qcom/media: update media code

Change-Id: I8fab90e0696562b21b22143d3357d518cad6d8cc
Signed-off-by: Iliyan Malchev <malchev@google.com>
Fix compilation of media modules from build root

Change-Id: I33c2666de541409e91bcf58964db28e247017a60
hardware/qcom/media: fix build for other targets

Change-Id: I0a3890c88516f71b67a333051c503f37cc93741e
Signed-off-by: Iliyan Malchev <malchev@google.com>
venc : Reduce input port default buffer count

- For metadata mode, reduce the default buffer count
  to 4.
- Metadata mode currently has no way to signal the number
  of buffers prior to start of recording. This in turn means
  for a input source with finite buffers, we might end up having
  a larger buffer count than the source.

Change-Id: Ic43e233d90e0ddf0779aba8f41d07c5bfa3d7423
Fix dlsym call to get OMX_Deinit reference

Change-Id: I7c8b4608e5d0eb98014966e18d8a7d6f74671e57
mm-video: vdec: Check size of native output buffer

- Add check to ensure size of native output buffer is
  alteast the size requested by the driver

Change-Id: I851244b433a00a748f25f3209be9f8c5222507cb
mm-video: vdec: Fix calculation of pBuffer pointer for extradata processing

- When graphic buffers are being used, the output buffer-header
  pBuffer points to the native buffer handle.
- So lookup at the driver context array for the actual buffer address

Change-Id: I47d34328b6f57d70f927ceedeedb7ac7aa4a9e51
mm-video: Use msm ion header file

Change-Id: I08f000d5f471f6a6a1f4ba80a54d0b2cf9e666d0
mm-video: Enable use of O_DSYNC flag

- Enable use of O_DSYNC flag for secure video playback
- Enable use of O_DSYNC flag for allocating uncached i/o buffers

Change-Id: Iab9bd0d9d986934d439d1a44d1d846e858e0d3cf
mm-video: vidc: Map encoder input buffer aligned to 16

The video core requires the encoder input buffer size to be
calculated after aligning the height and width to 16.

Change-Id: Ica04d82cd58e859f69fdbb32565bd9276c858d0c
mm-video: vidc: Revert optimization to skip few initialization steps for QCIF

- As the OMX IL component is initialized with the default resolution for
  QCIF, many steps were skipped in the implementation of OMX_SetParameter
  with index OMX_IndexParamPortDefinition if the client sets QCIF as the
  encode resolution.
- This causes issues with some IL clients (e.g. OMXCodec) which tries to update
  the port buffer size.
- To be safe, do all initialization steps irrespective of resolution.

Change-Id: I7c42e9ec6ede4a0b40242599e9119fa7a5eccc00
mm-video: venc: Fix enumeration of color formats

Video encoder component should return OMX_ErrorNoMore,
when nIndex is greater than the color format enumeration
count.

Change-Id: I8e0c6864e5b8f948246cd407cae828e93795917a
Signed-off-by: Iliyan Malchev <malchev@google.com>
libc2dcolorconvert: Initial commit
libc2dcolorconvert: New API and color format support

- Add an API to query for buffer requirements
- Add an API to dump the converted output buffer
- Add support for NV12 color format

Change-Id: Ic958731752fda09bc2bc96472c9345e9653c2c6f
vidc: venc: Support for RGB888A input format.

Adding support for RGB888A as input format for video
encoding by integrating color conversion library.

Change-Id: I771294efc8601eff9c3e13f251686697634f2f17
mm-video: venc: Align the buffer size to 4K for ION memory.

Before this change, the buffer size alignment was missing if
the frame width or frame height were not multiple of 16.

Change-Id: Ic868cb0e093fcf093c351e7e65c80de983539030
vidc: handle incorrect buffer size from c2d.

Video component will check for buffer size that the C2D component
returns after color conversion. Any error in buffer size will be
reported to client and session will be terminated.

Change-Id: I8f54c095b3d16e2089fbfa1be22b6ef9a0827ff4
Signed-off-by: Iliyan Malchev <malchev@google.com>
Buffer size calculation corrections for NV12_2K

Change-Id: I15c0c004b52f244aa7cd70e9859dfd363b37cd85
Signed-off-by: Iliyan Malchev <malchev@google.com>
mm-core: Support for secure encoder component.

Adding support for avc secure encoder

Change-Id: Id3df7ea8d49ad0be240fbfbb0d227e81ec9d60ed
Signed-off-by: Iliyan Malchev <malchev@google.com>
vidc: Support for secure encoding session.

This change adds support for secure encoding session.
All buffers in openmax component will allocated from the
secure heap.

Change-Id: Id0da4e2a6149c41b2101c52a8eb9486ade39bd1e
Signed-off-by: Iliyan Malchev <malchev@google.com>