vaapi:gstreamer-codecparsers.git
5 years agocodecparsers: fix bitplanes decoding (DIFF6 or NORM6).
Gwenole Beauchesne [Thu, 24 Jan 2013 16:28:22 +0000 (17:28 +0100)]
codecparsers: fix bitplanes decoding (DIFF6 or NORM6).

Fix decoding of DIFF6 or NORM6 bitplanes with an odd number of lines
(3x2 "horizontal" tiles). In this case, we have to skip the first line
of macroblocks but <width> number of bytes was used to do so, instead
of the actual <stride> size.

Likewise, the number of remaining bytes to skip in the row is <width>
minus the x offset since the output data buffer is already offset by
x bytes. This fixes cases with a number of macroblocks per line that
is not a multiple of 8.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agocodecparsers: vc1: add API to parse slice headers.
Gwenole Beauchesne [Wed, 23 Jan 2013 13:47:58 +0000 (14:47 +0100)]
codecparsers: vc1: add API to parse slice headers.

Add gst_vc1_parse_slice_header() function to parse slice headers as
described in 7.1.2. Slice layers are optional and allowed in advanced
profile mode only. Picture header, if available (PIC_HEADER_FLAG),
is parsed but not recorded because it shall be the same as that was
previously parsed with gst_vc1_parse_frame_header().

This fixes SA00049.vc1 conformance test.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agocodecparsers: vc1: simplify GstVC1VopDquant structure.
Gwenole Beauchesne [Tue, 22 Jan 2013 10:42:49 +0000 (11:42 +0100)]
codecparsers: vc1: simplify GstVC1VopDquant structure.

Rename dqsbedge to dqbedge. The intent is that we can only have a single
boundary edge selector, depending on the value of dqprofile. So, dqbedge
represents DQSBEDGE if dqprofile == GST_VC1_DQPROFILE_SINGLE_EDGE, or
DQDBEDGE if dqprofile == GST_VC1_DQPROFILE_DOUBLE_EDGE.

The former dqbedge field is marked as unused and can be removed on the
next gst-plugins-bad version that allows ABI changes.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agocodecparsers: vc1: fix bitplanes decoding.
Gwenole Beauchesne [Tue, 22 Jan 2013 17:01:24 +0000 (18:01 +0100)]
codecparsers: vc1: fix bitplanes decoding.

Fix decoding of DIFF2 or NORM2 bitplanes with an odd number of macroblocks.
In particular, account for the first bit that was already parsed so that to
avoid a buffer overflow after all pairs are parsed.

This fixes SA00040.vc1 conformance test.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agocodecparsers: vc1: fix VOPDQUANT parser for DQUANT == 2.
Gwenole Beauchesne [Tue, 22 Jan 2013 09:48:39 +0000 (10:48 +0100)]
codecparsers: vc1: fix VOPDQUANT parser for DQUANT == 2.

Fix parsing of VOPDQUANT when DQUANT == 2. In particular, DQUANTFRM is
not present in the bitstream in this case and it shall be derived to
the default value of zero (7.1.1.31.1).

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agocodecparsers: vc1: fix calculation of ALTPQUANT.
Gwenole Beauchesne [Tue, 22 Jan 2013 09:38:20 +0000 (10:38 +0100)]
codecparsers: vc1: fix calculation of ALTPQUANT.

Fix calculation of ALTPQUANT when DQUANT == 1. PQDIFF alters ALTPQUANT
in any case. See 7.1.1.31.6.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agocodecparsers: vc1: fix parser for DQPROFILE in VOPDQUANT.
Gwenole Beauchesne [Tue, 22 Jan 2013 09:11:34 +0000 (10:11 +0100)]
codecparsers: vc1: fix parser for DQPROFILE in VOPDQUANT.

Fix parse_vopdquant() to correctly parse DQPROFILE, which is 2 bits
instead of a single bit.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agoUpdate to git master commit 49fefbd.
Gwenole Beauchesne [Thu, 17 Jan 2013 14:43:49 +0000 (15:43 +0100)]
Update to git master commit 49fefbd.

5 years agocodecparsers: h264: zero-initialize SPS VUI parameters
Mark Nauwelaerts [Sat, 12 Jan 2013 12:15:02 +0000 (13:15 +0100)]
codecparsers: h264: zero-initialize SPS VUI parameters

... so all 'present' flags indicate no presence of optional parts
in case VUI parameters end up not being parsed.

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

5 years agocodecparsers: h264: add inferred value for slice_beta_offset_div2.
Gwenole Beauchesne [Sun, 6 Jan 2013 17:54:52 +0000 (18:54 +0100)]
codecparsers: h264: add inferred value for slice_beta_offset_div2.

The standard specifies that when slice_beta_offset_div2 is not present
in the slice header, then the value of slice_beta_offset_div2 shall be
inferred to be equal to 0.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agoMerge branch 'master' into gst-vaapi-branch
Gwenole Beauchesne [Sun, 6 Jan 2013 17:54:03 +0000 (18:54 +0100)]
Merge branch 'master' into gst-vaapi-branch

5 years agoUpdate to git master commit 1e9aaee.
Gwenole Beauchesne [Sun, 6 Jan 2013 17:53:18 +0000 (18:53 +0100)]
Update to git master commit 1e9aaee.

5 years agocodecparsers: vc1: fix PTYPE for interlaced frames.
Gwenole Beauchesne [Mon, 19 Nov 2012 09:32:57 +0000 (10:32 +0100)]
codecparsers: vc1: fix PTYPE for interlaced frames.

Coverity found missing break in parse_frame_header_advanced() when
determining PTYPE from FPTYPE for interlaced streams.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agocodecparsers: h264: fix error code for invalid size parsed in SPS.
Gwenole Beauchesne [Fri, 21 Sep 2012 16:23:21 +0000 (18:23 +0200)]
codecparsers: h264: fix error code for invalid size parsed in SPS.

gst_h264_parse_sps() returned FALSE if it parsed invalid (negative)
size components. Now make it gracefully return GST_H264_PARSER_ERROR
instead of GST_H264_PARSER_OK (FALSE).

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

5 years agocodecparsers: h264: fix rbsp_more_data() implementation.
Gwenole Beauchesne [Wed, 10 Oct 2012 14:19:49 +0000 (16:19 +0200)]
codecparsers: h264: fix rbsp_more_data() implementation.

Account for trailing zero bits when checking for rbsp_more_data().

In particular, fix an hypothetical stream whereby rbsp_more_data()
is called in the following conditions for PPS header: NalReader
reached position 20, 12 bits are remaining and trailing data at
current byte position is c8 00.

rbsp_more_data() used to return TRUE whereas it should obviously
return FALSE because x8 00 represents a valid rbsp_trailing_bits()
structure.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agocodecparsers: h264: fix error code for invalid size parsed in SPS.
Gwenole Beauchesne [Fri, 21 Sep 2012 16:23:21 +0000 (18:23 +0200)]
codecparsers: h264: fix error code for invalid size parsed in SPS.

gst_h264_parse_sps() returned FALSE if it parsed invalid (negative)
size components. Now make it gracefully return GST_H264_PARSER_ERROR
instead of GST_H264_PARSER_OK (FALSE).

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agoMerge branch 'master' into gst-vaapi-branch
Gwenole Beauchesne [Tue, 13 Nov 2012 08:55:15 +0000 (09:55 +0100)]
Merge branch 'master' into gst-vaapi-branch

5 years agoUpdate to git master commit 0b3e0ed.
Gwenole Beauchesne [Tue, 13 Nov 2012 08:54:35 +0000 (09:54 +0100)]
Update to git master commit 0b3e0ed.

5 years agoFix FSF address
Tim-Philipp Müller [Sat, 3 Nov 2012 20:38:00 +0000 (20:38 +0000)]
Fix FSF address

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

5 years agoMerge branch 'master' into gst-vaapi-branch
Gwenole Beauchesne [Thu, 11 Oct 2012 07:52:48 +0000 (09:52 +0200)]
Merge branch 'master' into gst-vaapi-branch

Conflicts:
gst-libs/gst/codecparsers/Makefile.am

5 years agocodecparsers: add JPEG bitstream parser.
Gwenole Beauchesne [Wed, 12 Sep 2012 08:40:06 +0000 (10:40 +0200)]
codecparsers: add JPEG bitstream parser.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agoUpdate to git master commit 380b23a.
Gwenole Beauchesne [Wed, 10 Oct 2012 16:40:29 +0000 (18:40 +0200)]
Update to git master commit 380b23a.

5 years agocheck: Fix mpegvideoparser PAR expectation
Jan Schmidt [Thu, 13 Sep 2012 20:34:16 +0000 (13:34 -0700)]
check: Fix mpegvideoparser PAR expectation

The parser (correctly) now interprets the test header using
MPEG-1 semantics, so fix the test expectation.

5 years agotests: mpegvideoparser: adjust to modified API
Mark Nauwelaerts [Fri, 8 Jun 2012 09:12:06 +0000 (11:12 +0200)]
tests: mpegvideoparser: adjust to modified API

5 years ago.gitignore: ignore more test binaries and stamp files
Tim-Philipp Müller [Thu, 15 Mar 2012 00:13:40 +0000 (00:13 +0000)]
.gitignore: ignore more test binaries and stamp files

5 years agogsth264parser: fix Coverity found not initialized sps/pps valid member.
Peter Seiderer [Mon, 3 Sep 2012 11:43:03 +0000 (13:43 +0200)]
gsth264parser: fix Coverity found not initialized sps/pps valid member.

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

5 years agogsth264parser: fix Coverity detected off by one at call to READ_UE_ALLOWED.
Peter Seiderer [Mon, 3 Sep 2012 11:09:29 +0000 (13:09 +0200)]
gsth264parser: fix Coverity detected off by one at call to READ_UE_ALLOWED.

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

5 years agompeg4parser: parse complexity estimation header in video object layer
Arnaud Vrac [Sun, 2 Sep 2012 18:19:17 +0000 (20:19 +0200)]
mpeg4parser: parse complexity estimation header in video object layer

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

5 years agompeg4parser: fix some issues related to video object layer parsing
Arnaud Vrac [Sun, 2 Sep 2012 18:18:32 +0000 (20:18 +0200)]
mpeg4parser: fix some issues related to video object layer parsing

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

5 years agompegvideoparse: Handle Sequence Display Extension
Jan Schmidt [Mon, 3 Sep 2012 16:47:30 +0000 (09:47 -0700)]
mpegvideoparse: Handle Sequence Display Extension

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.

5 years agocodecparsers: vc1: fix aspect ratio calculation.
Gwenole Beauchesne [Wed, 12 Sep 2012 09:08:25 +0000 (11:08 +0200)]
codecparsers: vc1: fix aspect ratio calculation.

ASPECT_HORIZ_SIZE and ASPECT_VERT_SIZE are syntax elements that hold
binary encodings of sizes ranging from 1 to 256. Thus, the calculated
pixel-aspect-ratio was off by one.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=683858

5 years agocodecparsers: h264parse: don't use anonymous unions.
Gwenole Beauchesne [Wed, 12 Sep 2012 09:01:34 +0000 (11:01 +0200)]
codecparsers: h264parse: don't use anonymous unions.

Anonymous union is an ISO C (2011) feature that is not exposed in
compilers strictly conforming to the previous standard.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agocodecparsers: h264: compute pixel aspect ratio.
Gwenole Beauchesne [Wed, 12 Sep 2012 09:21:41 +0000 (11:21 +0200)]
codecparsers: h264: compute pixel aspect ratio.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agocodecparsers: minor header indentation clean-up for mpegvideoparser
Tim-Philipp Müller [Tue, 10 Jul 2012 22:27:23 +0000 (23:27 +0100)]
codecparsers: minor header indentation clean-up for mpegvideoparser

5 years agoh264parser: do not assert on data input, just return
Vincent Penquerc'h [Mon, 11 Jun 2012 09:49:15 +0000 (10:49 +0100)]
h264parser: do not assert on data input, just return

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

5 years agoh264parser: Remove un-needed checks and inline some functions
Edward Hervey [Tue, 5 Jun 2012 15:57:41 +0000 (17:57 +0200)]
h264parser: Remove un-needed checks and inline some functions

val and nr always exist (&nr, &value)
bits is always called smaller than the width

Makes parsing 30% faster

5 years agocodecparsers: mpeg: relax entry constraint
Mark Nauwelaerts [Fri, 1 Jun 2012 08:59:22 +0000 (10:59 +0200)]
codecparsers: mpeg: relax entry constraint

... since it is acceptable and properly handled further on.

5 years agoAdd build infrastructure.
Gwenole Beauchesne [Wed, 10 Oct 2012 15:57:23 +0000 (17:57 +0200)]
Add build infrastructure.

5 years agompegvideoparse: tweak codec parser API and adjust parser element
Mark Nauwelaerts [Tue, 22 May 2012 12:00:36 +0000 (14:00 +0200)]
mpegvideoparse: tweak codec parser API and adjust parser element

... to allow for more efficient parsing and (more) consistent parsing API
among various codec parsers.

Fixes #672701.

Conflicts:

gst/videoparsers/gstmpegvideoparse.c

5 years agocodecparsers: mpeg4: fixup documentation spelling
Mark Nauwelaerts [Tue, 22 May 2012 10:30:07 +0000 (12:30 +0200)]
codecparsers: mpeg4: fixup documentation spelling

5 years agompegvideoparser: Optimize scanning for start code
Nicolas Dufresne [Tue, 8 May 2012 20:51:11 +0000 (16:51 -0400)]
mpegvideoparser: Optimize scanning for start code

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

5 years agocodecparsers: mpegvideoparser: fix buffer size check
Mark Nauwelaerts [Mon, 21 May 2012 13:24:25 +0000 (15:24 +0200)]
codecparsers: mpegvideoparser: fix buffer size check

... to mind unsigned integer wrap

Based on patch by Alban Browaeys <prahal@yahoo.com>

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

5 years agocodecparsers: mpeg4: do not expect a marker bit where not specified
Mark Nauwelaerts [Fri, 18 May 2012 14:17:13 +0000 (16:17 +0200)]
codecparsers: mpeg4: do not expect a marker bit where not specified

Fixes #672447.

5 years agocodecparser: mpeg4 type error
Wind Yuan [Fri, 27 Apr 2012 02:49:07 +0000 (22:49 -0400)]
codecparser: mpeg4 type error

5 years agompegvideoparse: Do not ignore start code at the end of buffer
Matej Knopp [Sat, 14 Apr 2012 19:09:25 +0000 (21:09 +0200)]
mpegvideoparse: Do not ignore start code at the end of buffer

5 years agogst: Update versioning
Sebastian Dröge [Wed, 4 Apr 2012 12:41:22 +0000 (14:41 +0200)]
gst: Update versioning

5 years agoFix an unwanted double negation from last commit
Thibault Saunier [Sat, 10 Mar 2012 23:53:54 +0000 (20:53 -0300)]
Fix an unwanted double negation from last commit

5 years agoFix 'ignoring return value of function declared with const attribute'
Thibault Saunier [Sat, 10 Mar 2012 22:10:52 +0000 (19:10 -0300)]
Fix 'ignoring return value of function declared with const attribute'

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.

5 years agocodecparsers: h264: record number of emulation prevention bytes in slice_header().
Gwenole Beauchesne [Fri, 2 Mar 2012 10:45:41 +0000 (11:45 +0100)]
codecparsers: h264: record number of emulation prevention bytes in slice_header().

Some hardware video decode acceleration API (VA-API, DXVA) require
a bit count to the first macroblock, minus the number of emulation
prevention bytes. So, instead of having the consumer of the library
scan the slice_header() again, just record that number while parsing.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=671203

5 years agoAdd initial codec parsers from gst-plugins-bad 0.10.23.
Gwenole Beauchesne [Wed, 10 Oct 2012 15:38:37 +0000 (17:38 +0200)]
Add initial codec parsers from gst-plugins-bad 0.10.23.