Skip to content

Commit

Permalink
VDPAU: Fall 'back' to H264 Main profile for H264Baseline
Browse files Browse the repository at this point in the history
- as well as constrained baseline

(cherry picked from commit d3719e6)
  • Loading branch information
mark-kendall committed Jun 22, 2020
1 parent 9442315 commit bcd9a63
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mythtv/libs/libmythtv/decoders/mythvdpauhelper.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bcd9a63

Please sign in to comment.