|
|
@ -29,6 +29,7 @@ |
|
|
|
#include "h2645_vui.h" |
|
|
|
#include "h2645_vui.h" |
|
|
|
#include "data.h" |
|
|
|
#include "data.h" |
|
|
|
#include "ps.h" |
|
|
|
#include "ps.h" |
|
|
|
|
|
|
|
#include "profiles.h" |
|
|
|
#include "refstruct.h" |
|
|
|
#include "refstruct.h" |
|
|
|
|
|
|
|
|
|
|
|
static const uint8_t default_scaling_list_intra[] = { |
|
|
|
static const uint8_t default_scaling_list_intra[] = { |
|
|
@ -244,6 +245,7 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, |
|
|
|
static int decode_profile_tier_level(GetBitContext *gb, AVCodecContext *avctx, |
|
|
|
static int decode_profile_tier_level(GetBitContext *gb, AVCodecContext *avctx, |
|
|
|
PTLCommon *ptl) |
|
|
|
PTLCommon *ptl) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
const char *profile_name = NULL; |
|
|
|
int i; |
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
|
|
if (get_bits_left(gb) < 2+1+5 + 32 + 4 + 43 + 1) |
|
|
|
if (get_bits_left(gb) < 2+1+5 + 32 + 4 + 43 + 1) |
|
|
@ -252,18 +254,16 @@ static int decode_profile_tier_level(GetBitContext *gb, AVCodecContext *avctx, |
|
|
|
ptl->profile_space = get_bits(gb, 2); |
|
|
|
ptl->profile_space = get_bits(gb, 2); |
|
|
|
ptl->tier_flag = get_bits1(gb); |
|
|
|
ptl->tier_flag = get_bits1(gb); |
|
|
|
ptl->profile_idc = get_bits(gb, 5); |
|
|
|
ptl->profile_idc = get_bits(gb, 5); |
|
|
|
if (ptl->profile_idc == AV_PROFILE_HEVC_MAIN) |
|
|
|
|
|
|
|
av_log(avctx, AV_LOG_DEBUG, "Main profile bitstream\n"); |
|
|
|
#if !CONFIG_SMALL |
|
|
|
else if (ptl->profile_idc == AV_PROFILE_HEVC_MAIN_10) |
|
|
|
for (int i = 0; ff_hevc_profiles[i].profile != AV_PROFILE_UNKNOWN; i++) |
|
|
|
av_log(avctx, AV_LOG_DEBUG, "Main 10 profile bitstream\n"); |
|
|
|
if (ff_hevc_profiles[i].profile == ptl->profile_idc) { |
|
|
|
else if (ptl->profile_idc == AV_PROFILE_HEVC_MAIN_STILL_PICTURE) |
|
|
|
profile_name = ff_hevc_profiles[i].name; |
|
|
|
av_log(avctx, AV_LOG_DEBUG, "Main Still Picture profile bitstream\n"); |
|
|
|
break; |
|
|
|
else if (ptl->profile_idc == AV_PROFILE_HEVC_REXT) |
|
|
|
} |
|
|
|
av_log(avctx, AV_LOG_DEBUG, "Range Extension profile bitstream\n"); |
|
|
|
#endif |
|
|
|
else if (ptl->profile_idc == AV_PROFILE_HEVC_SCC) |
|
|
|
av_log(avctx, profile_name ? AV_LOG_DEBUG : AV_LOG_WARNING, |
|
|
|
av_log(avctx, AV_LOG_DEBUG, "Screen Content Coding Extension profile bitstream\n"); |
|
|
|
"%s profile bitstream\n", profile_name ? profile_name : "Unknown"); |
|
|
|
else |
|
|
|
|
|
|
|
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); |
|
|
|