aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2023-02-28 20:44:38 +0100
committerLynne <dev@lynne.ee>2023-05-29 00:41:34 +0200
commitcc5fab5c48ea27a4133b8b913472dc59e19a2afb (patch)
treeb714741b171fb718fdb7f505ceaa569159ce2c5e
parent32fcb17e4213ddcad6d814f18ce762c3deb143e6 (diff)
downloadffmpeg-cc5fab5c48ea27a4133b8b913472dc59e19a2afb.tar.gz
hevc_ps: expose sublayer_ordering_info_flag
-rw-r--r--libavcodec/hevc_ps.c8
-rw-r--r--libavcodec/hevc_ps.h1
2 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 995b70f65d..8125d9cbd3 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -855,7 +855,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
{
HEVCWindow *ow;
int ret = 0;
- int bit_depth_chroma, start, sublayer_ordering_info, num_comps;
+ int bit_depth_chroma, start, num_comps;
int i, j;
// Coded parameters
@@ -961,8 +961,8 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
return AVERROR_INVALIDDATA;
}
- sublayer_ordering_info = get_bits1(gb);
- start = sublayer_ordering_info ? 0 : sps->max_sub_layers - 1;
+ sps->sublayer_ordering_info_flag = get_bits1(gb);
+ start = sps->sublayer_ordering_info_flag ? 0 : sps->max_sub_layers - 1;
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].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++) {
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;
diff --git a/libavcodec/hevc_ps.h b/libavcodec/hevc_ps.h
index 39212b43a7..182b671ef7 100644
--- a/libavcodec/hevc_ps.h
+++ b/libavcodec/hevc_ps.h
@@ -203,6 +203,7 @@ typedef struct HEVCSPS {
unsigned int log2_max_poc_lsb;
int pcm_enabled_flag;
+ uint8_t sublayer_ordering_info_flag;
int max_sub_layers;
struct {
int max_dec_pic_buffering;