diff options
author | Milen Mitkov <mmitkov@mm-sol.com> | 2011-08-26 16:31:14 +0300 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-09-02 14:04:23 -0700 |
commit | 14646afbb7bfa03417947cdce4e37227ed8fcc3c (patch) | |
tree | cd7d1236ad1ecf09b79a14cbd383e8a914d5dc95 | |
parent | 91d468a87f160f325439ab737da2fc805be718d8 (diff) | |
download | hardware_ti_omap4-14646afbb7bfa03417947cdce4e37227ed8fcc3c.zip hardware_ti_omap4-14646afbb7bfa03417947cdce4e37227ed8fcc3c.tar.gz hardware_ti_omap4-14646afbb7bfa03417947cdce4e37227ed8fcc3c.tar.bz2 |
DOMX : Multiple focus and exposure areas support
Adds support for multiple focus and exposure areas and
also correctly returning the number of maximum supported
focus and exposure areas in DOMX side.
- Patch set 2 : Rebased.
Change-Id: Ia6983f4006405e69dded064270860d8b1f33d576
Signed-off-by: Milen Mitkov <mmitkov@mm-sol.com>
-rwxr-xr-x | omx_core/inc/OMX_TI_IVCommon.h | 47 | ||||
-rwxr-xr-x | omx_core/inc/OMX_TI_Index.h | 3 | ||||
-rwxr-xr-x | omx_proxy_component/omx_camera/src/omx_proxy_camera.c | 2 |
3 files changed, 51 insertions, 1 deletions
diff --git a/omx_core/inc/OMX_TI_IVCommon.h b/omx_core/inc/OMX_TI_IVCommon.h index ebd5b2f..cfe228a 100755 --- a/omx_core/inc/OMX_TI_IVCommon.h +++ b/omx_core/inc/OMX_TI_IVCommon.h @@ -55,6 +55,7 @@ extern "C" { #define MAX_URI_LENGTH (OMX_MAX_STRINGNAME_SIZE) +#define MAX_ALGOAREAS (35) /*======================================================================= */ /* Enumerated values for operation mode for compressed image @@ -2384,8 +2385,12 @@ typedef struct OMX_TI_CAPTYPE { OMX_U16 ulCapVarFPSModesCount; // supported variable FPS capture modes count OMX_TI_VARFPSTYPE tCapVarFPSModes[10]; OMX_TI_SENMOUNT_TYPE tSenMounting; + OMX_U16 ulAlgoAreasFocusCount; // supported number of AlgoAreas for focus areas + OMX_U16 ulAlgoAreasExposureCount; // supported number of AlgoAreas for exposure areas } OMX_TI_CAPTYPE; + + /** * Defines 3A Face priority mode. * @@ -2600,6 +2605,48 @@ typedef struct OMX_TI_CONFIG_ZSLDELAYTYPE { OMX_S32 nDelay; } OMX_TI_CONFIG_ZSLDELAYTYPE; +/** + * AlogAreas purpose + * This type specifies the purpose of areas specified in OMX_ALGOAREASTYPE. + * */ +typedef enum OMX_ALGOAREAPURPOSE{ + OMX_AlgoAreaFocus = 0, // Multi region focus + OMX_AlgoAreaExposure, +}OMX_ALGOAREAPURPOSE; + +typedef struct OMX_ALGOAREA { + OMX_S32 nLeft; /**< The leftmost coordinate of the area rectangle */ + OMX_S32 nTop; /**< The topmost coordinate of the area rectangle */ + OMX_U32 nWidth; /**< The width of the area rectangle in pixels */ + OMX_U32 nHeight; /**< The height of the area rectangle in pixels */ + OMX_U32 nPriority; /**< Priority - ranges from 1 to 1000 */ +}OMX_ALGOAREA; + +/** + * Algorythm areas type + * This type defines areas for Multi Region Focus, + * or another algorithm region parameters, + * such as Multi Region Auto Exposure. + * + * STRUCT MEMBERS: + * nSize : Size of the structure in bytes + * nVersion : OMX specification version information + * nPortIndex : Port index + * tAreaPosition : Area definition - coordinates and purpose - Multi Region Focus, Auto Exposure, etc. + * nNumAreas : Number of areas defined in the array + * nAlgoAreaPurpose : Algo area purpose - eg. Multi Region Focus is OMX_AlgoAreaFocus + */ +typedef struct OMX_ALGOAREASTYPE { + OMX_U32 nSize; + OMX_VERSIONTYPE nVersion; + OMX_U32 nPortIndex; + + OMX_U32 nNumAreas; + OMX_ALGOAREA tAlgoAreas[MAX_ALGOAREAS]; + OMX_ALGOAREAPURPOSE nAlgoAreaPurpose; +} OMX_ALGOAREASTYPE; + + #ifdef __cplusplus } diff --git a/omx_core/inc/OMX_TI_Index.h b/omx_core/inc/OMX_TI_Index.h index 5aec517..a69f0e3 100755 --- a/omx_core/inc/OMX_TI_Index.h +++ b/omx_core/inc/OMX_TI_Index.h @@ -224,7 +224,8 @@ typedef enum OMX_TI_INDEXTYPE { OMX_TI_IndexConfigZslDelay, /**< reference: OMX_TI_CONFIG_ZSLDELAYTYPE */ OMX_TI_IndexParamMetaDataBufferInfo, /***< reference: OMX_TI_PARAM_METADATABUFFERINFO */ OMX_TI_IndexConfigZslFrameSelectMethod, /**< reference: OMX_TI_CONFIG_ZSLFRAMESELECTMETHODTYPE */ - OMX_TI_IndexAndroidNativeBufferUsage /**< reference: OMX_TI_IndexAndroidNativeBufferUsage */ + OMX_TI_IndexAndroidNativeBufferUsage, /**< reference: OMX_TI_IndexAndroidNativeBufferUsage */ + OMX_TI_IndexConfigAlgoAreas /**< reference: OMX_PARAM_SHAREDBUFFER (pSharedBuff is OMX_ALGOAREASTYPE) */ } OMX_TI_INDEXTYPE; diff --git a/omx_proxy_component/omx_camera/src/omx_proxy_camera.c b/omx_proxy_component/omx_camera/src/omx_proxy_camera.c index db138ec..541c31a 100755 --- a/omx_proxy_component/omx_camera/src/omx_proxy_camera.c +++ b/omx_proxy_component/omx_camera/src/omx_proxy_camera.c @@ -176,6 +176,7 @@ static OMX_ERRORTYPE CameraGetConfig(OMX_IN OMX_HANDLETYPE case OMX_TI_IndexConfigAAAskipBuffer: case OMX_TI_IndexConfigCamCapabilities: case OMX_TI_IndexConfigExifTags: + case OMX_TI_IndexConfigAlgoAreas: pConfigSharedBuffer = (OMX_TI_CONFIG_SHAREDBUFFER *) pComponentParameterStructure; @@ -236,6 +237,7 @@ static OMX_ERRORTYPE CameraSetConfig(OMX_IN OMX_HANDLETYPE case OMX_TI_IndexConfigAAAskipBuffer: case OMX_TI_IndexConfigCamCapabilities: case OMX_TI_IndexConfigExifTags: + case OMX_TI_IndexConfigAlgoAreas: pConfigSharedBuffer = (OMX_TI_CONFIG_SHAREDBUFFER *) pComponentParameterStructure; |