[x264-devel] Q: MBAFF coding

Takashi Mochizuki mochi at da2.so-net.ne.jp
Wed Feb 3 02:31:26 CET 2010


Hi,

I would like to implement MBAFF coding in my x264 QuickTime Compressor  
component.
After test implementation is done, I have two questions now.

//

Would you please tell me how MBAFF works?

My understandings are following.
- x264_encoder_encode() requires whole "frame" buffer even if MBAFF is  
enabled
- output data contains MBAFF interlaced "frame", both field contained.

As far as my trial, libx264 seems to reqiure following:
- b_interlaced = true
- i_weighted_pred = false
- i_level_idc should not be -1 (I uses 31 as Level 3.1 for now)

//

I tested this output MBAFF stream via vlc/mplayer(libavcodec), or  
Apple H.264 decoder.
- libavcodec based app decode whole buffer at one time (MBAFF'ed frame  
is decoded at once) - preferred
- Apple H.264 decoder gets in stuck. Seems to stop when first field is  
done.
  I guess that second field is not decoded even if buffer contains  
both field.

I would like to know If there is any work around in encoder side, to  
enforce decoding MBAFF
on Apple H.264. (such like different nal encoding method or something,  
if could)
- I uses libavcodec/libx264.c - encode_nals() function to encode  
x264_encoder_encode output into nal

I would appreciate any suggestion.

//

Takashi 


More information about the x264-devel mailing list