summaryrefslogtreecommitdiff
path: root/libavcodec/hevc.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-01-25 13:01:08 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-27 12:37:34 +0100
commit06894f1a04dda384ab3632b2342f0f97ec9ebed9 (patch)
tree89cb4486b044489f78d59856daf04e175125d45c /libavcodec/hevc.c
parent2af82a1ad9f788ec3c1d22e15423996a4b161934 (diff)
hevc: store the short term rps flag and size in the context
For future use by hardware accelerators. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r--libavcodec/hevc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index bcbb889dfa..1a908d5693 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -474,7 +474,7 @@ static int hls_slice_header(HEVCContext *s)
sh->colour_plane_id = get_bits(gb, 2);
if (!IS_IDR(s)) {
- int short_term_ref_pic_set_sps_flag, poc;
+ int poc;
sh->pic_order_cnt_lsb = get_bits(gb, s->sps->log2_max_poc_lsb);
poc = ff_hevc_compute_poc(s, sh->pic_order_cnt_lsb);
@@ -487,12 +487,14 @@ static int hls_slice_header(HEVCContext *s)
}
s->poc = poc;
- short_term_ref_pic_set_sps_flag = get_bits1(gb);
- if (!short_term_ref_pic_set_sps_flag) {
+ sh->short_term_ref_pic_set_sps_flag = get_bits1(gb);
+ if (!sh->short_term_ref_pic_set_sps_flag) {
+ int pos = get_bits_left(gb);
ret = ff_hevc_decode_short_term_rps(s, &sh->slice_rps, s->sps, 1);
if (ret < 0)
return ret;
+ sh->short_term_ref_pic_set_size = pos - get_bits_left(gb);
sh->short_term_rps = &sh->slice_rps;
} else {
int numbits, rps_idx;