1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-14 20:33:00 +02:00

hevc: set profile based on the profile compatibility flags if needed

This fixes retrieving a valid profile for many of the FATE conformance samples,
allowing them to be properly decoded by the HWAccel after adding a profile check.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Hendrik Leppkes 2016-01-30 17:44:34 +01:00 committed by Anton Khirnov
parent fca3c3b619
commit 1ecb63cd1c

View File

@ -244,8 +244,12 @@ static void decode_profile_tier_level(GetBitContext *gb, AVCodecContext *avctx,
else else
av_log(avctx, AV_LOG_WARNING, "Unknown HEVC profile: %d\n", ptl->profile_idc); av_log(avctx, AV_LOG_WARNING, "Unknown HEVC profile: %d\n", ptl->profile_idc);
for (i = 0; i < 32; i++) for (i = 0; i < 32; i++) {
ptl->profile_compatibility_flag[i] = get_bits1(gb); ptl->profile_compatibility_flag[i] = get_bits1(gb);
if (ptl->profile_idc == 0 && i > 0 && ptl->profile_compatibility_flag[i])
ptl->profile_idc = i;
}
ptl->progressive_source_flag = get_bits1(gb); ptl->progressive_source_flag = get_bits1(gb);
ptl->interlaced_source_flag = get_bits1(gb); ptl->interlaced_source_flag = get_bits1(gb);
ptl->non_packed_constraint_flag = get_bits1(gb); ptl->non_packed_constraint_flag = get_bits1(gb);