If you use 8 bits to represent the height you can have 256 distinct levels, which is reasonably smooth — like a Minecraft map.
If you tried to cut this down to just half - 4 bits - then now you would have only 16 levels! This is very ugly, with big blocky staircases instead of nice smooth hills.
So what to do to compress this data better?
One approach is to find the nearest sine waves to the shape of the hills. Use a big sine wave for the big hills and then add on small sine waves to represent the smaller bumps and ridges.
There is a way to do this so that you end up with roughly the same amount of data as the original 8-bit encoding and have the same output.
Now if you throw away half of this sine wave data you still get the original smooth shapes because sine waves are inherently smooth! Instead of turning blocky the map becomes slightly incorrect. Hills stay roughly the same but they shift around and might loose some fine detail.
Essentially, humans are sensitive to staircase compression — even small amounts are very noticeable, but insensitive to the sine wave compression. We can exploit this to squeeze more bits out of the data before this compression becomes visible.
This works for audio, images, and motion.
No comments yet.