How To: Chroma Subsampling
Chroma Subsampling can be a lot to wrap your head around but don’t worry, you’re not alone, which is why we’ve put together this guide to help you get it right every time.
The main reason behind all of the confusion is that there are two very similar methods to Chroma Subsampling, one of which is quite outdated. This guide will outline the more modern and preferred technique.
What is Chroma Subsampling?
The main principals that you need to know to understand Chroma Subsampling are:
1. Any electronic image is made up of squares called pixels.
2. Pixels can have luminance (luma) which tells the pixel how light or dark it is.
3. Pixels can also have chrominance (chroma) which tells the pixel what colour it needs to be.
4. A pixel without any chroma would be black & white.
5. A pixel without any luma would not exist as all images need light to be exposed.
As specified above, in order to produce a high quality photograph, each pixel needs to have its own luma value. However, not every pixel needs to have its own chroma data.
Chroma Subsampling is the act of forcing sets of pixels to share the same chroma data (to be the same colour), which will in turn save space.
What does it look like?
Chroma Subsampling is written out using three numbers in a ratio format, for example; 4:4:4, 4:2:2 or 4:2:0.
The first number identifies the width in pixels that the reference block for that sampling pattern will be. This is typically 4 but on occasion it may be 3 or 8.
The second and third numbers relate to the two rows in the sample.
The second number highlights how many of the pixels in the top row contain chroma samples and the third number details how many of the pixels in the bottom row contain chroma samples.
This 4:4:4 ratio shows that every pixel in the sample has chroma data, meaning that there is no subsampling going on in this image. This is the format seen in most HD resolution images and high space-consuming images.
If we take a look at the 4:2:2 ratio, we now see that two of the pixels in each of the two rows are sharing a chroma sample; this is Chroma Subsampling.
When this method is applied to the image you do technically lose a certain amount of detail but its is very difficult to notice for most people.
This type of subsampling can be seen in various cameras and editing codecs such as Apple ProRes 422.
Finally, if we take a look at the 4:2:0 ratio, you can immediately see how much Chroma Subsampling has taken place and how much detail will have been lost from the overall image. The top row will still retain half of the chroma data from the original 4:4:4 image but the bottom row will contain nothing and is forced to share the chroma data with the above row.
This last example is the reason that some images can seem poor and low-quality, because what you’re really seeing is blocks of pixels being forced to share the same chroma data in order to save on space. Add to that other forms of image compression seen in formats such as MPEG and your image will only get worse in terms of its quality.
What happens when pulling a Chromakey?
When it comes to pulling a chromakey things can get really intricate and messy if Chroma Subsampling has taken place. If each pixel contains its own chroma data, as in the 4:4:4 example, pulling out a particular key from a section of image is relatively easy. However, when those pixels are sharing colours the lines distinguishing each colour are blurred which can leave you with uneven lines around chromakeys. 4:4:2 is usually fine, but lower can start to cause issues.
Of course, the quality of an image can be determined by many other factors but when it comes to chromakeying your footage you need to understand whether you are working with subsampled footage and how that will affect any edits that you need to make.