OMX6 OpenMax IL H264 decode.

Stephen Webb swebb.gstreamer at gmail.com
Wed Oct 22 17:53:49 PDT 2014


This isn't a gstreamer question, but I haven't found any other place where
one can ask questions and have a reasonable belief that they will get
answered.

If someone can point me to a different forum (or other resource) for my
problem, I will gladly go there.

I'm open to a short term consulting engagement if someone is interested in
that.

* What I am trying to do is decode an annex B H264 stream on an Android
iMX6 platform.
* I want to decode with as little latency as possible.
* As we are already using gstreamer for other purposes, I started there.
* I end up with ~8 frames of latency which I can't get get rid of.
* I have switched to OpenMax IL with the idea of getting as much control as
possible.

So far I have:
Get a handle to the HW H264 decoder.
Configure the ports
Allocate the input and output buffers.
Get the component in the executing state.
Repeatedly "feed" the input port by calling EmpyThisBuffer and handling the
EmptyBufferDone callback.

The problem is that I never get an FillBufferDone callback even though the
deocder happily takes input "forever" (where does it go?)

I have tried sending a single NAL at a time.
I have tried separating SPS/PPS NALs from VCL NALs.
I have tried sending full frames in a buffer.
I have tried setting buffer flags (OMX_BUFFERFLAG_CODECCONFIG,
OMX_BUFFERFLAG_ENDOFFRAME)
END_OF_FRAME flag results in a "Stream is corrupt" error being sent to my
callback.
I have tried stripping the 0001 NAL delimiters.
I have tried to query the input port with:


OMX_GetParameter(mHandle, (OMX_INDEXTYPE)
OMX_IndexParamNalStreamFormatSupported, &lFormatType);

(I get an index not supported error)

I have tried to set the format with
OMX_SetParameter(mHandle,(OMX_INDEXTYPE)
OMX_IndexParamNalStreamFormatSelect, &lFormatType);

(index not supported error)

--------------------------------------------------------------------
Questions / thoughts.

1.  I am not using timestamps.  Is this OK?
2.  I am setting the framerate to 0.  Is this OK?
3.  Am I supposed to be handling the non VCL frames manually and
configuring the ports/formats accordingly?  Or can I send all NAL data to
the decoder?
4.  Am I allowed to send the raw buffer to the decoder (with 0001 headers
and all)?
5.  Do I have to send individual NALs per buffer?

I'm out of ideas.  Anything helps.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20141022/66651312/attachment.html>


More information about the gstreamer-devel mailing list