Commit graph

7 commits

Author SHA1 Message Date
He Junyan
05ee44b62b codecparsers: h265parser: return invalid profile if len is 0.
Though the profiles[0] is inited as GST_H265_PROFILE_INVALID in the
gst_h265_profile_tier_level_get_profile(), the profile detecting may
change its content later. So the return of profiles[0] may not be an
invalid profile even the len is 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1517>
2022-01-13 05:28:17 +00:00
He Junyan
9eb0f8501f codecparsers: h265parser: Fix the index incrementation error in append_profile().
The current "*idx++" operation just refers the pointer and increment the pointer
itself, not the content of the pointer. This causes that the count of the profiles
is always 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1517>
2022-01-13 05:28:17 +00:00
He Junyan
e1f9c6d559 codecparsers: h265parser: Correct the read of slice_sao_chroma_flag.
According to the SPEC, for parsing the slice header, we should read the
slice_sao_chroma_flag only when ChromaArrayType is not equal to 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1488>
2022-01-04 09:53:25 +08:00
Víctor Manuel Jáquez Leal
3040a26073 codecparsers: h265parser: Use a table map to get profile.
Instead of a sequence of if statements, declare a table to map profile
idc with profiles and traverse it.

Also, first add the profile from the parsed profile idc and later add,
into the profile array, the profile from the compatibility flags.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1440>
2021-12-16 17:08:30 +01:00
Víctor Manuel Jáquez Leal
168ad9f58f codecparsers: h265parser: Verify all possible profiles.
It's possible a HEVC stream to have multiple profiles given the
compatibility bits. Instead of returning a single profile, internal
gst_h265_profile_tier_level_get_profiles() returns an array with all
it possible profiles.

Profiles are appended into the array only if the generated profile
is not invalid.

gst_h265_profile_tier_level_get_profile() is rewritten in terms of
gst_h265_profile_tier_level_get_profiles(), returning the first
profile found the array.

And  gst_h265_get_profile_from_sps() is also rewritten in terms of
gst_h265_profile_tier_level_get_profiles(), but traversing the array
verifying if the proposed profile is actually valid by Annex A.3.x of
the specification.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1440>
2021-12-16 17:08:30 +01:00
Seungha Yang
4dd0c6ce44 codecparsers: {h264,h265}parser: Fix typo around SEI nalu generator
Fix to create correct SEI nalu when the size of payloadType and/or
payloadType is larger than 255 (0xff)

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1601
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1106>
2021-10-13 17:21:52 +00:00
Thibault Saunier
019971a3c7 Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
Renamed from gst-libs/gst/codecparsers/gsth265parser.c (Browse further)