We are seeing a problem with HDMI 1080i input capture on DM8168. The capture-encode demo code present in ezsdk_5_03_01_15 has been modified to just use the capture OMX component. The captured output is showing only one field correct and the other field being garbage. We are not using DEI or any other OMX component and are trying to display the output of capture component on to HDMI display port. The images below show our output and the original output.
It would be useful if we could get the IL_ClientSetCaptureParams function of some demo code where 1080i HDMI capture works.
We are using the following settings for 1080i capture:
OMX_PARAM_PORTDEFINITIONTYPE paramPort;
OMX_PARAM_VFCC_HWPORT_PROPERTIES sHwPortParam;
OMX_PARAM_VFCC_HWPORT_ID sHwPortId;
OMX_PARAM_BUFFER_MEMORYTYPE memTypeCfg;
OMX_INIT_PARAM (¶mPort);
paramPort.nPortIndex = OMX_VFCC_OUTPUT_PORT_START_INDEX;
OMX_GetParameter (cap_ctxt->pCapHandle, OMX_IndexParamPortDefinition,¶mPort);
paramPort.nPortIndex = OMX_VFCC_OUTPUT_PORT_START_INDEX;
paramPort.format.video.nFrameHeight = cap_ctxt->nHeight; //1920
paramPort.format.video.nFrameWidth = cap_ctxt->nWidth; //1080
paramPort.format.video.nStride = cap_ctxt->nWidth*2;
paramPort.nBufferCountActual = cap_ctxt->nBufferCountActual;
paramPort.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused;
/* Capture output in 422 format */
paramPort.format.video.eColorFormat = OMX_COLOR_FormatYCbYCr;
paramPort.nBufferSize = (paramPort.format.video.nStride * paramPort.format.video.nFrameHeight);
OMX_SetParameter (cap_ctxt->pCapHandle, OMX_IndexParamPortDefinition, ¶mPort);
OMX_INIT_PARAM (&memTypeCfg);
memTypeCfg.nPortIndex = OMX_VFCC_OUTPUT_PORT_START_INDEX;
memTypeCfg.eBufMemoryType = OMX_BUFFER_MEMORY_DEFAULT;
eError = OMX_SetParameter (cap_ctxt->pCapHandle, OMX_TI_IndexParamBuffMemType,
&memTypeCfg);
if (eError != OMX_ErrorNone)
printf("failed to set memory Type at output port\n");
OMX_INIT_PARAM (&sHwPortId);
sHwPortId.eHwPortId = cap_ctxt->vipPort;
eError = OMX_SetParameter (cap_ctxt->pCapHandle,
(OMX_INDEXTYPE) OMX_TI_IndexParamVFCCHwPortID,
(OMX_PTR) & sHwPortId);
OMX_INIT_PARAM (&sHwPortParam);
sHwPortParam.eCaptMode = OMX_VIDEO_CaptureModeSC_NON_MUX;
sHwPortParam.eVifMode = OMX_VIDEO_CaptureVifMode_16BIT;
sHwPortParam.eInColorFormat = OMX_COLOR_FormatYCbYCr;
sHwPortParam.eScanType = OMX_VIDEO_CaptureScanTypeInterlaced;
sHwPortParam.nMaxHeight = cap_ctxt->nHeight;
sHwPortParam.nMaxWidth = cap_ctxt->nWidth;
sHwPortParam.nMaxChnlsPerHwPort = 1;
eError = OMX_SetParameter (cap_ctxt->pCapHandle,
(OMX_INDEXTYPE)
OMX_TI_IndexParamVFCCHwPortProperties,
(OMX_PTR) & sHwPortParam);
The output image:
Original:
Thanks
George