Added VP8 OMX component.

Add vp8 plug-in base code to enable openmax component.

Fixed library version to match the current released
version

Fixed the index for VP8 component

Change-Id: I79606de57dbdd0ada5f6fb7e0b02b615c6a22069
Signed-off-by: Sameer Kibey <sameer.kibey@intel.com>
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
Updates to VA config buffer setup in VP8 OMX component.

Added some minor changes to VP8 OMX component.

Change-Id: I7f0b97c5d2ef9f8c3ade92b00a5b04d2423700b8
Signed-off-by: Sameer Kibey <sameer.kibey@intel.com>
Resolution change handling support for VP8 OMX.

Added code to handle resolution change for VP8 OMX
component. The H.264 OMX component performs a flush when
new resolution is detected though SPS header. However,
a flush will make us lose the key frame in case of VP8.
This causes all subsequent inter-frames to be dropped
due to missing reference. The current solution is to not
do a flush in VP8 case, but simply ignore the previous output
buffer with incorrect resolution. This works for VP8 IVF and WebM
files. Dynamic resolution change handling with flush will be added
later.

Change-Id: I3339d00f000504dc95153a26c87579bd9300968b
Signed-off-by: Sameer Kibey <sameer.kibey@intel.com>
vp8 vid-dec: fix index usage for VP8 Coding

VP8 coding should remove the VPX index

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
Initialize mGlxPictures pointer to NULL.

Initialize mGlxPictures pointer to NULL. Otherwise
this will contain garbage value and PutSurface() will be
called on invalid pixmap, causing a segfault. This issue
was seen during VP8 playback on 64-bit bayleybay.

Signed-off-by: Sameer Kibey <sameer.kibey@intel.com>
vp8_dec: avoid copying header files twice

while building within ChromiumOS there's a conflict where the
VideoDecoder_source_h header file can't be replaced once
copied by the previous component.  As the header is already
in the right place, no need to copy it twice

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
add configure option --enable-libyami, default is off

Change-Id: I43a252d01e38d1b991eb2935b195e14bccd82376
OMXVideoDecoderBase: MapRawNV12, check dest buffer size before copy nv12 data
OMXVideoDecoderBase: improve MapRawNV12 to support odd frame size
update output port param for resolution change

paramPortDefinitionOutput.nBufferSize is used by client
to alloc output buffer (gst-omx for example).
chromium doesn't care of it, getDecodedBuffer uses
sizeof(VideoRenderBuffer) when bNativeBufferEnable is true.
even sizeof(VideoRenderBuffer) seems too big,
since only one pointer is set to pBuffer->pPlatformPrivate.

1. Output.nBufferSize inits to OUTPORT_BUFFER_SIZE
2. calculate Output.nBufferSize in HandleFormatChange
3. if decoder gets frame size during start,
   does HandleFormatChange in ProcessorInit

Change-Id: Ieb1c14be1a36fc853db4ae1ed360a7d65ce7cdc6
OMXVideoDecoderBase: call renderDone in processOutPortBuffers

it is incorrect to call renderDone() in PreFillBuffer.
    a) rendering hasn't been done yet
    b) two threads may come here twice:
        there are ComponentBase::Work->OMXVideoDecoderBase::getDecodedBuffer and ComponentBase::CBaseFillThisBuffer
        calling renderDone() twice will confuse codec, since codec usually recycle surface buffer upon this call.

clear pPlatformPrivate after renderDone(), since it has been returned back to codec.
it disclose the issue of flagNativeBuffer in ProcessorPreFillBuffer, fix it.

Change-Id: I48222fd769ff7cc5c5cf8591c89b51ffff4b0721
AVC dec: remove AccumulateBuffer

it fixed one issue that an incorrect frame data is sent from
omx to codec when codec temp-reject one buffer (which should be
retained in omx level)

it is unnecessary and problematic to AccumulateBuffer in OMXVideoDecoderAVC

Change-Id: I3f69e2038c1499308a9c934eac219d5d6b16d66f
configure: add option --enable-vp8-role-name, default off (chromium)

 1. when --enable-vp8-role-name is not set (default)
    vp8 decoder uses "video_decoder.vpx" as role name, it matches chromium
2. when --enable-vp8-role-name is set,
    vp8 decoder uses "video_decoder.vp8" as role name, it matches gst-omx

Change-Id: I0ddc447692bee3ba5b5a555319590082b7c36b99