Re: mpeg2 demux output pin buffer size



On Sep 11, 9:51 pm, Geraint Davies <gerai...@xxxxxxxxxx> wrote:
On Thu, 11 Sep 2008 04:48:59 -0700 (PDT), dev <krt....@xxxxxxxxx>
wrote:



Hi All,

I am decoding mpeg2 transport stream. My mpeg2 decoder expects one
frame worth of data at once for decoding.But mpeg2 demux filter
connects with 8192 bytes of data and hence it breaks any output it
gives in to max size 8192 or smaller.

For frames worth 0.15MB of data to be decoded I am buffering and
feeding it to decoder. Is there any alternative to buffering ? My a/v
sync goes for a toss because of this buffering involved.

What is the best way to identify a MPEG2 frames beginning and end? At
present I am parsing through the data looking for picture start code's
occurrence i.e. 0x00010000. Based on two such occurrences I buffer and
feed data to the decoder. Is my assumption right that every frame has
a picture start code?

I've not seen this requirement in an mpeg-2 decoder before (mpeg-4 and
h264 yes, mpeg1 and 2 no).

If you really do need this, then yes, I think you need to look for the
next picture start code (which you've typed wrong: its 00 00 01 00
isn't it?). But remember that the sequence header and sequence header
extension should go with the following frame, if present. So cut
before a 00 00 01 b3 as well if present.

(and you don't need to look for two occurrences do you? Just look for
the next cut point and then start the next buffer).

G

Hi,

Thanks for the info Geraint .

I am using a third party decoder, directshow is mere wrapper arround
it.
The decoder expects some data to be buffered and given to it,and its a
way too high 300-400kb of data.

1.Buffering input media samples data into temporary buffer and
returning S_FALSE from transofrm for such media samples.Is this
approach right for buffering?
2. When the video filter has so much data to be buffered would not the
audio/video sync go for a toss ? Can I control this in any way?
3. Do I have to handle timestamping manually for this?

Any input would be great help.

Regards,
Dev
.



Relevant Pages

  • Re: mpeg2 demux output pin buffer size
    ... before you get the first frame output and so I suppose you think that ... in buffering will increase the time for the pause to complete, ... Limitation on my mpeg2 decoder filter ... In this case which time stamp do I attach to the ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: mpeg2 demux output pin buffer size
    ... I am decoding mpeg2 transport stream. ... My mpeg2 decoder expects one ... Is there any alternative to buffering? ... Is my assumption right that every frame has ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: double buffering
    ... >the middle of drawing a frame. ... If you're learning about double buffering, you might also want to look ... Once upon a time, not so long ago, we did not have frame ... whole and to display that whole. ...
    (comp.graphics.algorithms)
  • Re: Quake performance SGI vs Sun
    ... > Not on an SGI. ... No triple buffering. ... And it introduces one extra frame ... > driver combinations. ...
    (comp.sys.sun.hardware)
  • Re: Quake performance SGI vs Sun
    ... > The latency is the time between rendering the frame and displaying it. ... and misleading at best, with triple buffering, in worst case, we get ...
    (comp.sys.sun.hardware)