diff options
author | SeungBeom Kim <sbcrux.kim@samsung.com> | 2010-10-20 12:58:20 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2010-12-06 17:47:59 -0800 |
commit | 705b4879e7a089eacb3431a6df01d3aa69717df6 (patch) | |
tree | e9e372b7a0e6003d289b69797f9f02f8413156a3 /sec_mm | |
parent | 6bbd1c5ecb1e7847adf42d824562c96d2b13f5ca (diff) | |
download | device_samsung_crespo-705b4879e7a089eacb3431a6df01d3aa69717df6.zip device_samsung_crespo-705b4879e7a089eacb3431a6df01d3aa69717df6.tar.gz device_samsung_crespo-705b4879e7a089eacb3431a6df01d3aa69717df6.tar.bz2 |
Change Encode output port Buffer size
o incoporate reviewer's comment to set parameter first to avoid code duplication
bug - 3115953
Change-Id: Iaadbc4b803e0b9baa929494f3f3882c1fae45dd2
Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com>
Diffstat (limited to 'sec_mm')
-rw-r--r-- | sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c | 22 | ||||
-rw-r--r-- | sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.h | 2 |
2 files changed, 23 insertions, 1 deletions
diff --git a/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c b/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c index c1bd4ef..eff5dec 100644 --- a/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c +++ b/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c @@ -1235,6 +1235,28 @@ OMX_ERRORTYPE SEC_OMX_VideoEncodeSetParameter( ret = OMX_ErrorNone; } break; + case OMX_IndexParamPortDefinition: + { + OMX_PARAM_PORTDEFINITIONTYPE *pPortDefinition = + (OMX_PARAM_PORTDEFINITIONTYPE *)ComponentParameterStructure; + ret = SEC_OMX_SetParameter(hComponent, nIndex, ComponentParameterStructure); + if (ret != OMX_ErrorNone) { + goto EXIT; + } + + if (pPortDefinition->nPortIndex == INPUT_PORT_INDEX) { + SEC_OMX_BASEPORT *pSECInputPort = &pSECComponent->pSECPort[INPUT_PORT_INDEX]; + OMX_U32 width = pSECInputPort->portDefinition.format.video.nFrameWidth; + OMX_U32 height = pSECInputPort->portDefinition.format.video.nFrameHeight; + SEC_OMX_BASEPORT *pSECOutputPort = &pSECComponent->pSECPort[OUTPUT_PORT_INDEX]; + pSECOutputPort->portDefinition.format.video.nFrameWidth = width; + pSECOutputPort->portDefinition.format.video.nFrameHeight = height; + pSECOutputPort->portDefinition.nBufferSize = (width * height * 3) / 2; + SEC_OSAL_Log(SEC_LOG_TRACE, "pSECOutputPort->portDefinition.nBufferSize: %d", + pSECOutputPort->portDefinition.nBufferSize); + } + } + break; default: { ret = SEC_OMX_SetParameter(hComponent, nIndex, ComponentParameterStructure); diff --git a/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.h b/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.h index 4654a24..93d2800 100644 --- a/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.h +++ b/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.h @@ -42,7 +42,7 @@ #define DEFAULT_VIDEO_INPUT_BUFFER_SIZE ALIGN_TO_8KB(ALIGN_TO_128B(DEFAULT_FRAME_WIDTH) * ALIGN_TO_32B(DEFAULT_FRAME_HEIGHT)) \ + ALIGN_TO_8KB(ALIGN_TO_128B(DEFAULT_FRAME_WIDTH) * ALIGN_TO_32B(DEFAULT_FRAME_HEIGHT / 2)) /* (DEFAULT_FRAME_WIDTH * DEFAULT_FRAME_HEIGHT * 3) / 2 */ -#define DEFAULT_VIDEO_OUTPUT_BUFFER_SIZE 1024 * 1024 +#define DEFAULT_VIDEO_OUTPUT_BUFFER_SIZE DEFAULT_VIDEO_INPUT_BUFFER_SIZE #define INPUT_PORT_SUPPORTFORMAT_NUM_MAX 3 #define OUTPUT_PORT_SUPPORTFORMAT_NUM_MAX 1 |