Compression Formats

Digital-video devices can compress audio and video data in real time. In general, compression involves tradeoffs between the data rate and different kinds of compression artifacts. For a given compression algorithm, there are typically many parameters that reflect the different tradeoffs possible. Unfortunately, the myriad of algorithmic possibilities makes the direct control of all the tunable parameters of an algorithm impractical. (This is especially true for the MCI string-command interface.) As an extreme example, the JPEG algorithm has 192 tunable parameters, in the form of three 8-by-8 quantization matrices.

Parameter descriptors deal with this algorithmic richness in a reasonably device-independent manner. At the procedural level, the parameter descriptor uses a data structure that contains a specific set of values for all the tunable parameters needed by a specific compression algorithm. This data structure is given a symbolic name so that the associated descriptor can be conveniently referenced at the application level.

Every digital-video device that supports recording supports descriptors associated with the descriptor names low, medium, and high. For example, the set device name video quality low command is valid for all digital-video devices. The precise definition of what constitutes low quality video is device specific. Individual devices can also create other predefined descriptor names. (Devices with unique descriptor names provide the documentation for these descriptors.) Also, new descriptors can be created with the quality command.

Some devices support several different compression algorithms. For these devices, applications can select the audio or video algorithm with the MCI commands. These commands can also describe major variations. For example, a program capable of compressing into CD-XA audio formats might accept a command such as setaudio device name algorithm cdxa-b. The acceptable parameters for the argument of the algorithm flag would be device-specific.