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.

RTOS/TDA2: H.264 low lantancy encode

Part Number: TDA2

Tool/software: TI-RTOS

Hello,

We are trying to enable low latency encoding by setting parameters for sliced mode on encoder link, but we keep getting errors in creation phase. Our video input is 1280x720. We are not sure about the slice size as well, so we are open to suggestions.
Note: We are using TDA2xx chip and vision_sdk_2.12.
This is what we changed so far:

In usecase: 

pLinkChPrm->encodingPreset = SYSTEM_XDM_USER_DEFINED;
pLinkChPrm->rateControlPreset = SYSTEM_IVIDEO_USER_DEFINED;

In encLink_h264.c:

staticParams->videnc2Params.inputDataMode = IVIDEO_NUMROWS;
staticParams->videnc2Params.outputDataMode = IVIDEO_SLICEMODE;

staticParams->sliceCodingParams.sliceCodingPreset = 1;   //IH264_SLICECODING_USERDEFINED;
staticParams->sliceCodingParams.sliceMode = 1;   //IH264_SLICEMODE_MBUNIT;
staticParams->sliceCodingParams.sliceUnitSize = 6;
staticParams->sliceCodingParams.streamFormat = IH264_BYTE_STREAM;

dynamicParams->videnc2DynamicParams.ignoreOutbufSizeFlag = XDAS_TRUE;
dynamicParams->videnc2DynamicParams.getBufferFxn =
enclink_h264_get_buffer_fxn;

static XDAS_Int32 enclink_h264_get_buffer_fxn(XDM_DataSyncHandle dataSyncHandle,
XDM_DataSyncDesc *dataSyncDesc)
{
dataSyncDesc->baseAddr = NULL;
dataSyncDesc->numBlocks = 1;//gConfigOrg.numBlocks[block_count];
dataSyncDesc->varBlockSizesFlag = 1;
dataSyncDesc->blockSizes = (XDAS_Int32*)Input_BlockSizeArray;
return ENC_LINK_S_SUCCESS;

}

The error occurs at enclink_h264_control call with XDM_SETPARAMS.

Thank you,
Marijana  

  • Hi Marijana,

    Please refer below sections in Encoder User Guide here: git.ti.com/.../docs

    1. Table 4-12: Default and Supported Values for IH264ENC_SliceCodingParams.
    2. Appendix G: Low Latency / Sub Frame Level Synchronization

    And Sample test application provided in the codec package @ path: ..\ivahd_h264enc_02_00_09_01_production\packages\ti\sdo\codecs\h264enc\app\test\src

    1. Please refer putDataFxn & getDataFxn implementation.