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.

question about OMX VENC input in EZSDK 5.04

Hi.

I am using OMX VENC component in EZSDK 5.04.

the following connection is working well. 
        DEI outport(1920x1080, 420sp) -> VENC inport

I have changed DEI outport resolution and VENC input resolution using "OMX_SetConfig" in "OMX_StateExecuting" state 
( dynamic configuration)
        DEI outport(1280x720, 420sp) -> VENC inport
        (stride : 1920)
There is no error, but encoded picture have some problem like VENC reads invalid color data with invalid address
(it seems that Luma data is correctly resized.), see the result of dynamic configuration. 

And another test with static configuration show the correct result like bottom picture. Surely, DEI outport buffer size is
1280x720x1.5. (stride : 1280)

If DEI write resized data in sequential without any offset between luma and chroma and VENC read data sequentially,
I think there is no problem, but it seems that there is any offset.

So, i guess that VENC can not read resized CbCr data address, which is changed by DEI outport.

Am I wrong ?

Could you explain how to write/read frame data when DEI/VENC is changing resolution with dynamic configuration ? 

the result of dynamic configuration

the result of static configuration

best regards

hwanserk.
 

 

      

  • following codes are setting dynamic configuration

    ///////////////////////////////////////////////////////////////// DEI setting

    OMX_INIT_PARAM (&chResolution);
    chResolution.Frm0Width = 1920;
    chResolution.Frm0Height = 1080;
    chResolution.Frm0Pitch = 1920*2; // buffer max size *2

    chResolution.Frm1Width = 1280;   //////// -> VENC inport, YUV420SP
    chResolution.Frm1Height = 720;
    chResolution.Frm1Pitch = 1920;  
    chResolution.FrmStartX = 0;
    chResolution.FrmStartY = 0;
    chResolution.FrmCropWidth = 0;
    chResolution.FrmCropHeight = 0;
    chResolution.eDir = OMX_DirOutput;
    chResolution.nChId = 0;
    eError = OMX_SetConfig (pPreComp->handle,
    (OMX_INDEXTYPE) OMX_TI_IndexConfigVidChResolution,
    &chResolution);
    if (eError != OMX_ErrorNone)
    {
    ERROR ("failed to set input channel resolution\n");
    }
    else
    {
    printf ("DEI output configuration:: Successful \n");
    }



    /////////////////////////////////////////////////////////////////////// VENC setting
    OMX_INIT_PARAM (&tDynParams);

    tDynParams.nPortIndex = OMX_VIDENC_OUTPUT_PORT;

    eError = OMX_GetConfig(pComp->handle, OMX_TI_IndexParamVideoDynamicParams, &tDynParams);
    if (eError != OMX_ErrorNone)
    {
    ERROR ("failed to VENC getconfig\n");
    }
    else
    {
    PRINTF ("VENC get output configuration:: Successful \n");

    );
    }


    tDynParams.videoDynamicParams.h264EncDynamicParams.videnc2DynamicParams.generateHeader = XDM_GENERATE_HEADER;

    tDynParams.videoDynamicParams.h264EncDynamicParams.videnc2DynamicParams.inputWidth = 1280; 

    tDynParams.videoDynamicParams.h264EncDynamicParams.videnc2DynamicParams.inputHeight = 720;
    tDynParams.videoDynamicParams.h264EncDynamicParams.videnc2DynamicParams.captureWidth = 1920;
    eError = OMX_SetConfig(pComp->handle, OMX_TI_IndexConfigVideoDynamicParams,
    &tDynParams);

    if (eError != OMX_ErrorNone)
    {
    ERROR ("failed to VENC setconfig : error(%x)\n", eError);
    }
    else
    {
    PRINTF ("VENC set output configuration:: Successful \n");

    );
    }

  • Hello Hwan,

    Did u solved this issue ? I had similar problem and it resolved by some patch work.

    Regards,

    Hitesh

  • Hi Hitesh,

    I'm facing the same issue on EZSDK 5.05.02.00. If you have found a fix, can you please share?

    Thanks in advance

    Regards,

    Manu

  • Hello Manu,

    This is very old e2e thread please open a new one.

    BR
    Margarita
  • Hello Margarita,

    Thanks for your suggestion. I have created a new thread here

    Regards,

    Manu