PDA

View Full Version : About CRF in X264


chiefmonk
5th October 2007, 05:31
Hello,everyone. I'm a newbie to x264. I'm curious about the CRF. How could CRF give a constant video quality? Can anyone give me some threads about it?

Dark Shikari
5th October 2007, 05:33
CRF isn't exactly a constant quality--nothing is--but it tries.

It'll be easier to explain QP mode--think of CRF as a somewhat optimized QP mode that is able to vary quantizers for somewhat better quality.

QP mode just uses the same quantizer for every frame, which in some sense means a constant quality. In terms of visual quality, there are some cases where you need lower QP to achieve acceptable visual quality, but that's what adaptive quantization is for.

Two-pass bitrate also tries to reach the ideal of constant quality, of course--the difference is that CRF and QP mode operate on a different metric (what bitrate can we get at this quality?) versus two-pass bitrate (what quality can we get at this bitrate?)

chiefmonk
5th October 2007, 07:33
Thank you Dark Shikari. Here is my understanding of your apply, if it is wrong, please correct me.
CRF can be seen as a function of QP (CRF=f(QP)). Since a const QP doesn't always give an accpetable quality, CRF tries to vary QP according to the video content(give high QP in motion area or low QP in smooth area). But how did the x264 developers found the relationship between QP and CRF? Is it experimental or theoretical? I tried to read the threads posted serveral years ago, but it's too much for me to check all.

Dark Shikari
5th October 2007, 07:40
Thank you Dark Shikari. Here is my understanding of your apply, if it is wrong, please correct me.
CRF can be seen as a function of QP (CRF=f(QP)). Since a const QP doesn't always give an accpetable quality, CRF tries to vary QP according to the video content(give high QP in motion area or low QP in smooth area). But how did the x264 developers found the relationship between QP and CRF? Is it experimental or theoretical? I tried to read the threads posted serveral years ago, but it's too much for me to check all.I don't know exactly how the CRF algorithm works. Wait for Akupenguin to respond to this thread, perhaps.

audyovydeo
5th October 2007, 14:11
But how did the x264 developers found the relationship between QP and CRF? Is it experimental or theoretical?


from a thread dating a few month ago, it was experimental.
Try this thread too :

http://forum.doom9.org/showthread.php?p=996195#post996195


cheers
audyovydeo

chiefmonk
5th October 2007, 16:31
Thanks. That's just what I want.