View Full Version : x264 Interlace and MBAFF
ron spencer
29th January 2016, 22:19
Is it right that x264 cannot encode to an interlaced file but instead uses MBAFF? That is, if my camcorder inputs are TFF, I cannot explicitly make x264 encode to TFF despite having the TFF option set; it will use MBAFF for all interlaced encodes...is this correct?
LoRd_MuldeR
29th January 2016, 22:32
Is it right that x264 cannot encode to an interlaced file but instead uses MBAFF?
I don't understand this question, because MBAFF (Macroblock-Adaptive Frame/Field Coding) is one of two methods to store interlaced video in H.264. The other one is PAFF (Picture-Adaptive Frame/Field Coding).
"MBAFF vs. PAFF" is orthogonal to "TFF vs. BFF".
See also:
http://forum.doom9.org/showthread.php?t=120317
ron spencer
30th January 2016, 01:34
Sorry...I guess I was not thinking when I posted.
I have 1080i files from my camcorder. So:
1. When I encode them with Adobe's Media Encoder I have an option of using MBAFF or not. If not, I get output files that have the same scan order as my input, which is TFF. Again MBAFF is an option.
2. With MeGui, which uses x264, I can specify TFF for sure as the interlace, but there is no option to choose MBAFF.
So there must be something the Adobe encoder can do with the interlaced input that does not require anything special, whereas x264 will always use MBAFF (or PAFF if asked). Is this the case (x264 can only use MBAFF or PAFF to deal with interlacing) ?
LoRd_MuldeR
30th January 2016, 01:58
It seems you are still confusing "MBAFF vs. PAFF" and "TFF vs. BFF", although these are two separate (orthogonal) properties.
MBAFF means that each individual macro-block within the frame can either be coded "progressive" or "interlaced", which results in more efficient encoding overall, compared to PAFF.
That's because, with MBAFF, the more efficient "progressive" mode can be used in static regions of the frame. With PAFF, the frame will be either "progressive" or "interlaced" as a whole.
The field order, TFF or BFF, only specifies which field ("top" filed or "bottom" filed) is supposed to be displayed first. I think both, MBAFF and PAFF, can be either TFF or BFF.
Note that, with x264, you enable interlaced encoding with the "--tff" or "--bff" switch. This also sets the field order, obviously. Finally, note that x264 supports/uses MBAFF since 2011.
ron spencer
30th January 2016, 02:16
OK...your explanations are great. Thanks! Any idea what other encoders use when mbaff is an option for interlaced?
Asmodian
30th January 2016, 03:29
OK...your explanations are great. Thanks! Any idea what other encoders use when mbaff is an option for interlaced?
I would bet any encoder uses PAFF if not using MBAFF, it can only be one or the other for interlaced encoding in H.264. ;)
ron spencer
30th January 2016, 04:10
I would bet any encoder uses PAFF if not using MBAFF, it can only be one or the other for interlaced encoding in H.264. ;)
So then if that is the case for H264, then if one has an option for MBAFF and does not check it for interlaced sources, then it MUST be using PAFF?
I guess AVCHD does not have as such rigid requirements?
Asmodian
30th January 2016, 05:17
I guess AVCHD does not have as such rigid requirements?
Why do you say that? For interlaced H.264 it is either MBAFF or PAFF, that is what "interlaced" encoding means.
This isn't more rigid, it is more flexible; you can use either MBAFF or PAFF.
Think of PAFF as "normal interlaced" and MBAFF as a more efficient interlaced if you want to. MBAFF is slower to encode because the encoder has to make the decision between progressive or interlaced encoding for each macroblock instead of only once for each frame.
AVCHD is a subset of the H.264 video standard, not something else. For example Panasonic's AVC-Intra uses MBAFF for interlaced encoding but a lot of AVCHD uses PAFF instead. If you don't have an option that means the encoder picks one or the other, the only other option is progressive encoding which is not good with interlaced content.
ron spencer
30th January 2016, 13:08
Thanks!!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.