mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-30 19:34:43 +00:00
lavc/vaapi_decode: fix profile search when profile mismatch is allowed
When profile mismatch is allowed, use the highest supported profile for VAAPI decoding. Signed-off-by: Jun Zhao <jun.zhao@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
This commit is contained in:
parent
71e2ec017a
commit
217a723b4e
@ -281,7 +281,7 @@ static int vaapi_decode_make_config(AVCodecContext *avctx)
|
|||||||
VAStatus vas;
|
VAStatus vas;
|
||||||
int err, i, j;
|
int err, i, j;
|
||||||
const AVCodecDescriptor *codec_desc;
|
const AVCodecDescriptor *codec_desc;
|
||||||
VAProfile profile, *profile_list = NULL;
|
VAProfile profile, va_profile, *profile_list = NULL;
|
||||||
int profile_count, exact_match, alt_profile;
|
int profile_count, exact_match, alt_profile;
|
||||||
const AVPixFmtDescriptor *sw_desc, *desc;
|
const AVPixFmtDescriptor *sw_desc, *desc;
|
||||||
|
|
||||||
@ -328,6 +328,7 @@ static int vaapi_decode_make_config(AVCodecContext *avctx)
|
|||||||
if (exact_match)
|
if (exact_match)
|
||||||
break;
|
break;
|
||||||
alt_profile = vaapi_profile_map[i].codec_profile;
|
alt_profile = vaapi_profile_map[i].codec_profile;
|
||||||
|
va_profile = vaapi_profile_map[i].va_profile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
av_freep(&profile_list);
|
av_freep(&profile_list);
|
||||||
@ -347,6 +348,7 @@ static int vaapi_decode_make_config(AVCodecContext *avctx)
|
|||||||
av_log(avctx, AV_LOG_WARNING, "Using possibly-"
|
av_log(avctx, AV_LOG_WARNING, "Using possibly-"
|
||||||
"incompatible profile %d instead.\n",
|
"incompatible profile %d instead.\n",
|
||||||
alt_profile);
|
alt_profile);
|
||||||
|
profile = va_profile;
|
||||||
} else {
|
} else {
|
||||||
av_log(avctx, AV_LOG_VERBOSE, "Codec %s profile %d not "
|
av_log(avctx, AV_LOG_VERBOSE, "Codec %s profile %d not "
|
||||||
"supported for hardware decode.\n",
|
"supported for hardware decode.\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user