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.

How to configure input port for OpenMax encoder component using DM8168



Does know how to properly configure the input port for an OpenMax encoder component? Specifically, in the OMX_PARAM_PORTDEFINITIONTYPE structure, how should the following members be set:

  • nBufferSize
  • video.cMIMEType
  • video.nStride
  • video.eCompressionFormat
  • video.eColorFormat

I have tried many different values that all produce OMX_ErrorBadParameter errors when I call OMX_AllocateBuffer on the port. 

  •  

    Typical Port Setting are configured as follows

    • nBufferSize = (paramPort.format.video.nStride * pAppData->nHeight * 3) >> 1;
    • video.nStride = Width
    • video.eCompressionFormat = OMX_VIDEO_CodingUnused
    • video.eColorFormat = OMX_COLOR_FormatYUV420SemiPlanar

     

    Are you sure that the ports have been enabled before allocating the buffer:

     OMX_SendCommand (pAppData->pEncoder, OMX_CommandPortEnable,
                       OMX_VFDC_INPUT_PORT_START_INDEX, NULL);