Commit graph

18 commits

Author SHA1 Message Date
Thibault Saunier
019971a3c7 Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
Sebastian Dröge
ffa4d84e54 h2645parser: Catch overflows in AVC/HEVC NAL unit length calculations
Offset and size are stored as 32 bit guint and might overflow when
adding the nal_length_size, so let's avoid that.

For the size this would happen if the AVC/HEVC NAL unit size happens to
be stored in 4 bytes and is 4294967292 or higher, which is likely
corrupted data anyway.

For the offset this is something for the caller of these functions to
take care of but is unlikely to happen as it would require parsing on a
>4GB buffer.

Allowing these overflows causes all kinds of follow-up bugs in the
h2645parse elements, ranging from infinite loops and memory leaks to
potential memory corruptions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2103>
2021-03-24 09:22:48 +00:00
Haihao Xiang
4a93f6e651 h265parse: recognize more HEVC extension streams
There are streams which have the right general_profile_idc and
general_profile_compatibility_flag, but don't have the right extension
flags. We may try to use chroma_format_idc and bit_depth to
recognize these streams.

e.g.
https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/SCC/IBF_Disabled_A_MediaTek_2.zip

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1328>
2020-09-16 16:51:45 +00:00
Haihao Xiang
626af12498 h265parser: select the right profile for high throughput SCC stream
Currently screen-extended-high-throughput-444 is recognized as
screen-extended-main-444, screen-extended-high-throughput-444-10 is
recognized as screen-extended-main-444-10 because they have the same
extension flags, so without this patch, it is possible that a decoder
which supports SCC but doesn't support throughput SCC will try to decode
a throughput SCC stream.

e.g.
https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/SCC/HT_A_SCC_Apple_2.zip

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1328>
2020-09-16 16:51:45 +00:00
He Junyan
4ccd59eb24 test: h265parser: Add a test case for SCC extension.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1146>
2020-05-05 17:07:41 +00:00
He Junyan
3be186fe85 libs: parser: h265: Add SCC extension support.
Add support for screen content coding extensions profiles.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1146>
2020-05-05 17:07:41 +00:00
He Junyan
9082f103a4 test: h265parser: Add check for high throughput scc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1121>
2020-04-28 13:54:11 +00:00
He Junyan
be1cdca760 test: h265parser: Add more check or h265 extensions.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1121>
2020-04-28 13:54:11 +00:00
Seungha Yang
ce09ceb106 h265parser: Add a helper method to create SEI nal unit
Add an API to create raw SEI nal unit. This would be useful in case
an user want to create SEI nal data and inject the SEI nal data
into bitstream.
2020-04-02 09:20:11 +00:00
Seungha Yang
5ac018e949 tests: h265parser: Add test for registered user data SEI 2020-03-23 15:21:42 +00:00
Seungha Yang
959320264a h265parser: Add helper macro for nal type classification
Add some macros to remove code duplication and to make it more readable
2020-03-05 23:22:34 +09:00
Stéphane Cerveau
5881c1ad2d tests: add picture timing SEI parsing 2020-02-25 09:33:47 +00:00
Wangfei
5f63f59837 tests: h265parser: Add test parsing range extension in PPS 2019-08-31 23:22:44 +00:00
Seungha Yang
4e5894fa3d tests: h265parser: Add test parsing nonzero vps_max_layer_id in VPS 2018-11-07 16:13:44 +09:00
Nicolas Dufresne
95c99aa0a7 h265parser: Add same parsing test as for H264
This adds the same test as found in H264 test.
2018-11-06 07:26:03 +00:00
Guillaume Desmottes
6dd997541c h265parser: allow partial matching on range extension profile
Best to return a valid profiles rather than no profile if bitstream uses
a not standard profile.

https://bugzilla.gnome.org/show_bug.cgi?id=793876
2018-03-05 13:22:12 -05:00
Guillaume Desmottes
9f25fcdfc9 h265parse: add support for 'Format range extensions profiles'
Those profiles have been introduced in version 2 of the HEVC spec
(A.3.5).

https://bugzilla.gnome.org/show_bug.cgi?id=793876
2018-03-05 13:22:12 -05:00
Guillaume Desmottes
d252f503fc h265parser: decouple GstH265Profile and GstH265ProfileIDC
We used to have the same enum to represent H265 profiles and idc values.
Those are no longer the same with extension profiles defined from
version 2 of the spec.
Split those enums so the semantic of each is clearer and we'll be able
to add extension profiles to GstH265Profile.

Also add gst_h265_profile_tier_level_get_profile() to retrieve the
GstH265Profile from the GstH265ProfileTierLevel. It will be used to
implement the detection of extension profiles.

https://bugzilla.gnome.org/show_bug.cgi?id=793876
2018-03-05 13:19:42 -05:00