MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / copy_output

Function copy_output

libavcodec/sanm.c:2680–2700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2678}
2679
2680static int copy_output(SANMVideoContext *ctx, int sanm)
2681{
2682 uint8_t *dst;
2683 const uint8_t *src = sanm ? (uint8_t *)ctx->frm0 : (uint8_t *)ctx->fbuf;
2684 int ret, height = ctx->height;
2685 ptrdiff_t dstpitch, srcpitch = ctx->pitch * (sanm ? sizeof(ctx->frm0[0]) : 1);
2686
2687 if ((ret = ff_get_buffer(ctx->avctx, ctx->frame, 0)) < 0)
2688 return ret;
2689
2690 dst = ctx->frame->data[0];
2691 dstpitch = ctx->frame->linesize[0];
2692
2693 while (height--) {
2694 memcpy(dst, src, srcpitch);
2695 src += srcpitch;
2696 dst += dstpitch;
2697 }
2698
2699 return 0;
2700}
2701
2702static int decode_bl16(AVCodecContext *avctx,int *got_frame_ptr)
2703{

Callers 2

decode_bl16Function · 0.85
decode_animFunction · 0.85

Calls 1

ff_get_bufferFunction · 0.85

Tested by

no test coverage detected