OMX_BOOL IntraRefreshVOP;
OMX_VIDEO_CONTROLRATETYPE eControlRate[ALL_PORT_NUM];
OMX_VIDEO_PARAM_QUANTIZATIONTYPE quantization;
+ OMX_VIDEO_PARAM_INTRAREFRESHTYPE intraRefresh;
OMX_BOOL bFirstInput;
OMX_BOOL bFirstOutput;
portDefinition->nBufferSize = MAX_INPUT_METADATA_BUFFER_SIZE;
}
#endif
+ }
+ break;
+ case OMX_IndexParamVideoIntraRefresh:
+ {
+ OMX_VIDEO_PARAM_INTRAREFRESHTYPE *pIntraRefresh = (OMX_VIDEO_PARAM_INTRAREFRESHTYPE *)ComponentParameterStructure;
+ OMX_U32 portIndex = pIntraRefresh->nPortIndex;
+ EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
+
+ if (portIndex != OUTPUT_PORT_INDEX) {
+ ret = OMX_ErrorBadPortIndex;
+ goto EXIT;
+ } else {
+ pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
+ pIntraRefresh->eRefreshMode = pVideoEnc->intraRefresh.eRefreshMode;
+ pIntraRefresh->nAirMBs = pVideoEnc->intraRefresh.nAirMBs;
+ pIntraRefresh->nAirRef = pVideoEnc->intraRefresh.nAirRef;
+ pIntraRefresh->nCirMBs = pVideoEnc->intraRefresh.nCirMBs;
+ }
+ ret = OMX_ErrorNone;
}
break;
default:
ret = OMX_ErrorNone;
}
break;
+ case OMX_IndexParamVideoIntraRefresh:
+ {
+ OMX_VIDEO_PARAM_INTRAREFRESHTYPE *pIntraRefresh = (OMX_VIDEO_PARAM_INTRAREFRESHTYPE *)ComponentParameterStructure;
+ OMX_U32 portIndex = pIntraRefresh->nPortIndex;
+ EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
+
+ if (portIndex != OUTPUT_PORT_INDEX) {
+ ret = OMX_ErrorBadPortIndex;
+ goto EXIT;
+ } else {
+ pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
+ if (pIntraRefresh->eRefreshMode == OMX_VIDEO_IntraRefreshCyclic) {
+ pVideoEnc->intraRefresh.eRefreshMode = pIntraRefresh->eRefreshMode;
+ pVideoEnc->intraRefresh.nCirMBs = pIntraRefresh->nCirMBs;
+ Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "OMX_VIDEO_IntraRefreshCyclic Enable, nCirMBs: %d",
+ pVideoEnc->intraRefresh.nCirMBs);
+ } else {
+ ret = OMX_ErrorUnsupportedSetting;
+ goto EXIT;
+ }
+ }
+ ret = OMX_ErrorNone;
+ }
+ break;
#ifdef USE_STOREMETADATA
case OMX_IndexParamStoreMetaDataBuffer:
{
pCommonParam->SourceHeight = pExynosOutputPort->portDefinition.format.video.nFrameHeight;
pCommonParam->IDRPeriod = pH264Enc->AVCComponent[OUTPUT_PORT_INDEX].nPFrames + 1;
pCommonParam->SliceMode = 0;
- pCommonParam->RandomIntraMBRefresh = 0;
pCommonParam->Bitrate = pExynosOutputPort->portDefinition.format.video.nBitrate;
pCommonParam->FrameQp = pVideoEnc->quantization.nQpI;
pCommonParam->FrameQp_P = pVideoEnc->quantization.nQpP;
pCommonParam->CbPadVal = 0;
pCommonParam->CrPadVal = 0;
+ if (pVideoEnc->intraRefresh.eRefreshMode == OMX_VIDEO_IntraRefreshCyclic) {
+ /* Cyclic Mode */
+ pCommonParam->RandomIntraMBRefresh = pVideoEnc->intraRefresh.nCirMBs;
+ Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "RandomIntraMBRefresh: %d", pCommonParam->RandomIntraMBRefresh);
+ } else {
+ /* Don't support "Adaptive" and "Cyclic + Adaptive" */
+ pCommonParam->RandomIntraMBRefresh = 0;
+ }
+
if (pExynosInputPort->bufferProcessType == BUFFER_SHARE) {
if (pVideoEnc->ANBColorFormat == OMX_COLOR_FormatYUV420SemiPlanar)
pCommonParam->FrameMap = VIDEO_COLORFORMAT_NV12;
pCommonParam->SourceHeight = pExynosOutputPort->portDefinition.format.video.nFrameHeight;
pCommonParam->IDRPeriod = pMpeg4Enc->mpeg4Component[OUTPUT_PORT_INDEX].nPFrames + 1;
pCommonParam->SliceMode = 0;
- pCommonParam->RandomIntraMBRefresh = 0;
pCommonParam->Bitrate = pExynosOutputPort->portDefinition.format.video.nBitrate;
pCommonParam->FrameQp = pVideoEnc->quantization.nQpI;
pCommonParam->FrameQp_P = pVideoEnc->quantization.nQpP;
pCommonParam->CbPadVal = 0;
pCommonParam->CrPadVal = 0;
+ if (pVideoEnc->intraRefresh.eRefreshMode == OMX_VIDEO_IntraRefreshCyclic) {
+ /* Cyclic Mode */
+ pCommonParam->RandomIntraMBRefresh = pVideoEnc->intraRefresh.nCirMBs;
+ } else {
+ /* Don't support "Adaptive" and "Cyclic + Adaptive" */
+ pCommonParam->RandomIntraMBRefresh = 0;
+ }
+
if (pExynosInputPort->bufferProcessType == BUFFER_SHARE) {
if (pVideoEnc->ANBColorFormat == OMX_SEC_COLOR_FormatNV21Linear)
pCommonParam->FrameMap = VIDEO_COLORFORMAT_NV12;
pCommonParam->SourceHeight = pExynosOutputPort->portDefinition.format.video.nFrameHeight;
pCommonParam->IDRPeriod = pMpeg4Enc->h263Component[OUTPUT_PORT_INDEX].nPFrames + 1;
pCommonParam->SliceMode = 0;
- pCommonParam->RandomIntraMBRefresh = 0;
pCommonParam->Bitrate = pExynosOutputPort->portDefinition.format.video.nBitrate;
pCommonParam->FrameQp = pVideoEnc->quantization.nQpI;
pCommonParam->FrameQp_P = pVideoEnc->quantization.nQpP;
pCommonParam->CbPadVal = 0;
pCommonParam->CrPadVal = 0;
+ if (pVideoEnc->intraRefresh.eRefreshMode == OMX_VIDEO_IntraRefreshCyclic) {
+ /* Cyclic Mode */
+ pCommonParam->RandomIntraMBRefresh = pVideoEnc->intraRefresh.nCirMBs;
+ } else {
+ /* Don't support "Adaptive" and "Cyclic + Adaptive" */
+ pCommonParam->RandomIntraMBRefresh = 0;
+ }
+
if (pExynosInputPort->bufferProcessType == BUFFER_SHARE) {
if (pVideoEnc->ANBColorFormat == OMX_SEC_COLOR_FormatNV21Linear)
pCommonParam->FrameMap = VIDEO_COLORFORMAT_NV12;