There are two methods of compression lossless and lossy.
Lossless is a process in which the compressed data and be restore 100% identical to the original uncompressed data. An example being a ZIP file where you compress data to save space but when you uncompress it you need it to be exactly the same as the original files.
Lossy is different in that the compression results in a good aproximation of the original data. You can never go from a compressed file to the original as data has just been losted (deemed expendable) in the compression process.
You may be wondering why the heck you would ever use a lossy compression method when you can never revert to the original data? Well it turns out making a good lossless compression algorithm is extremely difficult and chances are you won't get much better than 2:1 ration (1meg file compressed to 1/2 a meg file) where as a lossy algorithm can have incredibly high ratios. It is not uncommon for a 50:1 ratio in video compression. Think of the previous example where an hour video took 100gigs of space. Now we can have an hour stored in 5 gigs and thus able to fit on a DVD disc. For the average person chances are if they were shown the original uncompressed directly next to the lossy compressed DVD they would not be able to tell any significant differences. This is where the advantage of lossy compression lies in extremely high ratios and being able to produce a final product that is a very good aproximation of the original.
Now, I'll present you with how "I believe" the current algorithms work in compression video images (like mpeg2/mpeg4 DVD/HDDVD) actually work.
A keyframe is the basis of a compressed video. The keyframe is a single image (of course a video normally contains thousands if not millions of keyframes) that other images can be mathmatically derived from.
Let's say you have a keyframe that contains mountains, grass, trees, sky, and clouds.
Now let's say the next frame of the video contains all the elements in the keyframe except a red house.
Well, since they're very similar we can say for this frame use the keyframe + 1 red house and now we have our image. Granted it's significantly more complicated in terms of math but that's the general idea. Find an image that is similar enough that we can mathmatically create it from a keyframe.
Wednesday, October 24, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment