[Mp4-tech] B frame bit-rate in H.264 stream

Tourapis, Alexis alexis.tourapis dolby.com
Fri Sep 21 07:04:49 EDT 2007


Dear Changfeng,
A big problem with your current configuration (which seems to be based on a later version of the JM, if I am not mistaken considering also that hierarchical coding was added in version 9.0) is that you have set "NumberReferenceFrames =  1". This means that only a single reference is available and not two for B slices. That as you can guess is very bad and is even very different from MPEG-2. In order to get "Legacy" behavior, you need to set "NumberReferenceFrames =  2" and set PList0References, BList0References, and BList1References to 1. Of course keeping (assuming they are supported), parameters PyramidRefReorder and   PocMemoryManagement enabled is very important considering what I mentioned earlier. I would suggest that you dump the poc's of the pictures that are available in your buffer and are use for reference at any given time to verify that this is the case. Obviously this would have a big impact on your performance and the behavior of the B coded pictures.
Alexis
-----Original Message-----
From: changfeng niu [mailto:changfeng.niu gmail.com]
Sent: Fri 9/21/2007 4:43 AM
To: Tourapis, Alexis
Cc: Gary Sullivan; mp4-tech lists.mpegif.org
Subject: Re: [Mp4-tech] B frame bit-rate in H.264 stream
Hi everyone:
First, i must thanks Alexis and Gary for your response.
   As you say , "If I make the old-fashioned MPEG-2-style assumption, it
would look like this temporally:
I0, B1, B2, P3, B4, ..., Pn, Bn+1, Bn+2, Pn+3, ...
 and would look like this in bitstream order
I0, P3, B1, B2, P6, ..., Pn+3, Bn+1, Bn+2, Pn+6, ...".And no B frame is used
as a reference. MPEG2 decoder 0f transcoder  outputing parameters   and
H.264 encoder of transcoder encoding  paraters are as follows:("not used"
means that the encoder doesn't use this parater)
I frame
MPEG2  Decoder
H.264 Encoder
JM coder
mode
Only 16x16
macroblock
Only 16x16
macroblock
prediction
not used
By H.264 Arithmetic
h.264 Arithmetic
SymbolMode
VLc
VLC
VLC
P and B frame
MPEG2  Decoder
H.264 Encoder
JM coder
Specification
Macroblock
Inter or Intra mode
by Mpeg2 decoder
output
 Mode decision
Mpeg2 and H.264 have some differnce
SymbolMode
VLc
VLC
VLC
B frame
e Bn+1 and Bn+2 use Pn and Pn+3 as references.
In attachment,  The configure file for JM is attached. you can understan my
JM's configure.
Now the problem I face is that B frame bits have notable differences  between
the encoder of transcoder  and JM8.6 encoder .In JM 8.6, The second B frame
has more fewer bits(I don't know why?) .But for two successive B frames the
encoder of transcoder outputs almost the same size bits( I think if the
first B frame of two successive B frame is not as a reference ,it should be
so. )
Best wishes toyou! Thanks very much!
-----------------------------------------
This message (including any attachments) may contain confidential
information intended for a specific individual and purpose.  If you
are not the intended recipient, delete this message.  If you are
not the intended recipient, disclosing, copying, distributing, or
taking any action based on this message is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/mp4-tech/attachments/20070921/5c7ab61c/attachment.html


More information about the Mp4-tech mailing list