Constant rate factor

Constant rate factor

Constant Rate Factor (CRF) is a x264's single-pass encoding method.



The way constant quality encoding is usually done, it keeps up a constant quality by compressing every frame 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 into account.

The eye perceives 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, 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 encoding cutting off high and low frequencies in music that are audible on CDs.

If one were a computer 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 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 broadcasts.

That derives from too low of a bitrate. 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 bits 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 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.

See also


External links

Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Constant Rate Factor — Постоянное Значение Оценки (англ. Constant Rate Factor, CRF)  метод одно проходного сжатия видео кодеком x264. Обзор Обычно, кодирование видео с постоянным качеством осуществляется путём сжатия каждого кадра одинакового типа в… …   Википедия

  • Factor analysis — is a statistical method used to describe variability among observed, correlated variables in terms of a potentially lower number of unobserved, uncorrelated variables called factors. In other words, it is possible, for example, that variations in …   Wikipedia

  • Constant maturity swap — A constant maturity swap, also known as a CMS, is a swap that allows the purchaser to fix the duration of received flows on a swap. The floating leg of an interest rate swap typically resets against a published index. The floating leg of a… …   Wikipedia

  • Constant elasticity of substitution — In economics, Constant elasticity of substitution (CES) is a property of some production functions and utility functions. More precisely, it refers to a particular type of aggregator function which combines two or more types of consumption, or… …   Wikipedia

  • Reaction rate — Iron rusting a chemical reaction with a slow reaction rate. Wood …   Wikipedia

  • Tendency of the rate of profit to fall — The tendency of the rate of profit to fall (TRPF) is a hypothesis in economics and political economy, most famously expounded by Karl Marx in chapter 13 of Das Kapital Vol. 3. It was generally accepted in the 19th century. Economists as diverse… …   Wikipedia

  • Real time factor — The real time factor (RTF) is a common metric of measuring the speed of an automatic speech recognition system. It can also be used in other context where an audio or video signal is processed (usually automatically) at nearly constant rate (e.g …   Wikipedia

  • Units conversion by factor-label — Many, if not most, parameters and measurements in the physical sciences and engineering are expressed as a numerical quantity and a corresponding dimensional unit; for example: 1000 kg/m³, 100 kPa/bar, 50 miles per hour, 1000 Btu/lb. Converting… …   Wikipedia

  • Failure rate — is the frequency with which an engineered system or component fails, expressed for example in failures per hour. It is often denoted by the Greek letter λ (lambda) and is important in reliability engineering. The failure rate of a system usually… …   Wikipedia

  • Heart rate — is the number of heartbeats per unit of time, typically expressed as beats per minute (bpm). Heart rate can vary as the body s need to absorb oxygen and excrete carbon dioxide changes, such as during exercise or sleep. The measurement of heart… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”