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

Function mpeg_decode_init

libavcodec/mpeg12dec.c:768–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

766}
767
768static av_cold int mpeg_decode_init(AVCodecContext *avctx)
769{
770 Mpeg1Context *s = avctx->priv_data;
771 MPVContext *const s2 = &s->slice.c;
772 int ret;
773
774 s2->slice_ctx_size = sizeof(s->slice);
775 s2->out_format = FMT_MPEG1;
776
777 if ( avctx->codec_tag != AV_RL32("VCR2")
778 && avctx->codec_tag != AV_RL32("BW10"))
779 avctx->coded_width = avctx->coded_height = 0; // do not trust dimensions from input
780 ret = ff_mpv_decode_init(s2, avctx);
781 if (ret < 0)
782 return ret;
783
784 ff_mpeg12_init_vlcs();
785
786 s2->chroma_format = CHROMA_420;
787 avctx->color_range = AVCOL_RANGE_MPEG;
788 return 0;
789}
790
791static const enum AVPixelFormat mpeg1_hwaccel_pixfmt_list_420[] = {
792#if CONFIG_MPEG1_NVDEC_HWACCEL

Callers

nothing calls this directly

Calls 2

ff_mpv_decode_initFunction · 0.85
ff_mpeg12_init_vlcsFunction · 0.85

Tested by

no test coverage detected