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.

Where is a setup for operating a decoder iby a ”dot by dot” output image?



Hi.

I use ti-ezsdk_dm816x-evm_5_03_01_15.

Where is a setup for operating a decoder by a "dot by dot" output image?

The image resolution of 1920x1080(H.264) is set to 2048x1152 in my decoder output setup.

--------------------------

OMX_ERRORTYPE
IL_ClientSetDecodeParams (
    IL_Client   *pAppData
)
{
    OMX_ERRORTYPE eError = OMX_ErrorNone;
    OMX_HANDLETYPE pHandle = pAppData->pDecHandle;

    pAppData->nWidth  = 1920;
    pAppData->nHeight = 1080;

    {
        OMX_PORT_PARAM_TYPE portInit;
           
        OMX_INIT_PARAM (&portInit);

        portInit.nPorts             = 2;
        portInit.nStartPortNumber   = 0;
        eError = OMX_SetParameter (pHandle, OMX_IndexParamVideoInit, &portInit);
    }

    {
        OMX_PARAM_PORTDEFINITIONTYPE pInPortDef;
   
        OMX_INIT_PARAM (&pInPortDef);

        pInPortDef.nPortIndex           = 0;
        pInPortDef.eDir                 = OMX_DirInput;
        pInPortDef.nBufferCountActual   = 4;
        pInPortDef.nBufferSize          = 2073600;

        pInPortDef.bEnabled             = OMX_TRUE;
        pInPortDef.bPopulated           = OMX_FALSE;

        pInPortDef.format.video.cMIMEType = "H264";
        pInPortDef.format.video.nFrameWidth     = 1920;
        pInPortDef.format.video.nFrameHeight    = 1080;
        pInPortDef.format.video.nStride         = -1;

        pInPortDef.format.video.xFramerate          = (30) << 16;
        pInPortDef.format.video.eCompressionFormat  = OMX_VIDEO_CodingAVC;
        pInPortDef.format.video.eColorFormat        = OMX_COLOR_FormatYUV420Planar;

        eError = OMX_SetParameter (pHandle, OMX_IndexParamPortDefinition, &pInPortDef);
    }
   
    {
        OMX_PARAM_PORTDEFINITIONTYPE pOutPortDef;

        OMX_INIT_PARAM (&pOutPortDef);

        pOutPortDef.nPortIndex      = 1;
        pOutPortDef.eDir            = 1;
        pOutPortDef.nBufferCountActual = 8;

        pOutPortDef.nBufferSize = 3612672;
        pOutPortDef.bEnabled    = OMX_TRUE;
        pOutPortDef.bPopulated  = OMX_FALSE;
        pOutPortDef.format.video.cMIMEType      = "H264";
        pOutPortDef.format.video.nFrameWidth    = 1920;
        pOutPortDef.format.video.nFrameHeight   = 1080;
        pOutPortDef.format.video.nStride        = 2048;

        pOutPortDef.format.video.xFramerate     = (30) << 16;
        pOutPortDef.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused;
        pOutPortDef.format.video.eColorFormat   = OMX_COLOR_FormatYUV420SemiPlanar;

        eError = OMX_SetParameter (pHandle, OMX_IndexParamPortDefinition, &pOutPortDef);
    }

    {
        OMX_PARAM_COMPPORT_NOTIFYTYPE pNotifyType;
           
        OMX_INIT_PARAM(&pNotifyType);
        pNotifyType.eNotifyType = OMX_NOTIFY_TYPE_NONE;
        pNotifyType.nPortIndex  = OMX_VIDDEC_INPUT_PORT;
        eError = OMX_SetParameter (pHandle, OMX_TI_IndexParamCompPortNotifyType, &pNotifyType);

        pNotifyType.eNotifyType = OMX_NOTIFY_TYPE_NONE;
        pNotifyType.nPortIndex  = OMX_VIDDEC_OUTPUT_PORT;
        eError = OMX_SetParameter (pHandle, OMX_TI_IndexParamCompPortNotifyType, &pNotifyType);
    }
   
    {
        OMX_VIDEO_PARAM_STATICPARAMS tStaticParam;

        OMX_INIT_PARAM (&tStaticParam);

        tStaticParam.nPortIndex = OMX_VIDDEC_OUTPUT_PORT;

        eError = OMX_GetParameter (pHandle, OMX_TI_IndexParamVideoStaticParams, &tStaticParam);

        tStaticParam.videoStaticParams.h264DecStaticParams.presetLevelIdc = IH264VDEC_LEVEL42;

        eError = OMX_SetParameter (pHandle, OMX_TI_IndexParamVideoStaticParams, &tStaticParam);
    }

EXIT:
    return eError;
}

--------------------------

Regards,
Miki Shinji

 

  • Hi Miki,

    You are using an old version of the EZSDK. Please switch to the new ti-ezsdk_dm816x-evm_5_04_00_11.

    For the available decoder configuration check ti-ezsdk_dm816x-evm_5_04_00_11/component-sources/omx_05_02_00_38/examples/ti/omx/demos/decode | decode_display | decode_mosaicdisplay

    You can check also section 2.5 Video Decoder Component (VDEC), from ti-ezsdk_dm816x-evm_5_04_00_11/component-sources/omx_05_02_00_38/OMX_05_02_00_38_UserGuide.pdf

    Regards,

    Pavel


  • Hi, Pavel.

    Thank you for reply.

    A problem is solved for new SDK(ti-ezsdk_dm816x-evm_5_04_00_11).

    thank you.

    Miki Shinji.