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.

DM365 H264 Platinum Encoder Multiple Slices

Hello,

could you kindly help me to configure the encoder to output data stream in multpile slices.

Platform:
DM365
DVSDK 2.10.1.18
H264 Platinum encode 2.0.0.10
Resolution: QVGA

I configured H264 encoder to output 15 MBs per slice:
.entropyMode=0 //CAVLC
.sliceMode=2 //MBs per slice
.outputDataMode=1 //byte stream format
.sliceSize=15 //one row for QVGA

Here is the dump of both static and dynamic configuration structs:
1261.enc_params.txt


however, the first (IDR) frame (for example) consists of 2 Non VLC slices, and one large VLC slice.
I expected (please correct me if I am wrong), to get a sequence of NAL units delimited by 0x0000001 headers, where each NALU contains 1 MB row.

Unfortunately, I failed to find any information regarding how to configure the slicing feature (encoder user guide, TI's wike etc).



Thank you in advance.

  • Hi Nequam,

    In slicemode = 2, Slice size should be multiple of 2 . If you set slice size non-multiple of 2 encoder will return proper error code (IH264VENC_ERR_SLICESIZE)

    Encoder user guide has information( NOTE section page No. 4-49)  about how to configure slice size. And QVGA(320x240) has 20MBs per row.

    and soon TI will update wiki topic about slicing feature configuration.

     

    Thanks,

    Veeranna

  • Hi 

    If you want One row per slice, alternatively  you can also use slicemode = 3(rows per slice) and slicesize = 1(one row per slice), 

  • Dear Veeranna,

    I am sorry, 15 MBs is a typo. As you can see from configuration dump attached to the question message I configure it to 20.


    Encoder is initialized successfully, and even encodes a frame, however as I can see it outputs a single VLC NAL.

    Perhaps, we use different user guide version. In mine, taken from the codec 2.0.0.10 h264/docs folder (SPRUEU9C, Audust 2010),
    page 4-49 contains 4.2.2.6 IH264VENC_Fxns topic. Where can I get the newer version of the user guide.

    Am I right, expecting the encoder to output frames divided to NAL units delimited by 0x0000001?

    Thank you in advance.

  • Hi Nequam,

    What you are expecting is correct.

    But one thing you should note is MBs based slices are supported only in encQuality = 0 mode.

    Looking at your settings I see that encodingPreset =1 which results in encQuality = 2, in which there is no support for MBs based slices and will be turned off internally. When encodingPreset =1 it overrides the encQuality flag. So you are not seeing any slices at your end.

    Two things you can do is,

    Change encodingPreset  to 3 and encQuality = 0. This enables MBs based slices

    or

    As Veeranna suggested use sliceMode = 3

    Rgds, mahant

  • Dear Mahant and Veeranna,

     

    thank you for your help. Now it works.

     

    Best regards.