WavPack

from Wikipedia, the free encyclopedia
WavPack

WavPack monochrome logo.png
Basic data

developer David Bryant
Current  version 5.3.0
( April 16, 2020 )
operating system platform independent
programming language C.
category Encoder
License BSD license
German speaking No
wavpack.com

WavPack (.wv / wvc) is a free open source codec for lossless and lossy audio data compression , developed by David Bryant / Conifer Software.

The reference implementation (analogous to zip and unzip) is implemented in two complementary programs - an encoder (WavPack) and a decoder (WvUnpack) - as well as an additional tool for adding replay gain information (WvGain).

From version 11, the well-known compression program WinZip uses WavPack to reduce the size of RIFF-WAVE files.

description

WavPack enables lossless data compression of PCM -coded (audio) data based on unpacked PCM data in the RIFF-WAVE format.

Compression modes

WavPack has three working modes:

  • In the (preset) lossless mode ( English lossless ) a compressed file is generated which allows a reconstruction of the output sound bitidentische curve. All header data of the original WAVE file are also saved (unless expressly deactivated) . The packing rate naturally fluctuates with the type of input signal, but is usually between 25 and 50 percent and improves with classical music and other signals with greater dynamic bandwidth.
  • In lossy mode (English lossy ) a relatively small, high-quality lossy compressed file is generated. In contrast to the lossless mode, the file size is predictable here: a desired (constant) bit rate is selected here. If possible, the encoder discards signal components that are as unimportant as possible until the set bit rate is reached; where possible it remains lossless. In contrast to the majority of common lossy codecs, the method works without exploiting inadequacies of the human hearing by means of a psychoacoustic model. Therefore, higher bit rates are used here: At 384 kbps, WavPack delivers largely transparent results. In this mode, too, all header data of the original WAVE file are saved (if not explicitly deactivated). The files generated are far more suitable for later transcoding into other lossy formats than methods that use a psychoacoustic model. A final report shows whether freedom from loss has been achieved or how many deviations from the original signal had to be accepted.
  • The hybrid mode ( also called DualStream at OptimFROG ) combines lossy and lossless compression by creating a correction file in addition to a lossy compressed file, which together then allow completely lossless reconstruction. The packing rate is slightly lower here than in the purely lossless mode.

All modes are available in five different levels of complexity. A higher level increases the computational effort when packing and unpacking (symmetry). The encoder provides a switchable asymmetry mode, which enables higher packing rates that are only at the expense of the coding time without affecting the decoding effort.

Main features

  • Fast and efficient coding and decoding
  • Open source , free software ( BSD- like license)
  • Cross-platform availability
  • Support of mono, stereo and multi-channel signals
  • Support of high resolutions - both in terms of time and amplitude (sampling frequencies from 6 to 192 kHz, sampling points of 8, 16, 24 and 32-bit floating point values)
  • Lossless, lossy and hybrid modes (lossy + correction file)
  • Optional asymmetry mode, i.e. H. more computational effort is required for encoding, but this does not lead to any additional effort for decoding.
  • Flexible metadata system ( APE v2 and ID3 tags)
  • Streaming support
  • Fault tolerance
  • Support of the replay gain standard
  • Supports gap-free playback
  • Supports embedded cuesheet
  • Support for RIFF chunks
  • Supports the creation of self-extracting files under Windows
  • Embedded MD5 checksums for a quick check for completeness
  • Good software support
  • Hardware support

history

David Bryant began developing WavPack in mid- 1998 with the release of version 1.0. It did not master anything else than the lossless packing and unpacking of audio data - but even then with one of the best ratios of coding time to efficiency.

Version 2.0 came very soon after the first, which supported lossy packing (quantizes the prediction residual values ​​for data reduction - no psychoacoustic model is used).

Version 3.0 came in 1999 with new features such as a faster (less efficient) mode, support for raw PCM files without header data (“raw” / “headerless”) and error detection through a 32-bit cyclic redundancy check .

Another essential feature of the late 3.x versions was the hybrid mode, in which, in addition to a lossy coded file, a correction file is generated which, when combined, allows the original data to be reconstructed.

WavPack 4 came out in 2004 . It added important features such as fast searching, multi-channel support, and support for high bit and sample rates, making it one of the most diverse, modern and most widely used free lossless audio packing methods after FLAC .

Version 4.4 (towards the end of 2006 ) brings among other things a new complexity level high between the old high (now very high ) and the normal mode with a pack rate close to the old high with significantly lower complexity, a completely revised and much faster asymmetrical mode and enables higher packing rates in hybrid mode. Version 4.41 from May 6, 2007 brought among other things 10 to 30% higher working speeds of the reference programs.

Software support

  • Directshow filter for Directshow programs such as Windows Media Player
  • REAPER - versatile audio / midi sequencer with direct * .wv import and rendering
  • MrQuestionMan - Audio Identifier
  • Burrrn - Direct multi-format audio CD writing
  • Mp3tag - universal tag editor
  • Exact Audio Copy - audio CD reader
  • VUPlayer - Free multiformat audio playback / conversion program
  • Play and Cog - playback programs for macOS with WavPack support
  • VLC media player - supports WavPack from version 0.8.6
  • MPXPlay - DOS ( MS-DOS , FreeDOS , DR-DOS ) -based playback program with WavPack support
  • The GodFather - Tagger / Music Manager
  • Wavpack4Wavelab - the first third party file input / output module for the commercial / professional wave editor Steinberg Wavelab 5/6
  • Easy CD-DA Extractor - Commercial CD reading, encoding and converting program
  • macOS : Max and XLD - encode directly from various lossless formats, including WavPack, to AIFF or FLAC.
  • Audacious - Unix audio player

Additional modules for

  • NullSoft's Winamp with ReplayGain and Media Library support
  • foobar2000 - Advanced audio player with support of ReplayGain and Cuesheets (official additional module)
  • XMMS
  • Adobe Audition / CoolEdit with support for 32 bit floating point and storage of additional information
  • dBpoweramp - Music Converter / Audio-Player / CD-Writer (official additional module)
  • Apollo audio player with ReplayGain support
  • MusikCube - Free audio player
  • Nero Burning ROM
  • LAMIP (official additional module) - Modular audio player for Linux and friends
  • XMPlay - small free Windows player with official additional module
  • Quintessential Player
  • 1by1 and Coolplayer with the Winamp -WavPack add-on module

Hardware support

  • For devices with the open source Rockbox firmware such as the iriver ihp100, ihp120, ihp140, H320, H340 and iPod Color / Photo / Nano models
  • Roku PhotoBridge HD through an additional module

technology

To ensure a high working speed, WavPack uses a very simple prediction that is based exclusively on integer mathematics. In the fast mode, the prediction consists only in the arithmetic extrapolation of the previous two sampling points. If, for example, the previous two sampling points were the values ​​−10 and 20, then the predicted value would be 50. For the preset mode, a simple adjustment factor is added to weight the influence of the first point on the prediction. For the above example this meant a variation of the result from 20 with no influence to 50 with full influence. This weighting factor is constantly adjusted, depending on the characteristics of the spectrum of the sound material, therefore it is called "adaptive".

The generated prediction value is then subtracted from the real sample to obtain the error value. In mono mode, this value is forwarded directly to the encoder, but stereo signals tend to have dependencies between the channels, which can also be used. In this case, two error values ​​are determined, one of which represents the difference and one the average of the left and right error values. In the fast mode, these two new values ​​are simply sent to the encoder instead of the right and left error values. In the default mode, the difference value is always given to the encoder together with one of the remaining three values, the average, the left or the right value. An adaptive algorithm continuously determines the most suitable of the three based on the changing balance between the channels.

The developer has developed a data encoder for WavPack which he believes is better than Rice coding in two areas. It is impossible to code more efficiently than the Rice coding, as it always achieves optimal bit coding for this type of data (sometimes known as the Huffman code ). WavPack's encoder is somewhat less efficient, but only by about 0.15 bits / sample (or less than one percent for 16-bit data). The first advantage of the WavPack coder is that the data does not have to be pre-buffered and instead each sample can be transferred directly in bit codes. This is more efficient in the calculation and is important in applications in which the coding delay is important. The second advantage is that it can easily be adapted to the lossy coding, since all important bits (with the exception of the inevitable "one" most significant bit ) are transmitted directly. It is therefore sufficient, for example, to transfer only the three most important bits of each sampling point (with sign ). In fact, it is even possible to transmit just the sign and the mandatory MSB of each point with an average of only 3.65 bits per sample.

This procedure is used to implement the lossy mode of WavPack. In the fast mode, the output of the non-adaptive decorrelator is simply rounded to the nearest encodable value resulting from the specified number of bits. In the default mode, the adaptive decorrelator is used, which lowers the noise by about one decibel (dB). Furthermore, both the current and the following sampling point are used to determine the more suitable of the two, which reduces the background noise by a further dB.

The developer has decided not to use floating point arithmetic in WavPack's procedures, as he considers integer operations to be less susceptible to small deviations from chip to chip that could compromise losslessness. The Pentium floating point error is an alarming example of this. There is a possibility that a lossless packer using floating point operations could produce a different output on such a faulty Pentium. Even when such errors are not taken into account, floating-point math is complicated enough to allow for small differences between “correct” implementations that create difficulties for a variety of applications. In order to increase the reliability even further, the encoder incorporates a 32-bit error detection code into the data stream generated.

The WavPack source code is extremely portable, primarily due to the exclusive use of integer operations. It was compiled for numerous Unix variants ( Linux , macOS , Solaris , FreeBSD , OpenBSD , NetBSD , Compaq Tru64 UNIX , HP-UX ...), as well as for Windows , DOS , Palm OS and OpenVMS . It runs on architectures such as x86 , ARM , PowerPC , AMD64 , IA-64 , Sun SPARC , DEC Alpha , PA-RISC , MIPS , or Motorola 68k .

See also

Web links

Individual evidence

  1. Release 5.3.0 . April 16, 2020 (accessed April 17, 2020).
  2. The wav_pack Open Source Project on Open Hub: Languages ​​Page . In: Open Hub . (accessed on September 3, 2018).