summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZiyan <jaraidaniel@gmail.com>2016-01-02 22:42:17 +0100
committerMichael Gernoth <michael@gernoth.net>2016-01-03 04:54:29 -0800
commit7b565f62d3823a5b139474536372da530e500a03 (patch)
tree02b03c9f0d05606698cc402baf634dbd1f8185d0
parent1905f15c8ecfdab8e053a684aa9093e66421cd58 (diff)
downloadhardware_ti_omap4-7b565f62d3823a5b139474536372da530e500a03.tar.gz
hardware_ti_omap4-7b565f62d3823a5b139474536372da530e500a03.tar.bz2
hardware_ti_omap4-7b565f62d3823a5b139474536372da530e500a03.zip
domx: add support for tuna
Change-Id: Ibdf65581caca78b2daa41ac9898383f4c3d38097 (cherry picked from commit e57f2b6f67a2b87da5b9c2f2b82e6cc28eef819b)
-rwxr-xr-xdomx/omx_core/inc/OMX_TI_IVCommon.h49
-rw-r--r--domx/omx_core/inc/OMX_TI_Index.h18
-rwxr-xr-xdomx/omx_proxy_component/omx_camera/src/omx_proxy_camera.c4
-rw-r--r--domx/omx_proxy_component/omx_camera/src/proxy_camera_android_glue.c2
4 files changed, 73 insertions, 0 deletions
diff --git a/domx/omx_core/inc/OMX_TI_IVCommon.h b/domx/omx_core/inc/OMX_TI_IVCommon.h
index b439470..53ff447 100755
--- a/domx/omx_core/inc/OMX_TI_IVCommon.h
+++ b/domx/omx_core/inc/OMX_TI_IVCommon.h
@@ -476,7 +476,9 @@ typedef struct OMX_CONFIG_BRACKETINGTYPE {
OMX_BRACKETMODETYPE eBracketMode;
OMX_U32 nNbrBracketingValues;
OMX_S32 nBracketValues[10]; /**< 10 can be assumed */
+#ifndef DOMX_TUNA
OMX_S32 nBracketValues2[10]; /**< 10 can be assumed */
+#endif
} OMX_CONFIG_BRACKETINGTYPE;
@@ -1741,6 +1743,9 @@ typedef struct OMX_CONFIG_EXTRADATATYPE {
OMX_VERSIONTYPE nVersion;
OMX_U32 nPortIndex; /**< The read-only value containing the index of the port */
OMX_EXT_EXTRADATATYPE eExtraDataType; /**< Identifies the extra data payload type */
+#ifdef DOMX_TUNA
+ OMX_TI_CAMERAVIEWTYPE eCameraView;
+#endif
OMX_BOOL bEnable;
} OMX_CONFIG_EXTRADATATYPE;
@@ -2544,9 +2549,11 @@ typedef enum OMX_TI_SENFACING_TYPE {
typedef struct OMX_TI_SENMOUNT_TYPE {
OMX_U32 nSenId;
OMX_U32 nRotation;
+#ifndef DOMX_TUNA
OMX_BOOL bMirror;
OMX_BOOL bFlip;
OMX_TI_SENFACING_TYPE eFacing;
+#endif
}OMX_TI_SENMOUNT_TYPE;
/**
@@ -2599,7 +2606,9 @@ typedef struct OMX_TI_CAPRESTYPE {
OMX_U32 nHeightMin; // smallest height supported
OMX_U32 nWidthMax; // biggest width supported
OMX_U32 nHeightMax; // biggest height supported
+#ifndef DOMX_TUNA
OMX_U32 nMaxResInPixels;// max resolution in pixels
+#endif
} OMX_TI_CAPRESTYPE;
/**
@@ -2695,34 +2704,72 @@ typedef struct OMX_TI_CAPTYPE {
OMX_VERSIONTYPE nVersion;
OMX_U32 nPortIndex;
OMX_U16 ulPreviewFormatCount; // supported preview pixelformat count
+#ifdef DOMX_TUNA
+ OMX_COLOR_FORMATTYPE ePreviewFormats[100];
+#else
OMX_COLOR_FORMATTYPE ePreviewFormats[32];
+#endif
OMX_U16 ulImageFormatCount; // supported image pixelformat count
+#ifdef DOMX_TUNA
+ OMX_COLOR_FORMATTYPE eImageFormats[100];
+#else
OMX_COLOR_FORMATTYPE eImageFormats[32];
+#endif
OMX_TI_CAPRESTYPE tPreviewResRange; // supported preview resolution range
+#ifndef DOMX_TUNA
OMX_TI_CAPRESTYPE tRotatedPreviewResRange; // supported rotated preview resolution range
+#endif
OMX_TI_CAPRESTYPE tImageResRange; // supported image resolution range
OMX_TI_CAPRESTYPE tThumbResRange; // supported thumbnail resolution range
OMX_U16 ulWhiteBalanceCount; // supported whitebalance mode count
+#ifdef DOMX_TUNA
+ OMX_WHITEBALCONTROLTYPE eWhiteBalanceModes[100];
+#else
OMX_WHITEBALCONTROLTYPE eWhiteBalanceModes[32];
+#endif
OMX_U16 ulColorEffectCount; // supported effects count
+#ifdef DOMX_TUNA
+ OMX_IMAGEFILTERTYPE eColorEffects[100];
+#else
OMX_IMAGEFILTERTYPE eColorEffects[32];
+#endif
OMX_S32 xMaxWidthZoom; // Fixed point value stored as Q16
OMX_S32 xMaxHeightZoom; // Fixed point value stored as Q16
OMX_U16 ulFlickerCount; // supported anti-flicker mode count
+#ifdef DOMX_TUNA
+ OMX_COMMONFLICKERCANCELTYPE eFlicker[100];
+#else
OMX_COMMONFLICKERCANCELTYPE eFlicker[32];
+#endif
OMX_U16 ulExposureModeCount; // supported exposure mode count
+#ifdef DOMX_TUNA
+ OMX_EXPOSURECONTROLTYPE eExposureModes[100];
+#else
OMX_EXPOSURECONTROLTYPE eExposureModes[32];
+#endif
OMX_BOOL bLensDistortionCorrectionSupported;
OMX_BOOL bISONoiseFilterSupported;
OMX_S32 xEVCompensationMin; // Fixed point value stored as Q16
OMX_S32 xEVCompensationMax; // Fixed point value stored as Q16
OMX_U32 nSensitivityMax; // nSensitivityMax = 100 implies maximum supported equal to "ISO 100"
OMX_U16 ulFocusModeCount; // supported focus mode count
+#ifdef DOMX_TUNA
+ OMX_IMAGE_FOCUSCONTROLTYPE eFocusModes[100];
+#else
OMX_IMAGE_FOCUSCONTROLTYPE eFocusModes[32];
+#endif
OMX_U16 ulSceneCount; // supported scene count
+#ifdef DOMX_TUNA
+ OMX_SCENEMODETYPE eSceneModes[100];
+#else
OMX_SCENEMODETYPE eSceneModes[64];
+#endif
OMX_U16 ulFlashCount; // supported flash modes count
+#ifdef DOMX_TUNA
+ OMX_IMAGE_FLASHCONTROLTYPE eFlashModes[100];
+#else
OMX_IMAGE_FLASHCONTROLTYPE eFlashModes[32];
+#endif
OMX_U32 xFramerateMin; // Fixed point value stored as Q16
OMX_U32 xFramerateMax; // Fixed point value stored as Q16
OMX_BOOL bContrastSupported;
@@ -2735,6 +2782,7 @@ typedef struct OMX_TI_CAPTYPE {
OMX_U16 ulCapVarFPSModesCount; // supported variable FPS capture modes count
OMX_TI_VARFPSTYPE tCapVarFPSModes[10];
OMX_TI_SENMOUNT_TYPE tSenMounting;
+#ifndef DOMX_TUNA
OMX_U16 ulAutoConvModesCount; // supported auto convergence modes count
OMX_TI_AUTOCONVERGENCEMODETYPE eAutoConvModes[32];
OMX_U16 ulBracketingModesCount; // supported bracketing modes count
@@ -2745,6 +2793,7 @@ typedef struct OMX_TI_CAPTYPE {
OMX_IMAGE_CODINGTYPE eImageCodingFormat[32];
OMX_U16 uSenNativeResWidth;
OMX_U16 uSenNativeResHeight;
+#endif
OMX_U16 ulAlgoAreasFocusCount;
OMX_U16 ulAlgoAreasExposureCount;
OMX_BOOL bAELockSupported;
diff --git a/domx/omx_core/inc/OMX_TI_Index.h b/domx/omx_core/inc/OMX_TI_Index.h
index 27fba89..d271775 100644
--- a/domx/omx_core/inc/OMX_TI_Index.h
+++ b/domx/omx_core/inc/OMX_TI_Index.h
@@ -204,6 +204,23 @@ typedef enum OMX_TI_INDEXTYPE {
OMX_TI_IndexConfigAVCHRDBufferSizeSetting, /**< 0x7F00006F reference: OMX_TI_VIDEO_CONFIG_AVCHRDBUFFERSETTING */
OMX_TI_IndexConfigFocusDistance, /**< 0x7F000070 reference: OMX_TI_CONFIG_FOCUSDISTANCETYPE */
OMX_TI_IndexUseNativeBuffers, /**< 0x7F000071 reference: OMX_TI_ParamUseNativeBuffer(used only in proxy) */
+#ifdef DOMX_TUNA
+ OMX_TI_IndexParamUseEnhancedPortReconfig, /**< 0x7F000072 reference: OMX_TI_IndexParamUseEnhancedPortReconfig */
+ OMX_TI_IndexEncoderStoreMetadatInBuffers, /**< 0x7F000073 reference: */
+ OMX_TI_IndexParamZslHistoryLen, /**< 0x7F000074 reference: OMX_TI_PARAM_ZSLHISTORYLENTYPE */
+ OMX_TI_IndexConfigZslDelay, /**< 0x7F000075 reference: OMX_TI_CONFIG_ZSLDELAYTYPE */
+ OMX_TI_IndexParamMetaDataBufferInfo, /**< 0x7F000076 reference: OMX_TI_PARAM_METADATABUFFERINFO */
+ OMX_TI_IndexConfigZslFrameSelectMethod, /**< 0x7F000077 reference: OMX_TI_CONFIG_ZSLFRAMESELECTMETHODTYPE */
+ OMX_TI_IndexAndroidNativeBufferUsage, /**< 0x7F000078 reference: OMX_TI_IndexAndroidNativeBufferUsage */
+ OMX_TI_IndexConfigAlgoAreas, /**< 0x7F000079 reference: OMX_PARAM_SHAREDBUFFER (pSharedBuff is OMX_ALGOAREASTYPE) */
+ OMX_TI_IndexConfigAutofocusEnable, /**< 0x7F00007A reference: OMX_CONFIG_BOOLEANTYPE */
+ OMX_TI_IndexComponentHandle, /**< 0x7F00007B reference: OMX_TI_COMPONENT_HANDLE */
+ /* Unused and unsupported indexes on tuna, only added here to avoid some ifdefs */
+ OMX_TI_IndexUseBufferDescriptor,
+ OMX_TI_IndexParamComponentBufferAllocation,
+ OMX_TI_IndexConfigGammaTable,
+ OMX_TI_IndexConfigDynamicCameraDescriptor,
+#else
OMX_TI_IndexConfigSinglePreviewMode, /**< 0x7F000072 reference: */
OMX_TI_IndexConfigFreezeAWB, /**< 0x7F000073 reference: */
OMX_TI_IndexConfigAWBMinDelayTime, /**< 0x7F000074 reference: */
@@ -281,6 +298,7 @@ typedef enum OMX_TI_INDEXTYPE {
OMX_TI_IndexConfigGammaTable, /**< 0x7F0000B5 reference: OMX_TI_CONFIG_SHAREDBUFFER */
OMX_TI_IndexConfigDynamicCameraDescriptor, /**< 0x7F0000B6 reference: OMX_TI_CONFIG_SHAREDBUFFER */
+#endif
OMX_TI_IndexConfigStreamInterlaceFormats = ((OMX_INDEXTYPE)OMX_IndexVendorStartUnused + 0x100), /**< 0x7F000100 reference: OMX_STREAMINTERLACEFORMATTYPE */
diff --git a/domx/omx_proxy_component/omx_camera/src/omx_proxy_camera.c b/domx/omx_proxy_component/omx_camera/src/omx_proxy_camera.c
index e277ddc..6d78454 100755
--- a/domx/omx_proxy_component/omx_camera/src/omx_proxy_camera.c
+++ b/domx/omx_proxy_component/omx_camera/src/omx_proxy_camera.c
@@ -97,6 +97,7 @@ MEMPLUGIN_BUFFER_ACCESSOR sDccBuffer;
OMX_ERRORTYPE OMX_CameraVtcFreeMemory(OMX_IN OMX_HANDLETYPE hComponent)
{
OMX_ERRORTYPE eError = OMX_ErrorNone;
+#ifndef DOMX_TUNA
PROXY_COMPONENT_PRIVATE *pCompPrv;
OMX_PROXY_CAM_PRIVATE* pCamPrv;
OMX_COMPONENTTYPE *hComp = (OMX_COMPONENTTYPE *) hComponent;
@@ -137,6 +138,7 @@ OMX_ERRORTYPE OMX_CameraVtcFreeMemory(OMX_IN OMX_HANDLETYPE hComponent)
EXIT:
DOMX_EXIT("eError: %d", eError);
+#endif
return eError;
}
@@ -152,6 +154,7 @@ EXIT:
static OMX_ERRORTYPE _OMX_CameraVtcAllocateMemory(OMX_IN OMX_HANDLETYPE hComponent)
{
OMX_ERRORTYPE eError = OMX_ErrorNone, eCompReturn = OMX_ErrorNone;
+#ifndef DOMX_TUNA
OMX_STATETYPE tState= OMX_StateInvalid;
PROXY_COMPONENT_PRIVATE *pCompPrv;
OMX_PROXY_CAM_PRIVATE* pCamPrv;
@@ -227,6 +230,7 @@ static OMX_ERRORTYPE _OMX_CameraVtcAllocateMemory(OMX_IN OMX_HANDLETYPE hCompone
EXIT:
DOMX_EXIT("eError: %d", eError);
+#endif
return eError;
}
diff --git a/domx/omx_proxy_component/omx_camera/src/proxy_camera_android_glue.c b/domx/omx_proxy_component/omx_camera/src/proxy_camera_android_glue.c
index 4c98c0c..d3eac23 100644
--- a/domx/omx_proxy_component/omx_camera/src/proxy_camera_android_glue.c
+++ b/domx/omx_proxy_component/omx_camera/src/proxy_camera_android_glue.c
@@ -150,6 +150,7 @@ OMX_ERRORTYPE GLUE_CameraVtcAllocateMemory(OMX_IN OMX_HANDLETYPE hComponent, OMX
{
OMX_U32 i;
OMX_ERRORTYPE eError = OMX_ErrorNone, eCompReturn = OMX_ErrorNone;
+#ifndef DOMX_TUNA
PROXY_COMPONENT_PRIVATE *pCompPrv;
OMX_PROXY_CAM_PRIVATE* pCamPrv;
OMX_COMPONENTTYPE *hComp = (OMX_COMPONENTTYPE *) hComponent;
@@ -250,5 +251,6 @@ EXIT:
if (eError != OMX_ErrorNone) {
DOMX_ERROR("%s: Error 0x%x",__FUNCTION__, eError);
}
+#endif
return eError;
}