# I'm having a hard time understanding colormatrix

1. I'm having a hard time finding a simplified but detailed explanation of when to use colormatrix to convert between RGB and YUV. In general I don't understand the difference between RGB and YUV or why I would ever need to convert and in what situations converting is beneficial. I've read in places to us Rec.601->Rec.709 when converting a DVD or, and I don't understand this at all, up-scaling a DVD. Is there a simple way to explain this? Is it important to understand and use or am I fine leaving it out of avisynth scripts?
2. YUV is a rotation, translation, and scaling of the RGB colorspace.

from: https://software.intel.com/en-us/node/503873

The inner cube is the full RGB space. The outer cube is the full rec.601 YCbCr (YUV in AviSynth terminology) colorspace. Note how RGB cube is hovering on its black corner at Y=16, U=128, V=128, with its white corner directly above it at Y=235, U=128, V=128. And only about 1/6 of the possible YUV values lead to valid RGB values.

Rec.601 and rec.709 are slightly different rotations and scaling of that inner RGB cube. Rec.601 is usually used for standard definition video, rec.709 for high definition video.

PC.601 and PC.709 are similar but the inner cube is a little larger with the black corner at Y=0 and the white corner at Y=255. These are sometimes used while editing, rarely in the final product.

Unfortunately, some players always use rec.601, some always use rec.709. Some vary depending on the resolution of the video (rec.601 for SD, rec 709 for HD). Some will use the matrix specified in the encoded file. For the highest probability of getting the right colors on playback its recommended you use rec.601 for SD, rec.709 for HD -- and that you specify the matrix in the encoded video. There are some exceptions. For example, youtube now assumes rec.709 for all video so it's best to use rec.709 if you plan to upload to youtube.

So if you are upscaling from SD to HD you want to convert from rec.601 to rec.709. And vice versa.

Statistics