5 ms·
Maybe I'm too stupid to understand this but AFAIK YUV isn't exactly linear so you still need to convert to linear space (trichromatic linear color space like RG
by hatsunearu 5y ago
Maybe I'm too stupid to understand this but AFAIK YUV isn't exactly linear so you still need to convert to linear space (trichromatic linear color space like RGB/XYZ)... no?
- david-gpu 5y agoYUV is a linear transformation of RGB to the best of my knowledge. Wikipedia seems to agree.
- jacobolus 5y agoJPEG uses Y'CbCr, not YUV per se. The matrix transformation is applied to gamma-encoded R'G'B' (typically sRGB), not linear RGB. http://poynton.ca/PDFs/YUV_and_luminance_harmful.pdf http://poynton.ca/PDFs/YUV_and_luminance_harmful.pdf
- brigade 5y agoThe only important bit of pedantry over analog/digital and prime is reminding people that no one deals with linear light unless you already know you're doing so, and that blending in nonlinear space is rarely correct, no matter how common it is to do so.
- david-gpu 5y agoI think we are in agreement? What you are saying is that conversion from linear YUV to linear RGB is, indeed, linear. Further, the transformation from Y'CrCb to gamma-encoded R'G'B' is also a linear operation. Right?
- jacobolus 5y agoIt depends what you want to do with the data. If you want to send your sRGB-profile Y'CbCr JPEG image directly to an sRGB display then you are done after applying a matrix. If you want to composite multiple images, do other intermediate processing, or display the image on an arbitrary non-sRGB display, you probably want to convert to a linear space along the way.
- david-gpu 5y agoSo we are in full agreement, then.
- simias 5y agoIndeed but that's also true for RGB (which is typically sRGB on computers) and you can have linear YUV if you want. "RGB" and "YUV" can really mean a whole bunch of things. There are many RGBs and probably twice as many YUV due to the hell that's video standards. I'm not sure I understand where Carmack is coming from here though (am I missing some context? I don't use twitter and these threads are always a huge pain for me to follow especially since Carmack doesn't even bother breaking on full sentences). I don't get how processing in YUV instead of RGB has anything to do with 10bit components for instance. Also, in my experience most video software deals with YUV natively and only converts as needed. It's probably different in the gaming and image processing world but that's because everything else is RGB and it seems to be a big ask to just tell everybody to convert to YUV. Besides if quality is of the essence, you will typically store more that 10 bits for internal processing, probably 16 and maybe even floats if you want to have as much range as possible. I dunno, I won't pretend that I'm smarter than Carmack, but I wish there was a bit more context because it's a bit opaque for me at the moment.
- Jenk 5y ago> I don't use twitter and these threads are always a huge pain for me to follow especially since Carmack doesn't even bother breaking on full sentences This site (threadreaderapp.com) may be of interest to you. It aggregates threads into a readable column as if it were a single article, here's Carmack's "thread": https://threadreaderapp.com/thread/1400930510671601666.html https://threadreaderapp.com/thread/1400930510671601666.html Extremely useful for dialogues/conversations on twitter.
- alisonkisk 5y agohttps://news.ycombinator.com/item?id=27399731 https://news.ycombinator.com/item?id=27399731 explains.