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.

Omap4460:The size of output data of decoder is different from the input data

Hi all:

In my h264 decoding case on TI omap4460 , the output data is larger than the input bitstream.eg:When inputing 320*240, 384*336 will be output.

480*640 in, 640*736 out.

640*480 in,768*576 out.

Who encountered such a question? And Whether I did not have to set any parameters?

 

 

  • Chang;

    It happens because Ducati's video decoder is adding A multiple of 16 bits and extra padding for output buffers and sending port reconfiguration event for Client IL to recognize this changes. This happens when first buffer is processed, in another post I mentioned that it requires SPS+PPS+Iframe in first buffer after some investigation I found that it is needed to send SPS+PPS in first buffer in order for video decoder to read correct values from the headers and return the event if needed.

    You can look at OMXCodec.cpp in Android StageFright code

    http://git.omapzoom.org/?p=platform/frameworks/base.git;a=blob;f=media/libstagefright/OMXCodec.cpp;h=60d9bb727800c4a6c56fbdbe6ef889fc9700aae7;hb=HEAD

    2513 void OMXCodec::onEvent(OMX_EVENTTYPE event, OMX_U32 data1, OMX_U32 data2) {

    2529         case OMX_EventPortSettingsChanged:

    it handles extra OMX_EventPortSettingsChanged for when H264 file contains cropped resolutions. The event type is stored in data2 for handling.

    2542             } else if (data1 == kPortIndexOutput &&
    2543                         (data2 == OMX_IndexConfigCommonOutputCrop ||
    2544                          data2 == OMX_IndexConfigCommonScale)) {

    for a reference to cropped values see http://e2e.ti.com/support/omap/f/849/p/191291/684899.aspx