| 766 | } |
| 767 | |
| 768 | static 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 | |
| 791 | static const enum AVPixelFormat mpeg1_hwaccel_pixfmt_list_420[] = { |
| 792 | #if CONFIG_MPEG1_NVDEC_HWACCEL |
nothing calls this directly
no test coverage detected