Fix dlsym call to get OMX_Deinit reference

Change-Id: Ief924a2cddc472c1c580af2341819bdb04acb005
hardware/qcom/media: Use OMX_IVCommon.h header file

-  Use QCOM color format definitions from OMX_IVCommon.h

Change-Id: I5ba11d00647751ce06db0c07393fc122c403179a
libI420colorconvert: Add new library for MovieStudio color conversions

This library is a wrapper around the proprietary color conversion
library. VideoEditor framework opens this library which in turn will
open the proprietary color conversion library and perform the
conversion. It has routines to handle color conversion from TILE4x2
to Planar and from planar ro semi-planar.

Change-Id: I66033d378a293c601f83037eebdc6e5e1a60481c
CRs-Fixed: 328501
Add support for 7630_surf for JB bringup.

Change-Id: I7599449e56c26cbbc46f084567bf71da95ccf099
mm-video:: Publish Divx realted header files

- Export DecryptDivx related files

Change-Id: I7c6d2f6f5621f0988ccc282d59d3a797aa4a082e
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: Ic0ee522d05654db71ab9ccf2aca537b85725cd89
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: Ifb0e72343089f610af14e7e3458aef17f877119a
mm-video: Enable compilation on MSM8974 target

Enable compilation of and fix compilation issues of
mm-video module for MSM8974.  Change references of
MSM target 'copper' to 'msm8974'.

Change-Id: If3d975e840f08ab74396590cec6ab18f3e55c6a5

Conflicts:

	Android.mk
Revert "mm-video: Use msm ion header file".

This reverts commit fa06a3d50a36b5756b2c9497d983a54e90440a01.

Change-Id: I4a3e8ad12f02d70e689052141ab430d1fb58b39a
mm-video : Switch back to ion.h from kernel sources.

- Also, use kernel header files exported from kernel sources
  for vdec and venc.

Change-Id: I18597074094dd6d5c1dbeed7987e307a73246552

Conflicts:

	mm-video/vidc/venc/Android.mk
mm-video: Enable O_DSYNC flag.

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

Change-Id: If0d05193c337d08ee02daf4323751dee26ca4615
vidc: venc: fix for compilation error if ion is enabled

This change will resolve the video encoder compilation error
for 7630 target if ion is enabled in the build.

Change-Id: I3edadd65aa9fbc211c7fc6b2bf9ae003c3e60db7
mm-core: Fix building 7x27A on CM10

Change-Id: If245c8961f81d0c14a9f611b23c037911ca8e4ba
qcom/media: Squashed set of commits to bring it up-to-date with CAF

mm-video: Update ION allocation API for BADGER.

Update ION allocation API to reflect proper size.Change
printf to DEBUG_PRINT messages for badger.

Change-Id: I0b59929db876dd3d970f71c326a53afc3b515f3c

mm-video: vidc: Adds support for smooth streaming

Adds support for smooth streaming by enabling
continue data transfer mode.

Change-Id: I5b872aa5081a1d13c35eed0d462292cbaaefb1e4

mm-video: vidc: Adds support for higher resolution than QCIF

Adds support for all the resolutions by setting
height and width if it is different from QCIF.

Change-Id: I29aee539755942f25c2e0c9fc43d3a9853d28457

mm-video: vdec: Adds support to dump YUV output into file for copper

Adds support to dump YUV output into file for copper
by calculating stride and scanlines.

Change-Id: I0cf1cd2e9d0f094ef71aca8f6465a61e193a2518

mm-video: vidc: Flush buffers on OMX command

Move the flush buffer logic to trigger on OMX_CommandFlush.  This avoids
some race conditions that occurs when client fails to call PortDisable
quickly enough after a port reconfiguration.

Change-Id: Ie19fae01148767512227b0810945858342be9fbc
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>

mm-video: vidc: Add support for H263

Adding support for H.263 encoding and decoding
by setting H263 fourcc code.

Change-Id: I4f44e0166bee989c40997b4fd0a16a4462bdae04

mm-video: vidc: Adds support for MPEG4 decoder support

Adds support for MPEG4 decoder by setting MPEG4 fourcc code.

Change-Id: Iab773d6a40bad6cdab337c602f3a6cbfed17673b

mm-video: vidc: Adds support for VC-1 decoder

Adds support for VC-1 decoder by setting VC-1 fourcc code.

Change-Id: I0ef6798abacfe40409af9542163267d894417004

mm-video: vidc: Adds support for VP8 decoder

Adds support for VP8 decoder.It supports only frame
by frame decode

Change-Id: I125bfa7cad5916e257e940af08b686827675e991

mm-video: vidc: Add MPEG2 decoder support

Adds support for MPEG2 decoder by adding fourcc code.

Change-Id: I4701618e96759662c1f898e4a2d89d141bf868c6

mm-video: vidc: Adds support to set picture order

Adds support to set picture order using Controls.

Change-Id: Id1dcace3fb855bc37dd3b922b0d83a30a5694b78

mm-video: vidc: Adds support for Intra Refresh support

Adds support for Intra Refresh MB support.

Change-Id: Ibba0989bb23793e1463fe2041c3f63e3b070391c

mm-video: vidc: Adds support for BYTE based slicing

Adds support for BYTE based slicing

Change-Id: I241ec7c9c969f0c9b0deb29c25ae56c163a4660e

mm-video: vidc: Adds support to set frame rate

Adds support to set frame rate to venus

Change-Id: I4849bfb8d7679d13ec05e792ce65074969450a3a

mm-video: vidc: Adds support for dynamic I frame request

Adds support for on demand I frame request

Change-Id: Iab287197b1c5512eb96f70b2c3ec68706a06c77a

mm-video: vidc: Adds support for 4kX2K resolution support

Adds support for 4KX2K resolution support by adding
entries in profile and level table for MPEG4,H264
and H263.

Change-Id: I15a221d91f0dc69172920a061db79b2590a38ba7

mm-video: vidc: Adds support for VP8 encoder.

Adds support for VP8 encoder

Change-Id: Ie9733839e360227ace12ee05c4e018e4c79119ca

mm-video: vidc : Adds support for 4KX2K resolution support in testapp

Adds support for 4KX2K resolution support in testapp.
Adds support to provide 4K2K as string input to select
4KX2K for MPEG4,H264 and H263.

Change-Id: I272db7f46b0d722e66922ee9bf2b4e1dc90d8172

mm-video: vdec: test: Adds CRC generator.

Adds CRC generator for decoded video frames.
For every decoded video frame, a CRC value is
generated and written into a file. This file
can be used by crc_comparator tool to compare
with reference YUV.

Change-Id: Id765079ccbfca0985f6bc8d8e330d92748b4cef5

mm-video: vidc: Adds support for VP8 decoder in testapp

Adds support for VP8 decoder in test app.VP8 decoder
changes are made specific to 8974 target.

Change-Id: I5c192eb709003410beff3d4c15a33c181f426453

mm-video: vidc: Adds VP8 encoder support in testapp

Adds VP8 encoder support in encoder testapp.These
changes are applicable only for 8974.

Change-Id: I230d84df6229a8844bef959c0c9e6c40766372a0

mm_video: vidc: Align input buffer size for vdec

1080p video core needs scratch space in the input buffers.
This change will reduce the input buffer size exposed to client
by scratch buffer requirements of video core.

Change-Id: I56fde759a1c715cb204f5779114f2694f13eb6f7
CRs-Fixed: 366808

vidc: Make msm8974 specific changes in make file.

Enabled compilation of msm8974 target specific file for msm8974.

Change-Id: I4dc8e7cb91e08f5ea85052e8b0142b990059e630

mm_video: vidc: Handle consecutive start code in demux table

In case of consecutive start code in a frame, these changes shall
eliminate the first occurance of the start code entry while
constructing a demux table

Change-Id: I12c679407b60aa7d3414414911659b38737d4814
CRs-Fixed: 368116

mm-video: vidc: Add PAR value extradata support for H264

Core gives aspect ratio information for H264 in a shared
memory register. This change will fetch the value of the
aspect ratio from the designated register and append this
information to the frame_info extradata which can be used
by the client.

Change-Id: I8f7f29a4f70cb99049d8238101326f86b5901a6f

mm-video: vdec: Ignore extradata handling.

Extradata is not implemented in driver yet,
so ignoring extradata handling till it is
supported by driver.

Change-Id: Ibed3ea7dd0156c5e04e9a74364f841abd9d9b664

vidc: vdec: Amend timestamp reorder logic for interlaced content

Due to the wrong logic in duplicate timestamp reorder for interlaced
content, the output timestamps are not in ascending order sometimes.
This commit will fix the issue.

Change-Id: I39761d0bed93fa83806a4e4c4a602782fa743ebf
CRs-fixed: 374393

mm-video: vidc: Add ION support for 8x55 target

This commit will add ION memory support for
video decoder and encoder on 8x55 target.

Change-Id: I426187b5399545ce2b4126f01ea50333f8e28e8a

mm-core: Add OMX registry table files for 7630 target

Add OMX registry table files to the 7630 target build to
avoid video playback failed case using Hardware decoder.

Change-Id: I0016b2569de4b1fdada69ba56a21d040f3768798
CRs-fixed: 380463

mm-video: vdec: testapp: Fix display issue on JB

PAN_DISPLAY has to be called explicitly after OVERLAY_PLAY to
display the frames

Change-Id: Icb8a4ff2df5abce9f10cf37ea44fa8d16b3b5398

msm-video: Add a flag for the syntax header generation

- Null check is added for the buffer in get_parameter.
- Get syntax header feature is disabled by default to avoid
  kernel crash while fuzzing the device. This feature can be
  enabled by adding flag ENABLE_GET_SYNTAX_HDR in Android.mk
  if required

CRs-Fixed: 384479
Change-Id: I1bfafed1ae3b5bc03745ebded6ef9fb3c2e6c696

mm-video: vidc: Set TILE colorformat for index zero port format

- Set TILE color format on video port format for index zero
- Amend logging as appropriate.

Change-Id: I6bd71910f3cff3f804afa84a41ee5450c3190264

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: I4ef59c442f028b2e76e063f1538c2f41b7f2a123

vidc: 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: I790d9b0a08f3adff81b902ba4b6850469100b367

mm-video: vdec: Fix output buffer dump.

Fixes buffer dump for output buffers according
to NV12 format on 8974.

Change-Id: I0527803ff41629ecbc219415ef78735bd107019d

hardware/qcom/media: Add AC3/EAC3 support

Add entries for AC3/EAC3 in registry. Add definitions to support
AC3/EAC3.

Change-Id: I39ed12657df86a72a11b8f756eb8503f58807d8b

mm-video: venc: 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: I2349772853e7f572490cd44cad78a99e704c75b1
mm-video: Fix noisy logging in Vdec

 * Remove the override of compile options
 * Change the parameter debug info that's printed in every frame to LOW

Change-Id: Ia3bb6ecf1c106a216604cdc5a21e4173944ab340
mm-core: Add MPEG-2 extension and user data types

With this commit, OMX_ExtraDataMP2ExtnData and
OMX_ExtraDataMP2UserData eTypes are added to support
MPEG-2 extra data types.

Change-Id: Iffd6e216d9f6fdf30f6a99410c353a37bbe14dc7
mm-core: Add support for Smooth streaming for secure mode playback.

   - This change will add the extension index required for

   - Smooth Streaming for both secure and non secure mode video playback.

Change-Id: I461a0267d0d1ef8524d5db9330b23b7108616640
CRs-Fixed: 368333
mm-video: vidc: Add support for Smooth streaming for secure mode playback.

    -When secure playback enabled, extra data parsing can't be done to
      find new resolution.

    -This change will add the extension index required for
      Smooth Streaming for both secure and non secure mode video playback.

Change-Id: Ifbab34b3f56a7054a62588bacd618c0f68eddc5b
CRs-Fixed: 368333
mm-video: vidc: Try to open secure video decoder again.

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

CRs-Fixed: 380161
(cherry picked from commit e1cc857273d078b6a30f9f171564e95fe017935f)

Change-Id: I276b0bd62dbd4def6b8d6a99a4a263c304fa3c06
mm-video: vidc: suppress non-fatal error messages.

These messages are non-fatal and appear frequently
during the video session. Hence suppressing them.

CRs-Fixed: 389408
(cherry picked from commit 21459ebf9bdc1fb22e5af62dcd4678eca7607474)

Change-Id: Iee1d87baadc626310b1463ae26951fd9305397e2