Commit graph

344 commits

Author SHA1 Message Date
Edward Hervey
7ecb3dc917 nalutils: Fix Exponential-Golomb 'ue' parsing
The algorithm we use only supports up to a maximum exponent of 31
(for a maximum resulting of 2**32 -1)

CID #1427097
2018-01-02 15:37:32 +01:00
Tim-Philipp Müller
0ba57d0b8c codecparsers: mpegvideoparser: remove API that was deprecated 5 years ago
Libraries in -bad are not covered by our API/ABI stability
guarantees, and to the best of our knowledge everyone using
this API has moved to the replacement APIs ages ago.
2017-11-26 16:23:16 +00:00
Havard Graff
22f0f11abf meson: remove vs_module_defs
The GST_EXPORT should handle it.
2017-10-05 13:57:48 +01:00
Tim-Philipp Müller
2445021120 codecparsers: make debug categories static
They're only used internally. The VP9 parser's debug
category symbol was accidentally exported.
2017-08-11 14:34:34 +01:00
Tim-Philipp Müller
d9354b83bb codecparsers: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
2db4ff751f codecparsers: h264: flesh out documentation for GST_H264_PARSER_NO_NAL_END 2017-07-04 15:28:36 +01:00
Vincent Penquerc'h
e5a0c4a751 jpeg2000sampling: fix critical when sampling is missing from caps
This can happen with real files
2017-06-08 16:17:43 +01:00
Thibault Saunier
78022a6e0c docs: Port all docstring to gtk-doc markdown 2017-04-12 12:57:57 -03:00
Tim-Philipp Müller
95c842a860 codecparsers: remove problematic 'extern inline'
'extern inline' was added in 2fb76c89 for MSVC (it was just
'inline' before), but all of this doesn't really make sense,
the functions are not going to be inlined anyway, and what
'extern inline' means exactly also appears to depend on the
Cxx standard targetted. Let's just remove the 'extern inline'
entirely. At least gcc6 still emits the exact same code as
before anyway. Fixes compilation/linking with gcc 4.8 as
used on L4T on the TK1.
2017-01-10 16:03:30 +00:00
Anton Eliasson
03615a772a codecparsers: h264parse: improve documentation commentary
https://bugzilla.gnome.org/show_bug.cgi?id=775306
2016-11-29 10:34:16 +00:00
Anton Eliasson
0e8567a981 codecparsers: h264parse: docs spellcheck
Spell checks, correct capitalization and some rewording to
better fit the terms used in the H.264 spec.

https://bugzilla.gnome.org/show_bug.cgi?id=775306
2016-11-29 10:30:50 +00:00
Scott D Phillips
e4407d4599 Fix some MSVC warnings about const-ness
Some miscellaneous warnings about const-ness, either casting away const
where we know it's safe or removing const where it's not correct.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-15 14:53:49 +02:00
Scott D Phillips
3c53da5e09 Cast away const from GstMetaInfo in *_get_meta_info() functions
MSVC warns about the const in the implicit argument conversion in the
calls to g_once_init_{enter,leave}. It's OK so explicitly cast it.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-15 14:53:49 +02:00
Nirbheek Chauhan
42af2d66d8 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Matej Knopp <matej.knopp@gmail.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:35:54 +01:00
Nirbheek Chauhan
2fb76c89fc codecparsers: Explicitly export functions marked inline
On MSVC, inline functions are not available outside of a file unless
explicitly exported
2016-08-19 14:37:04 +01:00
Tim-Philipp Müller
e92894e4ab codecparsers: jpeg2000: don't allow 0 value for array access with i-1 2016-07-01 12:20:14 +01:00
Tim-Philipp Müller
1462ac7cdf codecparsers: jpeg2000: fix possible out-of-bounds array access
sizeof(array) != G_N_ELEMENTS(array).

CID 1362900
2016-07-01 12:15:28 +01:00
Luis de Bethencourt
276dd2750f jpeg2000parse: fix typo in sampling check
Fixing small typo that changes the value of the return.
2016-06-28 12:12:29 +02:00
Aaron Boxer
e7e6a3579d jpeg2000parse: use enums for colorspace and sampling, rather than strings
Also, move gstjpeg2000sampling to codecparsers project

https://bugzilla.gnome.org/show_bug.cgi?id=767908
2016-06-24 11:23:31 +03:00
Michael Olbrich
378051d80a h264parse: fix default time_offset_length
The default value for time_offset_length should be 24, see
section E2.2 of the H264 spec.

https://bugzilla.gnome.org/show_bug.cgi?id=767792
2016-06-21 10:45:43 +03:00
Reynaldo H. Verdejo Pinochet
ea272f0bac codecparsers: drop all otherwizes 2016-06-17 15:58:09 -07:00
Tim-Philipp Müller
1b58bbf3ad h264parser: maintain minimal ABI compat
Because we can.

https://bugzilla.gnome.org/show_bug.cgi?id=723352
2016-05-28 10:54:13 +01:00
Sebastian Dröge
b5f8b556e9 h264parser: Remove unused fps_num/fps_den fields
Instead the newly added function should be used to calculate
the framerate properly.

https://bugzilla.gnome.org/show_bug.cgi?id=723352
2016-05-28 10:54:01 +01:00
Sreerenj Balachandran
8f853cfed5 codecparsers: mpegvideo: Parse more slice header fields
https://bugzilla.gnome.org/show_bug.cgi?id=733872
2016-04-15 01:22:52 +10:00
Sreerenj Balachandran
51c7526030 codecparsers: mpegvideo: Add vbv_delay field to PictureHeader
https://bugzilla.gnome.org/show_bug.cgi?id=733872
2016-04-15 01:22:52 +10:00
Sreerenj Balachandran
7b0b74041e codecparsers: mpegvideo: Add more fields to the GstMpegVideoSequenceHdr
Added the fields load_non_intra_quantiser_matrix and
load_chroma_intra_quantiser_matrix to the sequence header structure.

https://bugzilla.gnome.org/show_bug.cgi?id=733872
2016-04-15 01:22:52 +10:00
Sebastian Dröge
ccc068576a meta: Initialize all GstMeta fields
During allocation they are not initialized to all zeroes.

https://bugzilla.gnome.org/show_bug.cgi?id=764902
2016-04-13 10:17:24 +03:00
Sreerenj Balachandran
88a3b4da3c codecparser: vp9: move persistent fields from GstVp9FrameHdr to GstVp9Parser
The subsampling_x, subsampling_y, bit_depth, color_space and color_range
fileds are moved from GstVp9FrameHdr to the global GstVp9Parser structure.
These fields are only present in keyframe or intra-only frame, no need to
duplicate them for inter-frames. This is an ABI change.

https://bugzilla.gnome.org/show_bug.cgi?id=764370
2016-04-01 14:12:08 +03:00
Edward Hervey
5ebf1d477d mpegvideoparser: Handle non-hierarchical profiles again
This is a regression from since mpegvideoparser was switched to
use the codecparsing library.

The problem is that the high bit of the profile_and_level is used
to specify non-hierarchical profiles and levels. Unfortunately we
were discarding that information.

Expose that escape bit, and use it in the element

https://bugzilla.gnome.org/show_bug.cgi?id=763220
2016-03-09 15:18:42 +01:00
Scott D Phillips
cf0d45c100 codecparsers: h265: Fix initialization of slice_deblocking_filter_disabled_flag
H.265 7.4.7.1 says:

> When slice_deblocking_filter_disabled_flag is not present, it is
> inferred to be equal to pps_deblocking_filter_disabled_flag.

https://bugzilla.gnome.org/show_bug.cgi?id=762351
2016-02-20 10:55:46 +02:00
Thiago Santos
115945b663 mpeg4parser: prevent assertion when scanning for sync code
Only search if there is indeed enough data to be searched otherwise
an assertion is raised
2016-02-19 16:42:35 -03:00
Tim-Philipp Müller
4e37976d83 codecparsers: vp9: minor clean-up
Remove setting of parser variable to NULL after free,
that makes no sense (and coverity is no doubt going
to complain about it).
2015-12-30 13:17:24 +00:00
Tim-Philipp Müller
d6834432ed codecparsers: vp9: fix macro namespacing and rename GstVp9InterpFilter 2015-12-30 13:12:13 +00:00
Tim-Philipp Müller
75b31d1872 codecparsers: vp9: fix doc typos and sprinkle some Since markers 2015-12-30 13:09:23 +00:00
Tim-Philipp Müller
10392acca5 codecparsers: vp9: move license blurb into header and remove aux files
This is just a bunch of lookup tables..
2015-12-30 11:04:32 +00:00
Sebastian Dröge
814cb85822 codecparsers: Add another G_GNUC_INTERNAL 2015-12-30 11:54:14 +02:00
Sebastian Dröge
d0332c2a16 codecparsers: Spread some G_GNUC_INTERNAL in various places 2015-12-30 11:40:59 +02:00
Sebastian Dröge
1bf448cbbd vp9parser: Fix indentation to make gst-indent happier 2015-12-30 11:38:14 +02:00
Sebastian Dröge
45f2ad952f vp9parser: Rename symbols to prevent symbol conflicts
Also make clamp() a static function for the same reason and use CLAMP (as
defined by GLib) in the GStreamer code.
2015-12-30 11:37:59 +02:00
Sreerenj Balachandran
b245e0f16c codecparsers: Add VP9 codec parser
https://bugzilla.gnome.org/show_bug.cgi?id=757597
2015-12-30 11:19:33 +02:00
Víctor Manuel Jáquez Leal
d054a6918c codecparser: h264: initialize parsing structures
Initialize to 0 these parse structures before filling them: GstH264SEIMessage,
GstH264NalUnit, GstH264PPS, GstH264SPS and GstH264SliceHdr.

When calling the functions which fill those structures, they may fail, leaving
unitialized those structures. This situation may lead to future problems, such
as a segmentation fault when freeing, for example.

This patch initializes to zero these structures, before filling them.

https://bugzilla.gnome.org/show_bug.cgi?id=755161
2015-10-29 11:26:37 +02:00
Víctor Manuel Jáquez Leal
c8b3d84757 codecparser: h265: initialize parsing structures
Initialize to 0 these parse structures before filling them: GstH265SEIMessage,
GstH265NalUnit, GstH265VPS, GstH265PPS, GstH265SPS and GstH265SliceHdr.

When calling the functions which fill those structures, they may fail, leaving
unitialized those structures. This situation may lead to future problems, such
as a segmentation fault when freeing, for example.

This patch initializes to zero these structures, before filling them.

https://bugzilla.gnome.org/show_bug.cgi?id=755161
2015-10-29 11:26:36 +02:00
Sreerenj Balachandran
fcd42b7d77 codecparsers: h265: Fix the selection of Active Ref Pic Set
If short_term_ref_pic_set_sps_flag is FALSE, the ShortTermRefPicSet
structure is supposed to derive from slice header. Which means,
CurrRpsIdx is equal to num_short_term_ref_pic_sets. But the number
of refpicsets communicated via sps header is only num_short_term_ref_pic_sets - 1.
And we are using slice_header structure to reference the last entry, which is
ShortTermRefPicSet[num_short_term_ref_pic_sets].

https://bugzilla.gnome.org/show_bug.cgi?id=754834
2015-09-10 21:12:30 +02:00
Sreerenj Balachandran
81435c8891 codecparsers: h265 : Fix default scaling list values
Fix the default_scaling_list values based on Table 7-6

https://bugzilla.gnome.org/show_bug.cgi?id=754834
2015-09-10 21:10:17 +02:00
XuGuangxin
54c2620bdb codecparsers: h265: Fix tile row and column parsing
Section 6.5.1:  Coding tree block raster and tile scanning conversion process
Follow the equations 6-3 and 6-4

This will provide correct offset_max in slice_header for parsing
num_entry_point_offsets.

https://bugzilla.gnome.org/show_bug.cgi?id=754024

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
2015-08-26 12:24:02 +03:00
lyb
497f372668 codecparsers: h265: Add APIs for up-right-diagonal/raster scan conversion
As per  7-42 and 7-43 the ScalingFactor's scanIdx is 0,
which is "up-right-diagonal" scan. Add APIs for converting
up-right-diagonal to raster and vise versa.

https://bugzilla.gnome.org/show_bug.cgi?id=754024
2015-08-24 21:28:08 +03:00
XuGuangxin
26e350f0bf codecparsers: h265: Fix the range of delta_chroma_log2_weight_denom
Being more strict on specification, According to 7.4.7.3,
delta_chroma_log2_weight_denom should be in the range of
[(0 - luma_log2_weight_denom), (7 - luma_log2_weight_denom)]

https://bugzilla.gnome.org/show_bug.cgi?id=754024
2015-08-24 21:21:29 +03:00
Jan Schmidt
fdac09d843 h264parse: Clear SPS info after processing.
The SPS struct might be filled out by a call to
gst_h264_parser_parse_subset_sps, which fills out
dynamically allocated data and requires a call
to gst_h264_sps_clear() to free it. Also make sure
to clear out any allocated SPS data when returning
an error.

https://bugzilla.gnome.org/show_bug.cgi?id=753306
2015-08-15 15:39:23 +10:00
Sreerenj Balachandran
8a6cc4ed27 codecparsers: h265: Fix the range of delta_chroma_log2_weight_denom
ChromaLog2WeightDenom = luma_log2_weight_denom + delta_chroma_log2_weight_denom

The value of ChromaLog2WeightDenom should be in the range of 0 to 7 and
the value luma_log2_weight_denom  should be also in the range of 0 to 7.
Which means , delta_chroma_log2_weight_denom can have values in the range
between -7 and 7.

https://bugzilla.gnome.org/show_bug.cgi?id=753552
2015-08-12 14:11:31 +02:00
Sreerenj Balachandran
b6b2e04501 codecparsers: h265: Fix the parsing of ref_pic_lists_modification
https://bugzilla.gnome.org/show_bug.cgi?id=753552
2015-08-12 14:11:26 +02:00
Jan Schmidt
c1b0d818bb h264parse: Add more NAL types for debugging output.
Register more NAL unit types so that they are dumped
by name in the debug output instead of being labelled
'Invalid'
2015-07-29 23:10:49 +10:00
Hyunjun Ko
aae9119d97 mpegvideometa: add meta transform function
https://bugzilla.gnome.org/show_bug.cgi?id=751778
2015-07-07 13:43:47 +03:00
Tim-Philipp Müller
bd5db4f72f codecparsers: jpeg: add some padding to ScanHdr struct
For bits that we don't parse out at the moment.
2015-06-21 17:13:07 +01:00
Tim-Philipp Müller
5b02e4ac59 codecparsers: jpeg: fix docs for table parsing functions 2015-06-21 14:59:13 +01:00
Tim-Philipp Müller
d8963a015f docs: add new JPEG codecparser API to the docs
And sprinkle some more Since markers
2015-06-21 13:55:29 +01:00
Tim-Philipp Müller
7d8f694501 codecparsers: jpeg: fix validity checking of data parsed
g_return_val_if_fail() and g_assert() are not appropriate
for checking untrusted external data.

https://bugzilla.gnome.org/show_bug.cgi?id=673925
2015-06-21 11:32:10 +01:00
Tim-Philipp Müller
0f04a61bbe codecparsers: jpeg: fix up API
- add data pointer to GstJpegSegment and pass segment
  to all parsing functions, rename accordingly
- shorten GstJpegMarkerCode enum type name to GstJpegMarker
- move function gtk-doc blurbs into .c file
- add since markers
- flesh out docs for SOF markers

https://bugzilla.gnome.org/show_bug.cgi?id=673925
2015-06-21 11:31:50 +01:00
Tim-Philipp Müller
4a85958909 codecparsers: jpeg: tweak API a little
https://bugzilla.gnome.org/show_bug.cgi?id=673925
2015-06-21 11:30:30 +01:00
Tim-Philipp Müller
441478d161 codecparsers: jpeg: hide gst_jpeg_scan_for_marker_code()
Make this function private for now, since it's unclear whether
it's actually needed seeing that gst_jpeg_parse() scans too.

https://bugzilla.gnome.org/show_bug.cgi?id=673925
2015-06-21 11:30:30 +01:00
Gwenole Beauchesne
d279e12c8f codecparsers: jpeg: fix and optimize scan for next marker code.
Fix scan for next marker code when there is an odd number of filler
(0xff) bytes before the actual marker code. Also optimize the loop
to execute with fewer instructions (~10%).

This fixes parsing for Spectralfan.mov.
2015-06-21 11:28:38 +01:00
Gwenole Beauchesne
41ed5c0266 codecparsers: jpeg: fix calculation of segment size.
The size of a marker segment is defined to be exclusive of any initial
marker code. So, fix the size for SOI, EOI and APPn segments but also
the size of any possible segment that is usually "reserved" or not
explicitly defined.

https://bugzilla.gnome.org/show_bug.cgi?id=707447
2015-06-21 11:28:38 +01:00
Wind Yuan
c83e413656 codecparsers: jpeg: fix default Huffman tables generation.
Fix build_huffman_table() to correctly fill in the associated HUFFVAL
entries to the default Huffman tables.
2015-06-21 11:28:38 +01:00
Gwenole Beauchesne
7e7b4d68f4 codecparsers: jpeg: add JPEG bitstream parser
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=673925
2015-06-21 11:28:30 +01:00
Vineeth TM
7823e6d606 nalutils: trivial patch to check if
trivial patch to add proper ( while checking for if(G_UNLIKELY())

https://bugzilla.gnome.org/show_bug.cgi?id=751087
2015-06-16 22:05:34 -04:00
Luis de Bethencourt
417db39d0d codecparsers: mpeg4: actually return full number of bits of resync marker
Switch the increment of markersize from when it is used to when it is
returned from compute_resync_marker_size.

This also makes the CHECK_REMAINING in gst_mpeg4_parse_video_packet_header
check for the actually required number of bits now and not one too few.

https://bugzilla.gnome.org/show_bug.cgi?id=739345
2015-06-13 18:03:11 +01:00
Tim-Philipp Müller
b14fb383ed Revert "codecparsers: remove ignored increment of return"
This reverts commit 916b954315.

Clearly something else was intended, and it also makes
more sense to add the extra bit. The resync marker is
N zero bits plus a 1 bit, and the pattern/mask needs to
be run on N+1 bits too.

(Even after the rever the code doesn't do that of course, so
it still needs to be fixed differently.)

https://bugzilla.gnome.org/show_bug.cgi?id=739345
2015-06-13 17:59:42 +01:00
Sreerenj Balachandran
e6e0702821 codecparser: h265: Fix nal unit size checking
The EOS and EOB nals have the size 2 which is the size of
nal unit header itself. The gst_h265_parser_identify_nalu()
is not required to scan start code again in this case.

In other cases, for a valid nalunit the minimum required size
is 3 bytes (2 byte header and at least 1 byte RBSP payload)
2015-04-30 21:47:38 +02:00
Sreerenj Balachandran
af7ff2bd95 codecparser: h265: Calculate crop rectangle dimensions 2015-04-30 21:46:31 +02:00
Sreerenj Balachandran
877e69c9ec codecparser: h265: Fix parsing multiple SEI messages in a single SEI Nal
An SEI Nal can have more than one SEI message.

Change in API: the gst_h265_parser_parse_sei()
2015-04-30 21:45:39 +02:00
Sreerenj Balachandran
8407622c93 codecparser: h265: Fix the number of tile rows/columns parsing
The possible minimum value for num_tile_columns_minus1 and num_tile_rows_minus1
is zero (7.4.3.3).

https://bugzilla.gnome.org/show_bug.cgi?id=748641
2015-04-29 19:16:48 +02:00
Sreerenj Balachandran
989643ff7c codecparsers: h265: add helpers to convert quantization matrices
Add utility functions to convert quantization matrices from zig-zag scan
order into raster scan order and vice-versa

https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-04-26 21:46:25 +02:00
Sreerenj Balachandran
a86e7c1c1f codecparser: h265: skip byte alignment bits while parsing slice header
Skip the byte alignment bits as per the logic of byte_alignment()
provided in hevc specification. This will fix the calculation of
slice header size.

https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-04-26 21:45:31 +02:00
Sreerenj Balachandran
b17a026eb7 codecparser: h265: Fix the NumDeltaPocs calculation
Always use the equation provided in spec (7-57) for finding
the NumDeltaPocs

https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-04-26 21:45:08 +02:00
Sreerenj Balachandran
333ba075a5 codecparser: h265: Fix the NumPocTotalCurr calculation
The NumPocToalCurr should be calculated for all B and P slices.

https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-04-26 21:44:25 +02:00
Sreerenj Balachandran
889cc8ee31 codecparser: h265: Fix nal size calculation for EOS and EOB
https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-04-26 21:43:40 +02:00
Tim-Philipp Müller
699452ef31 Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:59:32 +01:00
Edward Hervey
aebec9bd24 codecparsers: Indent file
Someone's been commiting without using gst-indent :)
2015-01-23 12:26:16 +01:00
Edward Hervey
3da1c9c8d5 codecparsers: Add READ_UE_MAX macro
READ_UE_ALLOWED was almost exclusively used with min == 0, which doesn't
make much point for unsigned integers.

Add a READ_UE_MAX variant and use that instead. Also replaced two usages
of CHECK_ALLOWED (a,0,something) by CHECK_ALLOWED_MAX (a, something)
2015-01-23 12:24:52 +01:00
Sebastian Dröge
80e02cbdf9 Constify some static arrays everywhere 2015-01-21 10:18:50 +01:00
Vincent Penquerc'h
c73a5e0c54 h264parser: fix stack smashing
Ensure that we do not trust the bitstream when filling a table
with a fixed max size.
Additionally, the code was not quite matching what the spec says:
- a value of 3 broke from the loop before adding an entry
- an unhandled value did not add an entry
The reference algorithm does these things differently (7.3.3.1
in ITU-T Rec. H.264 (05/2003)).

This plays (apparently correctly) the original repro file, with
no stack smashing.

Based on a patch and bug report by André Draszik <git@andred.net>
2015-01-14 11:39:55 +00:00
Julien Isorce
3fb3758e7d codecparsers: fix some compiler warnings
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1

"warning: comparison is always true due to limited
range of data type"

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740673
2014-11-25 23:05:15 +00:00
Gwenole Beauchesne
8c76b5897a codecparsers: h264: fix derivation of MaxPicNum variable.
The logic to compute the MaxPicNum variable was reversed. In paricular,
MaxPicNum is double MaxFrameNum only if field_pic_flag is set to 1.

https://bugzilla.gnome.org/show_bug.cgi?id=739291
2014-11-14 09:36:27 +01:00
Aurélien Zanelli
6511a7282b h264parser: fix GstH264ParserResult documentation typo
https://bugzilla.gnome.org/show_bug.cgi?id=739906
2014-11-10 23:37:37 +00:00
Gwenole Beauchesne
65fc58da4d codecparsers: h264: recognize SVC NAL units.
Identify SVC NAL units and tag them as such. This is necessary for
gst_h264_parser_parse_slice_hdr() to fail gracefully, if the user
did not perform the check himself.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-10-29 15:00:56 +01:00
Gwenole Beauchesne
b50c3e2127 codecparsers: h264: fix number of list0 {,non-}anchor refs.
Fix copy-paste error in gst_h264_sps_mvc_copy() where num_anchor_refs_l0
and num_non_anchor_refs_l0 were incorrectly initialized from list1.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-10-29 15:00:56 +01:00
Tim-Philipp Müller
3e62612259 codecparsers: sprinkle some gtk-doc Since: markers for new API 2014-10-29 13:15:51 +00:00
Jan Schmidt
86b948587e codecparsers: Initialise nalu extension type to NONE
Always set a default NALU extension type, and override it
when we find a supported extension, to avoid having it unset/random
for unsupported NALU extensions
2014-10-29 23:23:02 +11:00
Jan Schmidt
cc71119539 h264parser: Fix frame packing SEI parsing 2014-10-29 23:21:47 +11:00
Sreerenj Balachandran
3776e78ae6 codecparsers: h264: add support for Frame Packing Arrangement SEI message.
This parses the frame_packing_arragement() payload in SEI message.
This information can be used by decoders to appropriately rearrange the
samples which belong to Stereoscopic and Multiview High profiles.

https://bugzilla.gnome.org/show_bug.cgi?id=685215

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-10-29 23:09:41 +11:00
Sreerenj Balachandran
51f003e469 codecparsers: h264: add support for Stereo Video Information SEI message.
Add the necessary payload parsing support for stereo_video_info.

https://bugzilla.gnome.org/show_bug.cgi?id=685215

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
2014-10-29 23:09:41 +11:00
Gwenole Beauchesne
8911a80662 codecparsers: h264: parse seq_parameter_set_mvc_extension().
https://bugzilla.gnome.org/show_bug.cgi?id=685215

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-10-29 23:09:41 +11:00
Gwenole Beauchesne
c1deab84e6 codecparsers: h264: parse MVC syntax elements.
https://bugzilla.gnome.org/show_bug.cgi?id=685215

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-10-29 23:09:41 +11:00
Luis de Bethencourt
916b954315 codecparsers: remove ignored increment of return
'return val++;' returns the value before it is incremented because the post
increment happens after the statement. Removing the unused increment.

https://bugzilla.gnome.org/show_bug.cgi?id=739345
2014-10-29 10:37:38 +00:00
Aurélien Zanelli
de327bf45b vc1parser: fix level values for simple/main profile
In simple profile, level set to 0 or 2 indicate low and medium level
respectively. In main profile, level set to 0, 2 or 4 indicate low,
medium and high level respectively.

Level values are defined in Annex J.1.2 of the SMPTE 421M.

https://bugzilla.gnome.org/show_bug.cgi?id=738230
2014-10-20 12:40:54 +02:00
Aurélien Zanelli
c9a196d54d vc1parser: take care of endianness when parsing sequence-layer
sequence-layer is serialized in little-endian byte order except for
STRUCT_C which is serialized in big-endian byte order.

But since STRUCT_A and STRUCT_B fields are defined as unsigned int msb
first, we have to pass them as big-endian to their parsing function. So
we basically use temporary buffers to convert them in big-endian.

See SMPTE 421M Annex J and L.

https://bugzilla.gnome.org/show_bug.cgi?id=736871
2014-09-18 13:36:07 +03:00
Sreerenj Balachandran
e93551d5b0 codecparser: h264: Use proper bit_reader api while parsing buffering_period SEI
https://bugzilla.gnome.org/show_bug.cgi?id=734970
2014-08-18 11:45:54 +01:00
Aurélien Zanelli
41df512eb9 codecparsers_h264: initialize some fields of pic_timing structure
Otherwise pic timing structure can have invalid cpb_removal_delay,
dpb_output_delay or pic_struct_present_flag which are blindly retrieved
in h264parse.

https://bugzilla.gnome.org/show_bug.cgi?id=734124
2014-08-01 17:06:29 +02:00
Fabrice Bellet
2f28fcb862 parser: mpeg4: fix vlc table used for sprite trajectory
The vlc table members cbits, cword and values were assigned in the wrong
order, causing the mpeg4 parser to fail when handling sprite
trajectories.

https://bugzilla.gnome.org/show_bug.cgi?id=733322
2014-07-21 09:37:51 +02:00
Gwenole Beauchesne
a61b7728b4 codecparsers: h264: clarifications and documentation fixes.
Fix documentation for GstH264NalUnit. The @ref_idc part was totally
unbalanced. Also add a note about @offset and @size fields to remind
that this is relative to the start of the NAL unit, thus including
the header bytes.
2014-07-01 16:26:48 +02:00
Gwenole Beauchesne
22b68b60ec codecparsers: h264: fix identification of EOSEQ and EOS NALs.
An end_of_seq() [EOSEQ] or end_of_stream() [EOS] NAL unit is really
one byte long because this shall include the NalHeaderBytes (1) too.
The NALU.offset starts from the first byte of the header.

This is the proper fix to commit d37f842. In practice, this fixes
parsing of FRExt1_Panasonic_D and FRExt2_Panasonic_C, that include
additional frames after an EOSEQ.

https://bugzilla.gnome.org/show_bug.cgi?id=732553

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-01 16:26:48 +02:00