After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740748 - h265parse: Fix the logic for constructing a complete AU
h265parse: Fix the logic for constructing a complete AU
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.4.4
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-26 13:01 UTC by KyungYong KIM
Modified: 2018-11-03 13:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to consider all VLC slices (1.95 KB, patch)
2015-03-19 21:47 UTC, Matej Knopp
none Details | Review

Description KyungYong KIM 2014-11-26 13:01:49 UTC
In h265parse, it doesn't consider all nal_unit_type about VCL(Video Coding Layer) to construct a complete AU.
It can resolve using following patch.

diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c
index 2d7b997..4a36e3b 100644
--- a/gst/videoparsers/gsth265parse.c
+++ b/gst/videoparsers/gsth265parse.c
@@ -693,10 +693,8 @@ gst_h265_parse_collect_nal (GstH265Parse * h265parse, const
   GST_LOG_OBJECT (h265parse, "nal type: %d %s", nal_type, _nal_name (nal_type))
   /* coded slice NAL starts a picture,
    * i.e. other types become aggregated in front of it */
-  h265parse->picture_start |= ((nal_type >= GST_H265_NAL_SLICE_TRAIL_N
-          && nal_type <= GST_H265_NAL_SLICE_TRAIL_R)
-      || (nal_type >= GST_H265_NAL_SLICE_BLA_W_LP
-          && nal_type <= RESERVED_IRAP_NAL_TYPE_MAX));
+  h265parse->picture_start |= (nal_type >= GST_H265_NAL_SLICE_TRAIL_N
+          && nal_type <= RESERVED_IRAP_NAL_TYPE_MAX);

   /* consider a coded slices (IRAP or not) to start a picture,
    * (so ending the previous one) if first_slice_segment_in_pic_flag == 1*/
@@ -711,10 +709,8 @@ gst_h265_parse_collect_nal (GstH265Parse * h265parse, const

   /* Any VCL Nal unit with first_slice_segment_in_pic_flag == 1 considered star
   complete |= h265parse->picture_start
-      && (((nal_type >= GST_H265_NAL_SLICE_TRAIL_N
-              && nal_type <= GST_H265_NAL_SLICE_TRAIL_R)
-          || (nal_type >= GST_H265_NAL_SLICE_BLA_W_LP
-              && nal_type <= RESERVED_IRAP_NAL_TYPE_MAX))
+      && ((nal_type >= GST_H265_NAL_SLICE_TRAIL_N
+              && nal_type <= RESERVED_IRAP_NAL_TYPE_MAX)
       && (nnalu.data[nnalu.offset + 2] & 0x80));

   GST_LOG_OBJECT (h265parse, "au complete: %d", complete);
Comment 1 Sebastian Dröge (slomo) 2014-11-27 10:38:54 UTC
Thanks for your patch, but can you attach it to this bug in "git format-patch" format?
Comment 2 Nicolas Dufresne (ndufresne) 2015-03-19 21:39:44 UTC
ping ?
Comment 3 Matej Knopp 2015-03-19 21:47:59 UTC
Created attachment 299879 [details] [review]
Patch to consider all VLC slices
Comment 4 Matej Knopp 2015-03-19 21:51:17 UTC
Sample file: http://www.elecard.com/assets/files/other/clips/bbb_720p_c.ts

This clearly breaks the decoding of the linked file. But the code seems to intentionally only check some of the slices - can someone explain why? Maybe there is something else to consider?

Possibly related: With sample file the parser outputs thousands of FIXME messages:
   Implement timestamp/duration interpolation based on SEI message

If no one is working on this, maybe the priority could be reduced?
Comment 5 Nicolas Dufresne (ndufresne) 2018-10-13 19:42:10 UTC
Do you have suffix SEI ? or some reserved SUFFIX included in the check ? It seems like a common mistake with H265, specially for those coming from H264 background.
Comment 6 GStreamer system administrator 2018-11-03 13:28:57 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/194.