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.

encoder delay on OMAP4

Dear Sir,

I want to do yuv file encoding using OMX.TI.DUCATI1.VIDEO.H264E on Huawei Ascend P1.  I followed the VTC app ( from http://review.omapzoom.org/#/c/19748/ .  I saw this

link in the post from this forum: http://e2e.ti.com/support/omap/f/849/p/197672/706831.aspx), only changed the encoder source from camera capturing to reading yuv file,

and this worked OK. But  I found there were 3 frames cached in the encoder,  which means that after finishing encoding three frames, then the first output frame come

out.

So is there a way to implement immediate output? that is no delay in output.

 Thanks

Qiao

  • I can think that it is a requirement of Video Encoder to collect those frame before processing next output, for example when processing B-frame for H264 format.

    If your concern is to process 1 or 2 frames then one thing to try is sending EOS flag to indicate the end stream and encoder to process actual data, I have never tried this before, it is a suggestion to try.

    I found next patch that is for StageFright code and contains information about similar fact, but you could try to implement it's behavior in DOMX side, as suggestion.

    http://review.omapzoom.org/#/c/19763/4

    and it could require to check what kOnlySubmitOneInputBufferAtOneTime flag is doing and replicate it in your code.

    For what I read it is disabling B-frames for H264 High profile format.

    I haven't try this change it is a suggestion that I just found, and it could not apply in some way depending on used format or Profile/Level configuration, where it could affect used 4AI release.

  • Hi Manuel,

    Thanks for your suggestions.

    I set the profile to be baseline, which means no B-frames, and  there were still 3 frames delayed.

    I also tried sending EOS flag to encoder when encoding every frame, and the encoder encoded every frame as IDR frame, but still had 3 frames cached.

    So,  any more hint?

    Thank you again:)

    Best Regards,

    Qiao

  • In a quick answer, since possible change is in Ducati side you must to contact TI representative to get access to Ducati code in order to get/do this modification.

    I remember a change for H264 where it was modified to return the first output buffer before than 3 input buffers and it was only made under certain restrictions, but like this information cannot be mentioned in public forum this is what I can say.

    But by default it is needed to store the first 3 buffers.

  • Please verify the post in case it answer your question, thanks.