View Full Version : Black and white in x264
bugmen0t
13th December 2013, 13:52
Hello, I have some black and white content to encode (source material is NTSC DVD), and I have some questions on how x264 handles this content and practices.
1) Are there any changes to the presets that could/should be enabled for black and white content?
2) When x264 encodes color content, approximately what percentage of the bitrstream goes to the luma channel and what percentage to chroma?
3) Is my understanding correct that I could use a lower bitrate on b/w content than what I typically use for color content and still have the same perceived quality since all bits can be devoted to the luma channel since there is no chroma data?
Thanks to those knowledgeable on this. I'm always interested in learning more.
Villa Palmar Timeshare Scam (http://timeshareadvisor.org/villa-del-palmar-resale-scams-uncovered/)
LoRd_MuldeR
13th December 2013, 16:03
1) Are there any changes to the presets that could/should be enabled for black and white content?
Not that I'm aware.
2) When x264 encodes color content, approximately what percentage of the bitrstream goes to the luma channel and what percentage to chroma?
I don't think x264 uses a certain "percentage" for luma or chroma. It's controlled indirectly by the "--chroma-qp-offset" option.
So with a source that has very "complex" chroma (e.g. a lot of chroma noise), the percentage spent for chroma will be higher, compared to a source that has very "simple" chroma.
And a "black and white" (actually greyscale) source has the simplest chroma possible - (ideally) all chroma blocks should be 100% flat - which probably means the chroma will be almost "free" to encode.
3) Is my understanding correct that I could use a lower bitrate on b/w content than what I typically use for color content and still have the same perceived quality since all bits can be devoted to the luma channel since there is no chroma data?
I think so. But it might not be that much, given that - in a usual YUV 4:2:0 source - the chroma has only 1/4 of the pixel data, compared to the luma, anyway. That plus the chroma qp offset!
detmek
13th December 2013, 19:33
Just in case of chroma noise, Avisynth and Greyscale() could be used to eliminate any chroma residue.
bugmen0t
13th December 2013, 20:46
ok thanks for the help. Is it safe to assume that DVDs authors from big studios won't have chroma noise, or is it safer just to include greyscale() in the avs? Is there any harm done from including this (assuming there aren't opening titles/studio logos in color)?
Villa Palmar Timeshare (http://timeshareadvisor.org/)
foxyshadis
14th December 2013, 02:43
It's never safe to assume anything about a professional release. Most releases are farmed out to mastering houses to create the structure and encode; some do an amazing job, most just don't care. The older a movie is, the less budget the release gets, too.
The maximum value for --chroma-qp-offset is 32, which would be pretty close to out your chroma bits anyway. (Since the maximum possible qp is 51.)
ty2010
14th December 2013, 17:25
-g for b&w in handbrake if that's what you're using. In addition to foxy's info, settings in your decompressor or image renderer can also introduce chroma noise.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.