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.
For omx implementations which provide aspect ratio information give these
precedence over the incoming values.

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!
omx: bcm: Add non-absolute library paths.

Not all distributions install the broadcom libraries in the broadcom default
path /opt/vc/lib. To supprt those the default system paths should be searched
as well.

Signed-off-by: Julian Scheel <julian@jusst.de>
Remove AI_IDN flags
omxil: Allow generic use of PrintOmx.

PrintOmx is not actually specific to the decoder module and can be handy in
all other omx modules as well. Therefor remove the linkage to decoder_t and
allow generic use with any vlc object. That pointer is used solely for debug
printing.

Signed-off-by: Julian Scheel <julian@jusst.de>
omxil: Provide function pointer for bcm debug.

The broadcom OMX implementation contains a handy debug function, which we load
now.

Signed-off-by: Julian Scheel <julian@jusst.de>
omxil: vout: Do not block in LockSurface when fifo is empty.

Instead of blocking when LockSurface can't get an omx bufferheader it should
return with an error to prevent deadlocks in VLC core.

Signed-off-by: Dennis Hamester <dhamester@jusst.de>
Signed-off-by: Julian Scheel <julian@jusst.de>
omxil: vout: Output images directly in Display

Instead of waiting for an Image to be released to display it, directly call
OmxEmptyThisBuffer to display the image as soon as possible. This also avoids
a race-condition, where the omx bufferheaders fifo could run empty while
actual pictures are available in the picture pool.

Signed-off-by: Dennis Hamester <dhamester@jusst.de>
Signed-off-by: Julian Scheel <julian@jusst.de>
wip: vout_wrapper: Increase private picture count from 4 to 7

As the omxil deinterlace filter can consume up to 5 pictures in parallel (2 in
the deinterlace filter, 2 headed to the output, 1 being prepared) the desired
count of filter reserved pictures of 3 is not sufficient anymore. Increase it
to 6, and hence the total count to 7.
Maybe this should be redesigned to be configurable depending on the used
filter plugins.
omxil: Expose setup_tunnel call.

The setup tunnel call is required to configure direct tunelling between OMX
components, which we use for the deinterlace filter integrated into the
decoder.

Signed-off-by: Julian Scheel <julian@jusst.de>
omxil_utils: Add component name to PrintOmxEvent
omxil: Properly set the framerate and progessive flag
WIP!! deinterlace in tunneled mode
omxil_vout: Output subpictures through dispmanx
omxil_vout: Delete subpicture after display.

If a subpicture is rendered it has to be freed.

Signed-off-by: Julian Scheel <julian@jusst.de>
omxil_vout: Only draw pictures with increased date

If a picture is older than the previously drawn one it shall be dropped to
avoid jumpy images.

Signed-off-by: Julian Scheel <julian@jusst.de>
omxil_vout: Handle OMX_EmptyThisBuffer errors

If an error occurs on an OMX_EmptyThisBuffer call the picture which should
have been rendered has to be freed, so that it is not leaked.

Signed-off-by: Julian Scheel <julian@jusst.de>