4 ms·
I'm just guessing it makes more sense to separate them. In my naive no knowledge version. if it was RGRGRGRG GBGBGBGB RGRGRGRG GBGBGBGB Then, if I
by gernb 4y ago
I'm just guessing it makes more sense to separate them. In my naive no knowledge version. if it was
RGRGRGRG
GBGBGBGB
RGRGRGRG
GBGBGBGB
Then, if I compress losslessly just grayscale I know at the other end I just interpret the first pixel as Red, next as green, red, green, etc., Then on the next row I interpret the first pixels as green, next as blue, next as green etc...
BUT, if I compress lossily then the unrelated colors next to each other are going to bleed into each other while compressing. VS if I separate them out so
RGRGRGRG
GBGBGBGB
RGRGRGRG
GBGBGBGB
becomes
RRRR BBBB
RRRR BBBB
GGGG
GGGG
GGGG
GGGG
The compression would make more sense and less bleeding of the signals from each color into other colors.
It would also seem to compress better. Imagine you're filming something pure green. Exaggerating but you'd get this
01010101
10101010
01010101
10101010
Which after separation is
0000 0000
0000 0000
1111
1111
1111
1111
That's just a guess though.
- rocqua 4y agoA different comment suggested they compress the green channel, and then compress the red and blue channel as differences against the green channel. This makes a lot of sense to me, since green is sort of 'luminance'. It is like a poor-mans LAB color space that exists before demosaicing.
- ryandamm 4y agoThis is a very good guess, and I believe it's precisely how it's done. Doing anything diff-ing the color channels still requires a lossy transformation step, so it's not quite as "raw." And you're right, that treating it as a single monochrome image makes it less compressible, because you get lots of high frequency information between adjacent pixels with different color. Which is sort of the opposite of what you want. Note also that, despite calling it "raw," Red's implementation is lossily compressed. You can even tune the compression ratio of their "raw" codec, and back in the very early days, there was certain subject matter that just looked terrible coming out of the camera, even as raw -- I remember one particular tree that an early user would film to test new firmware updates; in the earliest firmware builds, it actually crashed the camera (!). The images it did produce showed tons of wavelet compression artifacts.