Increase the avformat mux buffer size to 10 MB.

The previous value, 32 kB, causes formats like WebM to overflow
and split the blocks, which has negative consequences for streaming.
We're unlikely to have a memory crunch in this area, so increase it
to something generous.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
avformat mux: Mark keyframe blocks as such.

Some browsers, such as Firefox, are very picky about WebM streams needing to
start with a keyframe. To be able to handle this correctly when streaming,
the avformat mux needs to mark keyframe-containing blocks (or clusters, in
Matroska terminology) as such even after they have been muxed. The next patch
in the series will make httpd actually care about this flag.

Unfortunately, as avformat does not actually propagate this status, we need
to use some heuristics to figure out which blocks contain keyframes. The natural
thing to do would be to say that when we write a keyframe, the block that comes
back has to be a keyframe block, but the WebM/Matroska muxer thwarts this by
having its own internal buffering of clusters, flushing the _previous_ cluster
when we send it a keyframe. Thus, we need to explicitly send a flush (a NULL
packet) before the one that comes back when we mux a keyframe.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
avcodec: align dimensions only for software decoding

There is no use to CPU memory edges when decoding in hardware (arguably
libavcodec should be "enhanced" to not add them in that case).
This unbreaks VDPAU.
Add subdir-objects automake option where appropriate

Makes version 1.14 happy.
Update to gettext 0.18.3.1, fix AC_CHECK_DECLS usage
omxil: vout: Handle dynamic aspect changes.

Handle changes of aspect ratio through the Control handler.

Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
omxil: rpi: Fetch pixel aspect ratio from decoder.

The broadcom omx implementation has a vendor extension to fetch pixel aspect
information from the decoder. Use this to pass proper aspect information with
the pictures.

Signed-off-by: Julian Scheel <julian@jusst.de>
decoder: Give packetizer aspect ratio to decoder.

When the packetizer detects a valid pixel aspect ratio this should be
forwarded to the decoders input format. This is helpful for decoder modules
which do not detect the aspect ratio on their own.

Signed-off-by: Julian Scheel <julian@jusst.de>
omxil: Passthrough aspect ratio from input format.

If the input format has a valid pixel aspect ratio set (ie from the
packetizer) pass this into the output format. This helps for omx
implementations which do not report the aspect ratio.

Signed-off-by: Julian Scheel <julian@jusst.de>
decoder: Let decoder modules set dpb size.

As many decoder modules do manage their dpb completely internal and do not
benefit from a picture buffer large enough to hold the dpb in VLC itself, let
the decoders decide about the required dpb size.
As of now the only decoder utilizing the dpb through the VLC picture_buffer is
libmpeg2, which is adapted to announce it's actual dpb size.

Signed-off-by: Julian Scheel <julian@jusst.de>
omxil: Activate direct rendering mode.

Allow the omx core to use direct rendering.

Signed-off-by: Julian Scheel <julian@jusst.de>
wip: Increase number of omx buffers for direct rendering.

To activate direct rendering the vlc core requires enough buffers to store the
dpb (makes not much sense with omx...) and the internally kept references. For
mpeg2 this is 14. Hence increase the buffercount to 14 for testing.

This is not meant to go mainline like this!
wip: Timing hack for OMX on rpi.

No clue why we need this atm, will hopefully drop it soon.
wip: omxil: rpi: deinterlace filter

This is a starting point for a deinterlace filter based on broadcom image_fx
omx component. As of now this is not functional - Parameter set fails and no
buffers are filled.