hevc: fix RAP_B_Bossen

cherry picked from commit 903236292f066bc321080e3e2192b64f8943d960

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/79/merge
Mickaël Raulet 11 years ago committed by Michael Niedermayer
parent bd0f2d316f
commit f6e218a02d
  1. 25
      libavcodec/hevc.c
  2. 1
      tests/fate/hevc.mak
  3. 29
      tests/ref/fate/hevc-conformance-RAP_B_Bossen_1

@ -362,17 +362,6 @@ fail:
return ret; return ret;
} }
static int is_sps_exist(HEVCContext *s, const HEVCSPS* last_sps)
{
int i;
for( i = 0; i < MAX_SPS_COUNT; i++)
if(s->sps_list[i])
if (last_sps == (HEVCSPS*)s->sps_list[i]->data)
return 1;
return 0;
}
static int hls_slice_header(HEVCContext *s) static int hls_slice_header(HEVCContext *s)
{ {
GetBitContext *gb = &s->HEVClc->gb; GetBitContext *gb = &s->HEVClc->gb;
@ -390,8 +379,6 @@ static int hls_slice_header(HEVCContext *s)
sh->no_output_of_prior_pics_flag = 0; sh->no_output_of_prior_pics_flag = 0;
if (IS_IRAP(s)) if (IS_IRAP(s))
sh->no_output_of_prior_pics_flag = get_bits1(gb); sh->no_output_of_prior_pics_flag = get_bits1(gb);
if (s->nal_unit_type == NAL_CRA_NUT && s->last_eos == 1)
sh->no_output_of_prior_pics_flag = 1;
sh->pps_id = get_ue_golomb_long(gb); sh->pps_id = get_ue_golomb_long(gb);
if (sh->pps_id >= MAX_PPS_COUNT || !s->pps_list[sh->pps_id]) { if (sh->pps_id >= MAX_PPS_COUNT || !s->pps_list[sh->pps_id]) {
@ -404,16 +391,16 @@ static int hls_slice_header(HEVCContext *s)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
s->pps = (HEVCPPS*)s->pps_list[sh->pps_id]->data; s->pps = (HEVCPPS*)s->pps_list[sh->pps_id]->data;
if (s->nal_unit_type == NAL_CRA_NUT && s->last_eos == 1)
sh->no_output_of_prior_pics_flag = 1;
if (s->sps != (HEVCSPS*)s->sps_list[s->pps->sps_id]->data) { if (s->sps != (HEVCSPS*)s->sps_list[s->pps->sps_id]->data) {
const HEVCSPS* last_sps = s->sps; const HEVCSPS* last_sps = s->sps;
s->sps = (HEVCSPS*)s->sps_list[s->pps->sps_id]->data; s->sps = (HEVCSPS*)s->sps_list[s->pps->sps_id]->data;
if (last_sps) { if (last_sps && IS_IRAP(s) && s->nal_unit_type != NAL_CRA_NUT) {
if (is_sps_exist(s, last_sps)) { if (s->sps->width != last_sps->width || s->sps->height != last_sps->height ||
if (s->sps->width != last_sps->width || s->sps->height != last_sps->height || s->sps->temporal_layer[s->sps->max_sub_layers - 1].max_dec_pic_buffering !=
s->sps->temporal_layer[s->sps->max_sub_layers - 1].max_dec_pic_buffering != last_sps->temporal_layer[last_sps->max_sub_layers - 1].max_dec_pic_buffering) last_sps->temporal_layer[last_sps->max_sub_layers - 1].max_dec_pic_buffering)
sh->no_output_of_prior_pics_flag = 0;
} else
sh->no_output_of_prior_pics_flag = 0; sh->no_output_of_prior_pics_flag = 0;
} }
ff_hevc_clear_refs(s); ff_hevc_clear_refs(s);

@ -165,6 +165,7 @@ HEVC_SAMPLES_444_12BIT = \
# AMP_E_Hisilicon_3 -- AMP_E_Hisilicon # AMP_E_Hisilicon_3 -- AMP_E_Hisilicon
# MVDL1ZERO_A_docomo_4 -- MVDL1ZERO_A_docomo_3 # MVDL1ZERO_A_docomo_4 -- MVDL1ZERO_A_docomo_3
# RAP_A_docomo_5 -- RAP_A_docomo_4 # RAP_A_docomo_5 -- RAP_A_docomo_4
# RAP_B_bossen_2 -- RAP_B_bossen_1
# RPS_A_docomo_5 -- RPS_A_docomo_4 # RPS_A_docomo_5 -- RPS_A_docomo_4
# RPS_F_docomo_2 -- RPS_F_docomo_1 # RPS_F_docomo_2 -- RPS_F_docomo_1

@ -66,19 +66,16 @@
0, 64, 64, 1, 149760, 0x3362678b 0, 64, 64, 1, 149760, 0x3362678b
0, 65, 65, 1, 149760, 0x6e7fc851 0, 65, 65, 1, 149760, 0x6e7fc851
0, 66, 66, 1, 149760, 0x33f96449 0, 66, 66, 1, 149760, 0x33f96449
0, 67, 67, 1, 149760, 0xd9d05007 0, 67, 67, 1, 149760, 0xb3ba8cfb
0, 68, 68, 1, 149760, 0x477f2cf2 0, 68, 68, 1, 149760, 0x64787995
0, 69, 69, 1, 149760, 0xe1f9ccd0 0, 69, 69, 1, 149760, 0xc10de4c4
0, 70, 70, 1, 149760, 0xb3ba8cfb 0, 70, 70, 1, 149760, 0x18dd343f
0, 71, 71, 1, 149760, 0x64787995 0, 71, 71, 1, 149760, 0xa1c51358
0, 72, 72, 1, 149760, 0xc10de4c4 0, 72, 72, 1, 149760, 0x91fe6361
0, 73, 73, 1, 149760, 0x18dd343f 0, 73, 73, 1, 149760, 0xeec85f94
0, 74, 74, 1, 149760, 0xa1c51358 0, 74, 74, 1, 149760, 0x00a57402
0, 75, 75, 1, 149760, 0x91fe6361 0, 75, 75, 1, 149760, 0x4e88cc16
0, 76, 76, 1, 149760, 0xeec85f94 0, 76, 76, 1, 149760, 0xdbd51976
0, 77, 77, 1, 149760, 0x00a57402 0, 77, 77, 1, 149760, 0xfebf6b1a
0, 78, 78, 1, 149760, 0x4e88cc16 0, 78, 78, 1, 149760, 0x052546d2
0, 79, 79, 1, 149760, 0xdbd51976 0, 79, 79, 1, 149760, 0x046cd73b
0, 80, 80, 1, 149760, 0xfebf6b1a
0, 81, 81, 1, 149760, 0x052546d2
0, 82, 82, 1, 149760, 0x046cd73b

Loading…
Cancel
Save