When an image is encoded using JPEG, the RGB pixels are first encoded into YUV, and then the UV channels are downsampled. Before actually doing the DCT and encoding the coefficients, JPEG doesn't gamma correct the Y channel. Is this correct? Shouldn't we determine the DCT coefficients that will most affect our viewed result?
According to Wikipedia (insert standard disclaimer RE accuracy):
JPEG does not define which color encoding is to be used for images. JFIF defines the color model to be used: either Y for greyscale, or YCbCr as defined by CCIR 601.
YCbCr is a non-linear format. As I mentioned earlier, "Video Demystified" states:
"YCbCr is the color space originally defined by BT.601, and now used for all digital component video formats. .... The technically correct notation is Y'Cb'Cr' since all three components are derived from R'G'B'."
and Charles' Poynton's Colour FAQ states
Video systems approximate the lightness response of vision using R'G'B' signals that are each subject to a 0.45 power function.
With compression we are after the best visual representation per bit and, as the eye is non-linear in approximately this way, it makes sense to use non-linear representations.
The short answer is "no", for reasons covered in Alvy Ray Smith's memo, Gamma Correction. Gamma is not about nonlinearity in human perception, it's about nonlinearity in display devices (and, I suppose, acquisition devices too).