总算把qcomp的含义(mbtree=0情况下)给真正弄懂了,原来如此!
dwing吧
全部回复
仅看楼主
level 13
前提是讨论的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的质量好看来是不
正确的
认知。(不过解决掉心中的疑惑感觉还是挺好的!!!)
2014年12月24日 03点12分 1
level 8
qcomp管的是所以帧的复杂度,mbtree管的是单独的宏观的复杂度。理解不能。。。我一直以为qcomp是一个用来调节mbtree强度的东西。。。
2014年12月24日 06点12分 2
这里讨论的是关闭mb的情况下,nnm文档说开启
2014年12月24日 06点12分
nnm文档说当mbtree启用时,它会影响mbtree的强度(qcomp越大,mbtree越弱)
2014年12月24日 06点12分
回复 猪栏有只牛 :这个我自然知道,参数的内涵肯定不会这么简单,你能帮我解释一下我前一句话是意思么?
2014年12月24日 06点12分
@绘佐木修兵69 我也不懂,还是等楼主简单通俗点解释
2014年12月24日 06点12分
level 6
我之前的理解是,qcomp越高,无论是静态还是动态,码率都会变高(mbtree关闭的情况下)
2014年12月24日 07点12分 3
有更好的细节程度
2014年12月24日 07点12分
上面的结论不是我说的,是 doom9上面 的软件开发者说的,应该是比较权威的!!!qcomp应该属于高低复杂度的码率的转移过程,不可能会低复杂度和高复杂度同时都获得码率的增加或减少,不然和doom9上这位软件开发达人的理论就相悖了!!!
2014年12月24日 07点12分
我下面标{2}的地方就说了,如果提高qcomp=1.00会打破qcomp的码率分布规则,同时让高复杂度的地方获得更高的码率,第一眼看去确实质量更棒(而且你帧帧截图都是高质量),但是qcomp=1.00把更多码率浪费在高复杂度地方,会让其他地方丢失或欠缺码率,从质量整体上看来也许会变差。
2014年12月24日 07点12分
@阿拉斯加壮壮 qcomp=1在nmm的文档上解释是固定量化值,也就是qp,qp不是更不容易把帧压坏吗?不知道我的理解是不是出了问题还请指教
2014年12月24日 08点12分
level 6
如果一部片子90%都是静态或者动作很少,那么qcomp提高那码率反而会变低?楼主做个实验吗?
2014年12月24日 07点12分 4
level 12
我只是统计一下每次楼主说话会有几个感叹号
2014年12月24日 10点12分 6
+1
2014年12月26日 19点12分
+22
2014年12月27日 05点12分
←_← 他只是想自说自话而已
2014年12月28日 08点12分
level 13
@猪栏有只牛
qcomp
默认: 0.60
量化曲线(quantizer curve)压缩因子。0.0 => 恒定比特率,1.0 => 恒定量化值。
qcomp在“高成本”的高运动帧与“低成本”的低运动帧之间权衡分配码率。极端设置qcomp=0.0趋于真正的恒定比特率,通常会造成高运动场景十分难看,而将宝贵的码率用于让低运动场景看着很完美。另一极端设置qcomp=1.0则能达到近似恒定量化参数(QP),并完全关闭x264的aq-mode和时间方向的RDO(mb-tree),于是码率被浪费在高复杂度的场景上,而高复杂度的场景无法用作未来远处的帧的参考,因为帧与帧之间的变化太大。
与mbtree一起使用时,也会影响mbtree与aq-strength的强度,而这两项倾向于将更多码率用于低复杂度的场景和宏块(macroblock)。(qcomp越大,则aq与mbtree越弱)。
2014年12月27日 12点12分 7
好详细,向楼主学习[大拇指]
2014年12月27日 16点12分
mbtree据说(我没见过)带来的副作用就是暗场或者画面比较简单的动画会发糊,但它是给予缓慢变化的场景高质量,压缩高动态场景的啊。为什么静态还会发糊?
2015年05月12日 07点05分
开mbtree是优先保证静态区域的还原吗?
2015年05月12日 08点05分
这个可靠…
2016年05月17日 12点05分
level 7
mark
2015年04月14日 07点04分 8
level 11
实际情况下,为了体现视频锐化程度往往将qcomp设得比默认值高,但也不会高太多,不然就需要在播放时提高锐化
2015年04月15日 03点04分 9
1