[XviD-devel] streaming mpeg-4 / decoding b-frames

shatty xvid-devel@xvid.org
Sat, 31 Aug 2002 22:02:19 -0700


Hello,

I am trying to ensure that there will be no problems with
bidirectionally encoded frames in the new media kit api for 
OpenBeOS. Internally the media kit has a set of nodes and wires 
similar to various other media APIs. (directshow, gstreamer)  
The data is passed in a set of buffers that are handed from 
node to node.  The media kit is oriented around low latency 
media manipulation, so each node maintains some latency 
information.

Which brings me to the b-frames/streaming mpeg4.  If we do the
naive thing and simply pass the frames in the order in which 
they are to be presented, we have a big latency hit if a group 
of b-frames occurs.  We don't have to take this hit if I am not
mistaken, because each b-frame has only the prior frame and
the next key frame as its reference. (right?)

So we could pass the reference frame ahead of the group of
b-frames and then it would be available for decoding the 
b-frames, or we could pass it after the first one, for 
example.  Either of these seems better than the naive approach.

My question is: how do people handle this now with streaming
mpeg4 and also, how is this handled in the xvidcore lib?
Does the lib expect the frames out of order?  Please feel free
to respond offlist/onlist/IRC as you like.

Andrew Bachmann