decoder: h264: skip SPS extension and auxiliary slice NALs.
authorZhong Cong <congx.zhong@intel.com>
Tue, 4 Jun 2013 07:01:46 +0000 (15:01 +0800)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Sat, 26 Apr 2014 12:38:59 +0000 (14:38 +0200)
When NAL units of type 13 (SPS extension) or type 19 (auxiliary slice)
are present in a video, decoders shall perform the (optional) decoding
process specified for these NAL units or shall ignore them (7.4.1).

Implement option 2 (skip) for now, as alpha composition is not
supported yet during the decoding process.

This fixes decoding of the primary coded video in alphaconformanceG.

https://bugzilla.gnome.org/show_bug.cgi?id=703928
https://bugzilla.gnome.org/show_bug.cgi?id=728869
https://bugzilla.gnome.org/show_bug.cgi?id=724518

[skip NAL units earlier, i.e. at parsing time]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
ext/codecparsers
gst-libs/gst/vaapi/gstvaapidecoder_h264.c

index a454f86..7eb3458 160000 (submodule)
@@ -1 +1 @@
-Subproject commit a454f860186efe61c874cc938aecd7818d2935d1
+Subproject commit 7eb3458a1629bf9d959b0957ffe4363a258fe86f
index 368eed8..c238061 100644 (file)
@@ -3166,6 +3166,11 @@ gst_vaapi_decoder_h264_parse(GstVaapiDecoder *base_decoder,
             flags |= GST_VAAPI_DECODER_UNIT_FLAG_FRAME_START;
         gst_vaapi_parser_info_h264_replace(&priv->prev_slice_pi, pi);
         break;
+    case GST_H264_NAL_SPS_EXT:
+    case GST_H264_NAL_SLICE_AUX:
+        /* skip SPS extension and auxiliary slice for now */
+        flags |= GST_VAAPI_DECODER_UNIT_FLAG_SKIP;
+        break;
     default:
         if (pi->nalu.type >= 14 && pi->nalu.type <= 18)
             flags |= GST_VAAPI_DECODER_UNIT_FLAG_FRAME_START;