1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

hevc_ps: expose sublayer_ordering_info_flag

This commit is contained in:
Lynne 2023-02-28 20:44:38 +01:00
parent 32fcb17e42
commit cc5fab5c48
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
2 changed files with 5 additions and 4 deletions

View File

@ -855,7 +855,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
{ {
HEVCWindow *ow; HEVCWindow *ow;
int ret = 0; int ret = 0;
int bit_depth_chroma, start, sublayer_ordering_info, num_comps; int bit_depth_chroma, start, num_comps;
int i, j; int i, j;
// Coded parameters // Coded parameters
@ -961,8 +961,8 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
sublayer_ordering_info = get_bits1(gb); sps->sublayer_ordering_info_flag = get_bits1(gb);
start = sublayer_ordering_info ? 0 : sps->max_sub_layers - 1; start = sps->sublayer_ordering_info_flag ? 0 : sps->max_sub_layers - 1;
for (i = start; i < sps->max_sub_layers; i++) { for (i = start; i < sps->max_sub_layers; i++) {
sps->temporal_layer[i].max_dec_pic_buffering = get_ue_golomb_long(gb) + 1; sps->temporal_layer[i].max_dec_pic_buffering = get_ue_golomb_long(gb) + 1;
sps->temporal_layer[i].num_reorder_pics = get_ue_golomb_long(gb); sps->temporal_layer[i].num_reorder_pics = get_ue_golomb_long(gb);
@ -983,7 +983,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
} }
} }
if (!sublayer_ordering_info) { if (!sps->sublayer_ordering_info_flag) {
for (i = 0; i < start; i++) { for (i = 0; i < start; i++) {
sps->temporal_layer[i].max_dec_pic_buffering = sps->temporal_layer[start].max_dec_pic_buffering; sps->temporal_layer[i].max_dec_pic_buffering = sps->temporal_layer[start].max_dec_pic_buffering;
sps->temporal_layer[i].num_reorder_pics = sps->temporal_layer[start].num_reorder_pics; sps->temporal_layer[i].num_reorder_pics = sps->temporal_layer[start].num_reorder_pics;

View File

@ -203,6 +203,7 @@ typedef struct HEVCSPS {
unsigned int log2_max_poc_lsb; unsigned int log2_max_poc_lsb;
int pcm_enabled_flag; int pcm_enabled_flag;
uint8_t sublayer_ordering_info_flag;
int max_sub_layers; int max_sub_layers;
struct { struct {
int max_dec_pic_buffering; int max_dec_pic_buffering;