Log in

View Full Version : The new B-frame decision (--bframes 16 and you)


Pages : 1 2 3 4 [5]

Avenger007
31st August 2008, 16:40
Is it possible to merge the old and new B-frame decision algorithms such that the new algorithm is applied to the first, say, 4 B-frames and any further consecutive B-frames would be determined by the old algorithm?

DarkZell666
31st August 2008, 18:37
Is it possible to merge the old and new B-frame decision algorithms such that the new algorithm is applied to the first, say, 4 B-frames and any further consecutive B-frames would be determined by the old algorithm?

That's just like asking the new algo to stop searching after 4 b-frames, since the old algo almost never goes past 3 anyway :p

Warpman
31st August 2008, 19:31
That's just like asking the new algo to stop searching after 4 b-frames, since the old algo almost never goes past 3 anyway :p
uhm ive got tons of encodes, mosty anime where the old algo frequently used all 16bframes...

Dark Shikari
31st August 2008, 21:41
Is it possible to merge the old and new B-frame decision algorithms such that the new algorithm is applied to the first, say, 4 B-frames and any further consecutive B-frames would be determined by the old algorithm?No, this is inherently impossible by the way B-frame trellis works.

However, I'd much rather have 4 B-frames with the new algorithm than 16 with the old algorithm.

burfadel
1st September 2008, 07:31
Wasn't there an issue with the old b-frame decision that selected b-frames where p-frames should be in certain circumstances? (with a resultant loss in visual quality)?

akupenguin
1st September 2008, 15:17
Wasn't there an issue with the old b-frame decision that selected b-frames where p-frames should be in certain circumstances?
Umm, yes? Otherwise we wouldn't be able to make b-adapt=2 better...

IgorC
16th September 2008, 17:48
I don't know if it was already discussed but for this source http://www.steves-digicams.com/2005_reviews/s2is/samples/MVI_0371.AVI
new b-adapt with 16 b-frames cause higher bitrate than expected (from 1500 to 1700). While with 3 bframes bitrate is normal.

Dark Shikari
16th September 2008, 17:57
I don't know if it was already discussed but for this source http://www.steves-digicams.com/2005_reviews/s2is/samples/MVI_0371.AVI
new b-adapt with 16 b-frames cause higher bitrate than expected (from 1500 to 1700). While with 3 bframes bitrate is normal.This is probably due to the increased delay introduced by b-adapt 2 (I suspect the longer the source, the less the effect). I'm not sure exactly how this would cause it, but it'd be my prime culprit.

kemuri-_9
17th September 2008, 13:03
anime DVD source 720x480


x264_r977 --pass 1 --bitrate 784 --stats x264.stats --min-keyint 1 --keyint 500 --scenecut 50 --ref 16 --mixed-refs
--deblock 0:0 --no-fast-pskip --b-adapt _x_ --bframes 16 --b-bias 0 --b-pyramid --b-rdo --bime --weightb
--direct auto --subme 7 --direct-8x8 -1 --trellis 2 --analyse all --8x8dct --qpmin 1 --qpmax 51 --qpstep 60
--pbratio 1.4 --ratetol 100.0 --qcomp 0.6 --me umh --merange 32 --psy-rd 0.0:0.0 --thread-input --threads 1
--progress --no-dct-decimate --level 5.1 --log-file x264.1pass.log --output NUL open_lossless.avs


b-adapt 1

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:248 Avg QP:13.92 size: 26696 PSNR Mean Y:49.85 U:51.77 V:51.95 Avg:50.33 Global:49.22
x264 [info]: slice P:22363 Avg QP:15.36 size: 4893 PSNR Mean Y:48.09 U:50.67 V:50.89 Avg:48.76 Global:48.08
x264 [info]: slice B:7120 Avg QP:22.01 size: 537 PSNR Mean Y:48.02 U:51.28 V:51.60 Avg:48.77 Global:46.66
x264 [info]: consecutive B-frames: 65.1% 10.1% 5.2% 5.3% 9.1% 3.9% 0.0% 0.1% 0.0% 0.0% 0.0% 0.0% 0.0% 0.1% 0.1% 0.1% 0.6%
x264 [info]: mb I I16..4: 30.2% 33.0% 36.8%
x264 [info]: mb P I16..4: 3.5% 5.6% 1.4% P16..4: 55.8% 8.5% 8.5% 0.0% 0.0% skip:16.7%
x264 [info]: mb B I16..4: 0.1% 0.1% 0.0% B16..8: 23.7% 0.2% 0.2% direct: 0.9% skip:74.7% L0:41.7% L1:57.2% BI: 1.1%
x264 [info]: final ratefactor: 22.28
x264 [info]: 8x8 transform intra:51.2% inter:53.8%
x264 [info]: direct mvs spatial:98.2% temporal:1.8%
x264 [info]: ref P L0 72.4% 7.9% 5.2% 2.1% 1.9% 1.8% 1.7% 0.8% 0.9% 0.8% 0.8% 0.8% 0.7% 0.7% 0.8% 0.5%
x264 [info]: ref B L0 80.6% 7.8% 3.7% 1.5% 1.2% 1.0% 0.9% 0.6% 0.5% 0.4% 0.4% 0.4% 0.4% 0.4% 0.3%
x264 [info]: ref B L1 96.2% 3.8%
x264 [info]: SSIM Mean Y:0.9903388
x264 [info]: PSNR Mean Y:48.087 U:50.823 V:51.071 Avg:48.776 Global:47.701 kb/s:773.35
x264 [info]: encoded 29731 frames, 2.91 fps, 773.35 kb/s


b-adapt 2

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:248 Avg QP:13.72 size: 27347 PSNR Mean Y:50.03 U:52.08 V:52.21 Avg:50.49 Global:49.34
x264 [info]: slice P:18059 Avg QP:14.66 size: 5778 PSNR Mean Y:49.09 U:51.46 V:51.71 Avg:49.72 Global:48.42
x264 [info]: slice B:11424 Avg QP:20.34 size: 743 PSNR Mean Y:47.03 U:50.15 V:50.40 Avg:47.82 Global:47.13
x264 [info]: consecutive B-frames: 41.6% 9.1% 40.2% 3.6% 2.1% 0.8% 0.7% 0.4% 0.3% 0.3% 0.2% 0.1% 0.1% 0.1% 0.0% 0.1% 0.3%
x264 [info]: mb I I16..4: 30.3% 32.5% 37.2%
x264 [info]: mb P I16..4: 3.6% 5.7% 1.7% P16..4: 55.3% 9.7% 9.6% 0.0% 0.0% skip:14.4%
x264 [info]: mb B I16..4: 0.7% 0.7% 0.1% B16..8: 23.7% 0.2% 0.2% direct: 1.4% skip:73.0% L0:51.4% L1:47.4% BI: 1.2%
x264 [info]: final ratefactor: 21.29
x264 [info]: 8x8 transform intra:49.4% inter:50.9%
x264 [info]: direct mvs spatial:99.7% temporal:0.3%
x264 [info]: ref P L0 68.2% 9.3% 5.8% 2.5% 2.2% 2.0% 2.0% 1.0% 1.0% 0.9% 1.0% 0.9% 0.9% 0.8% 0.9% 0.6%
x264 [info]: ref B L0 81.9% 7.9% 3.1% 1.4% 1.1% 0.8% 0.7% 0.5% 0.5% 0.4% 0.4% 0.4% 0.3% 0.3% 0.2%
x264 [info]: ref B L1 94.5% 5.5%
x264 [info]: SSIM Mean Y:0.9905947
x264 [info]: PSNR Mean Y:48.306 U:50.962 V:51.208 Avg:48.995 Global:47.888 kb/s:771.61
x264 [info]: encoded 29731 frames, 2.02 fps, 771.61 kb/s


working on a threaded comparison now.
if this was the version of b-adapt when it was still a patch, then the b-adapt 2 would of been more around 1.50 fps

kemuri-_9
17th September 2008, 15:14
and the threaded comparisons...

x264_r977 --pass 1 --bitrate 784 --stats x264.stats --min-keyint 1 --keyint 500 --scenecut 50 --ref 16 --mixed-refs
--deblock 0:0 --no-fast-pskip --b-adapt _x_ --bframes 16 --b-bias 0 --b-pyramid --b-rdo --bime --weightb
--direct auto --subme 7 --direct-8x8 -1 --trellis 2 --analyse all --8x8dct --qpmin 1 --qpmax 51 --qpstep 60
--pbratio 1.4 --ratetol 100.0 --qcomp 0.6 --me umh --merange 32 --psy-rd 0.0:0.0 --thread-input --threads 4
--progress --no-dct-decimate --level 5.1 --log-file x264.1pass.log --output NUL open_lossless.avs


b-adapt 1: ~90% average CPU usage (across 4 cores)

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:347 Avg QP:13.38 size: 23731 PSNR Mean Y:51.19 U:53.47 V:53.57 Avg:51.63 Global:49.71
x264 [info]: slice P:22264 Avg QP:15.37 size: 4851 PSNR Mean Y:48.10 U:50.66 V:50.88 Avg:48.77 Global:48.12
x264 [info]: slice B:7120 Avg QP:21.99 size: 538 PSNR Mean Y:48.05 U:51.28 V:51.60 Avg:48.77 Global:46.70
x264 [info]: consecutive B-frames: 65.0% 10.2% 5.2% 5.4% 9.2% 3.9% 0.0% 0.1% 0.0% 0.0% 0.0% 0.0% 0.0% 0.1% 0.1% 0.1% 0.6%
x264 [info]: mb I I16..4: 32.8% 33.4% 33.8%
x264 [info]: mb P I16..4: 3.4% 5.5% 1.3% P16..4: 55.8% 8.5% 8.5% 0.0% 0.0% skip:16.9%
x264 [info]: mb B I16..4: 0.1% 0.1% 0.0% B16..8: 23.8% 0.2% 0.2% direct: 0.9% skip:74.6% L0:41.8% L1:57.1% BI: 1.1%
x264 [info]: final ratefactor: 22.30
x264 [info]: 8x8 transform intra:50.8% inter:53.9%
x264 [info]: direct mvs spatial:98.2% temporal:1.8%
x264 [info]: ref P L0 72.4% 7.9% 5.2% 2.1% 1.9% 1.8% 1.7% 0.8% 0.9% 0.8% 0.8% 0.8% 0.7% 0.7% 0.8% 0.5%
x264 [info]: ref B L0 80.6% 7.9% 3.6% 1.5% 1.1% 1.0% 0.9% 0.6% 0.5% 0.4% 0.4% 0.4% 0.4% 0.4% 0.3%
x264 [info]: ref B L1 96.2% 3.8%
x264 [info]: SSIM Mean Y:0.9903609
x264 [info]: PSNR Mean Y:48.125 U:50.837 V:51.081 Avg:48.804 Global:47.750 kb/s:774.59
x264 [info]: encoded 29731 frames, 9.44 fps, 774.59 kb/s


b-adapt 2: ~60% average CPU usage (across 4 cores)

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:346 Avg QP:13.17 size: 24719 PSNR Mean Y:51.35 U:53.55 V:53.70 Avg:51.76 Global:49.81
x264 [info]: slice P:18174 Avg QP:14.75 size: 5692 PSNR Mean Y:49.10 U:51.48 V:51.72 Avg:49.73 Global:48.46
x264 [info]: slice B:11211 Avg QP:20.38 size: 697 PSNR Mean Y:47.00 U:50.10 V:50.35 Avg:47.78 Global:47.14
x264 [info]: consecutive B-frames: 42.2% 9.4% 39.9% 3.3% 1.9% 0.8% 0.7% 0.4% 0.3% 0.2% 0.1% 0.0% 0.1% 0.1% 0.0% 0.1% 0.3%
x264 [info]: mb I I16..4: 32.8% 32.5% 34.7%
x264 [info]: mb P I16..4: 3.6% 5.7% 1.7% P16..4: 55.4% 9.6% 9.4% 0.0% 0.0% skip:14.6%
x264 [info]: mb B I16..4: 0.5% 0.6% 0.1% B16..8: 23.8% 0.2% 0.2% direct: 1.2% skip:73.3% L0:51.3% L1:47.5% BI: 1.2%
x264 [info]: final ratefactor: 21.40
x264 [info]: 8x8 transform intra:49.3% inter:51.2%
x264 [info]: direct mvs spatial:99.8% temporal:0.2%
x264 [info]: ref P L0 68.2% 9.3% 5.9% 2.5% 2.2% 2.0% 2.0% 1.0% 1.0% 0.9% 0.9% 0.9% 0.9% 0.8% 0.9% 0.6%
x264 [info]: ref B L0 82.7% 7.9% 3.0% 1.3% 1.0% 0.7% 0.7% 0.5% 0.4% 0.3% 0.4% 0.3% 0.3% 0.3% 0.2%
x264 [info]: ref B L1 94.5% 5.5%
x264 [info]: SSIM Mean Y:0.9905993
x264 [info]: PSNR Mean Y:48.335 U:50.982 V:51.225 Avg:49.021 Global:47.922 kb/s:772.90
x264 [info]: encoded 29731 frames, 5.33 fps, 772.90 kb/s

Sharktooth
17th September 2008, 15:21
that's a good reason to not use -bframes 16 with b-adapt 2 ...

kemuri-_9
17th September 2008, 15:39
that's a good reason to not use -bframes 16 with b-adapt 2 ...

depends on what kind of quality you want!

Ranguvar
17th September 2008, 15:41
Looks to me like --bframes 3 is still the sweet spot :) Speed (not so much now with the improvements), PS3 compatibility, not much quality loss I'd guess from those stats :)

Thanks for the test!

Quark.Fusion
17th September 2008, 17:00
Looks to me like --bframes 4 is the sweet spot :) But I'm prefer 6 not to miss better compression.

kemuri-_9, can you test 2, 4 and 6 b-frames on this source (where 5 and 6 b-frames were used on 1% cases, and 2 on most cases)?

Audionut
17th September 2008, 17:36
and the threaded comparisons...


Looks like the speed loss is worth it to me.

Look at the resulting bitrate, quantizers and metrics of each file.

Could you run another test with b-frames at say 5?

TIA.

Sapo84
17th September 2008, 17:45
I tried to encode a particular anime source (Iblard Jikan, with is mostly consosed by static landscapes with little motion between frames), the results are somewhat interesting

b-adapt 1 (2 pass encode with turbo)
--pass 2 --bitrate 1460 --stats "G:\iblard.stats" --ref 4 --mixed-refs --bframes 16 --b-pyramid
--b-rdo --bime --direct auto --filter 1:0 --psy-rd 0.5:0.4 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct
--threads auto --thread-input --aq-strength 0.8 --sar 1:1 --progress --output "G:\iblard.mp4" "G:\iblard.avs"

x264 [info]: slice I:59 Avg QP:16.48 size:136488 PSNR Mean Y:47.67 U:50.26 V:51.03 Avg:48.38 Global:45.40
x264 [info]: slice P:3873 Avg QP:19.58 size: 13427 PSNR Mean Y:42.22 U:45.04 V:45.37 Avg:42.96 Global:42.18
x264 [info]: slice B:8935 Avg QP:20.29 size: 2060 PSNR Mean Y:44.12 U:46.40 V:47.29 Avg:44.70 Global:42.56
x264 [info]: consecutive B-frames: 17.9% 0.8% 0.9% 4.2% 15.3% 28.3% 7.3% 1.2% 1.3% 1.2% 0.7% 1.4% 0.7% 0.8% 0.1% 1.0% 16.9%
x264 [info]: mb I I16..4: 7.3% 43.8% 48.9%
x264 [info]: mb P I16..4: 0.2% 1.1% 0.2% P16..4: 53.0% 9.1% 14.5% 0.0% 0.0% skip:22.0%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 27.5% 0.5% 1.4% direct: 3.6% skip:66.9% L0:32.8% L1:54.4% BI:12.8%
x264 [info]: 8x8 transform intra:58.5% inter:46.8%
x264 [info]: direct mvs spatial:95.1% temporal:4.9%
x264 [info]: ref P L0 81.7% 8.0% 7.7% 2.7%
x264 [info]: ref B L0 65.8% 27.8% 6.4%
x264 [info]: ref B L1 81.4% 18.6%
x264 [info]: SSIM Mean Y:0.9839589
x264 [info]: PSNR Mean Y:43.565 U:46.005 V:46.730 Avg:44.197 Global:42.449 kb/s:1462.18
encoded 12867 frames, 27.37 fps, 1462.25 kb/s

b-adapt 2 (otherwise same settings)

x264 [info]: slice I:59 Avg QP:16.37 size:137576 PSNR Mean Y:47.76 U:50.35 V:51.13 Avg:48.47 Global:45.51
x264 [info]: slice P:6890 Avg QP:18.51 size: 8726 PSNR Mean Y:44.97 U:47.18 V:48.18 Avg:45.58 Global:42.83
x264 [info]: slice B:5918 Avg QP:21.58 size: 1733 PSNR Mean Y:41.52 U:44.41 V:44.85 Avg:42.31 Global:41.85
x264 [info]: consecutive B-frames: 28.2% 37.4% 8.5% 8.6% 0.8% 1.2% 1.9% 3.1% 0.4% 1.6% 3.3% 2.2% 0.2% 0.3% 1.2% 1.1% 0.0%
x264 [info]: mb I I16..4: 7.5% 43.8% 48.7%
x264 [info]: mb P I16..4: 0.1% 0.6% 0.1% P16..4: 44.5% 6.1% 10.2% 0.0% 0.0% skip:38.5%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 29.1% 0.5% 1.3% direct: 3.4% skip:65.8% L0:30.8% L1:56.5% BI:12.7%
x264 [info]: 8x8 transform intra:59.0% inter:45.0%
x264 [info]: direct mvs spatial:93.1% temporal:6.9%
x264 [info]: ref P L0 80.5% 9.3% 6.6% 3.6%
x264 [info]: ref B L0 62.1% 28.4% 9.6%
x264 [info]: ref B L1 85.6% 14.4%
x264 [info]: SSIM Mean Y:0.9835001
x264 [info]: PSNR Mean Y:43.400 U:45.919 V:46.662 Avg:44.091 Global:42.360 kb/s:1462.82
encoded 12867 frames, 29.89 fps, 1462.90 kb/s

Less b-frames and worse PSNR and SSIM.

b-adapt 2 with 5 b-frame (good enough speed)
x264 [info]: slice I:59 Avg QP:16.53 size:135574 PSNR Mean Y:47.61 U:50.22 V:51.00 Avg:48.32 Global:45.36
x264 [info]: slice P:7329 Avg QP:18.84 size: 8600 PSNR Mean Y:44.54 U:46.82 V:47.78 Avg:45.17 Global:42.54
x264 [info]: slice B:5479 Avg QP:21.76 size: 1351 PSNR Mean Y:41.38 U:44.26 V:44.70 Avg:42.16 Global:41.69
x264 [info]: consecutive B-frames: 28.3% 43.1% 9.4% 12.2% 1.9% 5.2%
x264 [info]: mb I I16..4: 7.4% 44.3% 48.3%
x264 [info]: mb P I16..4: 0.1% 0.5% 0.1% P16..4: 44.5% 6.6% 11.1% 0.0% 0.0% skip:37.1%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 28.9% 0.4% 1.1% direct: 2.5% skip:67.2% L0:31.8% L1:55.5% BI:12.7%
x264 [info]: 8x8 transform intra:59.1% inter:45.6%
x264 [info]: direct mvs spatial:92.4% temporal:7.6%
x264 [info]: ref P L0 76.4% 10.9% 8.1% 4.6%
x264 [info]: ref B L0 53.9% 24.6% 21.5%
x264 [info]: ref B L1 87.8% 12.2%
x264 [info]: SSIM Mean Y:0.9827461
x264 [info]: PSNR Mean Y:43.209 U:45.744 V:46.484 Avg:43.904 Global:42.162 kb/s:1461.51
encoded 12867 frames, 28.38 fps, 1461.59 kb/s

Then i tried something different, I slowed down the first pass by using better settings so to give better data to the algorithm

--pass 1 --bitrate 1460 --stats "G:\iblard.stats" --ref 2 --mixed-refs --bframes 16 --b-adapt 2
--b-pyramid --direct auto --filter 1:0 --subme 5 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me dia --threads auto
--thread-input --aq-strength 0.8 --sar 1:1 --progress --output NUL "G:\iblard.avs"

x264 [info]: slice I:59 Avg QP:16.38 size:136688 PSNR Mean Y:48.45 U:51.04 V:51.85 Avg:49.17 Global:45.61
x264 [info]: slice P:6087 Avg QP:18.57 size: 9705 PSNR Mean Y:45.80 U:47.57 V:48.44 Avg:46.20 Global:42.82
x264 [info]: slice B:6721 Avg QP:21.25 size: 1686 PSNR Mean Y:41.79 U:44.58 V:45.01 Avg:42.56 Global:42.05
x264 [info]: consecutive B-frames: 18.6% 41.4% 11.0% 9.7% 0.9% 1.2% 3.0% 3.4% 0.6% 1.6% 2.6% 1.9% 0.5% 0.2% 2.2% 1.0% 0.3%
x264 [info]: mb I I16..4: 8.7% 43.4% 47.9%
x264 [info]: mb P I16..4: 0.1% 0.6% 0.1% P16..4: 45.3% 6.6% 11.0% 0.0% 0.0% skip:36.3%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 27.5% 0.4% 1.2% direct: 3.5% skip:67.3% L0:30.5% L1:59.0% BI:10.6%
x264 [info]: 8x8 transform intra:58.4% inter:45.0%
x264 [info]: direct mvs spatial:94.5% temporal:5.5%
x264 [info]: ref P L0 80.0% 9.6% 6.8% 3.6%
x264 [info]: ref B L0 63.3% 27.6% 9.1%
x264 [info]: ref B L1 86.7% 13.3%
x264 [info]: SSIM Mean Y:0.9838412
x264 [info]: PSNR Mean Y:43.719 U:46.026 V:46.661 Avg:44.310 Global:42.410 kb/s:1462.31
encoded 12867 frames, 29.06 fps, 1462.39 kb/s

More b.frame (6700 vs 5900) and better quality.
It's hard to draw a clear conclusion with only one source but I think it may be interesting to test how much turbo first pass can degrade the quality with b-adapt 2.

I also tried a slower first pass (with the same setting as the one above) with b-adapt 1

x264 [info]: slice I:59 Avg QP:16.75 size:132272 PSNR Mean Y:48.12 U:50.76 V:51.56 Avg:48.85 Global:45.23
x264 [info]: slice P:3998 Avg QP:19.98 size: 13844 PSNR Mean Y:41.84 U:44.62 V:44.97 Avg:42.58 Global:41.81
x264 [info]: slice B:8810 Avg QP:20.29 size: 1738 PSNR Mean Y:44.40 U:46.42 V:47.19 Avg:44.91 Global:42.53
x264 [info]: consecutive B-frames: 12.3% 3.3% 12.1% 19.1% 18.0% 18.6% 8.0% 0.3% 0.7% 0.2% 0.3% 0.4% 0.1% 0.0% 0.2% 0.1% 6.2%
x264 [info]: mb I I16..4: 8.7% 43.8% 47.5%
x264 [info]: mb P I16..4: 0.2% 1.0% 0.2% P16..4: 55.2% 9.7% 15.5% 0.0% 0.0% skip:18.3%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 26.4% 0.4% 1.2% direct: 3.3% skip:68.7% L0:31.7% L1:59.0% BI: 9.4%
x264 [info]: 8x8 transform intra:58.5% inter:46.7%
x264 [info]: direct mvs spatial:97.0% temporal:3.0%
x264 [info]: ref P L0 79.2% 7.6% 9.9% 3.2%
x264 [info]: ref B L0 69.3% 24.9% 5.8%
x264 [info]: ref B L1 81.5% 18.5%
x264 [info]: SSIM Mean Y:0.9835551
x264 [info]: PSNR Mean Y:43.622 U:45.884 V:46.521 Avg:44.205 Global:42.302 kb/s:1462.16
encoded 12867 frames, 27.89 fps, 1462.24 kb/s

Similar number of b-frames and similar quality.

Audionut
17th September 2008, 17:53
Then i tried something different, I slowed down the first pass by using better settings so to give better data to the algorithm.
.....
More b.frame (6700 vs 5900) and better quality.
.

That's because --b-adapt makes all it's decisions on the first pass.

Sapo84
17th September 2008, 18:02
That's because --b-adapt makes all it's decisions on the first pass.
Exactly :)
And that's why I wanted to try a slower (but better) first pass, and the results speak for themself.
Moreover with b-adapt 2 and a high (10+) number of b-frames the first pass is slow anyway :devil:

Sharktooth
17th September 2008, 18:09
metrics do not measure quality...
so the result doesnt speak at all.

Sapo84
17th September 2008, 19:29
metrics do not measure quality...
We all know, but neither subjective opinions nor still frames really measure quality.
And I still think that posting metrics/opinions/still frames is better than posting nothing at all.
I could have easily posted a few frames, but they would have been nearly useless because they're too similar, and I fail to see any difference at all watching the video in motion (which is expected).
Nevertheless a small gain in metrics with the same settings for the second pass is, at last, something interesting ;)

kemuri-_9
17th September 2008, 19:53
imo there should be some raised eyebrows as to how sapo's b-adapt 2 passes came out faster than the b-adapt 1 pass
since b-adapt 2 is slower than b-adapt 1.
i don't think it could be completely attributed to caching

I'm running tests again on a for loop (easy way to do it) for bframes 2-6 since everyone seems to be interested on these values' results.
will post when they finish in several hours.

Quark.Fusion
17th September 2008, 20:30
imo there shouldn't be some raised eyebrows as lesser b-frames = faster encode. (Ok, there can be from someone who don't understand) :)

Quark.Fusion
17th September 2008, 20:33
Can you also test how same settings as in second pass affect --b-adapt 2?

kemuri-_9
17th September 2008, 20:34
imo there shouldn't be some raised eyebrows as lesser b-frames = faster encode. (Ok, there can be from someone who don't understand) :)

are you blind? look at his first two outputs: they're both on 16 bframes, the first on b-adapt 1, the second on b-adapt 2, the 2nd (b-adapt 2) is faster.

and then the b-adapt 2 w/ 5 bframes was slower than the b-adapt 2 w/ 16 bframes
that shouldn't happen either.

Quark.Fusion
17th September 2008, 20:36
b-adapt 1 (2 pass encode with turbo)
x264 [info]: slice B:8935

b-adapt 2 (otherwise same settings)
x264 [info]: slice B:5918who is blind? :)

Quark.Fusion
17th September 2008, 20:43
But why --b-frames 5 is slower that --b-frames 16 is interesting, I think it is source-dependant — maybe Dark Shikari can answer?

DarkZell666
17th September 2008, 20:46
The B-frame distribution is vastly different, and the source is anime. This might account for the wierd fps differences, but it's still contrary to what was announced by Dark Shikari weeks ago.
Maybe he was talking about a typical movie DVD-rip usecase implicitely ... ? :)

Edit : I think I'll have a try myself in fact ...

DarkZell666
17th September 2008, 21:35
Well, results were consistent for me even on an anime source (Edit : using x264 r979 from x264.nl) :

Z:\data>encode2

Z:\data>SET OPTS=-r 16 --mixed-refs --b-rdo --bime --weightb --subme 7

Z:\data>SET OPTS2= -t 2 -8 --me umh --psy-rd 0.8:0.8 --thread-input --threads 6 --progress

Z:\data>x264.979.exe -r 16 --mixed-refs --b-rdo --bime --weightb --subme 7 -t 2 -8 --me umh --psy-rd 0.8:0.8 --thread-input --threads 6 --progress --pa
ss 1 --b-adapt 1 --bframes 5 --bitrate 784 --stats x264_anime_1_5.stats --output NUL anime.avs
avis [info]: 704x396 @ 23.98 fps (3001 frames)
x264 [warning]: width or height not divisible by 16 (704x396), compression will suffer.
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4 Cache64
x264 [info]: slice I:26 Avg QP:15.23 size: 41329 PSNR Mean Y:49.88 U:56.31 V:56.39 Avg:51.11 Global:49.25
x264 [info]: slice P:1353 Avg QP:16.80 size: 6874 PSNR Mean Y:45.94 U:52.22 V:52.44 Avg:47.20 Global:46.10
x264 [info]: slice B:1622 Avg QP:17.26 size: 1923 PSNR Mean Y:45.93 U:52.68 V:52.89 Avg:47.22 Global:45.90
x264 [info]: consecutive B-frames: 25.5% 15.8% 7.2% 9.7% 9.4% 32.5%
x264 [info]: mb I I16..4..PCM: 17.8% 39.7% 42.5% 0.0%
x264 [info]: mb P I16..4..PCM: 3.1% 7.2% 2.2% 0.0% P16..4: 44.1% 7.5% 10.0% 0.0% 0.0% skip:25.9%
x264 [info]: mb B I16..4..PCM: 0.3% 1.9% 0.8% 0.0% B16..8: 24.1% 1.0% 1.6% direct: 3.6% skip:66.8% L0:47.8% L1:45.9% BI: 6.3%
x264 [info]: final ratefactor: 19.22
x264 [info]: 8x8 transform intra:56.6% inter:30.1%
x264 [info]: ref P L0 75.9% 10.2% 4.2% 2.4% 1.4% 1.4% 0.8% 0.7% 0.5% 0.5% 0.3% 0.4% 0.3% 0.4% 0.2% 0.2%
x264 [info]: ref B L0 78.0% 7.1% 4.5% 2.0% 1.7% 1.2% 1.2% 0.7% 0.7% 0.6% 0.5% 0.4% 0.5% 0.4% 0.5%
x264 [info]: SSIM Mean Y:0.9942085
x264 [info]: PSNR Mean Y:45.966 U:52.506 V:52.719 Avg:47.247 Global:46.010 kb/s:862.46

encoded 3001 frames, 29.62 fps, 862.56 kb/s

Z:\data>x264.979.exe -r 16 --mixed-refs --b-rdo --bime --weightb --subme 7 -t 2 -8 --me umh --psy-rd 0.8:0.8 --thread-input --threads 6 --progress --pa
ss 1 --b-adapt 2 --bframes 5 --bitrate 784 --stats x264_anime_2_5.stats --output NUL anime.avs
avis [info]: 704x396 @ 23.98 fps (3001 frames)
x264 [warning]: width or height not divisible by 16 (704x396), compression will suffer.
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4 Cache64
x264 [info]: slice I:26 Avg QP:15.15 size: 41581 PSNR Mean Y:49.99 U:56.31 V:56.38 Avg:51.22 Global:49.25
x264 [info]: slice P:1606 Avg QP:15.62 size: 5975 PSNR Mean Y:46.64 U:52.91 V:53.16 Avg:47.90 Global:46.77
x264 [info]: slice B:1369 Avg QP:18.74 size: 1889 PSNR Mean Y:45.32 U:52.21 V:52.33 Avg:46.62 Global:45.22
x264 [info]: consecutive B-frames: 25.4% 35.0% 22.5% 7.0% 4.0% 6.1%
x264 [info]: mb I I16..4..PCM: 17.7% 39.7% 42.7% 0.0%
x264 [info]: mb P I16..4..PCM: 2.3% 5.5% 2.1% 0.0% P16..4: 45.0% 6.2% 8.5% 0.0% 0.0% skip:30.3%
x264 [info]: mb B I16..4..PCM: 0.6% 1.9% 0.5% 0.0% B16..8: 24.3% 1.0% 1.5% direct: 3.6% skip:66.7% L0:45.1% L1:46.9% BI: 8.0%
x264 [info]: final ratefactor: 19.15
x264 [info]: 8x8 transform intra:55.0% inter:28.6%
x264 [info]: ref P L0 81.8% 7.4% 3.5% 1.7% 1.1% 1.0% 0.8% 0.5% 0.4% 0.4% 0.3% 0.2% 0.2% 0.2% 0.2% 0.1%
x264 [info]: ref B L0 76.6% 9.1% 4.4% 2.1% 1.9% 1.2% 1.1% 0.7% 0.6% 0.5% 0.5% 0.4% 0.4% 0.3% 0.3%
x264 [info]: SSIM Mean Y:0.9942401
x264 [info]: PSNR Mean Y:46.065 U:52.620 V:52.810 Avg:47.346 Global:46.007 kb/s:847.72

encoded 3001 frames, 27.58 fps, 847.83 kb/s

Z:\data>x264.979.exe -r 16 --mixed-refs --b-rdo --bime --weightb --subme 7 -t 2 -8 --me umh --psy-rd 0.8:0.8 --thread-input --threads 6 --progress --pa
ss 1 --b-adapt 1 --bframes 16 --bitrate 784 --stats x264_anime_1_16.stats --output NUL anime.avs
avis [info]: 704x396 @ 23.98 fps (3001 frames)
x264 [warning]: width or height not divisible by 16 (704x396), compression will suffer.
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4 Cache64
x264 [info]: slice I:26 Avg QP:15.24 size: 41270 PSNR Mean Y:49.87 U:56.33 V:56.38 Avg:51.11 Global:49.24
x264 [info]: slice P:1297 Avg QP:17.02 size: 7078 PSNR Mean Y:45.81 U:52.13 V:52.33 Avg:47.08 Global:46.00
x264 [info]: slice B:1678 Avg QP:17.24 size: 1938 PSNR Mean Y:45.93 U:52.67 V:52.86 Avg:47.22 Global:45.94
x264 [info]: consecutive B-frames: 24.7% 15.7% 6.9% 9.9% 9.4% 10.5% 11.1% 1.9% 1.8% 1.7% 0.7% 1.2% 0.9% 1.4% 0.0% 1.1% 1.1%
x264 [info]: mb I I16..4..PCM: 17.8% 39.6% 42.6% 0.0%
x264 [info]: mb P I16..4..PCM: 3.3% 7.5% 2.3% 0.0% P16..4: 43.4% 7.8% 10.3% 0.0% 0.0% skip:25.5%
x264 [info]: mb B I16..4..PCM: 0.3% 1.8% 0.7% 0.0% B16..8: 24.6% 1.0% 1.7% direct: 3.8% skip:66.0% L0:48.3% L1:45.4% BI: 6.3%
x264 [info]: final ratefactor: 19.18
x264 [info]: 8x8 transform intra:56.7% inter:30.3%
x264 [info]: ref P L0 75.3% 10.5% 4.3% 2.5% 1.5% 1.5% 0.9% 0.7% 0.5% 0.6% 0.3% 0.4% 0.3% 0.4% 0.2% 0.2%
x264 [info]: ref B L0 78.2% 7.1% 4.4% 2.1% 1.7% 1.2% 1.1% 0.7% 0.6% 0.5% 0.6% 0.4% 0.4% 0.4% 0.4%
x264 [info]: SSIM Mean Y:0.9941755
x264 [info]: PSNR Mean Y:45.915 U:52.469 V:52.660 Avg:47.195 Global:45.985 kb/s:863.15

encoded 3001 frames, 30.73 fps, 863.25 kb/s

Z:\data>x264.979.exe -r 16 --mixed-refs --b-rdo --bime --weightb --subme 7 -t 2 -8 --me umh --psy-rd 0.8:0.8 --thread-input --threads 6 --progress --pa
ss 1 --b-adapt 2 --bframes 16 --bitrate 784 --stats x264_anime_2_16.stats --output NUL anime.avs
avis [info]: 704x396 @ 23.98 fps (3001 frames)
x264 [warning]: width or height not divisible by 16 (704x396), compression will suffer.
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4 Cache64
x264 [info]: slice I:26 Avg QP:15.18 size: 41497 PSNR Mean Y:49.97 U:56.32 V:56.39 Avg:51.20 Global:49.24
x264 [info]: slice P:1531 Avg QP:15.59 size: 6041 PSNR Mean Y:46.66 U:52.91 V:53.18 Avg:47.92 Global:46.77
x264 [info]: slice B:1444 Avg QP:18.62 size: 2035 PSNR Mean Y:45.23 U:52.09 V:52.23 Avg:46.53 Global:45.15
x264 [info]: consecutive B-frames: 24.8% 33.5% 18.7% 6.7% 2.2% 0.4% 4.9% 0.8% 1.5% 2.4% 0.4% 0.0% 2.6% 0.0% 0.0% 0.5% 0.6%
x264 [info]: mb I I16..4..PCM: 17.9% 39.7% 42.5% 0.0%
x264 [info]: mb P I16..4..PCM: 2.4% 5.8% 2.1% 0.0% P16..4: 44.8% 6.2% 8.4% 0.0% 0.0% skip:30.4%
x264 [info]: mb B I16..4..PCM: 0.6% 1.8% 0.5% 0.0% B16..8: 25.0% 1.1% 1.8% direct: 3.9% skip:65.3% L0:45.0% L1:46.6% BI: 8.5%
x264 [info]: final ratefactor: 19.16
x264 [info]: 8x8 transform intra:55.0% inter:28.9%
x264 [info]: ref P L0 83.9% 6.4% 3.3% 1.5% 1.2% 0.8% 0.7% 0.4% 0.4% 0.3% 0.3% 0.2% 0.2% 0.2% 0.1% 0.1%
x264 [info]: ref B L0 74.3% 10.3% 6.0% 2.3% 1.8% 1.1% 0.9% 0.6% 0.6% 0.5% 0.4% 0.4% 0.3% 0.3% 0.3%
x264 [info]: SSIM Mean Y:0.9941612
x264 [info]: PSNR Mean Y:45.998 U:52.543 V:52.752 Avg:47.279 Global:45.925 kb/s:847.84

encoded 3001 frames, 14.07 fps, 847.94 kb/s
Z:\data>

kemuri-_9
17th September 2008, 22:54
Quote:
b-adapt 1 (2 pass encode with turbo)
x264 [info]: slice B:8935

b-adapt 2 (otherwise same settings)
x264 [info]: slice B:5918

who is blind? :)

i was talking about the speed of the encodes in respect to each other,
not the number of resulting bframes at all... pay attention plz kthx.

thanks for the confirmation of speeds DarkZell666 - they're at how they're supposed to be.

kemuri-_9
18th September 2008, 04:26
here comes some of the comparisons that finished:

x264_r977 --pass 1 --bitrate 784 --stats x264.stats --min-keyint 1 --keyint 500 --scenecut 50 --ref 16 --mixed-refs
--deblock 0:0 --no-fast-pskip --b-adapt _x_ --bframes _y_ --b-bias 0 --b-pyramid --b-rdo --bime --weightb
--direct auto --subme 7 --direct-8x8 -1 --trellis 2 --analyse all --8x8dct --qpmin 1 --qpmax 51 --qpstep 60
--pbratio 1.4 --ratetol 100.0 --qcomp 0.6 --me umh --merange 32 --psy-rd 0.0:0.0 --thread-input --threads 4
--progress --no-dct-decimate --level 5.1 --log-file x264.1pass.log --output NUL open_lossless.avs


b-adapt 1, bframes 2:

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:347 Avg QP:13.29 size: 23913 PSNR Mean Y:51.27 U:53.50 V:53.62 Avg:51.71 Global:49.75
x264 [info]: slice P:23467 Avg QP:15.53 size: 4651 PSNR Mean Y:48.18 U:50.77 V:51.00 Avg:48.86 Global:48.05
x264 [info]: slice B:5917 Avg QP:22.05 size: 488 PSNR Mean Y:47.86 U:51.18 V:51.50 Avg:48.69 Global:46.72
x264 [info]: consecutive B-frames: 67.2% 10.3% 22.5%
x264 [info]: mb I I16..4: 33.0% 32.9% 34.1%
x264 [info]: mb P I16..4: 3.3% 5.2% 1.3% P16..4: 55.8% 8.3% 8.2% 0.0% 0.0% skip:18.0%
x264 [info]: mb B I16..4: 0.1% 0.1% 0.0% B16..8: 24.1% 0.1% 0.1% direct: 0.4% skip:75.0% L0:42.0% L1:57.1% BI: 0.9%
x264 [info]: final ratefactor: 22.44
x264 [info]: 8x8 transform intra:50.5% inter:54.1%
x264 [info]: direct mvs spatial:97.9% temporal:2.1%
x264 [info]: ref P L0 71.4% 8.2% 5.6% 2.2% 2.0% 1.9% 1.7% 0.8% 0.9% 0.8% 0.8% 0.8% 0.8% 0.7% 0.8% 0.5%
x264 [info]: ref B L0 84.6% 6.8% 3.1% 1.0% 0.9% 0.8% 0.6% 0.3% 0.3% 0.3% 0.3% 0.2% 0.2% 0.2% 0.2%
x264 [info]: ref B L1 94.3% 5.7%
x264 [info]: SSIM Mean Y:0.9903959
x264 [info]: PSNR Mean Y:48.151 U:50.887 V:51.133 Avg:48.857 Global:47.764 kb/s:776.30
x264 [info]: encoded 29731 frames, 9.63 fps, 776.30 kb/s


b-adapt 2, bframes 2:

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:346 Avg QP:13.17 size: 24596 PSNR Mean Y:51.34 U:53.53 V:53.69 Avg:51.76 Global:49.83
x264 [info]: slice P:18736 Avg QP:14.90 size: 5582 PSNR Mean Y:49.02 U:51.44 V:51.68 Avg:49.66 Global:48.37
x264 [info]: slice B:10649 Avg QP:20.38 size: 667 PSNR Mean Y:47.02 U:50.10 V:50.34 Avg:47.80 Global:47.23
x264 [info]: consecutive B-frames: 42.8% 11.3% 45.9%
x264 [info]: mb I I16..4: 32.7% 32.5% 34.8%
x264 [info]: mb P I16..4: 3.6% 5.7% 1.6% P16..4: 55.6% 9.5% 9.2% 0.0% 0.0% skip:14.8%
x264 [info]: mb B I16..4: 0.5% 0.6% 0.1% B16..8: 23.4% 0.2% 0.2% direct: 1.0% skip:74.0% L0:51.3% L1:47.5% BI: 1.2%
x264 [info]: final ratefactor: 21.52
x264 [info]: 8x8 transform intra:49.5% inter:51.6%
x264 [info]: direct mvs spatial:99.6% temporal:0.4%
x264 [info]: ref P L0 67.7% 9.5% 6.0% 2.6% 2.3% 2.0% 2.0% 1.0% 1.0% 0.9% 0.9% 0.9% 0.9% 0.8% 0.9% 0.6%
x264 [info]: ref B L0 83.9% 7.1% 3.0% 1.2% 0.9% 0.8% 0.6% 0.4% 0.4% 0.3% 0.3% 0.3% 0.3% 0.3% 0.2%
x264 [info]: ref B L1 94.9% 5.1%
x264 [info]: SSIM Mean Y:0.9906227
x264 [info]: PSNR Mean Y:48.332 U:50.983 V:51.226 Avg:49.020 Global:47.937 kb/s:775.41
x264 [info]: encoded 29731 frames, 9.47 fps, 775.41 kb/s



b-adapt 1, bframes 3:

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:347 Avg QP:13.35 size: 23773 PSNR Mean Y:51.22 U:53.48 V:53.59 Avg:51.67 Global:49.71
x264 [info]: slice P:22766 Avg QP:15.43 size: 4759 PSNR Mean Y:48.19 U:50.76 V:50.98 Avg:48.86 Global:48.10
x264 [info]: slice B:6618 Avg QP:21.99 size: 553 PSNR Mean Y:47.80 U:51.15 V:51.47 Avg:48.61 Global:46.67
x264 [info]: consecutive B-frames: 66.0% 10.2% 5.2% 18.6%
x264 [info]: mb I I16..4: 33.0% 33.2% 33.8%
x264 [info]: mb P I16..4: 3.4% 5.3% 1.3% P16..4: 55.7% 8.4% 8.4% 0.0% 0.0% skip:17.4%
x264 [info]: mb B I16..4: 0.1% 0.1% 0.0% B16..8: 27.4% 0.2% 0.2% direct: 0.4% skip:71.5% L0:39.2% L1:59.8% BI: 0.9%
x264 [info]: final ratefactor: 22.36
x264 [info]: 8x8 transform intra:50.6% inter:53.9%
x264 [info]: direct mvs spatial:98.0% temporal:2.0%
x264 [info]: ref P L0 72.1% 7.9% 5.4% 2.2% 1.9% 1.8% 1.7% 0.9% 0.9% 0.8% 0.8% 0.8% 0.7% 0.7% 0.8% 0.5%
x264 [info]: ref B L0 83.2% 6.6% 3.3% 1.4% 1.0% 0.8% 0.8% 0.5% 0.4% 0.3% 0.3% 0.4% 0.3% 0.3% 0.3%
x264 [info]: ref B L1 97.4% 2.6%
x264 [info]: SSIM Mean Y:0.9903856
x264 [info]: PSNR Mean Y:48.137 U:50.874 V:51.119 Avg:48.837 Global:47.754 kb/s:775.81
x264 [info]: encoded 29731 frames, 9.44 fps, 775.81 kb/s


b-adapt 2, bframes 3:

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:346 Avg QP:13.16 size: 24688 PSNR Mean Y:51.35 U:53.54 V:53.70 Avg:51.76 Global:49.82
x264 [info]: slice P:18440 Avg QP:14.82 size: 5641 PSNR Mean Y:49.09 U:51.48 V:51.72 Avg:49.72 Global:48.42
x264 [info]: slice B:10945 Avg QP:20.38 size: 687 PSNR Mean Y:46.97 U:50.07 V:50.31 Avg:47.75 Global:47.17
x264 [info]: consecutive B-frames: 42.5% 10.2% 39.8% 7.5%
x264 [info]: mb I I16..4: 32.8% 32.5% 34.7%
x264 [info]: mb P I16..4: 3.6% 5.7% 1.7% P16..4: 55.4% 9.5% 9.3% 0.0% 0.0% skip:14.7%
x264 [info]: mb B I16..4: 0.5% 0.6% 0.1% B16..8: 24.2% 0.2% 0.2% direct: 1.1% skip:73.1% L0:51.2% L1:47.6% BI: 1.2%
x264 [info]: final ratefactor: 21.46
x264 [info]: 8x8 transform intra:49.4% inter:51.4%
x264 [info]: direct mvs spatial:99.5% temporal:0.5%
x264 [info]: ref P L0 67.9% 9.3% 6.0% 2.6% 2.2% 2.0% 2.0% 1.0% 1.0% 0.9% 0.9% 0.9% 0.9% 0.8% 0.9% 0.6%
x264 [info]: ref B L0 84.0% 7.4% 2.6% 1.2% 0.9% 0.7% 0.7% 0.4% 0.4% 0.3% 0.3% 0.3% 0.3% 0.2% 0.2%
x264 [info]: ref B L1 95.8% 4.2%
x264 [info]: SSIM Mean Y:0.9906133
x264 [info]: PSNR Mean Y:48.333 U:50.985 V:51.224 Avg:49.021 Global:47.928 kb/s:774.72
x264 [info]: encoded 29731 frames, 9.08 fps, 774.72 kb/s



b-adapt 1, bframes 4:

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:347 Avg QP:13.37 size: 23730 PSNR Mean Y:51.20 U:53.45 V:53.58 Avg:51.65 Global:49.70
x264 [info]: slice P:22440 Avg QP:15.37 size: 4817 PSNR Mean Y:48.19 U:50.75 V:50.97 Avg:48.86 Global:48.13
x264 [info]: slice B:6944 Avg QP:22.13 size: 531 PSNR Mean Y:47.84 U:51.15 V:51.49 Avg:48.65 Global:46.66
x264 [info]: consecutive B-frames: 65.4% 10.2% 5.3% 5.4% 13.7%
x264 [info]: mb I I16..4: 32.9% 33.3% 33.8%
x264 [info]: mb P I16..4: 3.4% 5.4% 1.3% P16..4: 55.7% 8.5% 8.4% 0.0% 0.0% skip:17.2%
x264 [info]: mb B I16..4: 0.1% 0.1% 0.0% B16..8: 23.9% 0.2% 0.2% direct: 0.5% skip:75.0% L0:42.6% L1:56.3% BI: 1.1%
x264 [info]: final ratefactor: 22.31
x264 [info]: 8x8 transform intra:50.7% inter:53.9%
x264 [info]: direct mvs spatial:98.0% temporal:2.0%
x264 [info]: ref P L0 72.3% 8.0% 5.3% 2.1% 1.9% 1.8% 1.7% 0.8% 0.9% 0.8% 0.8% 0.8% 0.7% 0.7% 0.8% 0.5%
x264 [info]: ref B L0 81.5% 7.5% 3.6% 1.4% 1.1% 0.9% 0.9% 0.5% 0.4% 0.4% 0.4% 0.4% 0.4% 0.3% 0.3%
x264 [info]: ref B L1 96.2% 3.8%
x264 [info]: SSIM Mean Y:0.9903619
x264 [info]: PSNR Mean Y:48.147 U:50.875 V:51.125 Avg:48.845 Global:47.752 kb/s:774.24
x264 [info]: encoded 29731 frames, 9.48 fps, 774.24 kb/s


b-adapt 2, bframes 4:

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:346 Avg QP:13.17 size: 24672 PSNR Mean Y:51.34 U:53.54 V:53.70 Avg:51.76 Global:49.82
x264 [info]: slice P:18328 Avg QP:14.79 size: 5658 PSNR Mean Y:49.10 U:51.49 V:51.73 Avg:49.74 Global:48.43
x264 [info]: slice B:11057 Avg QP:20.37 size: 689 PSNR Mean Y:46.97 U:50.07 V:50.32 Avg:47.76 Global:47.17
x264 [info]: consecutive B-frames: 42.3% 9.5% 40.8% 4.0% 3.3%
x264 [info]: mb I I16..4: 32.8% 32.5% 34.8%
x264 [info]: mb P I16..4: 3.6% 5.7% 1.7% P16..4: 55.4% 9.5% 9.3% 0.0% 0.0% skip:14.7%
x264 [info]: mb B I16..4: 0.5% 0.6% 0.1% B16..8: 23.9% 0.2% 0.2% direct: 1.1% skip:73.4% L0:51.2% L1:47.6% BI: 1.2%
x264 [info]: final ratefactor: 21.43
x264 [info]: 8x8 transform intra:49.3% inter:51.3%
x264 [info]: direct mvs spatial:99.8% temporal:0.2%
x264 [info]: ref P L0 68.0% 9.4% 6.0% 2.5% 2.2% 2.0% 2.0% 1.0% 1.0% 0.9% 0.9% 0.9% 0.9% 0.8% 0.9% 0.6%
x264 [info]: ref B L0 83.3% 7.4% 2.9% 1.2% 1.0% 0.8% 0.7% 0.4% 0.4% 0.3% 0.4% 0.4% 0.3% 0.3% 0.2%
x264 [info]: ref B L1 94.4% 5.6%
x264 [info]: SSIM Mean Y:0.9906084
x264 [info]: PSNR Mean Y:48.335 U:50.984 V:51.225 Avg:49.023 Global:47.929 kb/s:773.22
x264 [info]: encoded 29731 frames, 8.65 fps, 773.22 kb/s


sets for 5 and 6 bframes still going, will post after i wake up.

qyqgpower
18th September 2008, 06:01
SSIM keeps dropping while bframes being increased.
b-adapt 1
bframes 2: 0.9903959
bframes 3: 0.9903856
bframes 4: 0.9903619
bframes 16: 0.9903609

b-adapt 2
bframes 2: 0.9906227
bframes 3: 0.9906133
bframes 4: 0.9906084
bframes 16: 0.9905993

From what I've learned, SSIM reflects more subjective quality than PSNR. So you get worse quality at same bitrate(2pass mode) with more bframes?

And why b-adapt 2 produce lower QP, larger size of bframes with lower PSNR than b-adapt 1?
x264 [info]: slice B:7120 Avg QP:21.99 size: 538 PSNR Mean Y:48.05 U:51.28 V:51.60 Avg:48.77 Global:46.70
x264 [info]: slice B:11211 Avg QP:20.38 size: 697 PSNR Mean Y:47.00 U:50.10 V:50.35 Avg:47.78 Global:47.14

Sagekilla
18th September 2008, 06:12
With more bframes is the bitrate being decreased? And what of PSNR for the different values? You have to realize that B's are typically encoded with a higher quant than a P or I frame, so that could be the reason for the slightly lower SSIM. Plus, that difference is too little to be anything of note. If you're seeing 0.99 --> 0.98 decrease, we have huge issues.

IgorC
18th September 2008, 06:54
SSIM keeps dropping while bframes being increased.
b-adapt 1
bframes 2: 0.9903959
bframes 3: 0.9903856
bframes 4: 0.9903619
bframes 16: 0.9903609

b-adapt 2
bframes 2: 0.9906227
bframes 3: 0.9906133
bframes 4: 0.9906084
bframes 16: 0.9905993

From what I've learned, SSIM reflects more subjective quality than PSNR. So you get worse quality at same bitrate(2pass mode) with more bframes?

And why b-adapt 2 produce lower QP, larger size of bframes with lower PSNR than b-adapt 1?
x264 [info]: slice B:7120 Avg QP:21.99 size: 538 PSNR Mean Y:48.05 U:51.28 V:51.60 Avg:48.77 Global:46.70
x264 [info]: slice B:11211 Avg QP:20.38 size: 697 PSNR Mean Y:47.00 U:50.10 V:50.35 Avg:47.78 Global:47.14
Looking at ssim result maybe bitrate is enough high and b-frames are rather harlmless. And the difference in ssim values isn't relevant.

Sagekilla
18th September 2008, 06:59
The difference in SSIM falls within the range of inaccuracy -- the 3 ending digits aren't too particularly useful for comparison.

G_M_C
18th September 2008, 07:12
@ DarkZell666;
What/whose x264-build are you using ?

DarkZell666
18th September 2008, 08:33
@ DarkZell666;
What/whose x264-build are you using ?



Ooops, good question, it's the r979 from x264.nl :)
(Post edited accordingly)

Quark.Fusion
18th September 2008, 08:37
SSIM keeps dropping while bframes being increased.
b-adapt 1
bframes 2: 0.9903959
bframes 3: 0.9903856
bframes 4: 0.9903619
bframes 16: 0.9903609

b-adapt 2
bframes 2: 0.9906227
bframes 3: 0.9906133
bframes 4: 0.9906084
bframes 16: 0.9905993

From what I've learned, SSIM reflects more subjective quality than PSNR. So you get worse quality at same bitrate(2pass mode) with more bframes?

And why b-adapt 2 produce lower QP, larger size of bframes with lower PSNR than b-adapt 1?
x264 [info]: slice B:7120 Avg QP:21.99 size: 538 PSNR Mean Y:48.05 U:51.28 V:51.60 Avg:48.77 Global:46.70
x264 [info]: slice B:11211 Avg QP:20.38 size: 697 PSNR Mean Y:47.00 U:50.10 V:50.35 Avg:47.78 Global:47.14
SSIM is almost the same, b-adapt slightly better.
Maybe b-adapt 2 produces more pyramids, they get lower QP, p-frames also get lower QP that b-frames.
Global PSNR is higher and PSNR is more useless that SSIM.

Quark.Fusion
18th September 2008, 08:45
As I didn't found dedicated b-pyramids thread can I request --bpratio switch to control b-pyramid QP here?

Soichiro
18th September 2008, 10:33
A bit late, but regarding the speed of the test encodes posted on the previous page, they're all the same/similar because those were 2nd pass stats, thus, b-adapt type wouldn't have any effect on the speed.

Audionut
18th September 2008, 11:18
here comes some of the comparisons that finished......

sets for 5 and 6 bframes still going, will post after i wake up.

Thanks.

qyqgpower
18th September 2008, 13:35
Another suggestion: since in 2pass mode, the result of b-adapt 2 is largely affected by the quality of 1st pass, and none of us(at least I think so:)) want to waste time on 1st pass.
We should find out a optimal 1st pass setting, which let b-adapt2 make ideal frame decision, without sacrifice more speed on unnecessary options.
It can be called "Turbo 1st pass for b-adapt 2" or something else ;)

kemuri-_9
18th September 2008, 13:35
b-adapt 1, bframes 5:

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:347 Avg QP:13.37 size: 23770 PSNR Mean Y:51.21 U:53.45 V:53.58 Avg:51.65 Global:49.71
x264 [info]: slice P:22314 Avg QP:15.36 size: 4844 PSNR Mean Y:48.18 U:50.74 V:50.96 Avg:48.85 Global:48.13
x264 [info]: slice B:7070 Avg QP:22.09 size: 533 PSNR Mean Y:47.86 U:51.19 V:51.51 Avg:48.66 Global:46.68
x264 [info]: consecutive B-frames: 65.1% 10.2% 5.2% 5.4% 9.2% 4.9%
x264 [info]: mb I I16..4: 32.9% 33.2% 33.9%
x264 [info]: mb P I16..4: 3.4% 5.5% 1.3% P16..4: 55.7% 8.5% 8.5% 0.0% 0.0% skip:17.0%
x264 [info]: mb B I16..4: 0.1% 0.1% 0.0% B16..8: 24.0% 0.2% 0.2% direct: 0.5% skip:74.9% L0:41.9% L1:57.0% BI: 1.1%
x264 [info]: final ratefactor: 22.30
x264 [info]: 8x8 transform intra:50.6% inter:53.8%
x264 [info]: direct mvs spatial:98.1% temporal:1.9%
x264 [info]: ref P L0 72.4% 7.9% 5.2% 2.1% 1.9% 1.8% 1.7% 0.8% 0.9% 0.8% 0.8% 0.8% 0.7% 0.7% 0.8% 0.5%
x264 [info]: ref B L0 80.7% 7.8% 3.6% 1.5% 1.2% 1.0% 0.9% 0.6% 0.5% 0.4% 0.4% 0.4% 0.4% 0.4% 0.3%
x264 [info]: ref B L1 96.3% 3.7%
x264 [info]: SSIM Mean Y:0.9903629
x264 [info]: PSNR Mean Y:48.141 U:50.875 V:51.122 Avg:48.839 Global:47.752 kb/s:774.78
x264 [info]: encoded 29731 frames, 9.50 fps, 774.78 kb/s


b-adapt 2, bframes 5:

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:346 Avg QP:13.17 size: 24704 PSNR Mean Y:51.34 U:53.55 V:53.70 Avg:51.76 Global:49.81
x264 [info]: slice P:18279 Avg QP:14.78 size: 5670 PSNR Mean Y:49.12 U:51.50 V:51.74 Avg:49.75 Global:48.44
x264 [info]: slice B:11106 Avg QP:20.40 size: 688 PSNR Mean Y:46.95 U:50.06 V:50.30 Avg:47.74 Global:47.15
x264 [info]: consecutive B-frames: 42.3% 9.6% 40.2% 3.8% 2.1% 2.0%
x264 [info]: mb I I16..4: 32.8% 32.5% 34.7%
x264 [info]: mb P I16..4: 3.6% 5.7% 1.7% P16..4: 55.4% 9.6% 9.4% 0.0% 0.0% skip:14.7%
x264 [info]: mb B I16..4: 0.5% 0.6% 0.1% B16..8: 23.8% 0.2% 0.2% direct: 1.1% skip:73.4% L0:51.1% L1:47.7% BI: 1.2%
x264 [info]: final ratefactor: 21.42
x264 [info]: 8x8 transform intra:49.3% inter:51.2%
x264 [info]: direct mvs spatial:99.8% temporal:0.2%
x264 [info]: ref P L0 68.1% 9.3% 5.9% 2.5% 2.2% 2.0% 2.0% 1.0% 1.0% 0.9% 0.9% 0.9% 0.9% 0.8% 0.9% 0.6%
x264 [info]: ref B L0 83.1% 7.6% 2.9% 1.2% 1.0% 0.8% 0.7% 0.5% 0.4% 0.3% 0.4% 0.4% 0.3% 0.3% 0.2%
x264 [info]: ref B L1 95.0% 5.0%
x264 [info]: SSIM Mean Y:0.9906032
x264 [info]: PSNR Mean Y:48.333 U:50.986 V:51.226 Avg:49.021 Global:47.922 kb/s:773.08
x264 [info]: encoded 29731 frames, 8.47 fps, 773.08 kb/s


b-adapt 1, bframes 6:

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:347 Avg QP:13.35 size: 23794 PSNR Mean Y:51.22 U:53.48 V:53.59 Avg:51.66 Global:49.71
x264 [info]: slice P:22301 Avg QP:15.36 size: 4846 PSNR Mean Y:48.17 U:50.72 V:50.94 Avg:48.83 Global:48.13
x264 [info]: slice B:7083 Avg QP:22.06 size: 534 PSNR Mean Y:47.92 U:51.23 V:51.56 Avg:48.72 Global:46.68
x264 [info]: consecutive B-frames: 65.1% 10.2% 5.2% 5.4% 9.2% 3.9% 1.0%
x264 [info]: mb I I16..4: 32.8% 33.2% 34.0%
x264 [info]: mb P I16..4: 3.4% 5.5% 1.4% P16..4: 55.8% 8.5% 8.5% 0.0% 0.0% skip:17.0%
x264 [info]: mb B I16..4: 0.1% 0.1% 0.0% B16..8: 24.0% 0.2% 0.2% direct: 0.6% skip:74.8% L0:41.9% L1:57.1% BI: 1.1%
x264 [info]: final ratefactor: 22.30
x264 [info]: 8x8 transform intra:50.6% inter:53.8%
x264 [info]: direct mvs spatial:98.0% temporal:2.0%
x264 [info]: ref P L0 72.4% 7.9% 5.2% 2.1% 1.9% 1.8% 1.7% 0.8% 0.9% 0.8% 0.8% 0.8% 0.7% 0.7% 0.8% 0.5%
x264 [info]: ref B L0 80.6% 7.8% 3.7% 1.5% 1.2% 1.0% 0.9% 0.6% 0.5% 0.4% 0.4% 0.5% 0.4% 0.4% 0.3%
x264 [info]: ref B L1 96.2% 3.8%
x264 [info]: SSIM Mean Y:0.9903634
x264 [info]: PSNR Mean Y:48.143 U:50.870 V:51.119 Avg:48.841 Global:47.753 kb/s:774.93
x264 [info]: encoded 29731 frames, 9.64 fps, 774.93 kb/s


b-adapt 2, bframes 6:

x264 [info]: using cpu capabilities: MMX2 SSE2Fast
x264 [info]: slice I:346 Avg QP:13.16 size: 24736 PSNR Mean Y:51.35 U:53.55 V:53.71 Avg:51.76 Global:49.82
x264 [info]: slice P:18244 Avg QP:14.77 size: 5678 PSNR Mean Y:49.12 U:51.50 V:51.74 Avg:49.75 Global:48.45
x264 [info]: slice B:11141 Avg QP:20.39 size: 693 PSNR Mean Y:46.95 U:50.06 V:50.31 Avg:47.74 Global:47.14
x264 [info]: consecutive B-frames: 42.3% 9.5% 40.0% 3.4% 2.3% 1.0% 1.6%
x264 [info]: mb I I16..4: 32.8% 32.5% 34.8%
x264 [info]: mb P I16..4: 3.6% 5.7% 1.7% P16..4: 55.4% 9.6% 9.4% 0.0% 0.0% skip:14.6%
x264 [info]: mb B I16..4: 0.5% 0.6% 0.1% B16..8: 23.8% 0.2% 0.2% direct: 1.1% skip:73.4% L0:51.2% L1:47.5% BI: 1.2%
x264 [info]: final ratefactor: 21.41
x264 [info]: 8x8 transform intra:49.3% inter:51.3%
x264 [info]: direct mvs spatial:99.8% temporal:0.2%
x264 [info]: ref P L0 68.1% 9.4% 5.9% 2.5% 2.2% 2.0% 2.0% 1.0% 1.0% 0.9% 0.9% 0.9% 0.9% 0.8% 0.9% 0.6%
x264 [info]: ref B L0 83.4% 7.5% 2.7% 1.3% 1.0% 0.8% 0.7% 0.5% 0.4% 0.3% 0.4% 0.3% 0.3% 0.3% 0.2%
x264 [info]: ref B L1 94.2% 5.8%
x264 [info]: SSIM Mean Y:0.9906044
x264 [info]: PSNR Mean Y:48.334 U:50.986 V:51.227 Avg:49.022 Global:47.923 kb/s:773.29
x264 [info]: encoded 29731 frames, 8.47 fps, 773.29 kb/s


and for what everyone has already been discussing, the general trend analaysis (and a response):
With more bframes is the bitrate being decreased? And what of PSNR for the different values? You have to realize that B's are typically encoded with a higher quant than a P or I frame, so that could be the reason for the slightly lower SSIM. Plus, that difference is too little to be anything of note. If you're seeing 0.99 --> 0.98 decrease, we have huge issues.

since in my options i told x264 it could fiddle with the average bitrate as it encoded it was allowed to fluctuate as it was churning each time. (see --ratetol 100)
and the general trend is that with more b-frames the bitrate is dropping with having lower qps (higher quality) (see QP averages and final ratefactor)
b-adapt 2 is totally kicking b-adapt 1's butt in Avg QPs and still having a little lower average bitrate.

comparing the b-adapt 1 w/ 16 bframes against the b-adapt 2 even w/ only 2 bframes,
b-adapt 2 has significantly lower average QPs even with a drop in 14 max bframes.
the quality is much better even with taking the small average bitrate adjustment into account

audyovydeo
18th September 2008, 13:41
comparing the b-adapt 1 w/ 16 bframes against the b-adapt 2 even w/ only 2 bframes

can you post the speeds you got with these two settings ?
personally I consider speed as part of the "sacred encoding trilogy".


thanks
a/v

kemuri-_9
18th September 2008, 14:05
can you post the speeds you got with these two settings ?
personally I consider speed as part of the "sacred encoding trilogy".

thanks
a/v

the encoding fps rates are included in the postings
see the last x264 [info]: line for each block of output

audyovydeo
18th September 2008, 14:16
the encoding fps rates are included in the postings
see the last x264 [info]: line for each block of output

But nowhere did I see "1 w/ 16 bframes against the b-adapt 2 even w/ only 2 ", only other combinations.
Unless it was typos on your part.

cheers
a/v

kemuri-_9
18th September 2008, 14:32
But nowhere did I see "1 w/ 16 bframes against the b-adapt 2 even w/ only 2 ", only other combinations.
Unless it was typos on your part.

cheers
a/v

those posts are a bit far back now:
16 bframes: http://forum.doom9.org/showthread.php?p=1184868#post1184868
2 bframes: http://forum.doom9.org/showthread.php?p=1185229#post1185229

Audionut
18th September 2008, 16:05
Thanks kemuri-_9, I simply don't have the time to do a detailed test.

Good results. I'll have to find some time to run a few quick tests for myself