Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#1 | Link |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
interlaced avc
ok with starting to analyse a bunch of avc hdtv samples i wondered about how interlaced is handled in avc:
there are four types of interlacing possible it seems: 1) interlaced (which means that all frames get interlaced) 2) paff: a mix of interlaced and progressive frames 3) mbaff: a mix of interlaced and progressive macroblocks in each frame 4) a mix of interlaced and mbaff frames how to detect the interlacing used on an existing stream: - progressive is signalled by setting frame_mbs_only_flag: 1 in the SPS - interlaced is signalled by setting frame_mbs_only_flag: 0 in the SPS and field_pic_flag: 1 on all frames - paff is signalled by setting frame_mbs_only_flag: 0 in the SPS and field_pic_flag: 1 on all frames that get interlaced and field_pic_flag: 0 on all frames that get progressive - mbaff is signalled by setting frame_mbs_only_flag: 0 and mb_adaptive_frame_field_flag: 1 in the SPS and field_pic_flag: 0 on the frames (field_pic_flag: 1 would indicate a normal interlaced frame) the mode of interlacing can be changed between the different SPSs now my questions: 1) is this correct ![]() 2) regarding paff: can progressive and interlaced frames varry in one SPS sequence or only between different SPS sequences (one SPS seq is fully interlaced, another one is fully progressive) 3) how does the field_pic_flag need to be set on mbaff-only streams (so no mix with paff)? 4) a stream having frame_mbs_only_flag: 0 but still also all frames with field_pic_flag: 0 would be a normal progressive stream? thx for the answers ![]()
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free Last edited by bond; 29th June 2005 at 22:01. |
![]() |
![]() |
![]() |
#2 | Link |
Registered User
Join Date: Sep 2004
Location: Yvelines
Posts: 30
|
In other words - frame_mbs_only_flag = 1 means progressive frames only. - mb_adaptive_frame_field_flag = 1 means that pictures encoded with filed_pic_flag = 0 will use mbaff - field_pic_flag = 1 means that the picture is encoded as two interlaced fields. |
![]() |
![]() |
![]() |
#3 | Link | |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
Quote:
so a frame with frame_mbs_only_flag: 0 and mb_adaptive_frame_field_flag: 1 and field_pic_flag: 1 will be a normal interlaced frame why is it not possible to mix mbaff frames and progressive frames? what about multisliced frames? is each slice treated like an own frame or are all slices which build a frame treated together as one frame? thx for your answers!!
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free Last edited by bond; 29th June 2005 at 18:43. |
|
![]() |
![]() |
![]() |
#5 | Link | |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
Quote:
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|
![]() |
![]() |
![]() |
#6 | Link | |
Registered User
Join Date: Feb 2004
Location: Warsaw, Poland
Posts: 8
|
Quote:
Best, |
|
![]() |
![]() |
![]() |
#7 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Gusto : indeed, MBaff adds 1 bit per 2MBs in order to signal whether the 2MBs will be field or frame. But firstly, this bit, in cabac, will take less than 1 bit in average. Secondly, encoding the pair of macroblocks in the correct mode doesn't increase the size, it reduces it. And it reduces it by far more than 1 bit.
|
![]() |
![]() |
![]() |
#9 | Link | |
Registered User
Join Date: Sep 2004
Posts: 17
|
Quote:
hworldjj |
|
![]() |
![]() |
![]() |
#10 | Link |
Registered User
Join Date: Feb 2004
Location: Warsaw, Poland
Posts: 8
|
Don't compare MBAFF vs frame mode in interlaced contents. What you can do is to compare:
1. MBAFF vs AFF in interlaced contents, 2. MBAFF vs FRAME in progressive ones In the first case it really depends on the content. As you've mentioned MBAFF (or more generally macroblock adaptive coding) is widely used in a professional domain (e.g. sattelite broadcasters), but first of all it's because of the uncertain nature of TV conent: some parts of the screen may be interlaced, some may not (e.g. anchorman + bottom ticker + some on-screen graphs, text, etc.). In such a case MBAFF will give overally better coding performance compared to just AFF (interlaced or progressive). In the second case you'll definatelly lose some bins/bits for coding of the MBAFF modes compared to just plain progressive, since making this decision on a mb level is not necessary and is a waste of bins. |
![]() |
![]() |
![]() |
#11 | Link | |
Registered User
Join Date: Sep 2004
Posts: 17
|
Quote:
hworldjj |
|
![]() |
![]() |
![]() |
#13 | Link |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
is it still considered to be a valid statement that mbaff is better than pure progressive encoding on pure progressive content?
![]() if yes, why? ^^
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
![]() |
![]() |
![]() |
#14 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
It's a valid statement when the video has a lot of high vertical frequencies ( horizontal stripes for example ). A "classic" example is foreman. On that progressive video, roughly 10 % of the macroblocks will be encoded as interlaced. Of course, foreman isn't the average video ( it's highly aliased ), and it's definitively not representative of most of the DVD.
On more common videos, the additionnal 1 bit per 2 macroblock will, with CABAC, be transformed in 1/5 to 1/10th of a bit per 2 macroblock, so the overhead will be quite small, while interlaced encoding might still kick in if high vertical frequencies show up. But it would be a closer call ( and progressive might still win ).
__________________
|
![]() |
![]() |
![]() |
#15 | Link |
x264 developer
Join Date: Sep 2004
Posts: 2,392
|
My intuition is: no.
There will be a very few macroblocks where interlaced coding is better than progressive coding. i.e. if the content happens to contain textures that look combed. But this is offset by the costs of mbaff: a fraction of a bit per macroblock to say "this block is progressive", and odd rows are unable to use the top-right neighbor for mv or intra prediction, and the resolution has to be mod32 (rather than the normal mod16), and the characteristic quantization artifacts of field coding tend to add combs (though this might be hidden if field coding is used only in the blocks that already contain such features). Foreman isn't just aliased, it's deinterlaced. So it doesn't count as even abnormal progressive content. Last edited by akupenguin; 9th October 2006 at 22:20. |
![]() |
![]() |
![]() |
#16 | Link |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
![]() btw would it be possible to losslessly convert from a mbaff stream that contains only progressive macroblocks to a real progressive stream?
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
![]() |
![]() |
![]() |
#18 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Isnt there an issue with intra prediction ?
__________________
|
![]() |
![]() |
![]() |
#20 | Link |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
damn, i hoped that it would be possible to convert the hdtv avc mbaff broadcasts to pure progressive (with progressive content)
i kinda start to prefer paff over mbaff, cause with paff its possible to send pure progressive streams as progressive
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|