|

楼主 |
发表于 2009-8-9 08:02
|
显示全部楼层
在我写这段废话的时候,最新的rev又出来了
http://git.videolan.org/gitweb.cgi?p=x264.git;a=commit;h=6f4054f79d3ff1034d634aabb9f9d9c8eb261bad
rev1203
我的测试是早上跑的,所以还是沿用了rev1198的binary
片源选的是BDMV ミチコとハッチン Vol 1的第一个特典NCOP,具有中等偏低运动复杂度但细节不少的一个片源。
AVS就不写了,裸压。
我一共用了两种测试方法,首先我试了下1pass crf+2pass bitrate,这是我常用的压制方法,
出去mb-tree之外参数如下- 1pass
- x264_rev1198 --profile main --level 4.1 --pass 1 --crf18 --keyint 240 --min-keyint 1 --ref 4 --no-fast-pskip --bframes 6 --b-adapt 2 --direct auto --psy-rd 0:0 --subme 9 --me umh --merange 32 --trellis 2 --partitions none --ipratio 1.3 --vbv-bufsize 50000 --vbv-maxrate 50000 --no-dct-decimate --threads 6 --sar 1:1 --psnr --ssim --stats mb_tree_on.stats -o nul ncop_test.avs
- 2pass
- x264_rev1198 --profile high --level 4.1 --pass 2 --bitrate 5000 --keyint 240 --min-keyint 1 --ref 4 --no-fast-pskip --bframes 6 --b-adapt 2 --direct auto --psy-rd 0:0 --subme 9 --me umh --merange 32 --trellis 2 --partitions p8x8,b8x8,i4x4,i8x8 --ipratio 1.3 --vbv-bufsize 50000 --vbv-maxrate 50000 --no-dct-decimate --threads 6 --sar 1:1 --psnr --ssim --stats mb_tree_on.stats -o mb_tree_on.264 ncop_test.avs
复制代码 下面是log信息
mb-tree on
1pass
avis [info]: 1920x1080 @ 23.98 fps (1944 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile Main, level 4.1
x264 [info]: slice I:24 Avg QP:14.84 size:155049
PSNR Mean Y:52.43 U:54.23 V:53.54 Avg:52.55 Global:49.44
x264 [info]: slice P:962 Avg QP:16.72 size: 66807
PSNR Mean Y:48.26 U:49.47 V:48.96 Avg:48.52 Global:47.07
x264 [info]: slice B:958 Avg QP:20.36 size: 7218
PSNR Mean Y:46.52 U:47.97 V:47.55 Avg:46.86 Global:46.58
x264 [info]: consecutive B-frames: 13.7% 57.4% 10.2% 14.2% 1.0% 2.8% 0.7%
x264 [info]: mb I I16..4: 39.1% 0.0% 60.9%
x264 [info]: mb P I16..4: 28.5% 0.0% 0.0% P16..4: 59.5% 0.0% 0.0% 0.0% 0.0% skip:11.9%
x264 [info]: mb B I16..4: 1.8% 0.0% 0.0% B16..8: 13.2% 0.0% 0.0% direct: 5.1%
skip:79.9% L0:45.9% L1:41.2% BI:13.0%
x264 [info]: direct mvs spatial:89.2% temporal:10.8%
x264 [info]: coded y,uvDC,uvAC intra:60.7% 53.4% 38.2% inter:20.1% 23.9% 14.1%
x264 [info]: SSIM Mean Y:0.9912379
x264 [info]: PSNR Mean Y:47.455 U:48.788 V:48.323 Avg:47.749 Global:46.838
kb/s:7390.57
encoded 1944 frames, 4.75 fps, 7391.31 kb/s
2pass
avis [info]: 1920x1080 @ 23.98 fps (1944 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile High, level 4.1
x264 [info]: slice I:24 Avg QP:14.88 size:143041
PSNR Mean Y:52.72 U:54.25 V:53.61 Avg:52.76 Global:49.67
x264 [info]: slice P:962 Avg QP:16.67 size: 43802
PSNR Mean Y:49.16 U:50.29 V:49.72 Avg:49.38 Global:47.97
x264 [info]: slice B:958 Avg QP:21.48 size: 5439
PSNR Mean Y:47.47 U:48.80 V:48.34 Avg:47.76 Global:47.48
x264 [info]: consecutive B-frames: 13.7% 57.4% 10.2% 14.2% 1.0% 2.8% 0.7%
x264 [info]: mb I I16..4: 25.3% 37.8% 36.9%
x264 [info]: mb P I16..4: 4.9% 6.2% 2.9% P16..4: 45.1% 11.9% 10.0% 0.0% 0.0% skip:19.1%
x264 [info]: mb B I16..4: 0.3% 0.2% 0.1% B16..8: 25.9% 1.0% 0.8% direct: 0.8%
skip:70.8% L0:53.2% L1:42.8% BI: 4.1%
x264 [info]: 8x8 transform intra:43.2% inter:55.7%
x264 [info]: direct mvs spatial:81.2% temporal:18.8%
x264 [info]: coded y,uvDC,uvAC intra:58.6% 61.2% 42.4% inter:13.8% 18.2% 10.3%
x264 [info]: ref P L0 64.2% 17.2% 11.9% 6.7%
x264 [info]: ref B L0 82.4% 10.3% 7.2%
x264 [info]: SSIM Mean Y:0.9925743
x264 [info]: PSNR Mean Y:48.369 U:49.601 V:49.084 Avg:48.622 Global:47.739
kb/s:5010.41
encoded 1944 frames, 3.49 fps, 5010.68 kb/s
mb-tree off
1pass
avis [info]: 1920x1080 @ 23.98 fps (1944 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile Main, level 4.1
x264 [info]: slice I:24 Avg QP:14.19 size:160979
PSNR Mean Y:53.19 U:55.13 V:54.37 Avg:53.35 Global:50.22
x264 [info]: slice P:963 Avg QP:16.02 size: 76401
PSNR Mean Y:48.76 U:49.92 V:49.52 Avg:49.02 Global:47.42
x264 [info]: slice B:957 Avg QP:17.30 size: 15026
PSNR Mean Y:47.01 U:48.32 V:47.98 Avg:47.32 Global:46.90
x264 [info]: consecutive B-frames: 13.8% 57.3% 10.2% 14.2% 1.0% 2.8% 0.7%
x264 [info]: mb I I16..4: 38.1% 0.0% 61.9%
x264 [info]: mb P I16..4: 28.8% 0.0% 0.0% P16..4: 62.9% 0.0% 0.0% 0.0% 0.0% skip: 8.3%
x264 [info]: mb B I16..4: 4.0% 0.0% 0.0% B16..8: 23.7% 0.0% 0.0% direct:15.6%
skip:56.7% L0:45.4% L1:42.9% BI:11.7%
x264 [info]: direct mvs spatial:91.8% temporal:8.2%
x264 [info]: coded y,uvDC,uvAC intra:66.6% 57.2% 42.7% inter:25.0% 34.2% 17.1%
x264 [info]: SSIM Mean Y:0.9915399
x264 [info]: PSNR Mean Y:47.956 U:49.195 V:48.818 Avg:48.239 Global:47.180
kb/s:9059.35
encoded 1944 frames, 4.80 fps, 9060.07 kb/s
2pass
avis [info]: 1920x1080 @ 23.98 fps (1944 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile High, level 4.1
x264 [info]: slice I:24 Avg QP:14.93 size:133410
PSNR Mean Y:52.81 U:54.40 V:53.76 Avg:52.87 Global:49.66
x264 [info]: slice P:963 Avg QP:16.73 size: 41734
PSNR Mean Y:49.05 U:50.11 V:49.61 Avg:49.26 Global:47.76
x264 [info]: slice B:957 Avg QP:18.59 size: 7585
PSNR Mean Y:47.41 U:48.61 V:48.21 Avg:47.67 Global:47.32
x264 [info]: consecutive B-frames: 13.8% 57.3% 10.2% 14.2% 1.0% 2.8% 0.7%
x264 [info]: mb I I16..4: 25.2% 37.7% 37.1%
x264 [info]: mb P I16..4: 4.7% 6.1% 2.7% P16..4: 45.0% 11.4% 10.1% 0.0% 0.0% skip:20.0%
x264 [info]: mb B I16..4: 0.5% 0.3% 0.1% B16..8: 28.5% 1.1% 1.1% direct: 1.3%
skip:67.1% L0:50.3% L1:44.2% BI: 5.5%
x264 [info]: 8x8 transform intra:43.3% inter:59.2%
x264 [info]: direct mvs spatial:83.9% temporal:16.1%
x264 [info]: coded y,uvDC,uvAC intra:59.0% 61.7% 41.5% inter:13.4% 19.4% 10.2%
x264 [info]: ref P L0 65.8% 16.8% 11.2% 6.1%
x264 [info]: ref B L0 79.2% 12.1% 8.7%
x264 [info]: SSIM Mean Y:0.9922301
x264 [info]: PSNR Mean Y:48.288 U:49.426 V:48.977 Avg:48.521 Global:47.557
kb/s:4997.55
encoded 1944 frames, 3.15 fps, 4997.81 kb/s
肉眼观察第一个测试得出的结果,我没有逐帧检查,但回放效果看不出差别。不过这也很正常,bitrate 5000k的设置或许对于这种片源来说码率限制太宽松了。当然我也注意到crf18 1pass时,开启mb-tree之后目标码率由9000+锐减至7300+这个特征。而两者SSIM的差别只在万分位。
也许在crf=18这种准极限质量情况下,mb-tree的作用不是在提升质量,而是很有效地控制了目标码率。
另一个让人注意的情况是,B slice的QP,开启mb-tree之后,会有一定程度的增加。这是不是可以理解成由于我没有开启b-pyramid,因此在mb-tree中b做为ref的情况不存在,因此认定此为大动态场景,选择了较coarse的quantizer导致的呢?
接着我做了个很ep的测试,用2pass码率模式,bitrate设置成800k
对于fullHD来说,800k真的就对rate control提出了严峻的要求,我们来看下两者的表现。
首先是参数,和上边没有变化,除了将--pass 1 --crf 18改成了--pass 1 --bitrate 800而已。
mb-tree on
1pass
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cach
e64
x264 [info]: profile Main, level 4.1
x264 [info]: slice I:24 Avg QP:35.19 size: 22130 PSNR Mean Y:39.97 U:45.69
V:44.43 Avg:40.91 Global:36.45
x264 [info]: slice P:962 Avg QP:39.85 size: 7048 PSNR Mean Y:36.09 U:40.69
V:39.95 Avg:37.03 Global:35.06
x264 [info]: slice B:958 Avg QP:45.35 size: 888 PSNR Mean Y:33.78 U:38.78
V:38.18 Avg:34.78 Global:34.21
x264 [info]: consecutive B-frames: 13.7% 57.4% 10.2% 14.2% 1.0% 2.8% 0.7%
x264 [info]: mb I I16..4: 89.2% 0.0% 10.8%
x264 [info]: mb P I16..4: 38.5% 0.0% 0.0% P16..4: 13.2% 0.0% 0.0% 0.0% 0
.0% skip:48.3%
x264 [info]: mb B I16..4: 0.7% 0.0% 0.0% B16..8: 5.2% 0.0% 0.0% direct:
1.1% skip:93.1% L0:49.4% L1:50.0% BI: 0.6%
x264 [info]: final ratefactor: 39.20
x264 [info]: direct mvs spatial:70.6% temporal:29.4%
x264 [info]: coded y,uvDC,uvAC intra:4.1% 18.4% 6.9% inter:0.9% 2.9% 0.6%
x264 [info]: SSIM Mean Y:0.9155334
x264 [info]: PSNR Mean Y:35.003 U:39.811 V:39.132 Avg:35.967 Global:34.637 kb/s:
805.32
encoded 1944 frames, 4.68 fps, 806.49 kb/s
2pass
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cach
e64
x264 [info]: profile High, level 4.1
x264 [info]: slice I:24 Avg QP:34.18 size: 23026 PSNR Mean Y:41.45 U:46.16
V:44.82 Avg:42.20 Global:38.08
x264 [info]: slice P:962 Avg QP:37.17 size: 6882 PSNR Mean Y:39.34 U:42.53
V:41.78 Avg:40.00 Global:38.25
x264 [info]: slice B:958 Avg QP:42.18 size: 945 PSNR Mean Y:37.70 U:40.78
V:40.19 Avg:38.36 Global:37.94
x264 [info]: consecutive B-frames: 13.7% 57.4% 10.2% 14.2% 1.0% 2.8% 0.7%
x264 [info]: mb I I16..4: 42.0% 56.3% 1.7%
x264 [info]: mb P I16..4: 6.0% 5.5% 0.1% P16..4: 22.7% 1.6% 5.6% 0.0% 0
.0% skip:58.4%
x264 [info]: mb B I16..4: 0.2% 0.1% 0.0% B16..8: 9.2% 0.1% 0.0% direct:
0.2% skip:90.2% L0:45.7% L1:54.1% BI: 0.2%
x264 [info]: 8x8 transform intra:48.9% inter:95.9%
x264 [info]: direct mvs spatial:71.1% temporal:28.9%
x264 [info]: coded y,uvDC,uvAC intra:11.8% 27.8% 11.6% inter:1.1% 2.5% 0.7%
x264 [info]: ref P L0 57.3% 22.0% 14.9% 5.8%
x264 [info]: ref B L0 84.7% 9.2% 6.1%
x264 [info]: SSIM Mean Y:0.9572881
x264 [info]: PSNR Mean Y:38.559 U:41.716 V:41.032 Avg:39.218 Global:38.091 kb/s:
797.10
encoded 1944 frames, 7.63 fps, 797.56 kb/s
mb-tree off
1pass
avis [info]: 1920x1080 @ 23.98 fps (1944 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile Main, level 4.1
x264 [info]: slice I:24 Avg QP:35.87 size: 19305
PSNR Mean Y:39.27 U:45.44 V:44.26 Avg:40.28 Global:36.08
x264 [info]: slice P:963 Avg QP:40.41 size: 6943
PSNR Mean Y:35.16 U:40.28 V:39.62 Avg:36.18 Global:34.32
x264 [info]: slice B:957 Avg QP:43.79 size: 1009
PSNR Mean Y:33.19 U:38.38 V:37.84 Avg:34.23 Global:33.50
x264 [info]: consecutive B-frames: 13.8% 57.3% 10.2% 14.2% 1.0% 2.8% 0.7%
x264 [info]: mb I I16..4: 91.0% 0.0% 9.0%
x264 [info]: mb P I16..4: 41.3% 0.0% 0.0% P16..4: 12.8% 0.0% 0.0% 0.0% 0.0% skip:45.8%
x264 [info]: mb B I16..4: 0.7% 0.0% 0.0% B16..8: 5.7% 0.0% 0.0% direct: 1.3%
skip:92.3% L0:49.1% L1:50.3% BI: 0.7%
x264 [info]: final ratefactor: 40.55
x264 [info]: direct mvs spatial:73.8% temporal:26.2%
x264 [info]: coded y,uvDC,uvAC intra:3.3% 18.0% 6.5% inter:0.9% 3.3% 0.6%
x264 [info]: SSIM Mean Y:0.8992518
x264 [info]: PSNR Mean Y:34.240 U:39.409 V:38.799 Avg:35.269 Global:33.914
kb/s:800.62
encoded 1944 frames, 4.81 fps, 801.81 kb/s
2pass
avis [info]: 1920x1080 @ 23.98 fps (1944 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile High, level 4.1
x264 [info]: slice I:24 Avg QP:34.17 size: 19806
PSNR Mean Y:41.35 U:46.04 V:44.67 Avg:42.08 Global:37.76
x264 [info]: slice P:963 Avg QP:37.17 size: 6722
PSNR Mean Y:38.97 U:42.28 V:41.54 Avg:39.66 Global:37.76
x264 [info]: slice B:957 Avg QP:39.89 size: 1164
PSNR Mean Y:37.43 U:40.61 V:40.01 Avg:38.10 Global:37.52
x264 [info]: consecutive B-frames: 13.8% 57.3% 10.2% 14.2% 1.0% 2.8% 0.7%
x264 [info]: mb I I16..4: 46.2% 52.7% 1.0%
x264 [info]: mb P I16..4: 6.6% 5.1% 0.0% P16..4: 23.0% 1.7% 5.4% 0.0% 0.0% skip:58.2%
x264 [info]: mb B I16..4: 0.2% 0.1% 0.0% B16..8: 12.4% 0.1% 0.0% direct: 0.2%
skip:86.9% L0:41.2% L1:58.5% BI: 0.3%
x264 [info]: 8x8 transform intra:44.7% inter:95.8%
x264 [info]: direct mvs spatial:73.4% temporal:26.6%
x264 [info]: coded y,uvDC,uvAC intra:10.2% 25.7% 10.4% inter:1.2% 2.6% 0.7%
x264 [info]: ref P L0 58.5% 21.5% 14.3% 5.6%
x264 [info]: ref B L0 86.0% 8.5% 5.5%
x264 [info]: SSIM Mean Y:0.9507619
x264 [info]: PSNR Mean Y:38.240 U:41.509 V:40.830 Avg:38.923 Global:37.643
kb/s:795.46
encoded 1944 frames, 7.32 fps, 795.85 kb/s
On比Off在SSIM上由.95076增加到了.95729,提升了0.68%,不是什么很明显的提升嘛...
下面把800k压得两段视频放出来,大家来做个Blind Test吧,不要借用mediainfo窥探哦
800_test1.mkv
下载地址:http://www.namipan.com/d/800_tes ... a5b638c26dce2a77b00
800_test2.mkv
下载地址:http://www.namipan.com/d/800_tes ... 4e967790bfa87647b00 |
|