| 84 | } |
| 85 | |
| 86 | static int alloc_enhanced_frame(void *logctx, FFLCEVCFrame *frame_ctx, |
| 87 | LCEVC_PictureHandle *picture) |
| 88 | { |
| 89 | FFLCEVCContext *lcevc = frame_ctx->lcevc; |
| 90 | LCEVC_PictureDesc desc ; |
| 91 | LCEVC_ColorFormat fmt = map_format(frame_ctx->frame->format); |
| 92 | LCEVC_PicturePlaneDesc planes[4] = { 0 }; |
| 93 | LCEVC_ReturnCode res; |
| 94 | |
| 95 | res = LCEVC_DefaultPictureDesc(&desc, fmt, frame_ctx->frame->width, frame_ctx->frame->height); |
| 96 | if (res != LCEVC_Success) |
| 97 | return AVERROR_EXTERNAL; |
| 98 | |
| 99 | /* Set plane description */ |
| 100 | for (int i = 0; i < 4; i++) { |
| 101 | planes[i].firstSample = frame_ctx->frame->data[i]; |
| 102 | planes[i].rowByteStride = frame_ctx->frame->linesize[i]; |
| 103 | } |
| 104 | |
| 105 | /* Allocate LCEVC Picture */ |
| 106 | res = LCEVC_AllocPictureExternal(lcevc->decoder, &desc, NULL, planes, picture); |
| 107 | if (res != LCEVC_Success) { |
| 108 | return AVERROR_EXTERNAL; |
| 109 | } |
| 110 | return 0; |
| 111 | } |
| 112 | |
| 113 | static int lcevc_send_frame(void *logctx, FFLCEVCFrame *frame_ctx, const AVFrame *in) |
| 114 | { |
no test coverage detected