Commit graph

517 commits

Author SHA1 Message Date
Yeongjin Jeong 3f2240498b h265parser: Add simple GstH265Profile/string public utilites
It makes more simplifies the conversion between GstH265Profile and string.
2019-12-20 15:43:55 +00:00
Stéphane Cerveau c6eb17be6e h264parse: Align GST_H264_PROFILE_HIGH_422 to H264 standards
According to H264 ITU standards from 06/19, GST_H264_PROFILE_HIGH_422
(profile_idc = 122) with constraint_set1_flag = 0 and
constraint_set3_flag = 0 can be mapped to high-4:2:2 or high-4:4:4.
GST_H264_PROFILE_HIGH_422 with constraint_set1_flag = 0 and
constraint_set3_flag = 1 can be mapped to high-4:2:2, high-4:4:4,
high-4:2:2-intra or high-4:4:4-intra.
2019-12-18 03:03:40 +00:00
Olivier Crête 1f766a7145 Revert "videoparseutils: support two new EIA 608 closed caption formats"
This reverts commit f5c1c90122.
2019-12-17 16:44:10 -05:00
Aaron Boxer f5c1c90122 videoparseutils: support two new EIA 608 closed caption formats 2019-12-17 18:26:35 +00:00
Aaron Boxer e3297be433 h264parse: buffer mismatch in map/unmap 2019-11-26 13:07:47 -05:00
Vivia Nikolaidou 851682629e videoparsers: Disable gst_base_parse_set_infer_ts
From the documentation of gst_base_parse_set_infer_ts, it should be
disabled for non-audio data. Currently just disabling for all video
parsers that have reordered data: h264, h265, mpeg, mpeg4, vc1. Was
already disabled in h263.
2019-11-19 10:23:31 +02:00
Nicolas Dufresne 44322b1dfc vc1parse: Avoid division by zero assertion
A framerate of 0/1 is valid, but we cannot calculate the frame duration
in this context. Simply protect against this case.

Related to #660
2019-11-11 16:23:18 -05:00
Nicolas Dufresne a5113fe8c8 vc1parser: Relax ASF Binding Byte validation
According to the spec, the least significant bit is reserved and should
always we set to 1. Though, some wrong file has been found. Considering
how low important this reserved bit is, relax the validation.

Related to #660
2019-11-11 16:22:54 -05:00
Aaron Boxer 1414e58dfa jpeg2000parse: fail caps negotiation if caps are NOT fixed 2019-11-05 21:21:51 +00:00
Aaron Boxer 7b3491adf7 jpeg2000parse: use pre_push_frame to reset parser 2019-11-05 21:21:51 +00:00
Aaron Boxer bfee115d66 jpeg2000parse: parse_event: call base class at end
derived class should do it's work first before calling base
2019-11-05 21:21:51 +00:00
Aaron Boxer 67cffd70ad jpeg2000parse: do hard reset if gst_base_parse_finish_frame fails 2019-11-05 21:21:51 +00:00
Aaron Boxer a35157debf jpeg2000parse: initialize some variables to make valgrind happy 2019-11-05 21:21:51 +00:00
Aaron Boxer fae0664824 jpeg2000parse: use GST_INT in caps for profile
Negotiation failed with GST_UINT
2019-11-05 21:21:51 +00:00
Aaron Boxer 1344d9f560 jpeg2000parse: make explicit that codec_format is for src caps 2019-11-05 21:21:51 +00:00
Aaron Boxer 969e30c035 jpeg2000parse: refactor
1. only recalculate src codec format if sink caps change
2. use correct value for "jp2c" magic in J2C box ID
3. only parse J2K magic once, and store result
4. more sanity checks comparing caps to parsed codec
2019-11-05 21:21:51 +00:00
Aaron Boxer 2b6b1a2b04 jpeg2000parse: set parsed to TRUE in src caps 2019-11-05 21:21:51 +00:00
Aaron Boxer 453a65b8e9 jpeg2000parse: only cache caps parameters when caps have in fact changed 2019-11-05 21:21:51 +00:00
Aaron Boxer ead5dba3ac jpeg2000parse: fix typos in media format 2019-11-05 21:21:51 +00:00
Aaron Boxer 88efbd2344 jpeg2000parse: add reset method
Also add three new struct members, currently unused.
2019-11-05 21:21:51 +00:00
Aaron Boxer 6d3429af34 documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
Yeongjin Jeong 732735cab0 h265parse: Fix wrong NALU minimum length check
Fixes a problem where an EOS/EOB NALU placed at the end of
an AU is detected as an other AU and create a buffer that
does not have valid pts.
2019-11-04 14:16:49 +09:00
Yeongjin Jeong 0318458b0e h264parse: Fix wrong NALU minimum length check
Fixes a problem where an EOS/EOB NALU placed at the end of
an AU is detected as an other AU and create a buffer that
does not have valid pts.
2019-11-04 14:16:49 +09:00
Tim-Philipp Müller f218ec2794 Remove autotools build system 2019-10-14 13:54:27 +01:00
Guillaume Desmottes 403cffeace h265parse: fix colorimetry in src caps if sink caps has no structure
We do want to include the colorimetry in the src caps if the sink caps
doesn't have any structure associated.
2019-08-27 06:06:01 +00:00
Guillaume Desmottes e0d9722a1b h264parse: fix colorimetry in src caps if sink caps has no structure
We do want to include the colorimetry in the src caps if the sink caps
doesn't have any structure associated.
2019-08-27 06:06:01 +00:00
Aaron Boxer 40212aaf00 h265parse: add support for SEI registered user data 2019-08-26 18:14:17 -04:00
Aaron Boxer b7558bd190 h264parse: use gstvideoparseutils to handle user data 2019-08-26 18:14:17 -04:00
Aaron Boxer d5946fc804 mpegvideoparse: use gstvideoparseutils to handle user data 2019-08-26 18:14:17 -04:00
Aaron Boxer 22ec7fbbc2 videoparseutils: add new parser class 2019-08-26 18:14:17 -04:00
Matthew Waters 062ca5e55b h264parse: don't critical on VUI parameters > 2^31
A guint32 greater than 2^31 would be interpreted as negative by
gst_util_uint64_scale_int() and critical. Use the 64-bit integer version
of the function instead.
2019-08-20 18:12:56 +10:00
Seungha Yang b624c6a067 h265parse: Fix mastering display info parsing
Fix mismatched Red Y coordinate value.
2019-08-08 20:01:41 +09:00
Fuwei Tang f3587c61ba h264parse: fix issue that caps "interlace-mode" can't be updated correctly
Upstream overrides the info "interlace-mode", otherwise update it with
SPS info.
2019-08-06 09:47:36 +08:00
Marc Leeman f5e7b4bd73 mpeg4videoparse: allow sending config at IDR
Based on h264parse, also allow to send the config at every IDR.
2019-07-31 18:03:19 +00:00
Seungha Yang 5e7dbdf585 h265parse: Add support for compatible profiles of extensions
From decoder's capability point of view as defined by the h265 specification,
accept peer profile caps.
2019-07-31 00:32:40 +09:00
Mathieu Duponchelle 2305bf272c h26{4,5}parse: add support for forward predicted trick mode
Also stop assigning TRUE to fields with |=
2019-07-18 13:46:45 +00:00
Seungha Yang 06d85ca487 h264parse: Update caps per pixel aspect ratio change
Output caps should be updated per pixel aspect ratio change.
2019-07-16 17:53:42 +00:00
Seungha Yang 0e4efb86c8 h265parse: Expose parsed colorimetry when VUI provided it
... and also if upstream did not specify the colorimetry.
2019-07-16 17:53:42 +00:00
Seungha Yang 375acd5a79 h264parse: Expose parsed colorimetry when VUI provided it
... and also if upstream did not specify the colorimetry.
2019-07-16 17:53:42 +00:00
Jan Schmidt 8899a471e3 h264parse lib: Remove the SPS parse_vui_params flag
The SPS parsing functions take a parse_vui_param flag
to skip VUI parsing, but there's no indication in the output
SPS struct that the VUI was skipped.

The only caller that ever passed FALSE seems to be the
important gst_h264_parser_parse_nal() function, meaning - so the
cached SPS were always silently invalid. That needs changing
anyway, meaning noone ever passes FALSE.

I don't see any use for saving a few microseconds in
order to silently produce garbage, and since this is still
unstable API, let's remove the parse_vui_param.
2019-07-05 00:17:59 +10:00
Jan Schmidt bd46630b62 h265parse: Don't segfault when SPS hasn't been seen yet.
Fix a recently introduced segfault. Don't de-reference a NULL
SPS pointer when attempting to update source caps before SPS
has been seen in the stream.
2019-07-04 01:12:06 +10:00
Sebastian Dröge 324e55a3cd mpegvideoparse: Pass through interlace-mode field from upstream if available
We generally always prefer the information from upstream for other
metadata (pixel-aspect-ration, etc.) and should also do so here.

Other parsers (h264parse) already do the same.
2019-06-19 12:49:01 +00:00
Nicola Murino 59d8e56e95 h265parse: update parser state and header flag when using fallback sps
When sps parsing fails we use a fallback sps from the caps, since we
have got an sps we need to update parser state and header as in the case the
sps was successfully parsed
2019-06-15 20:02:10 -04:00
Nicola Murino c22b52ef4d h264parse: update parser state and header flag when using fallback sps
When sps parsing fails we use a fallback sps from the caps, since we
have got an sps we need to update parser state and header as in the case the
sps was successfully parsed

Closes #503
2019-06-15 20:02:10 -04:00
Thibault Saunier 475628c20e h264parse: Post a WARNING when data is broken 2019-06-15 23:13:43 +00:00
Seungha Yang 4f6ac87f67 h265parse: Add more string representations of extension profiles 2019-06-13 23:05:09 -04:00
Dong Il Park 392f86ae35 h265parse: Update framerate when we found vps_timing_info
The timing_info was described at vps or vui parameter.
So we can update the framerate field of GstCaps when we could
parse vps_timing_info parameters.
2019-06-14 02:15:46 +00:00
Seungha Yang 6843b663b6 h265parse: Don't miss constraint indicator flags in codec data
Set more unhandled flags to general_constraint_indicator_flags field.
The field is required for building "Codecs" parameter as defined
ISO/IEC 14496-15 Annex E. The resulting "Codecs" string might be used
in various places (e.g., HLS/DASH manifest, browser, player, etc)
2019-06-11 21:15:49 +09:00
Thibault Saunier 47a49f3381 docs: Build documentation with hotdoc 2019-05-13 17:00:00 -04:00
Seungha Yang a24367132b h265parse: Parse mastering display info and content light level from SEI
... and set to caps if necessary.

Note 1) the mastering display info and content light level SEI meessages
are persistent in the corresponding codec video sequence (i.e., GOP).
So any bitstream containing those SEI messages
(and also all pictures are intended to be HDR rendered) should be ensured that
each first slice of codec video sequence follows those SEI messages.

Note 2) The codec video sequence is a group an [IRAP + NoRaslOutputFlag == 1]
and following AUs which are not [IRAP + NoRaslOutputFlag == 1]
The NoRaslOutputFlag is equal to 1 for each IDR AU, BLA AU and some CRA AU.
For a CRA AU to have NoRaslOutputFlag equal to 1, following condition should required.
* When the CRA AU is the first AU in the bitstream in decoding order
* or the CRA AU is the first AU that follows an end of sequence NAL in decoding order
* or the HandleCraAsBlaFlag equal to 1.

Due to the limited context in parse element, in this commint, CRA AU will not considered as
having the NoRaslOutputFlag equal to 1. Therefore, in the worst case,
mastering-display-info and content-light-level could be cleared one GOP after
when stream was chagned from HDR to SDR.
2019-05-03 19:44:15 +00:00