It is completely legal to have packets with zero sizes.
Zero-sized packet indicates header with only Start Code.
One eg: is user data packet. The patch allows having
GstMpegVideoPacket with zero sizes.
https://bugzilla.gnome.org/show_bug.cgi?id=796477
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.
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
We only check input from the API user with g_return_*_if_fail().
Internal sanity checks should use g_assert() instead, which is
disabled by default for releases.
Add API to parse the Slice header. This also calculates the macroblock
position as specified in 6.3.16.
https://bugzilla.gnome.org/show_bug.cgi?id=664274
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Add new interface to MPEG-2 video parser that takes GstMpegVideoPacket
arguments instead of data, size, and offset. New functions are called
after gst_mpeg_video_packet_*() and provide the default implementation.
Older API is moved to the deprecated namespace and uses the new functions.
https://bugzilla.gnome.org/show_bug.cgi?id=692933
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Ignore the display_extension values if they are greater than the width/height
values provided by seqhdr and calculate the PAR based on the seqhdr values.T
his is what DVD players are doing.
Thanks to "David Schleef <ds@schleef.org>"
https://bugzilla.gnome.org/show_bug.cgi?id=685103
Add utility functions to convert quantization matrices from zigzag scan
order (as encoded in the bitstream) into raster scan order. Also provide
another function to reverse the operation.
https://bugzilla.gnome.org/show_bug.cgi?id=693000
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Quantizer matrices are encoded in zigzag scan order in the bitstream,
but they are stored in raster scan order when they are parsed. However,
default matrices were also prepared in zigzag scan order, hence the
mismatch. i.e. the matrices were presented either in raster scan order
if they are explicitly present in the bitstream, or they were presented
in zigzag scan order if the default definitions were to be used instead.
One way to solve this problem is to always expose the quantization
matrices in zigzag scan order, since this is the role of the parser to
not build up stories from the source bitstream and just present what
is in there.
Utility functions will be provided to convert quantization matrices in
either scan order.
https://bugzilla.gnome.org/show_bug.cgi?id=693000
Signed-off-by: Cong Zhong <congx.zhong@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Change the way the pixel-aspect-ratio is computed by
interpreting the sequence header aspect ratio info
as MPEG-1 values until a sequence extension or
sequence display extension is seen, and then updating
the sequence header struct accordingly.
Fixes incorrect anamorphic display on some MPEG-2 (DVD)
sequences.
... to allow for more efficient parsing and (more) consistent parsing API
among various codec parsers.
Fixes#672701.
Conflicts:
gst/videoparsers/gstmpegvideoparse.c
This always happens with GstByteReader/Writer and friends when
not taking into account returned boolean of the _read/_write functions
(which is actually wrong).
Make use of the *_unchecked variant as much as possible, or take the
returned value into account.