assrender: proxy allocations on video pad

Forward allocation queries on video sink pad instead
of discarding them.

This allows the upstream elements to use the allocation
parameters or pools from the downstream elements like
videosink.

https://bugzilla.gnome.org/show_bug.cgi?id=692012
assrender: refactor code to avoid duplication

https://bugzilla.gnome.org/show_bug.cgi?id=692012
assrender: fix some subtitles being ignored

https://bugzilla.gnome.org/show_bug.cgi?id=692012
assrender: add wait-text property

This is the same property as in the pango element, to allow waiting for
text on the text pad before rendering the video.

https://bugzilla.gnome.org/show_bug.cgi?id=692012
assrender: render overlay composition if supported downstream

This allows rendering ASS subtitles on top of video when
using hardware-accelerated video decoders based on e.g.
VA-API or VDPAU.

https://bugzilla.gnome.org/show_bug.cgi?id=678389
https://bugzilla.gnome.org/show_bug.cgi?id=692012
assrender: use overlay composition to blit subtitles on video frames

Re-uses existing blitting code and also means we can support
a lot more video formats out of the box, hence avoid unnecessary
pixel format or colour space conversions.

https://bugzilla.gnome.org/show_bug.cgi?id=692012
assrender: reenable unit tests and up rank to primary again
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.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
codecparsers: vc1: fix parser for DQPROFILE in VOPDQUANT.

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

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
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.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
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).

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
curltlssink: set correct level of SSL for the transfer

https://bugzilla.gnome.org/show_bug.cgi?id=692010
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.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
configure.ac: disable MFC if some v4l2 PIX_FMT missing
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.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
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.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
insertbin: Add bin to dynamically insert elements in a running pipeline

This element automatically links in any element added using it's
action signals. These elements must have a single source pad and a single
sink pad.
codecparsers: vc1: 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.

This fixes decoding for the video sample attached to:
https://bugzilla.gnome.org/show_bug.cgi?id=668565

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
codecparsers: vc1: fix bitplanes decoding (DIFF6 or NORM6 residual bytes).

Fix parsing of residual bytes. This is a two-step process. First,
remaining colums of full vertical resolution (<height>) need to be
processed. Next, remaining bytes in the first row can be processed,
while taking into account the fact that we may have filled in the
first columns already. So, this is not full horizontal resolution.

The following figure helps in understanding the expected order of
operations, for a 8x5 MBs bitplane.

    5 5 6 6 6 6 6 6
    5 5 1 1 1 2 2 2
    5 5 1 1 1 2 2 2
    5 5 3 3 3 4 4 4
    5 5 3 3 3 4 4 4

So, after tiles 1 to 4 are decoded, vertical tile 5 needs to be
processed (2x5 MBs) and then the horizontal tile 6 (6x1 MBs).

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
insertbin, tests: fix printf format compiler warnings