From: Gwenole Beauchesne Date: Mon, 30 Jun 2014 14:12:52 +0000 (+0200) Subject: decoder: h264: decode current picture earlier. X-Git-Tag: 0.5.9~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=8bdef56cd42d920bcfd81ebe3273d15e02d15c13;hp=f48b1e0cd6eb42d9260bb50318b44cdc2fbb8629;p=platform%2Fupstream%2Fgstreamer-vaapi.git decoder: h264: decode current picture earlier. Slightly optimize decoding process by submitting the current VA surface for decoding earlier to the hardware, and perform the reference picture marking process and DPB update process afterwards. This is a minor optimization to let the video decode engine kick in work earlier, thus improving parallel resources utilization. --- diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index 0b3d0c6..fe3f628 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -1463,12 +1463,12 @@ decode_current_picture(GstVaapiDecoderH264 *decoder) if (!picture) return GST_VAAPI_DECODER_STATUS_SUCCESS; + if (!gst_vaapi_picture_decode(GST_VAAPI_PICTURE_CAST(picture))) + goto error; if (!exec_ref_pic_marking(decoder, picture)) goto error; if (!dpb_add(decoder, picture)) goto error; - if (!gst_vaapi_picture_decode(GST_VAAPI_PICTURE_CAST(picture))) - goto error; gst_vaapi_picture_replace(&priv->current_picture, NULL); return GST_VAAPI_DECODER_STATUS_SUCCESS;