Log in

View Full Version : Interlaced encoding in x264


vlada
8th January 2007, 12:34
Hi,

I have 2 simple questions. In MeGUI, I can select interlaced encoding using x264, but i can't set field order (TFF/BFF). Why? It is very important information during playback.

Second thing. There seems to be a problem in libavcodec with interlaced h.264. If I try to play the file, DirectShow players crash (ffdshow beta1) and VLC crashes too. The same happens with MainConcept encoded interlaced h.264 files. Is this a known problem? Any chances to have a fix soon?

Sharktooth
8th January 2007, 14:36
interlaced option in x264 just work like that (no TFF/BFF), so MeGUI reflects what x264 can do.
The problem is in libavcodec and again not in MeGUI.
This is the wrong place for reporting those problems.

bond
9th January 2007, 22:14
moved

for the crash make sure you are using a mod 32 height

x264 uses mbaff for interlacing, not old style interlaced/paff

vlada
11th January 2007, 12:09
for the crash make sure you are using a mod 32 height

x264 uses mbaff for interlacing, not old style interlaced/paff

I have a 1080i source and I'd like to keep it so. So I can't have a mod 32 height. Is this a restriction of libavcodec or MPEG-4 AVC specification?

What's the difference between mbaff and paff? Could you please explain this to me? Thank you.

Sergey A. Sablin
11th January 2007, 12:58
I have a 1080i source and I'd like to keep it so. So I can't have a mod 32 height. Is this a restriction of libavcodec or MPEG-4 AVC specification?

MPEG-4 AVC doesn't have such a restriction - encoder should extend picture size and write cropping rectangle, so the decoder should display source resolution correctly.

What's the difference between mbaff and paff? Could you please explain this to me? Thank you.

here is a quick search result - http://forum.doom9.org/showthread.php?p=927647&highlight=mbaff+paff#post927647

LiFe
11th January 2007, 15:19
moved
x264 uses mbaff for interlacing, not old style interlaced/paff

--interlaced Enable pure-interlaced mode

I was fairly certain that when I read up on the interlacing support in x264 when it came out that it was PAFF (frame based) only at this point in time. (Not MBAFF, macroblock based)

The description of the switch certainly implies it.

Did I make a mistake?

bob0r
11th January 2007, 16:45
http://mirror01.x264.nl/x264/changelog.txt

r570 | pengvado | 2006-10-01 04:41:22 +0200 (Sun, 01 Oct 2006) | 2 lines

support interlace. uses MBAFF syntax, but is not adaptive yet.

LiFe
12th January 2007, 08:10
Well that explains why I havn't been using it yet then : )

bond
12th January 2007, 23:00
I have a 1080i source and I'd like to keep it so. So I can't have a mod 32 height. Is this a restriction of libavcodec or MPEG-4 AVC specificationmod 32 is needed because of libavcodec not supporting what Sergey wrote for mbaff

aleste81
16th October 2007, 18:30
"For interlaced content, the H.264 standard allows two
fields to be coded either jointly, i.e. frame-based coding, or
separately, i.e. field-based coding [1]. The frame/field coding
concept can be extended to the macroblock level called
Macroblock-Adaptive Frame/Field (MBAFF) coding in H.264.

The concept of macroblock frame/field coding decision was
originated from MPEG2 standard. Instead of splitting up a
16x16 MB into two 16x8 blocks, super MB [2] is defined as a
decision unit. Each super MB consists of two vertically
adjacent MB’s. The advantage of super MB is that all 7 block
sizes can be used in either frame or field coding.
Macroblock-Adaptive frame/field coding provides
additional gain over picture-level adaptive coding [3].
In the H.264 reference software, the MBAFF decision
is made using a “brute force” approach by encoding the
super MB in both frame and field modes, and choosing the one
that yields a lower R-D Lagrangian cost. In this paper, a new
algorithm is introduced for making efficient MBAFF decision in a H.264 encoder."

http://scien.stanford.edu/2005projects/ee398/projects/reports/Guerrero%20Chan%20Tsang%20-%20Project%20Report%20-%20Fast%20Macroblock%20Adaptive%20Coding%20in%20H264.pdf

dattrax
17th October 2007, 13:47
Just for your info, I have made a modification to the HDR_info patch which correctly inserts the SEI info for TFF/BFF signalling.

Its available in the patch thread and also in the 2:3 pulldown thread

Jim