View Full Version : Question about MBAFF/PAFF

6th January 2007, 19:29
what exactly are MBAFF and PAFF ? only thing I know is they have to do something with deinterlacing (?) of H.264 TS streams and mbaff is used by BBC HD and paff by skyHD. but exactly do they do and what advantages does one have from it ?

6th January 2007, 20:13
PAFF means "Picture Adaptive Field Frame", MBAFF means "MacroBlock Adaptive Field Frame".

* PAFF allows to decide, on a frame basis, whether to encode each frame as a frame or as two fields. When encoded as two fields, it's as if you would have done a separatefields() on the frame.
* MBAFF allows to decide, on a macroblock basis, whether to encode as field or frame. Actually, it works on vertical pairs of macroblocks, so on 16x32 areas. You can easily put two frame macroblocks ( on under the other ), or two field ones ( one with the top lines, the other with the bottom lines ).

MBAFF is the most efficient method in almost every cases ( if not all ), as soon as the encoder does a proper job, of course.

Finally, MBAFF and PAFF may be used together. In that case, you can code a frame either as MBAFF ( thus having the choice field/frame per macroblock ) or as field.

6th January 2007, 21:16
Adding what bond said:

mplayer -dumpvideo -dumpfile raw.264 file.ts
h264_parse raw.264 > h264_log.txt

(http://lists.mplayerhq.hu/pipermail/mplayer-docs/2006-February/007261.html for MBAFF analyzing)

Results for MBAFF (whether it is MBAFF or not):
China.ts BBC-HD = mbaff (you can not call it 1080i or 1080p in theory, it should be 1080mbaff)
mb_adaptive_frame_field_flag: 1 <-- MBAFF = YES
frame_mbs_only_flag: 0
field_pic_flag: 0
field_pic_flag: 1

Pengvado said:
you can clearly see if MBAFF is 1080 "i" or "p" just by looking at it:
beyonce.at.the.bbc.1080mbaff.sample.ts (http://mirror05.x264.nl/public/beyonce.at.the.bbc.1080mbaff.sample.ts) 1080 "i" (50mb)
BBC.HD.Robin.Hood.S01E03.H.264.1080MBAFF.AC3.5.1-BBC.sample.ts (http://mirror05.x264.nl/public/BBC.HD.Robin.Hood.S01E03.H.264.1080MBAFF.AC3.5.1-BBC.sample.ts) 1080 "p" (100mb)

Like Manao said only if the encoder does it well, it will never encode anything interlaced from a progressive source, Tandberg H.264 encoder seems to think otherwise :)

... Now something about PAFF, again using bond's thread:

ASTRA.HD.Demokanal.H.264.001.ts = paff progressive (1080p)
mb_adaptive_frame_field_flag: 0
frame_mbs_only_flag: 0
field_pic_flag: 0
field_pic_flag: 1 <-- not found

sky-hd.sample.ts = paff progressive (1080p)
mb_adaptive_frame_field_flag: 0
field_pic_flag: 0
field_pic_flag: 1 <-- not found

(will not share these samples, few GBs in size)

In the above 2 samples all frames are encoded progressive, so the result can be called: 1080p

All H.264 HD channels, except BBC-HD, all broadcast PAFF-progressive video (according to the log files created by h264_parse), and that is good :cool:

The advantage of using MBAFF or PAFF is that you can broadcast video (movies) progressive, for our benefit. :D
If they got interlaced material, like the Beyonce and James Brown concerts from BBC-HD, they can also air it, without having to deinterlace it themself, but rather leave the source as raw as possible.
Interlaced source > Interlaced broadcast = you can deinterlace (at home)
Interlaced source > Progressive broadcast = Interlaced video, but all interlacing information is lost.

6th January 2007, 21:21
0o thanks for all that information :p
so basically it can be said that broadcasted movies with MBAFF or PAFF are either better in PQ than ones broadcastet without (just in that aspect), or if not, then at least save cpu performance, because no deinterlacing has to be done when playing ?

6th January 2007, 21:24
You ought to deinterlace it if you are to show it on a progressive display.

6th January 2007, 21:25
hm it even has to be interlaced when its basically broadcasted all progressive in that way ?

6th January 2007, 21:55
As pengvado said: Trust your eyes, try the video with or without deinterlacing, if you see no difference (probably progressive), dont bother deinterlacing, thus saving the cpu some work.

Thank my friend in the freezer all H.264 1080 broadcasts are not all high profile settings, or playing it would be hell :scared:

7th January 2007, 00:47
Extra information:

BBC-HD (MBAFF) 1440x1080 uses the Grass Valley H.264 solution:

And most other H.264 (PAFF) channels, like for example Sky-HD 1920x1080, use the Tandberg H.264 solution:

26th July 2007, 06:17
LUXE HD on Eutelsat 7 east uses 1280x1080 (AR 16:9) MBAFF by Ateme, the quality is superb!

I guess now there are 4 players on the H.264 Satellite market:

grass valley, ViBE H.264: http://www.thomsongrassvalley.com/products/transmission/vibe/encoder_mpeg4_hd/
scientific atlanta, H.264: http://www.scientificatlanta.com/customers/Source/7006554.pdf
tandberg, H.264: http://www.tandberg.net/our_story/h264.jsp
ateme, H.264: http://www.ateme.com/BB_HD_4Chip.php