Constant rate factor
Encyclopedia
Constant Rate Factor is a x264
X264
x264 is a free software library for encoding video streams into the H.264/MPEG-4 AVC format. It is released under the terms of the GNU General Public License.-History:...

's single-pass encoding method.

Overview

Constant quality encoding usually keeps up a constant quality by compressing every frame
Film frame
In filmmaking, video production, animation, and related fields, a film frame or video frame is one of the many still images which compose the complete moving picture...

 of the same type the same amount. In technical speak, that's maintaining a constant quantization parameter (QP). Constant Rate Factor, on the other hand, compresses different frames by different amounts. It does this by taking motion
Motion (physics)
In physics, motion is a change in position of an object with respect to time. Change in action is the result of an unbalanced force. Motion is typically described in terms of velocity, acceleration, displacement and time . An object's velocity cannot change unless it is acted upon by a force, as...

 into account.

The eye perceives
Visual perception
Visual perception is the ability to interpret information and surroundings from the effects of visible light reaching the eye. The resulting perception is also known as eyesight, sight, or vision...

 more detail in still objects than when they're in motion. Because of this, a video compressor can apply more compression (drop more detail) when things are moving, and apply less compression (retain more detail) when things are still. Subjectively
Subjective video quality
Subjective video quality is a subjective characteristic of video quality. It is concerned with how video is perceived by a viewer and designates his or her opinion on a particular video sequence...

, the video will seem to have higher quality.

Constant Quantization Parameter (CQP) mostly don't produce better visual quality as it just wastes space by compressing less in areas one really won't notice. This compares to MP3
MP3
MPEG-1 or MPEG-2 Audio Layer III, more commonly referred to as MP3, is a patented digital audio encoding format using a form of lossy data compression...

 encoding cutting off high and low frequencies
Frequency
Frequency is the number of occurrences of a repeating event per unit time. It is also referred to as temporal frequency.The period is the duration of one cycle in a repeating event, so the period is the reciprocal of the frequency...

 in music that are audible on CDs.

If one were a computer
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...

 then it would look at a Constant Rate Factor encoding and say it was lower quality than the Constant Quantization Parameter copy. And it would be. But if one is a human
Human
Humans are the only living species in the Homo genus...

 being, the Constant Rate Factor copy will look better because of perception subjectivity. It least compresses the parts you see the most, and most compresses the parts you see the least.

Technical details

A Constant Quantization Parameter encode at Q=18 will stay at Q=18 regardless of the frame. Constant Rate Factor will increase the Q to, say, 20, for high motion frames (compressing them more) and lower it down to 16 for low motion. That means that while the average quality as objectively gauged by peak signal-to-noise ratio (PSNR) goes slightly down, the perceptible image quality goes up.

When you use a constant rate factor, it varies the QP slightly. When a scene has a lot of action and motion, it will raise the quantization parameter (compressing more). This is because your eye will be distracted by everything going on, and won't have the image on screen for enough time to see the heavier compression. When a frame doesn't have a lot of motion, it will lower the QP, compressing it less. This is because your eye will have more time to look at the image, so you want it to be as much like the source as possible.

Constant Rate Factor is about improving subjective quality (or what the human eye sees) at the expense of objective quality (what a PSNR calculation sees). There is no way for anyone to tell you what your eye will notice on any given film.

Not a common knowledge

Constant Rate Factor is not the cause of the blocking you might see on digital cable or satellite broadcast
Broadcast
Broadcast or Broadcasting may refer to:* Broadcasting, the transmission of audio and video signals* Broadcast, an individual television program or radio program* Broadcast , an English electronic music band...

s.


That derives from too low of a bitrate
Bitrate
In telecommunications and computing, bit rate is the number of bits that are conveyed or processed per unit of time....

. Different bitrates correspond to different compression rate factors with different sources. So 1500 kbps will be enough to get a rate factor of 15 with one source, but only a rate factor of 20 with another, dirtier source. When someone use CRF or CQP it's like ordering "use whatever bitrate is necessary to preserve this much detail".

Those TV broadcasts get blocky because the complex things they're displaying require more bit
Bit
A bit is the basic unit of information in computing and telecommunications; it is the amount of information stored by a digital device or other physical system that exists in one of two possible distinct states...

s than the broadcaster has chosen to give them. They order "preserve as much detail as you can while never going above this high a bitrate no matter how complicated things get."

Lower overall size and quality isn't always a bad thing.

When using Constant Rate Factor, codec
Codec
A codec is a device or computer program capable of encoding or decoding a digital data stream or signal. The word codec is a portmanteau of "compressor-decompressor" or, more commonly, "coder-decoder"...

raises the quantization parameter (compressing more, losing more detail) for complex parts but doesn't raise it drastically, and it makes sure those complex parts still maintain a set quality level. Just a level lower than the simple parts. The bitrate for those parts might still be higher than for the simple parts, because the bitrate needed at a given moment to reach a given rate factor fluctuates. So overall size and quality may be lowered but overall perceived quality will be sustained in any case.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK