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

Function update_frame_props

libavcodec/decode.c:1666–1693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1664}
1665
1666static int update_frame_props(AVCodecContext *avctx, AVFrame *frame)
1667{
1668#if CONFIG_LIBLCEVC_DEC
1669 AVCodecInternal *avci = avctx->internal;
1670 DecodeContext *dc = decode_ctx(avci);
1671
1672 dc->lcevc.frame = dc->lcevc.ctx && avctx->codec_type == AVMEDIA_TYPE_VIDEO &&
1673 av_frame_get_side_data(frame, AV_FRAME_DATA_LCEVC);
1674
1675 if (dc->lcevc.frame) {
1676 int ret = ff_lcevc_parse_frame(dc->lcevc.ctx, frame,
1677 &dc->lcevc.width, &dc->lcevc.height, avctx);
1678 if (ret < 0)
1679 return ret;
1680
1681 // force get_buffer2() to allocate the base frame using the same dimensions
1682 // as the final enhanced frame, in order to prevent reinitializing the buffer
1683 // pools unnecessarely
1684 if (dc->lcevc.width && dc->lcevc.height) {
1685 dc->lcevc.base_width = frame->width;
1686 dc->lcevc.base_height = frame->height;
1687 frame->width = dc->lcevc.width;
1688 frame->height = dc->lcevc.height;
1689 }
1690 }
1691#endif
1692 return 0;
1693}
1694
1695static int attach_post_process_data(AVCodecContext *avctx, AVFrame *frame)
1696{

Callers 1

ff_get_bufferFunction · 0.85

Calls 3

decode_ctxFunction · 0.85
av_frame_get_side_dataFunction · 0.85
ff_lcevc_parse_frameFunction · 0.85

Tested by

no test coverage detected