[Pkg-gstreamer-commits] [gstreamer-vaapi] 144/176: encoder: h264: fix level when bitrate is automatically computed.

Vincent Cheng vcheng at moszumanska.debian.org
Tue Jun 3 08:09:35 UTC 2014


This is an automated email from the git hooks/post-receive script.

vcheng pushed a commit to branch upstream
in repository gstreamer-vaapi.

commit 586f872085cc1c4e5722b225de3ba0170fe53efa
Author: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
Date:   Tue Jan 21 17:04:40 2014 +0100

    encoder: h264: fix level when bitrate is automatically computed.
    
    Fix level characterisation when the bitrate is automatically computed
    from the active coding tools. i.e. ensure the bitrate once the profile
    is completely characterized but before the level calculation process.
---
 gst-libs/gst/vaapi/gstvaapiencoder_h264.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
index 57b004b..e8008f4 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
@@ -1511,14 +1511,16 @@ ensure_profile_and_level (GstVaapiEncoderH264 * encoder)
   if (!ensure_profile (encoder) || !ensure_profile_limits (encoder))
     return GST_VAAPI_ENCODER_STATUS_ERROR_UNSUPPORTED_PROFILE;
 
-  if (!ensure_level (encoder))
-    return GST_VAAPI_ENCODER_STATUS_ERROR_OPERATION_FAILED;
-
   /* Check HW constraints */
   if (!ensure_hw_profile_limits (encoder))
     return GST_VAAPI_ENCODER_STATUS_ERROR_UNSUPPORTED_PROFILE;
   if (encoder->profile_idc > encoder->hw_max_profile_idc)
     return GST_VAAPI_ENCODER_STATUS_ERROR_UNSUPPORTED_PROFILE;
+
+  /* Ensure bitrate if not set already and derive the right level to use */
+  ensure_bitrate (encoder);
+  if (!ensure_level (encoder))
+    return GST_VAAPI_ENCODER_STATUS_ERROR_OPERATION_FAILED;
   return GST_VAAPI_ENCODER_STATUS_SUCCESS;
 }
 
@@ -1874,8 +1876,6 @@ gst_vaapi_encoder_h264_reconfigure (GstVaapiEncoder * base_encoder)
   if (status != GST_VAAPI_ENCODER_STATUS_SUCCESS)
     return status;
 
-  ensure_bitrate (encoder);
-
   reset_properties (encoder);
   return set_context_info (base_encoder);
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gstreamer/gstreamer-vaapi.git



More information about the Pkg-gstreamer-commits mailing list