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

Function alloc_enhanced_frame

libavcodec/lcevcdec.c:86–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86static 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
113static int lcevc_send_frame(void *logctx, FFLCEVCFrame *frame_ctx, const AVFrame *in)
114{

Callers 1

lcevc_send_frameFunction · 0.70

Calls 1

map_formatFunction · 0.70

Tested by

no test coverage detected