← Back to context

Comment by PragmaticPulp

4 years ago

> that we can take the squares down to 10x10, maybe even 8x8 or 5x5

16x16, 8x8, or 4x4 would be the way to go. You'd want each RGB block to map to a single H.264 macroblock.

Using non order of 2 numbers means that individual blocks don't line up with macroblocks. Having a single macroblock represent 1, 4, or 16 RGB pixels would be ideal.

In fact, I bet modifying the original code to use a scaling factor of 16 instead of 20 would produce some significant improvements.

There's also the chroma subsampling issue. With the standard 4:2:0 ratios, you'll get half the resolution for the two chroma channels, and if I'm not mistaken, they are more aggressively quantized.

It would be better to use YUV/YCbCr directly instead of RGB.