We have used the term ‘codec’ quite a lot in earlier chapters without defining what it means. A codec is just a compression and decompression engine. It does not refer only to digital video, but also to audio and other forms of data. However, in this book, we are only concerned with video and audio codecs.
Previously, we classified codecs as lossless and lossy. This classification is only evident for audio and video codecs. Data compression does not tolerate data losses, so all data codecs are lossless. Imagine compressing a very important archive of documents only to find they are corrupted when you decompress them! You probably do not want that to happen with your video or audio. Lossy video codecs exploit redundancies in the video frames and insensitivities of the human visual system to reduce the amount of data required to represent the original video.
Audio codecs take advantage of properties of the human auditory system, striving to squeeze...