1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

lavc/hevc: Add poc_msb_present filed in LongTermRPS

delta_poc_msb_present_flag is needed in find_ref_idx() to
indicate whether MSB of POC should be taken into account.

Details in 8.3.2.

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
This commit is contained in:
Xu Guangxin 2020-05-12 21:42:49 +08:00 committed by Linjie Fu
parent d5f87f8567
commit 939a4db227
2 changed files with 3 additions and 3 deletions

View File

@ -41,6 +41,7 @@ typedef struct ShortTermRPS {
typedef struct LongTermRPS {
int poc[32];
uint8_t poc_msb_present[32];
uint8_t used[32];
uint8_t nb_refs;
} LongTermRPS;

View File

@ -280,7 +280,6 @@ static int decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitContext *gb)
rps->nb_refs = nb_sh + nb_sps;
for (i = 0; i < rps->nb_refs; i++) {
uint8_t delta_poc_msb_present;
if (i < nb_sps) {
uint8_t lt_idx_sps = 0;
@ -295,8 +294,8 @@ static int decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitContext *gb)
rps->used[i] = get_bits1(gb);
}
delta_poc_msb_present = get_bits1(gb);
if (delta_poc_msb_present) {
rps->poc_msb_present[i] = get_bits1(gb);
if (rps->poc_msb_present[i]) {
int64_t delta = get_ue_golomb_long(gb);
int64_t poc;