What is RGB?
Bob Friesenhahn <[email protected]> Sun, 3 Jul 2005 20:42:00 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.core |
|---|---|
| Message-ID | <[email protected]> |
I am currently working to make GraphicsMagick work better with video. Y'CbCr video (as opposed to full-range YCbCr as used by JPEG) is intentionally limits the range of values so that for an 8-bit sample, the "black" level is 16 and the "white" level is 240 (the Cb & Cr values are slightly less restricted). This is done in order to avoid clipping problems. Values normally fall within this range, but may sometimes fall outside the range. Rec 709 RGB also defines a similar value range. Computer RGB typically uses the full range of values. The problem I am seeing is that when converting Y'CbCr to RGB I can convert to Rec 709 RGB or I can convert to full-range RGB. The advantage of converting to Rec 709 RGB is that it is assured to not clip values and is itself a useful standard. The number of quantization levels between Rec 601/709 Y'CbCr and Rec 709 RGB is a better match. The advantage of converting to full-range RGB is that this is the computer user's typical format and the image will be shown with full contrast. I am thinking that it is best to convert to Rec 709 RGB. The user can always re-adjust levels if they save to a wider-range format. With this approach there is the problem that the RGB may be full-range. Also named colors like 'red' are designed for sRGB space. If the RGB data is out of range, the range of the RGB may need to be reduced to the Rec 709 range in order to be assured to convert to the correct range of Y'CbCr values. This could be accomplished by inspecting the data and re-leveling the image if necessary. Does anyone see a problem with this approach? There is also the option of introducing a named Rec 709 RGB space, but there is nothing which assures that the data will remain in the desired range. Bob ====================================== Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click