From bcd9a63ec012adeb4a028d6873c512bb93afa3e2 Mon Sep 17 00:00:00 2001 From: Mark Kendall Date: Mon, 22 Jun 2020 18:36:33 +0100 Subject: [PATCH] VDPAU: Fall 'back' to H264 Main profile for H264Baseline - as well as constrained baseline (cherry picked from commit d3719e6b110c76b188a3e4217ed5e253d2f6bd7b) --- mythtv/libs/libmythtv/decoders/mythvdpauhelper.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mythtv/libs/libmythtv/decoders/mythvdpauhelper.cpp b/mythtv/libs/libmythtv/decoders/mythvdpauhelper.cpp index 9bddec96d65..d529f1b5453 100644 --- a/mythtv/libs/libmythtv/decoders/mythvdpauhelper.cpp +++ b/mythtv/libs/libmythtv/decoders/mythvdpauhelper.cpp @@ -96,13 +96,16 @@ bool MythVDPAUHelper::ProfileCheck(VdpDecoderProfile Profile, uint32_t &Level, .arg(Profile).arg(supported).arg(Level).arg(Macros).arg(Width).arg(Height).arg(status)); if (((supported != VDP_TRUE) || (status != VDP_STATUS_OK)) && - (Profile == VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE)) + (Profile == VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE || + Profile == VDP_DECODER_PROFILE_H264_BASELINE)) { - LOG(VB_GENERAL, LOG_INFO, LOC + "Driver does not report support for H264 Constrained Baseline..."); + LOG(VB_GENERAL, LOG_INFO, LOC + QString("Driver does not report support for H264 %1Baseline") + .arg(Profile == VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE ? "Constrained " : "")); // H264 Constrained baseline is reported as not supported on older chipsets but // works due to support for H264 Main. Test for H264 main if constrained baseline // fails - which mimics the fallback in FFmpeg. + // Updated to included baseline... not so sure about that:) status = m_vdpDecoderQueryCapabilities(m_device, VDP_DECODER_PROFILE_H264_MAIN, &supported, &Level, &Macros, &Width, &Height); CHECK_ST @@ -350,9 +353,7 @@ bool MythVDPAUHelper::CheckH264Decode(AVCodecContext *Context) switch (Context->profile & ~FF_PROFILE_H264_INTRA) { case FF_PROFILE_H264_BASELINE: profile = VDP_DECODER_PROFILE_H264_BASELINE; break; -#ifdef VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE case FF_PROFILE_H264_CONSTRAINED_BASELINE: profile = VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE; break; -#endif case FF_PROFILE_H264_MAIN: profile = VDP_DECODER_PROFILE_H264_MAIN; break; case FF_PROFILE_H264_HIGH: profile = VDP_DECODER_PROFILE_H264_HIGH; break; #ifdef VDP_DECODER_PROFILE_H264_EXTENDED