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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd August 2018, 10:21   #21  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by davidhorman View Post
I don't exactly what --fake-interlaced does
It's just a flag in the video stream telling the playback device to treat it as interlaced. It doesn't necessarily mean that the stream is interlaced.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 22nd August 2018, 10:24   #22  |  Link
MrVideo
Registered User
 
MrVideo's Avatar
 
Join Date: May 2007
Location: Wisconsin
Posts: 2,129
Quote:
Originally Posted by hello_hello View Post
Most video formats including professional ones utilize chroma subsampling to reduce amount of chroma information in a video, taking advantage of the human visual system's lower acuity for color differences than for luminance.[11] Such a reduction improves compression of the video signal, which is always desirable because of storage and transmission limitations. To ensure compatibility with interlaced-based systems, chroma information in PsF video is sometimes recorded in interlaced format, despite that the content is progressive. This may result in interlaced artifacts being noticeable on colored objects.
Strange. Don't professional video cameras record 4:2:2, or better yet, 4:4:4? Or even better yet, a video format that yields the best for video editing during post production? I've never really dug into professional video gear.

I'd love to have an 8K camera and the video editing gear to go along with it. I'd have to win Powerball, or MegaMillions, in order for that to happen.
MrVideo is offline   Reply With Quote
Old 23rd August 2018, 06:44   #23  |  Link
MrVideo
Registered User
 
MrVideo's Avatar
 
Join Date: May 2007
Location: Wisconsin
Posts: 2,129
Quote:
Originally Posted by davidhorman View Post
https://www.afterdawn.com/glossary/t...e-field_coding

If done right (and I don't exactly what --fake-interlaced does) using MBAFF will be exactly the same as 25p, so that's why it's not specified separately.
OK, thanks for the update.
MrVideo is offline   Reply With Quote
Old 26th August 2018, 13:58   #24  |  Link
mkver
Registered User
 
Join Date: May 2016
Posts: 197
Quote:
Originally Posted by davidhorman View Post
https://www.afterdawn.com/glossary/t...e-field_coding

If done right (and I don't exactly what --fake-interlaced does) using MBAFF will be exactly the same as 25p, so that's why it's not specified separately.
A H.264 SPS (Sequence Parameter Set; this is the place where several encoding parameters that are not allowed to change on a frame-per-frame basis are transmitted (because transmitting it with each frame would be a waste of bits)) contains one or two parameters that influence the encoding mode: frame_mbs_only_flag and mb_adaptive_frame_field_flag.
If frame_mbs_only_flag is 1, then there are only coded frames, no fields, and all these frames are encoded with frame macroblocks.
If frame_mbs_only_flag is 0, then there may be coded frames and coded fields. In this case mb_adaptive_frame_field_flag is present and if set to 1, the encoding mode is MBAFF (Macroblock-Adaptive Frame-Field Coding -- slow-moving (e.g. background) parts of interlaced material can be more efficiently encoded as if it were progressive whereas it's the opposite for fast moving parts (e.g. faces); with MBAFF a part of a picture can be encoded with frame macroblocks (as if it were progressive) and other parts with field macroblocks). If mb_adaptive_frame_field_flag is 0, then it is PAFF (Picture-adaptive frame-field coding). Both PAFF and MBAFF allow coded fields as well as coded frames, but in PAFF mode all coded frames have only frame macroblocks.
Neither PAFF nor MBAFF nor frame_mbs_only_flag set to 1 automatically flag the content as progressive or interlaced (and even if it is flagged as progressive or interlaced, this needn't be true); indeed, in all cases (even frame_mbs_only_flag == 1) coded frames can be flagged as interlaced or progressive on a frame-by-frame basis depending on which field is to be shown first. (The frame-by-frame variation is coded via delta_pic_order_cnt_bottom or delta_pic_order_cnt[1]; of course, these needn't explicitly given in the frames, but can be given default values.)

After this background, what does x264 do with fake-interlaced? It uses PAFF mode and uses only frame pictures (which contain only frame encoded macroblocks). Said frames are coded progressively. It moreover sets the display time of both fields of these frames to the same value (it sets bottom_field_pic_order_in_frame_present_flag in the PPS (another place where several encoding parameters that are valid for more than one frame are kept) so that the individuals frames don't even have delta_pic_order_cnt_bottom elements, but the default value indicating that the display time of both fields being the same applies. That way the overhead of fake-interlaced is pretty much negligible: Every frame header (or actually every slice header) contains a (1 bit) flag that says that this slice is a coded frame, not a coded field. That's usually all (there is another downside: if frame_mbs_only_flag is 1, then the vertical frame dimensions are internally padded to mod 16; if the flag is 0, then every coded frame is vertically padded to mod 32; this can increase the bitrate by a bit more).
PAFF mode is better for this than MBAFF mode, because in he latter you would need to code whether the content is progressive or not at the macroblock level (i.e. more than once per coded frame) which would waste more bits.

Unfortunately, there doesn't seem to be a way to indicate that the content is progressive, but the croma is interlaced. There is chroma_sample_loc_type_top/bottom_field, but it can't be used for this purpose.
mkver is offline   Reply With Quote
Old 27th August 2018, 07:11   #25  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Thank you for the explanations.
So with --fake-interlaced the chroma of progressive footage gets actually encoded as interlaced, right?
Sharc is offline   Reply With Quote
Old 27th August 2018, 09:50   #26  |  Link
mkver
Registered User
 
Join Date: May 2016
Posts: 197
No, with --fake-interlaced one uses PAFF, but one encodes everything with frames and frame macroblocks and one signals that the display time of both fields encompassing the frame is the same which means that the frame is flagged as progressive. If the height of your video rounded up to the nearest multiple of 16 is actually a multiple of 32, then the decoded output of fake-interlaced and a normal no-interlaced encode coincide.
There is no flag in H.264 to tell that the content is progressive, but the chroma is interlaced.
mkver is offline   Reply With Quote
Old 27th August 2018, 13:41   #27  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Ah I see. Thanks for clarification.
Sharc is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:08.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.