Log in

View Full Version : Help newb understanding structure of multiple reference frames


johndeker
16th August 2011, 00:47
Would someone help explain to me the structure of multiple reference frames?



My understanding is mpeg4-asp has 1 reference frame, the frame immediately before the one you are on.

Mpeg4-avc added multiple reference frames like in this picture:
http://www.ars-docendi.de/anzeigendemo/html/html/mpeg_schnitt037.jpg

My questions are
1) In the picture it looks like the setting is for 2 reference frames max, which is done by the B frames. Is that correct?

2) I think the spec allows for up to 16 frames. The thing that's confusing me is how can you have more than 2 reference frames? It seems like you can only draw info from a single previous frame or single future frame. Which other frames are being references and held in buffer?

Dark Shikari
16th August 2011, 00:55
It seems like you can only draw info from a single previous frame or single future frame.You can reference any frame that was previously decoded and is still in the reference buffer.

johndeker
16th August 2011, 03:16
You can reference any frame that was previously decoded and is still in the reference buffer.

How is it determined what gets stored in reference buffer?

Is it all decoded frames within a GOP?

Dark Shikari
16th August 2011, 03:28
Every frame is added to the reference buffer unless it's marked as unreferenced. When the buffer is full, the oldest is evicted. This default behavior can be overrided with MMCO.

johndeker
16th August 2011, 03:48
So to make sure I'm getting this, the setting for "reference frames" is really only the number of decoded pictures to store at a given level/resolution?

And if a GOP had structure of let's say 8 B-frames (IBBBBBBBBP) with setting of 4 reference frames and currently decoding B-frame #7 then it can use all of the following:
* 4 previous decoded frames
* future P-frame (located after B-frame #8)
* past I-frame (located before B-frame #1)

Is that correct?

Dark Shikari
16th August 2011, 03:49
B-frames are typically unreferenced (except in the case of pyramid structures).

johndeker
16th August 2011, 03:57
B-frames are typically unreferenced (except in the case of pyramid structures).

I'm having trouble understanding. So if reference frames setting is set to 4, which 4 frames are being referenced? Would you mind write a example GOP structure to help explain?

Dark Shikari
16th August 2011, 04:00
Display: I0 B1 P2 B3 P4 B5 P6 B7 P8
Coded: I0 P2 B1 P4 B3 P6 B5 P8 B7

P8 can reference P6, P4, P2, and I0.

johndeker
16th August 2011, 05:01
thank you for all replies