前提是讨论的mbtree=0情况下,qcomp的取值:{1}Originally Posted by Diary Of An x264 DeveloperQuantizer curve compression, or “qcomp”, is a very old and simple idea. Lower the quality in areas of the video with high complexity and raise the quality in areas with low complexity. The original implementation dates at least back to the original libavcodec ratecontrol. There are three justifications for this:
【1】High-complexity scenes generally have high motion, and one is less likely to notice quality loss in a high motion scene, since fine detail is impossible to see in motion anyways.【2】High-complexity scenes are extraordinarily costly bit-wise, so even if it makes quality somewhat worse, it might be worth it to save those bits to use elsewhere.【3】Each frame in a high-complexity scene is not referenced very far into the future since there is a great deal of change between each frame, so even from a PSNR perspective, one should allocate fewer bits to those frames as opposed to frames which are nearly static.【4】x264 uses qcomp pretty much unchanged except that it performs a gaussian blur over the frame complexities to avoid too much local fluctuation between quantizers.【大概意思就是qcomp降低高复杂度场景的质量,节约出来的码率用来提升低复杂度场景的质量!!!主要是因为高复杂场景就算损失一点质量也是难以视觉察觉的,除非要帧帧去截图比较差不多。而且高复杂高动态场景分码率太多就太浪费了,而且从PSNR的好看角度来看也应该分配更少的码率给那些相对于静态场景的区域。看来qcomp=0.60(mbtree=0)保持不变就好了,除非对那些复杂帧使用了高斯模糊(大概是降噪降细节降码率)防止局部码率波动过大的情况下可以改变下qcomp的取值】 {2}If you raise the "--qcomp" value towards 1.0, you actually lower the effect of the qcomp algorithm! This means that "high complexity" scenes will get better quality - which may look better at a first glance (especially if you step through those scenes frame-by-frame). However, it also means that "high complexity" scenes will cost a lot more bits! Those bits are will then be missing in other places, of course! Consequently, the overall quality may easily become worse. Bummer!
As with most parameters (especially Psy optimizations), neither very high nor very low values will give optimal results. It's all about finding the sweet spot! And a "--qcomp" value of 0.6 obviously is what the developers consider to be a good default. If a higher (or lower) value would generally be beneficial, they would have madethat value the default! This doesn't mean that a somewhat higher (or lower) value couldn't be beneficial for your particular source and/or your personal preferences. But if you decide to mess with "--qcomp", your decision should be based on intensive testing rather than rumors. And if you are too lazy for running an in-depth test, just trust the developer's decision and stick with the default value
(BTW: The basic principle behind the classic "qcomp" algorithm and the "MB-Tree" algorithm is the same. The difference is that qcomp measures "complexity" for complete frames while MB-Tree tracks the "complexity" of individual macro-blocks)【看来qcomp管的是所有帧的复杂度情况,mbtree管的是单独的宏观的复杂度。】总结就是:如果视频高动态特别多的话,mbtree=0的情况下,提升qcomp的取值(高于0.60)是对整体都有好处的。如果视频静态特别多的话,mbtree=0的情况下,保持qcomp=0.60(或低于0.60)就可以了。因为一般视频动态也有,静态也有,保持默认的0.60似乎是最好的。BTW:一直觉得mbtree=0的情况下,qcomp=0.80的质量会比mbtree=0,qcomp=0.60的质量好看来是不正确的认知。(不过解决掉心中的疑惑感觉还是挺好的!!!)
【1】High-complexity scenes generally have high motion, and one is less likely to notice quality loss in a high motion scene, since fine detail is impossible to see in motion anyways.【2】High-complexity scenes are extraordinarily costly bit-wise, so even if it makes quality somewhat worse, it might be worth it to save those bits to use elsewhere.【3】Each frame in a high-complexity scene is not referenced very far into the future since there is a great deal of change between each frame, so even from a PSNR perspective, one should allocate fewer bits to those frames as opposed to frames which are nearly static.【4】x264 uses qcomp pretty much unchanged except that it performs a gaussian blur over the frame complexities to avoid too much local fluctuation between quantizers.【大概意思就是qcomp降低高复杂度场景的质量,节约出来的码率用来提升低复杂度场景的质量!!!主要是因为高复杂场景就算损失一点质量也是难以视觉察觉的,除非要帧帧去截图比较差不多。而且高复杂高动态场景分码率太多就太浪费了,而且从PSNR的好看角度来看也应该分配更少的码率给那些相对于静态场景的区域。看来qcomp=0.60(mbtree=0)保持不变就好了,除非对那些复杂帧使用了高斯模糊(大概是降噪降细节降码率)防止局部码率波动过大的情况下可以改变下qcomp的取值】 {2}If you raise the "--qcomp" value towards 1.0, you actually lower the effect of the qcomp algorithm! This means that "high complexity" scenes will get better quality - which may look better at a first glance (especially if you step through those scenes frame-by-frame). However, it also means that "high complexity" scenes will cost a lot more bits! Those bits are will then be missing in other places, of course! Consequently, the overall quality may easily become worse. Bummer!
As with most parameters (especially Psy optimizations), neither very high nor very low values will give optimal results. It's all about finding the sweet spot! And a "--qcomp" value of 0.6 obviously is what the developers consider to be a good default. If a higher (or lower) value would generally be beneficial, they would have madethat value the default! This doesn't mean that a somewhat higher (or lower) value couldn't be beneficial for your particular source and/or your personal preferences. But if you decide to mess with "--qcomp", your decision should be based on intensive testing rather than rumors. And if you are too lazy for running an in-depth test, just trust the developer's decision and stick with the default value
(BTW: The basic principle behind the classic "qcomp" algorithm and the "MB-Tree" algorithm is the same. The difference is that qcomp measures "complexity" for complete frames while MB-Tree tracks the "complexity" of individual macro-blocks)【看来qcomp管的是所有帧的复杂度情况,mbtree管的是单独的宏观的复杂度。】总结就是:如果视频高动态特别多的话,mbtree=0的情况下,提升qcomp的取值(高于0.60)是对整体都有好处的。如果视频静态特别多的话,mbtree=0的情况下,保持qcomp=0.60(或低于0.60)就可以了。因为一般视频动态也有,静态也有,保持默认的0.60似乎是最好的。BTW:一直觉得mbtree=0的情况下,qcomp=0.80的质量会比mbtree=0,qcomp=0.60的质量好看来是不正确的认知。(不过解决掉心中的疑惑感觉还是挺好的!!!)