vidc: Fix for secure mode crash.

In secure mode memory is never mmaped in userspace
accordingly memory should never be unmaped.
added checks as not to unmap the memory when in
secure mode.

CRs-fixed: 336365
(cherry picked from commit 1aa31132403ca9a803d9175b785b9846d5f0c828)

Change-Id: I43cd93156f087168fbcc504aace598202bcee2df
venc: Support OMX_COLOR_FormatAndroidOpaque color format

- The OMX IL Client can set color format to OMX_COLOR_FormatAndroidOpaque
  if the client is unaware of the input color format. (e.g. live effects)
- If OMX_COLOR_FormatAndroidOpaque is set, we internally map it to
  one of the supported input formats (e.g. OMX_COLOR_FormatYUV420SemiPlanar)

(cherry picked from commit 79535a226ec321df2f02d924494738091632369e)

Change-Id: Ice3ca88edc1131255fa0ee371f66206252d32482
vidc: vdec: Allocate separate fds for buffers

Made changes in allocate_output_buffer() to separate the
fds for decoder output buffers.

Change-Id: I8afb6a67b2df3387522309d0ff02f8d1fa41b794
(cherry picked from commit 77d7af1ba978c51be68e63b92575e676431c8f91)

Conflicts:

	vidc/vdec/src/omx_vdec.cpp
venc: Support OMX_COLOR_FormatAndroidOpaque color format

- The OMX IL Client can set color format to OMX_COLOR_FormatAndroidOpaque
  if the client is unaware of the input color format. (e.g. live effects)
- If OMX_COLOR_FormatAndroidOpaque is set, we internally map it to
  one of the supported input formats (e.g. OMX_COLOR_FormatYUV420SemiPlanar)

Change-Id: I611f98bb032e1791e40da9a5b84b17db0768e39b
(cherry picked from commit 79535a226ec321df2f02d924494738091632369e)
Merge "venc: Support OMX_COLOR_FormatAndroidOpaque color format" into ics_chocolate
mm-video: Create Decrypt handle internally

Decoder will create decrypt handle internally, when needed.

(cherry picked from commit 31c0e9a0f705625f88e24d976c89bdcab176b932)

Change-Id: I782e8b4c8451f74920925deae47b2f6295233029
vidc: Increase the MAX_INPUT_ERROR value

The OMX_Component errors out if the error count from video driver
exceeds MAX_INPUT_ERROR. The OMX component queues each SPS and PPS
separately and the video core returns a non-frame data recoverable
error after processing each SPS\PPS. With this change, the OMX
component can queue the max number of SPS and PPS, without
erroring out.

CRs-fixed: 337499
(cherry picked from commit 26fd32d632615f2b6ebfaf44f5db30b36a86706f)

Change-Id: Idd81a7a43b99bc8f106b892f32a3d7786e265b4b
vidc: Add slice info extradata feature for encoder

Single frame can have multiple slices/NAL units.
video driver can give slice information to
video encoder component at the end of output
bitstream if slice information extrdata enabled.

Slice info extradata can be enabled as below,
OMX_Client can call OMX_SetParameter with
index "OMX_QcomIndexParamIndexExtraDataType"
by appropriately sending third argument of
type QOMX_INDEXEXTRADATATYPE with
nPortIndex as output port number and
nIndex as "OMX_ExtraDataVideoEncoderSliceInfo".

The slice information in output buffer can be
parsed for any errors in component using
setprop command via adb shell window as below,
adb shell setprop vidc.venc.debug.sliceinfo 1

The extradata set parameter has to be called
before "OMX_IndexParamPortDefinition" else
currently driver is failing to allocate the
buffers due to buffer size mismatch.

CRs-fixed: 342914
(cherry picked from commit aedb982c4b74de69a42e49f02cf45c2f14deb936)

Change-Id: Iafb38c2ca9588ac6c9d47ae94ee2ff0c0916fe97
vidc: Check the nSize while handling extra data

There is a corner case in extra data handler if the
nSize of the extra data structure comes out to be zero.
Added a check to avoid infinite loop.

Change-Id: I3e86c010d3243acaa583f4e58fa57f8c53f7e67b
CRs-fixed: 342529
mm-video: update mk for cm9

Change-Id: I73a1bd021b53ecc4dda7f1490a0e145cdbdcc91a