{
GstVaapiDecoderH264Private * const priv = &decoder->priv;
- if (dpb_size < priv->dpb_count)
- return FALSE;
-
if (dpb_size > priv->dpb_size_max) {
priv->dpb = g_try_realloc_n(priv->dpb, dpb_size, sizeof(*priv->dpb));
if (!priv->dpb)
(dpb_size - priv->dpb_size_max) * sizeof(*priv->dpb));
priv->dpb_size_max = dpb_size;
}
-
- if (priv->dpb_size < dpb_size)
- priv->dpb_size = dpb_size;
- else if (dpb_size < priv->dpb_count)
- return FALSE;
+ priv->dpb_size = dpb_size;
GST_DEBUG("DPB size %u", priv->dpb_size);
return TRUE;
GstVaapiProfile profile;
GstVaapiChromaType chroma_type;
gboolean reset_context = FALSE;
- guint mb_width, mb_height, dpb_size;
+ guint mb_width, mb_height, dpb_size, num_views;
+
+ num_views = get_num_views(sps);
+ if (priv->max_views < num_views) {
+ priv->max_views = num_views;
+ GST_DEBUG("maximum number of views changed to %u", num_views);
+ }
dpb_size = get_max_dec_frame_buffering(sps);
if (priv->dpb_size < dpb_size) {
if (result != GST_H264_PARSER_OK)
return get_status(result);
- /* Reset defaults */
- priv->max_views = 1;
-
priv->parser_state |= GST_H264_VIDEO_STATE_GOT_SPS;
return GST_VAAPI_DECODER_STATUS_SUCCESS;
}
GstH264NalUnit * const nalu = &pi->nalu;
GstH264SPS *sps;
GstH264ParserResult result;
- guint num_views;
GST_DEBUG("parse slice");
sps = slice_hdr->pps->sequence;
/* Update MVC data */
- num_views = get_num_views(sps);
- if (priv->max_views < num_views) {
- priv->max_views = num_views;
- GST_DEBUG("maximum number of views changed to %u", num_views);
- }
pi->view_id = get_view_id(&pi->nalu);
pi->voc = get_view_order_index(sps, pi->view_id);
static GstVaapiDecoderStatus
decode_sequence_end(GstVaapiDecoderH264 *decoder)
{
+ GstVaapiDecoderH264Private * const priv = &decoder->priv;
GstVaapiDecoderStatus status;
GST_DEBUG("decode sequence-end");
return status;
dpb_flush(decoder, NULL);
+
+ /* Reset defaults, should there be a new sequence available next */
+ priv->max_views = 1;
return GST_VAAPI_DECODER_STATUS_SUCCESS;
}