[Pkg-gstreamer-commits] [gstreamer-vaapi] 54/176: decoder: h264: fix decoding of BA3_SVA_C.264.
Vincent Cheng
vcheng at moszumanska.debian.org
Tue Jun 3 08:09:27 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 1dd89800b0e895b0b699889c3ef4617dca95c6c5
Author: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
Date: Tue Dec 10 14:20:55 2013 +0100
decoder: h264: fix decoding of BA3_SVA_C.264.
Conformance test Base_Ext_Main_profiles/BA3_SVA_C.264 complys with
extended profile specifications. However, the SPS header has the
constraint_set1_flag syntax element set to 1. This means that, if
a Main profile compliant decoder is available, then it should be
able to decode this stream.
This changes makes it possible to fall-back from Extended profile
to Main profile if constraint_set1_flag is set to 1.
https://bugzilla.gnome.org/show_bug.cgi?id=720190
---
gst-libs/gst/vaapi/gstvaapidecoder_h264.c | 41 +++++++++++++++++++++++--------
1 file changed, 31 insertions(+), 10 deletions(-)
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
index 4fa8e50..1d1be55 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
@@ -752,6 +752,23 @@ gst_vaapi_decoder_h264_create(GstVaapiDecoder *base_decoder)
return TRUE;
}
+static void
+fill_profiles(GstVaapiProfile profiles[16], guint *n_profiles_ptr,
+ GstVaapiProfile profile)
+{
+ guint n_profiles = *n_profiles_ptr;
+
+ profiles[n_profiles++] = profile;
+ switch (profile) {
+ case GST_VAAPI_PROFILE_H264_MAIN:
+ profiles[n_profiles++] = GST_VAAPI_PROFILE_H264_HIGH;
+ break;
+ default:
+ break;
+ }
+ *n_profiles_ptr = n_profiles;
+}
+
static GstVaapiProfile
get_profile(GstVaapiDecoderH264 *decoder, GstH264SPS *sps)
{
@@ -764,17 +781,21 @@ get_profile(GstVaapiDecoderH264 *decoder, GstH264SPS *sps)
if (!profile)
return GST_VAAPI_PROFILE_UNKNOWN;
- if (sps->constraint_set1_flag && profile == GST_VAAPI_PROFILE_H264_BASELINE)
- profile = GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE;
-
- profiles[n_profiles++] = profile;
+ fill_profiles(profiles, &n_profiles, profile);
switch (profile) {
- case GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE:
- profiles[n_profiles++] = GST_VAAPI_PROFILE_H264_BASELINE;
- profiles[n_profiles++] = GST_VAAPI_PROFILE_H264_MAIN;
- // fall-through
- case GST_VAAPI_PROFILE_H264_MAIN:
- profiles[n_profiles++] = GST_VAAPI_PROFILE_H264_HIGH;
+ case GST_VAAPI_PROFILE_H264_BASELINE:
+ if (sps->constraint_set1_flag) { // A.2.2 (main profile)
+ fill_profiles(profiles, &n_profiles,
+ GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE);
+ fill_profiles(profiles, &n_profiles,
+ GST_VAAPI_PROFILE_H264_MAIN);
+ }
+ break;
+ case GST_VAAPI_PROFILE_H264_EXTENDED:
+ if (sps->constraint_set1_flag) { // A.2.2 (main profile)
+ fill_profiles(profiles, &n_profiles,
+ GST_VAAPI_PROFILE_H264_MAIN);
+ }
break;
default:
break;
--
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