This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Can not capture RGB data on Sil1161

Other Parts Discussed in Thread: TVP7002, TVP5158

Hi,

  My board is DM8168 EVM. SDK is EZSDK_5_05_02_00.I had captured dvi data from Sil1161 by v4l2.Now i want to capture dvi data from Sil1161 by OMX.But i cannot capture dvi data from Sil1161.I had changed capture parameters by following:

OMX_ERRORTYPE IL_ClientSetCaptureParams (IL_Client *pAppData)
{

OMX_PARAM_VFCC_HWPORT_PROPERTIES sHwPortParam;

OMX_PARAM_VFCC_HWPORT_ID sHwPortId;

OMX_CONFIG_VFCC_FRAMESKIP_INFO sCapSkipFrames;

OMX_PARAM_CTRL_VIDDECODER_INFO sVidDecParam;

OMX_PARAM_BUFFER_MEMORYTYPE memTypeCfg;

OMX_PARAM_PORTDEFINITIONTYPE paramPort;

OMX_ERRORTYPE eError = OMX_ErrorNone;

OMX_INIT_PARAM (&paramPort);

/* set input height/width and color format */
paramPort.nPortIndex = OMX_VFCC_OUTPUT_PORT_START_INDEX;
OMX_GetParameter (pAppData->pCapHandle, OMX_IndexParamPortDefinition,
&paramPort);
paramPort.nPortIndex = OMX_VFCC_OUTPUT_PORT_START_INDEX;
paramPort.format.video.nFrameWidth = pAppData->nWidth;
paramPort.format.video.nFrameHeight = pAppData->nHeight;
paramPort.format.video.nStride = pAppData->nWidth;
paramPort.nBufferCountActual = IL_CLIENT_CAPTURE_OUTPUT_BUFFER_COUNT;
paramPort.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused;
/* Capture output in 420 format */
paramPort.format.video.eColorFormat = OMX_COLOR_FormatYUV420SemiPlanar;

paramPort.nBufferSize =
(paramPort.format.video.nStride * pAppData->nHeight * 3) >> 1;
printf ("Buffer Size computed: %d\n", (int) paramPort.nBufferSize);
printf ("set input port params (width = %d, height = %d)",
(int) pAppData->nWidth, (int) pAppData->nHeight);
OMX_SetParameter (pAppData->pCapHandle, OMX_IndexParamPortDefinition,
&paramPort);

/* Setting Memory type at output port to Raw Memory */
OMX_INIT_PARAM (&memTypeCfg);
memTypeCfg.nPortIndex = OMX_VFCC_OUTPUT_PORT_START_INDEX;
memTypeCfg.eBufMemoryType = OMX_BUFFER_MEMORY_DEFAULT;
eError =
OMX_SetParameter (pAppData->pCapHandle, OMX_TI_IndexParamBuffMemType,
&memTypeCfg);

if (eError != OMX_ErrorNone)
ERROR ("failed to set memory Type at output port\n");

OMX_INIT_PARAM (&sHwPortId);
/* capture on EIO card is component input at VIP1 port */
sHwPortId.eHwPortId = OMX_VIDEO_CaptureHWPortVIP1_PORTA;
eError = OMX_SetParameter (pAppData->pCapHandle,
(OMX_INDEXTYPE) OMX_TI_IndexParamVFCCHwPortID,
(OMX_PTR) & sHwPortId);

OMX_INIT_PARAM (&sHwPortParam);

#ifdef RALPHMOD
sHwPortParam.eCaptMode = OMX_VIDEO_CaptureModeSC_DISCRETESYNC;
sHwPortParam.eVifMode = OMX_VIDEO_CaptureVifMode_24BIT;
sHwPortParam.eInColorFormat = OMX_COLOR_Format24bitRGB888;
#else
sHwPortParam.eCaptMode = OMX_VIDEO_CaptureModeSC_NON_MUX;
sHwPortParam.eVifMode = OMX_VIDEO_CaptureVifMode_16BIT;
sHwPortParam.eInColorFormat = OMX_COLOR_FormatYCbYCr;
#endif
sHwPortParam.eScanType = OMX_VIDEO_CaptureScanTypeProgressive;
sHwPortParam.nMaxHeight = pAppData->nHeight;
sHwPortParam.nMaxWidth = pAppData->nWidth;
sHwPortParam.nMaxChnlsPerHwPort = 1;

eError = OMX_SetParameter (pAppData->pCapHandle,
(OMX_INDEXTYPE)
OMX_TI_IndexParamVFCCHwPortProperties,
(OMX_PTR) & sHwPortParam);

if (pAppData->nFrameRate == 30)
{
OMX_INIT_PARAM (&sCapSkipFrames);
printf (" applying skip mask \n");

sCapSkipFrames.frameSkipMask = 0x2AAAAAAA;
eError = OMX_SetConfig (pAppData->pCapHandle,
(OMX_INDEXTYPE) OMX_TI_IndexConfigVFCCFrameSkip,
(OMX_PTR) & sCapSkipFrames);
}

/* Set parameters for TVP controller */

OMX_INIT_PARAM (&sHwPortId);
/* capture on EIO card is component input at VIP1 port */
sHwPortId.eHwPortId = OMX_VIDEO_CaptureHWPortVIP1_PORTA;
#ifndef RALPHMOD
eError = OMX_SetParameter (pAppData->pTvpHandle,
(OMX_INDEXTYPE) OMX_TI_IndexParamVFCCHwPortID,
(OMX_PTR) & sHwPortId);
#endif
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_CaptureScanTypeProgressive;
sHwPortParam.nMaxHeight = pAppData->nHeight;
sHwPortParam.nMaxWidth = pAppData->nWidth;
sHwPortParam.nMaxChnlsPerHwPort = 1;

#ifndef RALPHMOD
eError = OMX_SetParameter (pAppData->pTvpHandle,
(OMX_INDEXTYPE)
OMX_TI_IndexParamVFCCHwPortProperties,
(OMX_PTR) & sHwPortParam);
#endif

OMX_INIT_PARAM (&sVidDecParam);

/* set the mode based on capture/display device */
if (strcmp ((char *) pAppData->mode, "1080p") == 0)
{
sVidDecParam.videoStandard = OMX_VIDEO_DECODER_STD_1080P_60;
printf("1080p60 selected.\n");
}
else if (strcmp ((char *) pAppData->mode, "720p") == 0)
{
sVidDecParam.videoStandard = OMX_VIDEO_DECODER_STD_720P_60;
printf("720p60 selected.\n");
}
else
{
ERROR ("Incorrect Display Mode configured!!\n");
}

#ifndef RALPHMOD
/* setting TVP7002 component input */
sVidDecParam.videoDecoderId = OMX_VID_DEC_TVP7002_DRV;
sVidDecParam.videoSystemId = OMX_VIDEO_DECODER_VIDEO_SYSTEM_AUTO_DETECT;
eError = OMX_SetParameter (pAppData->pTvpHandle,
(OMX_INDEXTYPE) OMX_TI_IndexParamCTRLVidDecInfo,
(OMX_PTR) & sVidDecParam);
if (eError != OMX_ErrorNone)
ERROR ("failed to set Ctrl Vid dec info \n");
#endif

return (eError);
}

note:

 how to set the eCaptMode parameter?i set it to be OMX_VIDEO_CaptureModeSC_DISCRETESYNC.Is it ok?

  • Hello,

    You could check omx user guide about VFCC component:

    ti-ezsdk_dm816x-evm_5_05_02_00/component-sources/omx_05_02_00_48.

    2.2 Video Frame Capture Component (VFCC), we have:

    Features supported
    • Input Video Source Formats
       § YUV422 8-bit embedded sync mode
       § YUV422 16-bit embedded sync mode
       § YUV422 8-bit 2x/4x pixel multiplxed mode
       § YUV422 8-bit 4x line multiplexed mode
    • Output Video formats
       § YUV422 YUYV interleaved format
       § YUV420 Semi-planer format

    Also you could this struct called OMX_PARAM_CTRL_VIDDECODER_INFO(omx_ctrl.h). It has a member called OMX_CTRL_VID_DECODER_ID videoDecoderId, which can be set to one of:

    OMX_VID_DEC_Unused = 0x00000000,
    OMX_VID_DEC_SII9135_DRV,
    OMX_VID_DEC_TVP7002_DRV,
    OMX_VID_DEC_TVP5158_DRV,
    OMX_VID_DEC_TIExtensions = 0x6F000000,
    OMX_VID_DEC_VendorStartUnused = 0x7F000000,
    OMX_VID_DEC_Max = 0x7FFFFFFF

    BR

    Margarita