mpeg2: fix decoding of multiple slices with same slice_vertical_position.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 23 Feb 2012 10:19:48 +0000 (11:19 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 23 Feb 2012 10:19:48 +0000 (11:19 +0100)
6.3.15 says that "some slices may have the same slice_vertical_position,
since slices may start and finish anywhere". So, we can't submit the current
picture to the HW right away since subsequent slices would be missing.

gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c

index 7b57c12..e782577 100644 (file)
@@ -577,7 +577,6 @@ decode_slice(
     GstVaapiPicture * const picture = priv->current_picture;
     GstVaapiSlice *slice;
     VASliceParameterBufferMPEG2 *slice_param;
-    GstVaapiDecoderStatus status;
     GstBitReader br;
     guint8 slice_vertical_position_extension;
     guint8 quantiser_scale_code;
@@ -633,14 +632,6 @@ decode_slice(
     slice_param->slice_vertical_position   = priv->mb_y;
     slice_param->quantiser_scale_code      = quantiser_scale_code;
     slice_param->intra_slice_flag          = intra_slice;
-
-    /* Commit picture for decoding if we reached the last slice */
-    if (++priv->mb_y >= priv->mb_height) {
-        status = decode_current_picture(decoder);
-        if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
-            return status;
-        GST_DEBUG("done");
-    }
     return GST_VAAPI_DECODER_STATUS_SUCCESS;
 
 failed: