gallium/vl: respect the video codecs configure in meson
Acked-by: Christian König <christian.koenig@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15258>
This commit is contained in:
@@ -32,5 +32,25 @@ bool vl_codec_supported(struct pipe_screen *screen,
|
||||
enum pipe_video_profile profile,
|
||||
bool encode)
|
||||
{
|
||||
if (profile == PIPE_VIDEO_PROFILE_VC1_SIMPLE ||
|
||||
profile == PIPE_VIDEO_PROFILE_VC1_MAIN ||
|
||||
profile == PIPE_VIDEO_PROFILE_VC1_ADVANCED) {
|
||||
return VIDEO_CODEC_VC1DEC ? true : false;
|
||||
}
|
||||
if (profile >= PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE &&
|
||||
profile <= PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH444) {
|
||||
if (encode)
|
||||
return VIDEO_CODEC_H264ENC ? true : false;
|
||||
else
|
||||
return VIDEO_CODEC_H264DEC ? true : false;
|
||||
}
|
||||
if (profile >= PIPE_VIDEO_PROFILE_HEVC_MAIN &&
|
||||
profile <= PIPE_VIDEO_PROFILE_HEVC_MAIN_444) {
|
||||
if (encode)
|
||||
return VIDEO_CODEC_H265ENC ? true : false;
|
||||
else
|
||||
return VIDEO_CODEC_H265DEC ? true : false;
|
||||
}
|
||||
|
||||
return screen->get_video_param(screen, profile, encode ? PIPE_VIDEO_ENTRYPOINT_ENCODE : PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CAP_SUPPORTED);
|
||||
}
|
||||
|
Reference in New Issue
Block a user