Variance Adaptive Quantization

Last updated
Visual quality gain in x264: [1]
Parkrun x264 no VAQ.png
Without VAQ
Parkrun x264 with VAQ.png
With VAQ

Variance Adaptive Quantization (VAQ) is a video encoding algorithm that was first introduced in the open source video encoder x264. According to Xvid Builds FAQ: "It's an algorithm that tries to optimally choose a quantizer for each macroblock using advanced math algorithms." [2] It was later ported to programs which encode video content in other video standards, like MPEG-4 ASP or MPEG-2.

In the case of Xvid, the algorithm is intended to make up for the earlier limitations in its Adaptive Quantization mode. The first Xvid library containing this improvement was released in February 2008. [3]

Related Research Articles

In signal processing, data compression, source coding, or bit-rate reduction is the process of encoding information using fewer bits than the original representation. Any particular compression is either lossy or lossless. Lossless compression reduces bits by identifying and eliminating statistical redundancy. No information is lost in lossless compression. Lossy compression reduces bits by removing unnecessary or less important information. Typically, a device that performs data compression is referred to as an encoder, and one that performs the reversal of the process (decompression) as a decoder.

MPEG-1 is a standard for lossy compression of video and audio. It is designed to compress VHS-quality raw digital video and CD audio down to about 1.5 Mbit/s without excessive quality loss, making video CDs, digital cable/satellite TV and digital audio broadcasting (DAB) practical.

MPEG-4 is a method of defining compression of audio and visual (AV) digital data. It was introduced in late 1998 and designated a standard for a group of audio and video coding formats and related technology agreed upon by the ISO/IEC Moving Picture Experts Group (MPEG) under the formal standard ISO/IEC 14496 – Coding of audio-visual objects. Uses of MPEG-4 include compression of AV data for Internet video and CD distribution, voice and broadcast television applications. The MPEG-4 standard was developed by a group led by Touradj Ebrahimi and Fernando Pereira.

A video codec is software or hardware that compresses and decompresses digital video. In the context of video compression, codec is a portmanteau of encoder and decoder, while a device that only compresses is typically called an encoder, and one that only decompresses is a decoder.

Variable bitrate (VBR) is a term used in telecommunications and computing that relates to the bitrate used in sound or video encoding. As opposed to constant bitrate (CBR), VBR files vary the amount of output data per time segment. VBR allows a higher bitrate to be allocated to the more complex segments of media files while less space is allocated to less complex segments. The average of these rates can be calculated to produce an average bitrate for the file.

Xvid

Xvid is a video codec library following the MPEG-4 video coding standard, specifically MPEG-4 Part 2 Advanced Simple Profile (ASP). It uses ASP features such as b-frames, global and quarter pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG and custom quantization matrices.

Advanced Video Coding The most widely used standard for video compression

Advanced Video Coding (AVC), also referred to as H.264 or MPEG-4 Part 10, Advanced Video Coding, is a video compression standard based on block-oriented, motion-compensated integer-DCT coding. It is by far the most commonly used format for the recording, compression, and distribution of video content, used by 91% of video industry developers as of September 2019. It supports resolutions up to and including 8K UHD.

Quantization, involved in image processing, is a lossy compression technique achieved by compressing a range of values to a single quantum value. When the number of discrete symbols in a given stream is reduced, the stream becomes more compressible. For example, reducing the number of colors required to represent a digital image makes it possible to reduce its file size. Specific applications include DCT data quantization in JPEG and DWT data quantization in JPEG 2000.

ffdshow Open-source unmaintained codec library

ffdshow is an open-source unmaintained codec library that is mainly used for decoding of video in the MPEG-4 ASP and H.264/MPEG-4 AVC video formats, but it supports numerous other video and audio formats as well. It is free software released under GNU General Public License 2.0, runs on Windows, and is implemented as a Video for Windows (VFW) codec and a DirectShow filter.

x264 is a free and open-source software library and a command-line utility developed by VideoLAN for encoding video streams into the H.264/MPEG-4 AVC video coding format. It is released under the terms of the GNU General Public License.

MPEG-4 Part 2, MPEG-4 Visual is a video compression format developed by the Moving Picture Experts Group (MPEG). It belongs to the MPEG-4 ISO/IEC standards. It is a discrete cosine transform (DCT) compression standard, similar to previous standards such as MPEG-1 Part 2 and H.262/MPEG-2 Part 2.

Avidemux Free and open-source transcoding and video editing software

Avidemux is a free and open-source software for non-linear video editing and transcoding multimedia files. The developers intend it as "a simple tool for simple video processing tasks" and to allow users "to do elementary things in a very straightforward way". It is written in C++ and uses Qt for its graphical user interface, and FFmpeg for its multimedia functions. Starting with version 2.4, Avidemux also offers a command-line interface, and since version 2.6, the original GTK port has not been maintained and is now discontinued.

Α video codec is software or a device that provides encoding and decoding for digital video, and which may or may not include the use of video compression and/or decompression. Most codecs are typically implementations of video coding formats.

Context-adaptive binary arithmetic coding (CABAC) is a form of entropy encoding used in the H.264/MPEG-4 AVC and High Efficiency Video Coding (HEVC) standards. It is a lossless compression technique, although the video coding standards in which it is used are typically for lossy compression applications. CABAC is notable for providing much better compression than most other entropy encoding algorithms used in video encoding, and it is one of the key elements that provides the H.264/AVC encoding scheme with better compression capability than its predecessors.

Trellis quantization is an algorithm that can improve data compression in DCT-based encoding methods. It is used to optimize residual DCT coefficients after motion estimation in lossy video compression encoders such as Xvid and x264. Trellis quantization reduces the size of some DCT coefficients while recovering others to take their place. This process can increase quality because coefficients chosen by Trellis have the lowest rate-distortion ratio. Trellis quantization effectively finds the optimal quantization for each block to maximize the PSNR relative to bitrate. It has varying effectiveness depending on the input data and compression method.

Rate-distortion optimization (RDO) is a method of improving video quality in video compression. The name refers to the optimization of the amount of distortion against the amount of data required to encode the video, the rate. While it is primarily used by video encoders, rate-distortion optimization can be used to improve quality in any encoding situation where decisions have to be made that affect both file size and quality simultaneously.

Video Acceleration API (VA-API) is an open source API that allows applications such as VLC media player or GStreamer to use hardware video acceleration capabilities, usually provided by the graphics processing unit (GPU). It is implemented by the free and open-source library libva, combined with a hardware-specific driver, usually provided together with the GPU driver.

VP8 Open and royalty-free video coding format released by Google in 2010

VP8 is an open and royalty-free video compression format created by On2 Technologies as a successor to VP7 and owned by Google from 2010.

A video coding format is a content representation format for storage or transmission of digital video content. It typically uses a standardized video compression algorithm, most commonly based on discrete cosine transform (DCT) coding and motion compensation. Examples of video coding formats include H.262, MPEG-4 Part 2, H.264, HEVC (H.265), Theora, RealVideo RV40, VP9, and AV1. A specific software or hardware implementation capable of compression or decompression to/from a specific video coding format is called a video codec; an example of a video codec is Xvid, which is one of several different codecs which implements encoding and decoding videos in the MPEG-4 Part 2 video coding format in software.

References

  1. "The first in-depth technical analysis of VP8". 2010-05-19. Archived from the original on 2015-04-11.
  2. "Xvid Builds FAQ". 2012-09-08. Archived from the original on 2013-01-15.
  3. "VAQ: Making Xvid's Adaptive Quantization Not Suck". 2008-02-22. Archived from the original on 2020-08-07.