Hybrid codec

From Hydrogenaudio Knowledgebase
Jump to: navigation, search

A lossless/lossy 'hybrid' codec provides encoding to a lossless and a lossy stream simultaneously within the same format: it stores a lossy audio stream that can be played back as such, and then a correction stream such that decoding is lossless when both are present. The correction stream can be in the same file as the lossy stream, or in a separate file.

Hybrid encoding can have a variety of purposes and methods, at least including the following:

  • For end-users to keep lossy versions (say, for portable use) to be copied without the time or computing effort needed to transcode lossy to lossless every time; rather than keeping two sets of files, one can maintain one single copy in one single library, such that e.g. tag updates need only be done once. WavPack and OptimFROG provide for this option through their hybrid modes.
  • A similar purpose, but where the output stream is automatically selected by a hardware or software application, for example defaulting to a lossy stream if the transmission cannot support the lossless - or possibly for DRM purposes. In Blu-Ray, support for DTS (also often found in DVDs) is mandatory, and the newer DTS-HD formats provide not only a "core" DTS stream to legacy players, but also an "extension"/correction streams that the "HD"-aware players can use for more audio information. In the "DTS-HD-MA" version, the extension stream (together with the core DTS stream) will provide for losslessness. The rarer MPEG-4 SLS format has an AAC core stream and a correction stream for losslessness.
  • Other ways to retro-fit losslessness into a lossy format without breaking compatibility, include to store the correction not as a stream, but in the same way as a tag chunk. ATRAC's lossless mode and the short-lived Mp3HD were such retro-fits. An Mp3 player would then treat this chunk as if it were an unknown tag, ignoring it.