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.

Capture problem in 1080i in DM8168

  


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 (&paramPort);
  paramPort.nPortIndex = OMX_VFCC_OUTPUT_PORT_START_INDEX;
  OMX_GetParameter (cap_ctxt->pCapHandle, OMX_IndexParamPortDefinition,&paramPort);

  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, &paramPort);

  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

  • HI George ,

    I have been trying 1080i capture using OMX application on DM8148EVM using EZSDK 5.04 . OMX app has got only capture component and a TVP ctrl component .  This application captures 1080i component input and dumps the buffers into a file . I have considered YcbYcr as the output format for the Capture component .

    when I play the yuv file using mplayer on my host machine , I see the video is split into two parts  and scaled .

    I have used the same SetCaptureParams settings that you have used .

    mplayer  sample.yuv -demuxer rawvideo -rawvideo w=1920:h=1080:format=yuy2 -loop 0

    I am attaching the snapshot taken when the mplayer is playing the raw file on the host machine .

    Thanks,

    N Sivaramkrishna .

  • Hi,

    In ezsdk, for 1080i60 capture only 420sp field merged mode is supported. It will not eb able to provide two different fields or 422 format correctly. We will be providing 1080i60 support in next release.

    Regards

    Vimal