mm-video: update mk for cm9

Change-Id: I73a1bd021b53ecc4dda7f1490a0e145cdbdcc91a
Add qualcomm vendor build toggle
Missing header for qualcomm media OMX
Deprecate qualcomm media for qcom-opensource
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
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)
Revert "Missing header for qualcomm media OMX"

This reverts commit 249c760934711d8d7ec287ad169bfe74dc3a662e.
mm-video: Create Decrypt handle internally

Decoder will create decrypt handle internally, when needed.

(cherry picked from commit 31c0e9a0f705625f88e24d976c89bdcab176b932)

Change-Id: I782e8b4c8451f74920925deae47b2f6295233029
mm-video: update mk for cm9

Change-Id: I73a1bd021b53ecc4dda7f1490a0e145cdbdcc91a
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
Merge branch 'ics_chocolate' of git://codeaurora.org/platform/vendor/qcom-opensource/omx/mm-video
Merge branch 'ics_chocolate' of git://codeaurora.org
omx qsd8k: vdec compat for current kernels
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
vidc: venc: add maximum allowed bitrate check parameter

Bitrate for video encoder cannot be set beyond
the maximum suported bitrate for the set profile
and level. This change will enable maximum allowed
bitrate check condition (via OMX_SetParameter with
index 'OMX_QcomIndexParamVideoMaxAllowedBitrateCheck')
and return error if bitrate is more than the set
profile & level maximum supported bitrate.

CRs-fixed: 345105
(cherry picked from commit 03c4b8693e18ede01c9eaa69fd11e3e2fabcafa9)

Change-Id: Ic6b418042c95c7072d7c825763a422918f81ea26
vidc: vdec: Fix possibility of NULL pointer access

Code changes were made to take care possibility of
NULL pointer access and also to take care the use
of uninitialized variable.

CRs-Fixed: 345440
(cherry picked from commit 05023abdba5e5fb5068ed95543ecba4e9edc7c22)

Change-Id: Ifa2c9937c57304d2efe6c4eec863bbabda6155f0
vidc: venc: Update encoder test app to support ION

Encoder test app is updated with ION allocation and
free for input and output buffers.

Change-Id: Ifa2c4fcb5d05e2ca6ee4d2672449a7af3b0db85d
CRs-Fixed: 334525
(cherry picked from commit e481706c66b39498c41195c1e3e14305010aabe7)
mm-video: vidc: Try to open secure video decoder again.

Try to open secure video decoder again if first
open fails.

Change-Id: I09c6f1db00ef62e023e2640cc17f0dc81f49911e