You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
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>
This commit is contained in:
committed by
Michael Niedermayer
parent
2af82a1ad9
commit
06894f1a04
@@ -474,7 +474,7 @@ static int hls_slice_header(HEVCContext *s)
|
|||||||
sh->colour_plane_id = get_bits(gb, 2);
|
sh->colour_plane_id = get_bits(gb, 2);
|
||||||
|
|
||||||
if (!IS_IDR(s)) {
|
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);
|
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);
|
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;
|
s->poc = poc;
|
||||||
|
|
||||||
short_term_ref_pic_set_sps_flag = get_bits1(gb);
|
sh->short_term_ref_pic_set_sps_flag = get_bits1(gb);
|
||||||
if (!short_term_ref_pic_set_sps_flag) {
|
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);
|
ret = ff_hevc_decode_short_term_rps(s, &sh->slice_rps, s->sps, 1);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
sh->short_term_ref_pic_set_size = pos - get_bits_left(gb);
|
||||||
sh->short_term_rps = &sh->slice_rps;
|
sh->short_term_rps = &sh->slice_rps;
|
||||||
} else {
|
} else {
|
||||||
int numbits, rps_idx;
|
int numbits, rps_idx;
|
||||||
|
|||||||
@@ -575,6 +575,8 @@ typedef struct SliceHeader {
|
|||||||
uint8_t colour_plane_id;
|
uint8_t colour_plane_id;
|
||||||
|
|
||||||
///< RPS coded in the slice header itself is stored here
|
///< RPS coded in the slice header itself is stored here
|
||||||
|
int short_term_ref_pic_set_sps_flag;
|
||||||
|
int short_term_ref_pic_set_size;
|
||||||
ShortTermRPS slice_rps;
|
ShortTermRPS slice_rps;
|
||||||
const ShortTermRPS *short_term_rps;
|
const ShortTermRPS *short_term_rps;
|
||||||
LongTermRPS long_term_rps;
|
LongTermRPS long_term_rps;
|
||||||
|
|||||||
Reference in New Issue
Block a user