LWN: Comments on "Video4Linux2 part 5a: colors and formats" https://lwn.net/Articles/218798/ This is a special feed containing comments posted to the individual LWN article titled "Video4Linux2 part 5a: colors and formats". en-us Mon, 01 Sep 2025 12:52:43 +0000 Mon, 01 Sep 2025 12:52:43 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Video4Linux2 part 5a: colors and formats https://lwn.net/Articles/900405/ https://lwn.net/Articles/900405/ marcolwn <div class="FormattedComment"> some links are broken, here are the internet archive links:<br> <p> Colorspaces <br> <a rel="nofollow" href="https://web.archive.org/web/20120505053358/http://v4l2spec.bytesex.org/spec/x2123.htm">https://web.archive.org/web/20120505053358/http://v4l2spe...</a><br> <p> YUV Formats <br> <a rel="nofollow" href="https://web.archive.org/web/20120505061759/http://v4l2spec.bytesex.org/spec/x3891.htm">https://web.archive.org/web/20120505061759/http://v4l2spe...</a><br> <p> <p> a little more information about JPEG<br> <a rel="nofollow" href="https://web.archive.org/web/20120505053919/http://v4l2spec.bytesex.org/spec/r11285.htm">https://web.archive.org/web/20120505053919/http://v4l2spe...</a><br> <p> <p> Reserved Format Identifiers <br> <a rel="nofollow" href="https://web.archive.org/web/20120505060756/http://v4l2spec.bytesex.org/spec/x5665.htm">https://web.archive.org/web/20120505060756/http://v4l2spe...</a><br> <p> Field Order<br> <a rel="nofollow" href="https://web.archive.org/web/20120503220250/http://v4l2spec.bytesex.org/spec/x6386.htm">https://web.archive.org/web/20120503220250/http://v4l2spe...</a><br> </div> Fri, 08 Jul 2022 13:56:28 +0000 Video4Linux2 part 5a: colors and formats https://lwn.net/Articles/256965/ https://lwn.net/Articles/256965/ jimparis <div class="FormattedComment"><pre> I believe the BA81 pattern is incorrect (the greens should be staggered, in a checkerboard pattern). </pre></div> Fri, 02 Nov 2007 21:15:59 +0000 Video4Linux2 part 5a: colors and formats https://lwn.net/Articles/248713/ https://lwn.net/Articles/248713/ miku Various links to v4l2 spec seems to be broken.<br> Fri, 07 Sep 2007 11:04:46 +0000 __u32 pixelformat: https://lwn.net/Articles/219877/ https://lwn.net/Articles/219877/ roelofs <FONT COLOR="#008844"><I>the fourcc code describing the image format</I></FONT> <P> ...stored in <A HREF="http://v4l2spec.bytesex.org/spec/c1740.htm">little-endian format</A> (not native!), in case anyone else was wondering. <P> Greg Wed, 31 Jan 2007 04:06:59 +0000 RGB332 doesn't look right https://lwn.net/Articles/219843/ https://lwn.net/Articles/219843/ roelofs <FONT COLOR="#884400"><I>That was a color problem from before I figured out which colors I really wanted to use.</I></FONT> <P> Everybody's a critic, I know, but... I think it might work better to stick with a single shade for each channel and use a bullet or mid-dot or something to mark the most significant bit. (Are these made out of mini-tables? That was my assumption, but I haven't looked at the source yet.) I find the pale blue and pale green to be much more similar to each other than to the "regular" blue and green, to the point that the very first case (light blue, dark blue, light green, ...) looks more like a single bit on a pale background than a two-bit grouping followed by a three-bit one. <P> To put it another way, the grouping of same-color bits is more important information than which individual bit is most significant, but the extreme paleness of the MSBs makes them the most visually striking part of the diagrams. (IMHO. :-) ) <P> Thanks,<BR> Greg Tue, 30 Jan 2007 22:14:50 +0000 color spaces, whee! https://lwn.net/Articles/219838/ https://lwn.net/Articles/219838/ roelofs <FONT COLOR="#448800"><I>This colorspace also covers the set of YUV and YCbCr representations. This representation derives from the need for early color television signals to be displayable on monochrome TV sets.</I></FONT> <P> Well, that's one (techno-historical) way to look at it... But perhaps more accurately, it derives from the physiology of the human eye, which basically has YUV- or YCbCr-like sensors in it. The fact that YUV/YCbCr better lend themselves to certain compression tricks (even lossless ones, which is still sort of amazing to me) plays a role, too. <P> <FONT COLOR="#448800"><I>Conversion between YUV and RGB is not entirely straightforward, however; there are several formulas to choose from.</I></FONT> <P> Heck, conversion between RGB and RGB isn't entirely straightforward, either. Aside from "gamma" (~brightness/contrast), which most of us are vaguely aware of, there are a whole host of other, interlinked concepts involved: chromaticity, white point, color temperature, gamut, surround (ambient background lighting), rendering intent, ... In addition, there are separate exponential transfer functions (~"gamma") for cameras, monitors, display cards (LUTs!), etc.; you need to know details about both the source <I>and</I> the destination devices, and often there are files in between. It's a complicated mess, and it's <I>really</I> easy to get some (or all) of it wrong. :-/ <P> Greg Tue, 30 Jan 2007 22:03:31 +0000 RGB332 doesn't look right https://lwn.net/Articles/219840/ https://lwn.net/Articles/219840/ corbet Hmph. That was a color problem from before I figured out which colors I really wanted to use. The bit wasn't gone, just hiding. Fixed. Tue, 30 Jan 2007 21:38:37 +0000 RGB332 doesn't look right https://lwn.net/Articles/219835/ https://lwn.net/Articles/219835/ roelofs <FONT COLOR="#880044"><I>A red bit got away from me - they can be awfully slippery sometimes.</I></FONT> <P> You lost another one: RGB0. (Damned bits... This sort of thing never used to happen when the MCP was in control.) <P> Greg Tue, 30 Jan 2007 21:22:38 +0000 RGB332 doesn't look right https://lwn.net/Articles/219358/ https://lwn.net/Articles/219358/ corbet A red bit got away from me - they can be awfully slippery sometimes. I found another one and stuck it in. Sat, 27 Jan 2007 00:43:19 +0000 RGB332 doesn't look right https://lwn.net/Articles/219356/ https://lwn.net/Articles/219356/ tbird20d In your diagram for the RGB332 format, there should be two colors with 3 bits of information, and there are only 2 (for a total of 7 used bits instead of 8 bits). I think this is an error.<br> Sat, 27 Jan 2007 00:29:17 +0000 Video4Linux2 part 5a: colors and formats https://lwn.net/Articles/218995/ https://lwn.net/Articles/218995/ jwb This excellent article reminds me of another excellent article, <a href="http://lurkertech.com/lg/packings/index.html">The Pixel Rosetta Stone: Packings and Colorspaces</a> which is part of a much larger work, <a href="http://lurkertech.com/lg/">The Lurker's Guide to Video</a>, which has been around for eons but remains somewhat obscure. Thu, 25 Jan 2007 04:34:32 +0000