[matroska-devel] b-frames

Moritz Bunkus moritz at bunkus.org
Sat Jun 28 09:58:47 CEST 2003


Although I'm at home I'm still pondering the B frame handling. So here
are some of my questions.

1. Let's assume you have the typical sequence of IBP (display order?),
   timestamps 0, 40 and 80ms. In order to store that in Matroska WITH
   libmatroska I have to first AddFrame(I), then AddFrame(P, I) and then
   AddFrame(B, I, P). Otherwise I don't have the BlockGroup for the P
   frame that the AddFrame(B...) needs. Correct? So in a Matroska file
   the frames would be stored as IPB.

2. Reading those frames and refpriorities. For a file containing B
   frames I have a MinCache of 2. I frames have a prio of 0, P have 1
   and B have a prio of 2. Correct? So let's take the example above. I
   get the I frame and keep it. I get the P frame and keep it. Then I
   get the B frame. Now I'm happy and can deliver the frames in the
   order I want (either coding or display).

   Next example: display order IPBP which are stored as IPPB in the file
   according to my thoughts in 1. So I get the I frame, the first P
   frame which I both store. Now I get the second P frame. But which
   frame from the two stored frames can I discard? And how do I decide

3. Multiple B frames. Is this possible? If yes, how do I handle that?
   Display order: IB1B2P. How will this be stored, what does the
   refprio/cache handling look like in this case?

I guess that Steve will answer all this ;) Thanks in advance.

 ==> Ciao, Mosu (Moritz Bunkus)

More information about the Matroska-devel mailing list