diff --git a/meson.build b/meson.build index d28fc96a511..2ca81931a0e 100644 --- a/meson.build +++ b/meson.build @@ -413,7 +413,7 @@ endif _codecs = get_option('video-codecs') patent_codecs = ['vc1dec', 'h264dec', 'h264enc', 'h265dec', 'h265enc'] -free_codecs = ['av1dec', 'av1enc', 'vp9dec', 'jpegdec'] +free_codecs = ['av1dec', 'av1enc', 'vp9dec', 'mpeg12dec', 'jpegdec'] all_codecs = patent_codecs + free_codecs if _codecs.contains('all') diff --git a/meson.options b/meson.options index aa892f901d1..9a132f802c3 100644 --- a/meson.options +++ b/meson.options @@ -720,7 +720,7 @@ option( value : ['all_free'], choices: [ 'all', 'all_free', 'vc1dec', 'h264dec', 'h264enc', 'h265dec', 'h265enc', - 'av1dec', 'av1enc', 'vp9dec', 'jpegdec' + 'av1dec', 'av1enc', 'vp9dec', 'mpeg12dec', 'jpegdec' ], description : 'List of codecs to build support for. ' + 'Distros might want to consult their legal department before ' + diff --git a/src/gallium/auxiliary/vl/vl_codec.c b/src/gallium/auxiliary/vl/vl_codec.c index ebdc8a61fff..86d0b8670a2 100644 --- a/src/gallium/auxiliary/vl/vl_codec.c +++ b/src/gallium/auxiliary/vl/vl_codec.c @@ -57,6 +57,11 @@ bool vl_codec_supported(struct pipe_screen *screen, if (!VIDEO_CODEC_VC1DEC) return false; } + if (profile >= PIPE_VIDEO_PROFILE_MPEG1 && + profile <= PIPE_VIDEO_PROFILE_MPEG2_SIMPLE) { + if (!VIDEO_CODEC_MPEG12DEC) + return false; + } if (profile >= PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE && profile <= PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH444) { if (encode) {