mpegtsbase: Don't hard-flush the packetizer on discont buffers

Doing a hard flush on the packetizer will drop all observations, which
will eventually break push-based seeking (with BYTES segment) since
we won't know where to seek to anymore (new data would always be
considered as the beginning of the stream).
tsdemux: Fix scaling macros

While the calculation done in these macros will work with 64bit
integers, they will fail if working with 32bit integers.

Force the scaling up to solve that.

This amazingly didn't introduce major issues up to now, but resulted
in bogus values in debug logs.
mpegtspacketizer: Improve ts_to_offset code

* Search in current pending values first. For CBR streams we can very
  easily end up having just one initial observations and then nothing
  else (since the bitrate doesn't change).
* Use one group whether we are in that group *OR* if there is only
  one group.
* If the group to use isn't closed (points are being accumulated in the
  PCROffsetCurrent), use the latest data available for calculation
* If in the unlikelyness that all of this *still* didn't produce more
  than one data point, just return the initial offset
codecparsers: add VP8 bitstream parser.

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

[refactored, among other fixes]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
codecparsers: vp8: add GStreamer native utilities.

Import libvpx 1.3.0 range decoder files (dboolhuff.[ch]) to implement
the VP8 utilities native interface. Likewise, copy and use the default
libvpx generated entropy probabilities tables.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
codecparsers: vp8: rename dboolhuff symbols.

Rename VP8 dboolhuff symbols so that to avoid clashes with libvpx when
static linking.
tests: add test for VP8 bitstream parsing library.

[updated to new parser API]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
tests: add standalone program for VP8 parser.

Add standalone test application that demonstrates how to use the new
VP8 bitstream parsing library, while also allowing simple debugging/
tracing of IVF files.

[clean-ups, updated to new parser API]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
ivfparse: port to baseparse.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
ivfparse: enable build.

Drop `ivfparse' element from the non-ported set of plugins in configure.
ivfparse: avoid possible division-by-zero when calculating PTS.

Avoid possible division-by-zero while deriving the presentation timestamp
of the buffer. The base class will take care of any interpolation needs.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
ivfparse: detect and propagate resolution changes.

Detect resolution changes on key frames, and propagate the resulting
caps to the src pad. Only the uncompressed data chunk is decoded, so
avoid using the new VP8 bitstream parsing library for now.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
vtenc: fix complier error using fixed lenght arrays
rawparse: catch errors in caps manipulation

Coverity 1139622
mxfdemux: guard against NULL non source components

This component is dereferenced, and later code checking for
NULL in particular cases implies it can be NULL. This likely
does not fix the coverity warning as it was seeing another
path setting component to NULL explicitely, but this was
spotted by looking at:

Coverity 1139736

Which is actually OK from what I can see since the actual
dereference of the explicit NULL pointer will not happen
if the condition that led to the NULL pointer assignment
is met, since the assignment and defeference have mutually
exclusive tests.
dvbbasebin: fix test for proper use count balancing

usecount is unsigned, so too many "unuse" will wrap the counter
around and the >= 0 check will always be fine.

It would be much simpler to just make the counter signed, but
moving the checks where the decrements happen allow a mistake
to be detected earlier, and thus easier to debug.

Coverity 1139791
glcolorconvert: Fix bt709 conversion matrices.

Fix the sign on one entry in the bt.709 YUV->RGB conversion
matrix, and the corresponding inverse matrix. Fixes really
wrong colouring of some videos.
gl: prevent division by 0 on unsupported texture type

Coverity 1199697
gl: guard against using a NULL window pointer

Coverity 1195145
gl: a couple spelling/grammar fixes