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.

gst-openmax decoder output exactly same yuv buffers

Hello everyone:

I met a OMX decoder problem when debug gst-openmax on ICS, blaze tablet, that's OMX decoder could only decode several correct yuv frame before event OMX_EventPortSettingsChanged, data_2 = OMX_IndexConfigCommonOutputCrop, after above event receivd, the new released buffer to OMX, will output same yuv hex (in FillBufferDone event).  please give me some advices. Thanks in advance.

in gst-openmax our detail flow is:

       1) OMX_IndexParamVideoPortFormat, Get/Set both Input port and output port; 

        2) OMX_IndexParamPortDefinition, 

            for Input port, correct nFrameWidth, nFrameHeight, eCompressionFormat, eColorFormat, and nBufferSize=64K

            for output port, correct nFrameWidth, nFrameHeight,xFramerate

         3) native_window_set_crop/ native_window_set_buffer_layout

          4) enableGraphic buffer

          5) Allocate buffer:

             Input port, OMX_AllocateBuffer

             Output port,  Set up the native window(scaling mode, geometry, usage...),  

                                nativewindow->dequeueBuffer, then OMX_UseBuffer

          6) EmptyThisBuffer/FillThisBuffer

          7) OMX_EventPortSettingsChanged received (data2=0)

              Send command to Disable port. /FreeBuffers

              Send command to Enable port. /AllocateBuffers, send the buffers to OMX eg: buffer id= 0, 1, 2, 3, 4 (FillThisBuffer)

        8)  OMX_EventPortSettingsChanged received (data2= OMX_IndexConfigCommonOutputCrop)

             Set native window according to crop, eg: [32, 24, 1280+32, 720+24];  /native_window_set_buffer_layout

        9)  FillBufferDone received of buffer id= 0,1,2,3,4, and the output raw yuv data are correct, displayed normally on yuv player.

        10) During each FillBufferDone,  dequeue native window and send buffer (eg, id=5, 6, 7,8,9, 10......) to OMX by fillThisBuffer.

             The problem is the output buffers after event OMX_IndexConfigCommonOutputCrop step8, eg the output of buffer 5, the yuv hex value are exactly same with previously buffer 4, hence, buffer 6, 7, 8 are also exactly same with buffer 4;

The output buffer 9 changed, but buffer 10 HEX is same with buffer 9;

The output buffer 11 changed, but buffer 12, 13, 14 HEX are all same with buffer 11;

The output buffer 15 changed, but buffer 16, 17, 18, 19, 20, 21, 22, 23, 24 are exactly same HEX value......

So it seams after receive event OMX_EventPortSettingsChanged(OMX_IndexConfigCommonOutputCrop), the output buffers have same yuv with previouly buffer that'are error, and without error information from OMX or ducati.

Could you give me some advice for my check/debug. Thanks you so much.

  • Hi Ning Wei,

    TI does not release gstreamer software on ICS. Looks like you have done some custom work on ICS. May I recommend you download the latest ICS software from the following link: http://omappedia.org/wiki/4AI.1.6_OMAP4_Icecream_Sandwich_Release_Notes

    Once you download this, please refer to the implementation of OMX decoder usage in Stagefright framework. This would give an idea of what could be missing in the current custom implementation you have with gst based decoding on ICS.

    Regards, Satheesh.