Rate–distortion optimization
   HOME

TheInfoList



OR:

Rate-distortion optimization (RDO) is a method of improving
video quality Video quality is a characteristic of a video passed through a video transmission or processing system that describes perceived video degradation (typically, compared to the original video). Video processing systems may introduce some amount of dist ...
in video compression. The name refers to the optimization of the amount of ''distortion'' (loss of video quality) 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 (image, video, audio, or otherwise) where decisions have to be made that affect both file size and quality simultaneously.


Background

The classical method of making encoding decisions is for the video encoder to choose the result which yields the highest quality output image. However, this has the disadvantage that the choice it makes might require more bits while giving comparatively little quality benefit. One common example of this problem is in
motion estimation Motion estimation is the process of determining ''motion vectors'' that describe the transformation from one 2D image to another; usually from adjacent frames in a video sequence. It is an ill-posed problem as the motion is in three dimensions ...
, and in particular regarding the use of quarter pixel-precision motion estimation. Adding the extra precision to the motion of a
block Block or blocked may refer to: Arts, entertainment and media Broadcasting * Block programming, the result of a programming strategy in broadcasting * W242BX, a radio station licensed to Greenville, South Carolina, United States known as ''96.3 ...
during motion estimation might increase quality, but in some cases that extra quality isn't worth the extra bits necessary to encode the motion vector to a higher precision.


How it works

Rate-distortion optimization solves the aforementioned problem by acting as a video quality metric, measuring both the deviation from the source material and the bit cost for each possible decision outcome. The bits are mathematically measured by multiplying the bit cost by the
Lagrangian Lagrangian may refer to: Mathematics * Lagrangian function, used to solve constrained minimization problems in optimization theory; see Lagrange multiplier ** Lagrangian relaxation, the method of approximating a difficult constrained problem with ...
, a value representing the relationship between bit cost and quality for a particular quality level. The deviation from the source is usually measured as the
mean squared error In statistics, the mean squared error (MSE) or mean squared deviation (MSD) of an estimator (of a procedure for estimating an unobserved quantity) measures the average of the squares of the errors—that is, the average squared difference between ...
, in order to maximize the
PSNR Peak signal-to-noise ratio (PSNR) is an engineering term for the ratio between the maximum possible power of a Signal (information theory), signal and the power of corrupting noise that affects the fidelity of its representation. Because many sign ...
video quality metric. Calculating the bit cost is made more difficult by the entropy encoders in modern video codecs, requiring the rate-distortion optimization algorithm to pass each block of video to be tested to the entropy coder to measure its actual bit cost. In
MPEG The Moving Picture Experts Group (MPEG) is an alliance of working groups established jointly by ISO and IEC that sets standards for media coding, including compression coding of audio, video, graphics, and genomic data; and transmission and f ...
codecs, the full process consists of a discrete cosine transform, followed by quantization and entropy encoding. Because of this, rate-distortion optimization is much slower than most other block-matching metrics, such as the simple
sum of absolute differences In digital image processing, the sum of absolute differences (SAD) is a measure of the similarity between image blocks. It is calculated by taking the absolute difference between each pixel in the original block and the corresponding pixel in the ...
(SAD) and sum of absolute transformed differences (SATD). As such it is usually used only for the final steps of the
motion estimation Motion estimation is the process of determining ''motion vectors'' that describe the transformation from one 2D image to another; usually from adjacent frames in a video sequence. It is an ill-posed problem as the motion is in three dimensions ...
process, such as deciding between different partition types in H.264/AVC.


List of encoders that support RDO

*
Ateme Ateme S.A. is a multinational company that specializes in video delivery, namely software for video compression based on High_Efficiency_Video_Coding, H.265 / High_Efficiency_Video_Coding, HEVC standards; MPEG4; MPEG2 Data_compression#Video, encod ...
H.264 Advanced Video Coding (AVC), also referred to as H.264 or MPEG-4 Part 10, is a video compression standard based on block-oriented, motion-compensated coding. It is by far the most commonly used format for the recording, compression, and distr ...
encoder * Grass Valley ViBE encoders (SD & HD MPEG-2/MPEG-4) * Harmonic Electra 8000 encoder (SD & HD MPEG-2/MPEG-4) *
libavcodec libavcodec is a free and open-source library of codecs for encoding and decoding video and audio data. libavcodec is an integral part of many open-source multimedia applications and frameworks. The popular MPV, xine and VLC media players use ...
*
MainConcept MainConcept GmbH is a software company founded in Germany by Markus Moenig and Thomas Zabel. They specialize in developing video/audio codecs and also applications and plug-ins related to video/audio encoding. They are a subsidiary of Endeavor ...
H.264 Advanced Video Coding (AVC), also referred to as H.264 or MPEG-4 Part 10, is a video compression standard based on block-oriented, motion-compensated coding. It is by far the most commonly used format for the recording, compression, and distr ...
encoder *
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washin ...
VC-1 SMPTE 421, informally known as VC-1, is a video coding format. Most of it was initially developed as Microsoft's proprietary video format Windows Media Video 9 in 2003. With some enhancements including the development of a new Advanced Profile, ...
encoder * TANDBERG Television SD MPEG-2 EN8100 * TANDBERG Television HD MPEG-4 EN8190 * TANDBERG Television SD & HD MPEG-4 iPlex *
Theora Theora is a free lossy video compression format. It is developed by the Xiph.Org Foundation and distributed without licensing fees alongside their other free and open media projects, including the Vorbis audio format and the Ogg contai ...
1.1-alpha1 and later (the "Thusnelda" branch) *
x264 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. Histor ...
H.264 encoder * x265 H.265 encoder *
Xvid Xvid (formerly "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 mas ...
MPEG-4 ASP encoder * H.264/AVC reference software JM (Joint Model) *
HEVC High Efficiency Video Coding (HEVC), also known as H.265 and MPEG-H Part 2, is a video compression standard designed as part of the MPEG-H project as a successor to the widely used Advanced Video Coding (AVC, H.264, or MPEG-4 Part 10). In compar ...
reference software HM (HEVC Test Model) * Kvazaar (partial)


References

{{DEFAULTSORT:Rate-Distortion Optimization Video compression