NMM视频技术(旧)

 找回密码
 成为会员
搜索
查看: 8691|回复: 11

[AVC(H.264)] x264 rev1198 mb-tree rc加入

[复制链接]
发表于 2009-8-8 08:06 | 显示全部楼层 |阅读模式
from: http://git.videolan.org/gitweb.cgi?p=x264.git;a=commit;h=bb66c482242a0747823661b212114c1a2f015fe3

ds自己的blog:
http://x264dev.multimedia.cx/?p=98
A Tree of Thought

引用最后一句话
The rest, as they say, is history.

传说中SSIM提升60%的一段demo
点此下载
发表于 2009-8-8 12:04 | 显示全部楼层
本帖最后由 diseac 于 2009-8-8 12:12 编辑

我的一段测试:使用片源是一段静态比较多的暗场。
在静态比较多的场景,mb-tree竟然可以节省一倍多的码率,实在是惊叹!
(x264 r1198)

使用mb-tree:
--profile high --level 4.1
--keyint 300 --min-keyint 30 --bframes 3 --b-adapt 2 --ref 8 --debl
ock 0:0 --crf 18 --qpstep 8 --aq-mode 1 --aq-strength 1 --partitions p8x8,b8x8,i
4x4,i8x8 --direct auto --me umh --subme 10 --psy-rd 1:0 --trellis 1 --no-fast-ps
kip --no-dct-decimate --threads auto


avis [info]: 704x480 @ 29.97 fps (1001 frames)
x264 [info]: using SAR=40/33
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cach
e64
x264 [info]: profile High, level 4.1
mp4 [info]: initial delay 1001 (scale 30000)
x264 [info]: slice I:10    Avg QP:11.62  size: 26480  PSNR Mean Y:51.59 U:53.16
V:53.02 Avg:52.03 Global:51.97
x264 [info]: slice P:300   Avg QP:14.00  size:  8025  PSNR Mean Y:49.80 U:51.80
V:51.60 Avg:50.34 Global:50.27
x264 [info]: slice B:691   Avg QP:17.82  size:   740  PSNR Mean Y:49.39 U:51.49
V:51.26 Avg:49.95 Global:49.86
x264 [info]: consecutive B-frames:  0.6%  3.2% 48.1% 48.0%
x264 [info]: mb I  I16..4: 17.7% 64.7% 17.6%
x264 [info]: mb P  I16..4:  0.3%  1.0%  0.4%  P16..4: 50.7% 23.7% 17.4%  0.0%  0
.0%    skip: 6.5%
x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 34.9%  0.1%  0.1%  direct:
0.2%  skip:64.8%  L0:40.4% L1:59.1% BI: 0.5%
x264 [info]: 8x8 transform  intra:61.8%  inter:49.1%
x264 [info]: direct mvs  spatial:76.0%  temporal:24.0%
x264 [info]: coded y,uvDC,uvAC intra:88.2% 95.4% 71.6% inter:11.3% 28.4% 12.6%
x264 [info]: ref P L0  51.8% 17.8% 12.1%  5.5%  4.6%  3.4%  3.1%  1.7%
x264 [info]: ref B L0  72.3% 14.1%  7.4%  2.4%  1.6%  1.1%  1.0%
x264 [info]: SSIM Mean Y:0.9910400
x264 [info]: PSNR Mean Y:49.536 U:51.598 V:51.378 Avg:50.090 Global:49.997 kb/s:
762.50

encoded 1001 frames, 14.65 fps, 762.73 kb/s


不使用mb-tree:
--profile high --level 4.1
--keyint 300 --min-keyint 30 --bframes 3 --b-adapt 2 --b-pyramid --ref 8 --debl
ock 0:0 --crf 18 --qpstep 8 --aq-mode 1 --aq-strength 1 --partitions p8x8,b8x8,i
4x4,i8x8 --direct auto --me umh --subme 10 --psy-rd 1:0 --trellis 1 --no-fast-ps
kip --no-dct-decimate --threads auto --no-mbtree


avis [info]: 704x480 @ 29.97 fps (1001 frames)
x264 [info]: using SAR=40/33
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cach
e64
x264 [info]: profile High, level 4.1
mp4 [info]: initial delay 2002 (scale 30000)
x264 [info]: slice I:10    Avg QP:11.12  size: 28652  PSNR Mean Y:51.92 U:53.38
V:53.25 Avg:52.34 Global:52.30
x264 [info]: slice P:300   Avg QP:11.88  size: 13560  PSNR Mean Y:50.48 U:52.27
V:52.10 Avg:50.97 Global:50.91
x264 [info]: slice B:691   Avg QP:12.48  size:  3428  PSNR Mean Y:50.02 U:51.79
V:51.58 Avg:50.50 Global:50.43
x264 [info]: consecutive B-frames:  0.4%  2.8% 51.2% 45.6%
x264 [info]: mb I  I16..4: 17.3% 65.7% 17.0%
x264 [info]: mb P  I16..4:  0.4%  2.0%  0.7%  P16..4: 42.2% 28.3% 25.4%  0.0%  0
.0%    skip: 1.0%
x264 [info]: mb B  I16..4:  0.0%  0.1%  0.0%  B16..8: 42.2%  0.7%  2.5%  direct:
2.3%  skip:52.2%  L0:46.9% L1:49.8% BI: 3.4%
x264 [info]: 8x8 transform  intra:66.2%  inter:55.7%
x264 [info]: direct mvs  spatial:88.7%  temporal:11.3%
x264 [info]: coded y,uvDC,uvAC intra:92.5% 97.8% 81.1% inter:27.4% 51.0% 25.0%
x264 [info]: ref P L0  43.6% 19.3% 12.5%  7.1%  5.3%  5.1%  4.4%  2.7%
x264 [info]: ref B L0  46.8% 22.9% 11.5%  7.0%  4.7%  4.5%  2.7%
x264 [info]: ref B L1  84.4% 15.6%
x264 [info]: SSIM Mean Y:0.9919979
x264 [info]: PSNR Mean Y:50.174 U:51.948 V:51.754 Avg:50.661 Global:50.584 kb/s:
1610.35

encoded 1001 frames, 13.26 fps, 1610.57 kb/s
发表于 2009-8-8 13:50 | 显示全部楼层
我的一段测试:使用片源是一段静态比较多的暗场。
在静态比较多的场景,mb-tree竟然可以节省一倍多的码率,实在是惊叹!
(x264 r1198)

使用mb-tree:
--profile high --level 4.1
--keyint 300 --min-keyi ...
diseac 发表于 2009-8-8 12:04

肉眼观看画质没有明显差异吗?我觉得这点还是很重要的
发表于 2009-8-8 14:06 | 显示全部楼层
从PSNR来看,使用mb-tree的略好。
从SSIM来看,不使用mb-tree的更接近片源质量。
肉眼感观上2者变化不大,毕竟除了--b-pyramid 和--no-mbtree 以外,其他参数都是相同的。
不过我这个测试只使用了一套参数,也只用了一段影片,有一定的片面性。
期待各位更详细的测试。
发表于 2009-8-8 15:19 | 显示全部楼层
本帖最后由 dlnm 于 2009-8-8 17:28 编辑

-m 10 不是要 -t 2 才能打開麼?
話說我試用後用mediainfo看是顯示m9的
於是不能確定m10是否打開了

另外使用mb-tree竟然比不用時的編碼速度更快
會否是受使用mb-tree而節省了碼率的影響?
或許用2pass來測試, 結果更客觀
发表于 2009-8-8 17:06 | 显示全部楼层
5# dlnm

那个实际上是9的,感谢纠正问题。不过这个貌似对mb-tree的测试影响不大。
我没有提到编码速度的比较,因为做测试的同时我还在做别的事情,CPU并不是一直保持100%给x264使用的。
期待您的2pass测试。
发表于 2009-8-8 21:24 | 显示全部楼层
本帖最后由 lititude 于 2009-8-8 21:25 编辑


source

source


不用mb-tree
  1. x264_mbtree_rc1.exe --no-mbtree -B 600 --pass 1 --b-adapt 2 --slow-firstpass --tune animation --level 4.1 --profile high --preset medium -o nul --ssim --stats nmb.stats mbttest.avs
  2. x264_mbtree_rc1.exe --no-mbtree -B 600 --pass 2 --b-adapt 2 --tune animation --level 4.1 --profile high --preset medium -o 2pnmb.mkv --ssim --stats nmb.stats mbttest.avs

  3. [b]log:[/b]
  4. 1pass:
  5. avis [info]: 864x480 @ 23.98 fps (1876 frames)
  6. x264 [info]: using cpu capabilities: MMX2 SSE2Slow
  7. x264 [info]: profile High, level 4.1
  8. x264 [info]: slice I:17    Avg QP:27.80  size: 28922
  9. x264 [info]: slice P:814   Avg QP:29.31  size:  6368
  10. x264 [info]: slice B:1045  Avg QP:30.29  size:   383
  11. x264 [info]: consecutive B-frames:  9.7% 29.6% 52.0%  5.8%  1.3%  1.6%
  12. x264 [info]: mb I  I16..4: 14.4% 59.3% 26.4%
  13. x264 [info]: mb P  I16..4:  1.3%  4.0%  1.7%  P16..4: 26.1% 11.7%  7.4%  0.0%  0
  14. .0%    skip:47.8%
  15. x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 16.5%  0.1%  0.1%  direct:
  16. 0.1%  skip:83.1%  L0:54.0% L1:44.7% BI: 1.3%
  17. x264 [info]: final ratefactor: 26.74
  18. x264 [info]: 8x8 transform  intra:58.3%  inter:64.8%
  19. x264 [info]: coded y,uvDC,uvAC intra:59.0% 74.3% 52.9% inter:6.9% 7.6% 1.3%
  20. x264 [info]: ref P L0  71.5% 11.1%  7.8%  3.5%  3.0%  3.2%
  21. x264 [info]: ref B L0  87.7%  4.2%  4.2%  1.9%  2.0%
  22. x264 [info]: SSIM Mean Y:0.9586755
  23. x264 [info]: kb/s:621.1

  24. encoded 1876 frames, 4.88 fps, 621.21 kb/s

  25. 2pass:
  26. avis [info]: 864x480 @ 23.98 fps (1876 frames)
  27. x264 [info]: using cpu capabilities: MMX2 SSE2Slow
  28. x264 [info]: profile High, level 4.1
  29. x264 [info]: slice I:17    Avg QP:26.21  size: 28823
  30. x264 [info]: slice P:814   Avg QP:29.07  size:  6197
  31. x264 [info]: slice B:1045  Avg QP:30.29  size:   322
  32. x264 [info]: consecutive B-frames:  9.7% 29.6% 52.0%  5.8%  1.3%  1.6%
  33. x264 [info]: mb I  I16..4: 11.5% 60.0% 28.6%
  34. x264 [info]: mb P  I16..4:  1.2%  4.6%  2.2%  P16..4: 22.1% 11.5%  6.5%  0.0%  0
  35. .0%    skip:51.9%
  36. x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 15.3%  0.1%  0.1%  direct:
  37. 0.1%  skip:84.4%  L0:58.9% L1:40.1% BI: 1.0%
  38. x264 [info]: 8x8 transform  intra:58.0%  inter:62.4%
  39. x264 [info]: coded y,uvDC,uvAC intra:63.0% 78.1% 57.7% inter:5.9% 5.7% 1.0%
  40. x264 [info]: ref P L0  70.3% 11.4%  7.9%  3.7%  3.2%  3.4%
  41. x264 [info]: ref B L0  86.9%  4.1%  4.6%  2.2%  2.3%
  42. x264 [info]: SSIM Mean Y:0.9653376
  43. x264 [info]: kb/s:600.3

  44. encoded 1876 frames, 6.73 fps, 600.39 kb/s
复制代码

without mb-tree

without mb-tree


使用mb-tree
  1. x264_mbtree_rc1.exe -B 600 --pass 1 --slow-firstpass --b-adapt 2 --tune animation --level 4.1 --profile high --preset medium -o nul --ssim --stats mb.stats mbttest.avs

  2. x264_mbtree_rc1.exe -B 600 --pass 2 --b-adapt 2 --tune animation --level 4.1 --profile high --preset medium -o 2pmb.mkv --ssim --stats mb.stats mbttest.avs

  3. [b]log:[/b]
  4. 1pass:
  5. avis [info]: 864x480 @ 23.98 fps (1876 frames)
  6. x264 [info]: using cpu capabilities: MMX2 SSE2Slow
  7. x264 [info]: profile High, level 4.1
  8. x264 [info]: slice I:17    Avg QP:24.83  size: 35505
  9. x264 [info]: slice P:815   Avg QP:29.50  size:  6416
  10. x264 [info]: slice B:1044  Avg QP:32.40  size:   255
  11. x264 [info]: consecutive B-frames:  9.5% 30.7% 51.0%  5.6%  1.6%  1.6%
  12. x264 [info]: mb I  I16..4: 10.5% 59.5% 30.0%
  13. x264 [info]: mb P  I16..4:  1.2%  4.1%  1.6%  P16..4: 25.0% 11.7%  7.6%  0.0%  0
  14. .0%    skip:48.7%
  15. x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 12.4%  0.1%  0.1%  direct:
  16. 0.1%  skip:87.4%  L0:56.8% L1:42.8% BI: 0.5%
  17. x264 [info]: final ratefactor: 27.94
  18. x264 [info]: 8x8 transform  intra:59.3%  inter:62.6%
  19. x264 [info]: coded y,uvDC,uvAC intra:61.8% 76.7% 56.2% inter:6.5% 7.1% 1.2%
  20. x264 [info]: ref P L0  69.5% 11.5%  8.2%  3.9%  3.3%  3.6%
  21. x264 [info]: ref B L0  92.3%  3.3%  2.5%  1.0%  1.0%
  22. x264 [info]: SSIM Mean Y:0.9645246
  23. x264 [info]: kb/s:623.5

  24. encoded 1876 frames, 4.83 fps, 623.67 kb/s

  25. 2pass:
  26. avis [info]: 864x480 @ 23.98 fps (1876 frames)
  27. x264 [info]: using cpu capabilities: MMX2 SSE2Slow
  28. x264 [info]: profile High, level 4.1
  29. x264 [info]: slice I:17    Avg QP:25.24  size: 31399
  30. x264 [info]: slice P:815   Avg QP:29.84  size:  6262
  31. x264 [info]: slice B:1044  Avg QP:33.35  size:   229
  32. x264 [info]: consecutive B-frames:  9.5% 30.7% 51.0%  5.6%  1.6%  1.6%
  33. x264 [info]: mb I  I16..4: 10.5% 59.9% 29.6%
  34. x264 [info]: mb P  I16..4:  1.1%  4.7%  2.3%  P16..4: 20.6% 11.4%  6.3%  0.0%  0
  35. .0%    skip:53.6%
  36. x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 10.4%  0.1%  0.1%  direct:
  37. 0.0%  skip:89.4%  L0:58.4% L1:41.3% BI: 0.3%
  38. x264 [info]: 8x8 transform  intra:58.6%  inter:61.1%
  39. x264 [info]: coded y,uvDC,uvAC intra:65.2% 79.5% 60.1% inter:5.6% 5.1% 0.9%
  40. x264 [info]: ref P L0  70.2% 11.4%  7.8%  3.8%  3.2%  3.5%
  41. x264 [info]: ref B L0  93.2%  2.9%  2.2%  0.9%  0.8%
  42. x264 [info]: SSIM Mean Y:0.9681126
  43. x264 [info]: kb/s:600.9

  44. encoded 1876 frames, 7.06 fps, 600.99 kb/s
复制代码

with mb-tree

with mb-tree
 楼主| 发表于 2009-8-9 05:04 | 显示全部楼层
天哪 latitude君 您就不能在原帖上修改么=.=
 楼主| 发表于 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之外参数如下
  1. 1pass
  2. 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
  3. 2pass
  4. 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
发表于 2009-8-10 20:31 | 显示全部楼层
压制某段视频(真人的)...开了MB-Tree之后完全糊成一团了,而且还有大量色块,上--no-mbtree就好得很
发表于 2009-8-14 15:17 | 显示全部楼层
這幾天準備壓一套720p的TtT收藏

於是粗略的比對了一下
發現mb-tree用在動畫上
同crf時, 除了碼率下降了約35%外
其他的感覺分別不大

另外想問一下no-psy是甚麼來的
開啓後, 碼率進一步下降了約50%
发表于 2009-8-14 16:26 | 显示全部楼层
开mb-tree的crf是重新定义的,不能用来比较质量。
您需要登录后才可以回帖 登录 | 成为会员

本版积分规则

小黑屋|手机版|NMM视频技术

GMT+8, 2025-5-6 00:10 , Processed in 0.352176 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表