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)
{
GetBitContext *gb = &s->HEVClc->gb;
sh->no_output_of_prior_pics_flag = 0;
if (IS_IRAP(s))
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);
if (sh->pps_id >= MAX_PPS_COUNT || !s->pps_list[sh->pps_id]) {
return AVERROR_INVALIDDATA;
}
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) {
const HEVCSPS* last_sps = s->sps;
s->sps = (HEVCSPS*)s->sps_list[s->pps->sps_id]->data;
- if (last_sps) {
- if (is_sps_exist(s, last_sps)) {
- 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 != last_sps->temporal_layer[last_sps->max_sub_layers - 1].max_dec_pic_buffering)
- sh->no_output_of_prior_pics_flag = 0;
- } else
+ if (last_sps && IS_IRAP(s) && s->nal_unit_type != NAL_CRA_NUT) {
+ 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 !=
+ last_sps->temporal_layer[last_sps->max_sub_layers - 1].max_dec_pic_buffering)
sh->no_output_of_prior_pics_flag = 0;
}
ff_hevc_clear_refs(s);
return AVERROR_INVALIDDATA;
}
- ff_hevc_set_qPy(s, x0, y0, cb_xBase, cb_yBase, log2_cb_size);
+ ff_hevc_set_qPy(s, cb_xBase, cb_yBase, log2_cb_size);
}
if (s->sh.cu_chroma_qp_offset_enabled_flag && cbf_chroma &&
}
if (s->pps->cu_qp_delta_enabled_flag && lc->tu.is_cu_qp_delta_coded == 0)
- ff_hevc_set_qPy(s, x0, y0, x0, y0, log2_cb_size);
+ ff_hevc_set_qPy(s, x0, y0, log2_cb_size);
x = y_cb * min_cb_width + x_cb;
for (y = 0; y < length; y++) {
s->frame->pict_type = 3 - s->sh.slice_type;
+ if (!IS_IRAP(s))
+ ff_hevc_bump_frame(s);
+
av_frame_unref(s->output_frame);
ret = ff_hevc_output_frame(s, s->output_frame, 0);
if (ret < 0)
}
if (s->sps != s0->sps)
- ret = set_sps(s, s0->sps);
+ if ((ret = set_sps(s, s0->sps)) < 0)
+ return ret;
s->seq_decode = s0->seq_decode;
s->seq_output = s0->seq_output;