Chroma Subsampling
Posted on October 17, 2016 by KVMGalore | 0 comments
Chroma subsampling is a practice of encoding images by compressing their color information in order to reduce the overall storage size and bitrate of video files.
An electronic image is composed of pixels. Pixels have different attributes:
- Chroma attribute: color value, representing the color information.
- Luma (luminance) attribute: brightness value, representing the brightness (luminance) in an image (the "black-and-white" portion of the image), creating contrast and detail within the overall image.
If you take all the chroma out of a picture, you're left with a black-and-white image. The image would be grayscale, as there are variable depths of contrast between pure black and pure white.
If you take all the luminance out of an image, you're left with no image at all.
To accomplish a good quality image, each pixel must have its own luma data, but it doesn't necessarily need to have its own chroma data. Chunks of pixel can share the same chroma data and still produce a pretty good image.
Chroma subsampling is a practice of encoding images by having some pixels share the same chroma data (while keeping the luma data for each pixel in tact). Chroma subsampling is used in many video encoding schemes - both analog and digital - and also in JPEG encoding.
Chroma subsampling practice takes advantage of the human visual system which is more sensitive to the luminance, the brightness and contrast portion of an image and less sensitive to the chroma, color information of an image.
The number of pixels sharing the same chroma data determines how much subsampling is being done. How much color-information compression happens is often expressed as a set of numbers patterned: 'J:a:b' (e.g. 4:2:0).
'J' represents the number of pixels we're dealing with - how many pixels wide is the reference block for the sampling pattern (usually 4 pixels wide).
'a' represents the number of pixels in the top 'a' row which are getting chroma samples.
'b' represents the number of pixels in the bottom 'b' row which are getting chroma samples.
If every pixel in the 4x2 grid gets a chroma sample, there's actually no subsampling taking place, a situation represented by the 4:4:4 expression.