aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2017-09-26 18:04:12 -0700
committerMichael Niedermayer <michael@niedermayer.cc>2018-04-13 00:35:15 +0200
commitbb5748ec9d244e22e783e2914b64abf64c0808e3 (patch)
tree71208cbff4ec430a390ec791990242a9120b6df5 /libavcodec
parent90cfaff0bbc79f133a2d8c9f67763ba90072c9f9 (diff)
downloadffmpeg-bb5748ec9d244e22e783e2914b64abf64c0808e3.tar.gz
avcodec/hevc_ps: extract SPS fields required for hvcC construction
Signed-off-by: Aman Gupta <aman@tmm1.net> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/hevc_ps.c3
-rw-r--r--libavcodec/hevc_ps.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index f2c26c4598..dc1429fa73 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -891,7 +891,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
return AVERROR_INVALIDDATA;
}
- skip_bits1(gb); // temporal_id_nesting_flag
+ sps->temporal_id_nesting_flag = get_bits(gb, 1);
if ((ret = parse_ptl(gb, avctx, &sps->ptl, sps->max_sub_layers)) < 0)
return ret;
@@ -954,6 +954,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
sps->bit_depth, bit_depth_chroma);
return AVERROR_INVALIDDATA;
}
+ sps->bit_depth_chroma = bit_depth_chroma;
ret = map_pixel_format(avctx, sps);
if (ret < 0)
diff --git a/libavcodec/hevc_ps.h b/libavcodec/hevc_ps.h
index 44de3980e1..26842ef189 100644
--- a/libavcodec/hevc_ps.h
+++ b/libavcodec/hevc_ps.h
@@ -151,6 +151,7 @@ typedef struct HEVCSPS {
HEVCWindow pic_conf_win;
int bit_depth;
+ int bit_depth_chroma;
int pixel_shift;
enum AVPixelFormat pix_fmt;
@@ -163,6 +164,7 @@ typedef struct HEVCSPS {
int num_reorder_pics;
int max_latency_increase;
} temporal_layer[HEVC_MAX_SUB_LAYERS];
+ uint8_t temporal_id_nesting_flag;
VUI vui;
PTL ptl;