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 slice mode of encoder in newest RDK?

Hi All,

     We need to do multi-slice in H.264 encoder.  There are two kinds of slice mode, one by number of macroblocks,

one by number of bytes.  In encoder only simulation, first mode is o.k., second mode is not o.k.  However, we want

to use multi-slice in our system.  In newest RDK (ver 01.05.00.08), how to set multi-slice mode for encoder?  The

dynamic parameters or static parameters?  Can these two modes work in the EVM?  (Maybe I miss some setting.) 

Could anyone give the advices?

Thanks,

James

  • Hi All:

         In newest RDK, I have set

    hObj->staticParams.sliceCodingParams.sliceCodingPreset = 1
    hObj->staticParams.sliceCodingParams.sliceMode = 1
    hObj->staticParams.sliceCodingParams.sliceUnitSize = 480
    hObj->staticParams.videnc2Params.encodingPreset = 3

    before

    hObj->algHandle =
            enc_link_h264_create((IH264ENC_Fxns *) & H264ENC_TI_IH264ENC,
                                 &hObj->staticParams);

    But the bitstream still does not have multi slices.

    Could anyone give some advices?

    Thanks,

    James

  • Hi James,

     

    According to your setting shared, you are trying to set Multiple slices based on Max Number of MB per slice.

    Just ensure Max number of MB per slice is less than the maximum MBs in the frame.

    Eg: Say you are encoding QCIF (which has 99 MB per frame) and setting sliceUnitSize as 480, does not result in multiple slices in the bitstrean.

     

    Also just ensure you are not owerwriting the create time setting with Dynamic Settings given to control() call.

     

    Regards,

    Venu

     

  • Dear Venu:

    Thank you for your reply.  But I encode in 1080P format. (1920x1088).  So there should be 17 slices in a frame.

    And I do not do dynamic settings.  So do you have any other advices?

    Thanks,

    James

  • Hi James,

     

    Can you give the entire log of

     

    hObj->staticParams.

     

    Just ensure dynamic settng is done anywhaere else?

     

    regards,

    Venu

  • Hi Venu,

     

    The multi-slice setting seems in enclink_h264_set_static_params.

    I set the slice-mode relative parameters in this function.  It seems unrelative to dynamic setting.

    And I do not know how to get the entire log of

    hObj->staticParams.

    Could you tell me how?

     

    Thanks,

    James

  • Hi James,

    When I say log, print the values of all the members of the structure by putting printf.

    Multi-slice setting also exist in Dynamic params.

    typedef struct EncLink_H264Obj {
        IH264ENC_Handle algHandle;
        Int8 versionInfo[ENC_LINK_H264_VERSION_STRING_MAX_LEN];
        Int linkID;
        Int channelID;
        Int scratchID;
        UInt32 ivaChID;
        IH264ENC_DynamicParams dynamicParams;
        IH264ENC_Status status;
        IH264ENC_Params staticParams;
        IH264ENC_InArgs inArgs;
        IH264ENC_OutArgs outArgs;
        IVIDEO2_BufDesc inBufs;
        XDM2_BufDesc outBufs;
        IVIDEO_Format format;
        UInt32 memUsed[UTILS_MEM_MAXHEAPS];
    } EncLink_H264Obj;

    Check the highlighted structure contents.

     

    Regards,

    Venu

     

     

     

  • Dear Venu,

     

    Thank you for your support.  The problem has been resolved.

     

    Regards,

    James