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

Function ff_mpv_decode_init

libavcodec/mpegvideo_dec.c:86–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84H264_CHROMA_MC(avg_, op_avg)
85
86av_cold int ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx)
87{
88 enum ThreadingStatus thread_status;
89
90 ff_mpv_common_defaults(s);
91
92 s->avctx = avctx;
93 s->width = avctx->coded_width;
94 s->height = avctx->coded_height;
95 s->codec_id = avctx->codec->id;
96 s->workaround_bugs = avctx->workaround_bugs;
97
98 /* convert fourcc to upper case */
99 s->codec_tag = ff_toupper4(avctx->codec_tag);
100
101 ff_mpv_idct_init(s);
102
103 ff_h264chroma_init(&s->h264chroma, 8); //for lowres
104 s->h264chroma.avg_h264_chroma_pixels_tab[3] = avg_h264_chroma_mc1;
105 s->h264chroma.put_h264_chroma_pixels_tab[3] = put_h264_chroma_mc1;
106
107 if (s->picture_pool) // VC-1 can call this multiple times
108 return 0;
109
110 thread_status = ff_thread_sync_ref(avctx, offsetof(MpegEncContext, picture_pool));
111 if (thread_status != FF_THREAD_IS_COPY) {
112 s->picture_pool = ff_mpv_alloc_pic_pool(thread_status != FF_THREAD_NO_FRAME_THREADING);
113 if (!s->picture_pool)
114 return AVERROR(ENOMEM);
115 }
116 return 0;
117}
118
119int ff_mpeg_update_thread_context(AVCodecContext *dst,
120 const AVCodecContext *src)

Callers 5

ff_h263_decode_initFunction · 0.85
ff_rv34_decode_initFunction · 0.85
h261_decode_initFunction · 0.85
mpeg_decode_initFunction · 0.85
ff_vc1_decode_initFunction · 0.85

Calls 6

ff_mpv_common_defaultsFunction · 0.85
ff_toupper4Function · 0.85
ff_mpv_idct_initFunction · 0.85
ff_h264chroma_initFunction · 0.85
ff_mpv_alloc_pic_poolFunction · 0.85
ff_thread_sync_refFunction · 0.70

Tested by

no test coverage detected