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 set dm8168 omx encoder parameters for supportting multiple slices per picture?

Hi,

  My board is DM8168 EVM.My sdk is ezsdk_5_05_02_00.I know dm8168 omx encoder support multiple slices per picture.But i donot know how to set omx encoder parameters?Anyone can tell me ?Thank you very much.

tory

  • Hi Tory,

    As I told earlier, if you don't have overlay package you can't modify encoder parameter in omx for slice encoding.

    Check if you have omx_h264ve.c in component-sources\omx-ti81xx-src_05_02_00_48\src\ti\omx\comp\venc\src of your ezsdk package.

    If you find this file, you need to modify the function OMX_TI_H264VE_SetDefaultDynamicParams() to set the sliceCodingParams stucture.

    Ram

  • Hi ram,

     " The encoder in EZSDK does support slices - it just doesn't support the ability to extract the slices separately as they are encoded." Is it right?

    So i set the encoder parameters as following.But encoder does not output slices.It does not work.Can you give me some advice?

    Thank you very much.

    OMX_VIDEO_PARAM_DYNAMICPARAMS dynamic_params;

    OMX_INIT_PARAM(&dynamic_params);
    dynamic_params.nPortIndex = OMX_VIDENC_OUTPUT_PORT;

    OMX_GetParameter(encoder_handle, OMX_TI_IndexParamVideoDynamicParams, &dynamic_params);

    IH264ENC_DynamicParams *h264_params = &dynamic_params.videoDynamicParams.h264EncDynamicParams;

    h264_params->sliceCodingParams.sliceCodingPreset = IH264_SLICECODING_USERDEFINED;
    h264_params->sliceCodingParams.sliceMode         = IH264_SLICEMODE_BYTES;
    h264_params->sliceCodingParams.sliceUnitSize     = 1300;
    h264_params->sliceCodingParams.streamFormat      = IH264_BYTE_STREAM;

    OMX_SetParameter(encoder_handle, OMX_TI_IndexParamVideoDynamicParams, &dynamic_params);


    tory

  • Hi Tory,

    Yes the statement is correct.

    When you get one buffer from encoder component through FillBufferDone, the buffer will have all slices in a single buffer which constitute a frame. 

    From the other thread, 

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/278942.aspx, I guess you are able to set encoder to encode in slices in iLClient .

    How did you verify output has once slice? Did you use any video analyzer?

    Ram

  • Hi Ram,

      I save the single buffer to a file.Then check the file by ue software.The first frame nal seq is sps pps i frame data.But I frame data is only one nal.So i think it is only one slice not mul slices.Any parameters need to be set?

    Thank you very much.

    tory

  • Hi Tory,

    Are you setting sliceCoding params in iLClient_utils.c of omx_05_02_00_48\examples\ti\omx\demos\encode\src ?

    If this is yes, your settings is not interpreted since eEncodingModePreset is set to OMX_Video_Enc_Default.

    Set eEncodingModePreset to OMX_Video_Enc_User_Defined along with your slice settings. You should be able to get the slices in each frame.

    Please do this change in your iLclient_utils.c

    Ram

  • Hi Tory,

    along with 

    tEncoderPreset.eEncodingModePreset = OMX_Video_Enc_User_Defined;    

    you need to set

    tStaticParam.videoStaticParams.h264EncStaticParams.videnc2Params.encodingPreset = XDM_USER_DEFINED;

    Ram