exynos4: Set native color format for the Native window

based on and avoids need of commit 19ab8af47c

Change-Id: I2048689459359c54f98223b762f3fea803c81a8b
This commit is contained in:
Shilin Victor 2019-02-08 17:47:14 +03:00
parent 48e12ec57f
commit f0a77e61e0
8 changed files with 23 additions and 4 deletions

View File

@ -71,6 +71,7 @@ void SEC_UpdateFrameSize(OMX_COMPONENTTYPE *pOMXComponent)
switch(secOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_SEC_COLOR_FormatNV12TPhysicalAddress:
case OMX_SEC_COLOR_FormatANBYUV420SemiPlanar:
@ -1057,7 +1058,7 @@ OMX_ERRORTYPE SEC_OMX_VideoDecodeGetParameter(
switch (index) {
case supportFormat_0:
portFormat->eCompressionFormat = OMX_VIDEO_CodingUnused;
portFormat->eColorFormat = OMX_COLOR_FormatYUV420Planar;
portFormat->eColorFormat = OMX_COLOR_FormatYCbCr420Planar;
portFormat->xFramerate = portDefinition->format.video.xFramerate;
break;
case supportFormat_1:

View File

@ -480,6 +480,7 @@ OMX_ERRORTYPE SEC_MFC_H264Dec_SetParameter(
switch (pSECOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_SEC_COLOR_FormatNV12TPhysicalAddress:
case OMX_SEC_COLOR_FormatANBYUV420SemiPlanar:
@ -1143,6 +1144,7 @@ OMX_ERRORTYPE SEC_MFC_H264_Decode_Nonblock(OMX_COMPONENTTYPE *pOMXComponent, SEC
pSECOutputPort->portDefinition.format.video.eColorFormat = OMX_SEC_COLOR_FormatYUV420SemiPlanar_SBS_LR;
break;
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
default:
pSECOutputPort->portDefinition.format.video.eColorFormat = OMX_SEC_COLOR_FormatYUV420Planar_SBS_LR;
break;
@ -1157,6 +1159,7 @@ OMX_ERRORTYPE SEC_MFC_H264_Decode_Nonblock(OMX_COMPONENTTYPE *pOMXComponent, SEC
pSECOutputPort->portDefinition.format.video.eColorFormat = OMX_SEC_COLOR_FormatYUV420SemiPlanar_SBS_RL;
break;
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
default:
pSECOutputPort->portDefinition.format.video.eColorFormat = OMX_SEC_COLOR_FormatYUV420Planar_SBS_RL;
break;
@ -1173,6 +1176,7 @@ OMX_ERRORTYPE SEC_MFC_H264_Decode_Nonblock(OMX_COMPONENTTYPE *pOMXComponent, SEC
pSECOutputPort->portDefinition.format.video.eColorFormat = OMX_SEC_COLOR_FormatYUV420SemiPlanar_TB_LR;
break;
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
default:
pSECOutputPort->portDefinition.format.video.eColorFormat = OMX_SEC_COLOR_FormatYUV420Planar_TB_LR;
break;
@ -1187,6 +1191,7 @@ OMX_ERRORTYPE SEC_MFC_H264_Decode_Nonblock(OMX_COMPONENTTYPE *pOMXComponent, SEC
pSECOutputPort->portDefinition.format.video.eColorFormat = OMX_SEC_COLOR_FormatYUV420SemiPlanar_TB_RL;
break;
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
default:
pSECOutputPort->portDefinition.format.video.eColorFormat = OMX_SEC_COLOR_FormatYUV420Planar_TB_RL;
break;
@ -1440,6 +1445,7 @@ OMX_ERRORTYPE SEC_MFC_H264_Decode_Nonblock(OMX_COMPONENTTYPE *pOMXComponent, SEC
actualHeight / 2);
break;
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
#ifdef S3D_SUPPORT
case OMX_SEC_COLOR_FormatYUV420Planar_SBS_LR:
case OMX_SEC_COLOR_FormatYUV420Planar_SBS_RL:
@ -2002,7 +2008,7 @@ OSCL_EXPORT_REF OMX_ERRORTYPE SEC_OMX_ComponentInit(OMX_HANDLETYPE hComponent, O
SEC_OSAL_Strcpy(pSECPort->portDefinition.format.video.cMIMEType, "raw/video");
pSECPort->portDefinition.format.video.pNativeRender = 0;
pSECPort->portDefinition.format.video.bFlagErrorConcealment = OMX_FALSE;
pSECPort->portDefinition.format.video.eColorFormat = OMX_COLOR_FormatYUV420Planar;
pSECPort->portDefinition.format.video.eColorFormat = OMX_COLOR_FormatYCbCr420Planar;
pSECPort->portDefinition.bEnabled = OMX_TRUE;
if (bFlashPlayerMode != OMX_FALSE) {
pSECPort->portDefinition.nBufferCountActual = MAX_H264_FP_VIDEO_OUTPUTBUFFER_NUM;

View File

@ -629,6 +629,7 @@ OMX_ERRORTYPE SEC_MFC_Mpeg4Dec_SetParameter(
switch (pSECOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_SEC_COLOR_FormatNV12TPhysicalAddress:
case OMX_SEC_COLOR_FormatANBYUV420SemiPlanar:
@ -1430,6 +1431,7 @@ OMX_ERRORTYPE SEC_MFC_Mpeg4_Decode_Nonblock(OMX_COMPONENTTYPE *pOMXComponent, SE
height / 2);
break;
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
default:
#ifdef USE_CSC_FIMC
if ((pSECOutputPort->bIsANBEnabled == OMX_TRUE) && (pMpeg4Dec->hFIMCHandle != NULL)) {
@ -1699,6 +1701,7 @@ OMX_ERRORTYPE SEC_MFC_Mpeg4_Decode_Block(OMX_COMPONENTTYPE *pOMXComponent, SEC_O
height / 2);
break;
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
default:
#ifdef USE_CSC_FIMC
if ((pSECOutputPort->bIsANBEnabled == OMX_TRUE) && (pMpeg4Dec->hFIMCHandle != NULL)) {
@ -1964,7 +1967,7 @@ OSCL_EXPORT_REF OMX_ERRORTYPE SEC_OMX_ComponentInit(OMX_HANDLETYPE hComponent, O
SEC_OSAL_Strcpy(pSECPort->portDefinition.format.video.cMIMEType, "raw/video");
pSECPort->portDefinition.format.video.pNativeRender = 0;
pSECPort->portDefinition.format.video.bFlagErrorConcealment = OMX_FALSE;
pSECPort->portDefinition.format.video.eColorFormat = OMX_COLOR_FormatYUV420Planar;
pSECPort->portDefinition.format.video.eColorFormat = OMX_COLOR_FormatYCbCr420Planar;
pSECPort->portDefinition.bEnabled = OMX_TRUE;
if (codecType == CODEC_TYPE_MPEG4) {

View File

@ -542,6 +542,7 @@ OMX_ERRORTYPE SEC_MFC_WmvDec_SetParameter(
switch (pSECOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_SEC_COLOR_FormatNV12TPhysicalAddress:
case OMX_SEC_COLOR_FormatANBYUV420SemiPlanar:
@ -1328,6 +1329,7 @@ OMX_ERRORTYPE SEC_MFC_Wmv_Decode_Nonblock(OMX_COMPONENTTYPE *pOMXComponent, SEC_
height / 2);
break;
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
default:
#ifdef USE_CSC_FIMC
if ((pSECOutputPort->bIsANBEnabled == OMX_TRUE) && (pWmvDec->hFIMCHandle != NULL)) {
@ -1636,6 +1638,7 @@ OMX_ERRORTYPE SEC_MFC_Wmv_Decode_Block(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX
height / 2);
break;
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
default:
#ifdef USE_CSC_FIMC
if ((pSECOutputPort->bIsANBEnabled == OMX_TRUE) && (pWmvDec->hFIMCHandle != NULL)) {

View File

@ -300,6 +300,7 @@ OMX_ERRORTYPE SEC_MFC_VP8Dec_SetParameter(
switch (pSECOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_SEC_COLOR_FormatNV12TPhysicalAddress:
case OMX_SEC_COLOR_FormatANBYUV420SemiPlanar:
@ -1010,6 +1011,7 @@ OMX_ERRORTYPE SEC_MFC_VP8_Decode_Nonblock(OMX_COMPONENTTYPE *pOMXComponent, SEC_
break;
break;
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
default:
csc_tiled_to_linear_y_neon(
(unsigned char *)pYUVBuf[0],
@ -1237,6 +1239,7 @@ OMX_ERRORTYPE SEC_MFC_VP8_Decode_Block(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX
height / 2);
break;
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
default:
csc_tiled_to_linear_y_neon(
(unsigned char *)pYUVBuf[0],
@ -1475,7 +1478,7 @@ OSCL_EXPORT_REF OMX_ERRORTYPE SEC_OMX_ComponentInit(OMX_HANDLETYPE hComponent, O
SEC_OSAL_Strcpy(pSECPort->portDefinition.format.video.cMIMEType, "raw/video");
pSECPort->portDefinition.format.video.pNativeRender = 0;
pSECPort->portDefinition.format.video.bFlagErrorConcealment = OMX_FALSE;
pSECPort->portDefinition.format.video.eColorFormat = OMX_COLOR_FormatYUV420Planar;
pSECPort->portDefinition.format.video.eColorFormat = OMX_COLOR_FormatYCbCr420Planar;
pSECPort->portDefinition.bEnabled = OMX_TRUE;
/*for(i = 0; i < ALL_PORT_NUM; i++) {

View File

@ -130,6 +130,7 @@ typedef enum OMX_COLOR_FORMATTYPE {
OMX_COLOR_Format18BitBGR666,
OMX_COLOR_Format24BitARGB6666,
OMX_COLOR_Format24BitABGR6666,
OMX_COLOR_FormatYCbCr420Planar = 0x101, /* HAL_PIXEL_FORMAT_YCbCr_420_P */
OMX_COLOR_FormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
OMX_COLOR_FormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
OMX_COLOR_FormatMax = 0x7FFFFFFF

View File

@ -142,6 +142,7 @@ OMX_ERRORTYPE SEC_OSAL_LockANBHandle(
switch (format) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
#ifdef S3D_SUPPORT
case OMX_SEC_COLOR_FormatNV12Tiled_SBS_LR:

View File

@ -102,6 +102,7 @@ bool HardwareConverter::convert(
}
break;
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYCbCr420Planar:
default:
if (!handle_fimc->setDstPhyAddr((unsigned int)(dst_addr_array[0]),
(unsigned int)(dst_addr_array[1]),