1
$\begingroup$

I am studying H264 video these days. I know video encoder will do frame reorder for GOP with B pictures.I am not sure if my understand is correct!

  1. GOP input to encoder (it's raw data but I just map it as GOP for better understand).

I(1) B(2) B(3) P(4) B(5) B(6) P(7) B(8) B(9) P(10) B(11) B(12) I(13)

  1. GOP output from encoder.

I(1) P(4) B(2) B(3) P(7) B(5) B(6) P(10) B(8) B(9) I(13) B(11) B(12)

  1. GOP input to decoder.(the same as output from encoder)

I(1) P(4) B(2) B(3) P(7) B(5) B(6) P(10) B(8) B(9) I(13) B(11) B(12)

  1. GOP output from decode. (the same as input to encoder)

I(1) B(2) B(3) P(4) B(5) B(6) P(7) B(8) B(9) P(10) B(11) B(12) I(13)

$\endgroup$
1
$\begingroup$

I think you have in general the correct idea. But you have to remember that the encode order (and therefore the order in which the pictures will appear in the bitstream and be decoded), depends on how the references are.

if you have: I(1) B(2) B(3) P(4) B(5) B(6) P(7). etc...

You could have a structure where in the group [B(2) B(3) P(4)], the first B(2) has a reference to the past I frame, but a future reference to the following B(3) frame. In that case, the encode order start the same as having I(1) P(4), but the next cannot be B(2), because B(2) needs to wait for B(3) to be encoded. And this could change from repetition to repetition.

So in general the encode order of frames depends on how the referencing structure is. Since the standards do not specify this and allow freedom of choice when encoding, the GOP structure is in general totally arbitrary, so every specific case has to be analyzed.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.