| 2678 | } |
| 2679 | |
| 2680 | static 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 | |
| 2702 | static int decode_bl16(AVCodecContext *avctx,int *got_frame_ptr) |
| 2703 | { |
no test coverage detected