I B P video frame reordering
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.