MeteorRain
10th February 2006, 10:29
Well, just spend some time testing the "--direct spatial" option.
Source is a low motion anime(Full Metal Panic Fumoffu DVD source), 23:37 long, encoded at constant qp20, ref2, b-f12.
AVS script is:
setmemorymax(10)
LoadPlugin("g:\dgmpgdec146rc1\DGDecode.dll")
LoadPlugin("g:\avs\it.dll")
MPEG2Source("main.d2v")
IT(fps=30,ref="TOP",blend=false,diMode=3)
assumefps(2997,100)
crop(4,2,-4,-0)
bicubicresize(640,480,0.3333,0.3333)
Command lines are: (SP for spatial, TP for temporal)
SP:
H:\mp4\x264.exe --qp 20 --ref 2 --bframes 12 --b-pyramid --nf --weightb --analyse all --8x8dct --ipratio 1.0 --pbratio 1.0 --me umh --mixed-refs --progress --direct spatial --no-psnr --output "%1_sp.mp4" "%1\main.avs" 2> %1.log.txt
TP:
H:\mp4\x264.exe --qp 20 --ref 2 --bframes 12 --b-pyramid --nf --weightb --analyse all --8x8dct --ipratio 1.0 --pbratio 1.0 --me umh --mixed-refs --progress --no-psnr --output "%1_tp.mp4" "%1\main.avs" 2> %1.log.txt
Final works size: (video only)
SP: 106,012 KB
TP: 109,411 KB
I did an SSIM (Structural Similarity Index Metric 0.23) test. the overall result is:
SP Average SSIM = 87.92
TP Average SSIM = 87.89
(attention: x264 target file is in mp4, so i used directshowsource("xxx.mp4"))
SSIM peak image: (100 frame per pixel)
SP:
http://bbs.manmi.com/uploadFile/2006-2/200621017531927.gif
TP:
http://bbs.manmi.com/uploadFile/2006-2/2006210175358854.gif
Here the top of the image is 1.0, the bottom is 0.95.
The green line draws from the min SSIM value to its max(peak) per 100 frame.
The red point are the average SSIM per 100 frame.
There's some frames with SSIM 0.000 (don't know why) so there are long lines.
SSIM delta image:
delta value = SP SSIM - TP SSIM
Delta image:
http://bbs.manmi.com/uploadFile/2006-2/2006210175248349.gif
here the top of the image is 0.005, the bottom is -0.005.
the red point also average.
the white line is zero line.
and zoom more:
http://bbs.manmi.com/uploadfile/2006-2/2006210175141190.gif
here the top of the image is 0.002, the bottom is -0.002.
seems that spatial b-direct works better on this kind of materials ;)
============================================================
OK, the result of episode 2.
Size:
SP: 162,952 KB
TP: 165,404 KB
Average SSIM:
SP Average SSIM = 87.93
TP Average SSIM = 87.91
SSIM peak image:
SP:
http://bbs.manmi.com/UploadFile/2006-2/2006211193912233.gif
TP:
http://bbs.manmi.com/UploadFile/2006-2/2006211193928732.gif
SSIM delta image:
http://bbs.manmi.com/UploadFile/2006-2/2006211193938983.gif
zoom more:
http://bbs.manmi.com/UploadFile/2006-2/2006211193946841.gif
x264 core:37 svn-333M (built by Sharktooth)
SP: slice I:556 Avg QP:20.00 size: 23163 PSNR Mean Y:47.67 U:49.82 V:50.24 Avg:48.23 Global:47.37
TP: slice I:556 Avg QP:20.00 size: 23173 PSNR Mean Y:47.66 U:49.83 V:50.24 Avg:48.23 Global:47.37
SP: slice P:14410 Avg QP:20.00 size: 8412 PSNR Mean Y:45.60 U:47.70 V:47.78 Avg:46.15 Global:45.84
TP: slice P:14411 Avg QP:20.00 size: 8417 PSNR Mean Y:45.59 U:47.70 V:47.78 Avg:46.14 Global:45.84
SP: slice B:27504 Avg QP:20.00 size: 1176 PSNR Mean Y:46.05 U:48.24 V:48.31 Avg:46.63 Global:46.20
TP: slice B:27503 Avg QP:20.00 size: 1264 PSNR Mean Y:46.04 U:48.23 V:48.31 Avg:46.62 Global:46.19
SP: mb I I16..4: 31.4% 32.9% 35.7%
TP: mb I I16..4: 31.4% 32.8% 35.8%
SP: mb P I16..4: 4.3% 6.5% 5.1% P16..4: 16.5% 5.9% 4.6% 1.4% 0.9% skip:54.8%
TP: mb P I16..4: 4.3% 6.5% 5.1% P16..4: 16.4% 5.9% 4.6% 1.4% 0.9% skip:54.8%
SP: mb B I16..4: 0.2% 0.3% 0.4% B16..8: 5.9% 0.4% 0.7% direct: 5.6% skip:86.5%
TP: mb B I16..4: 0.2% 0.4% 0.4% B16..8: 12.8% 0.4% 0.7% direct: 3.5% skip:81.6%
SP: 8x8 transform intra:39.0% inter:20.4%
TP: 8x8 transform intra:39.0% inter:24.6%
SP: ref P 76.0% 24.0%
TP: ref P 76.5% 23.5%
SP: ref B 74.9% 25.1%
TP: ref B 80.9% 19.1%
SP: PSNR Mean Y:45.918 U:48.074 V:48.156 Avg:46.485 Global:46.086 kb/s:939.57
TP: PSNR Mean Y:45.911 U:48.073 V:48.155 Avg:46.480 Global:46.081 kb/s:953.75
so, spatial mode works fine, better than temporal in a low-motion, mid/high resolution, mid/high quality encoding.
============================================================
discussion welcomed. ;)
Source is a low motion anime(Full Metal Panic Fumoffu DVD source), 23:37 long, encoded at constant qp20, ref2, b-f12.
AVS script is:
setmemorymax(10)
LoadPlugin("g:\dgmpgdec146rc1\DGDecode.dll")
LoadPlugin("g:\avs\it.dll")
MPEG2Source("main.d2v")
IT(fps=30,ref="TOP",blend=false,diMode=3)
assumefps(2997,100)
crop(4,2,-4,-0)
bicubicresize(640,480,0.3333,0.3333)
Command lines are: (SP for spatial, TP for temporal)
SP:
H:\mp4\x264.exe --qp 20 --ref 2 --bframes 12 --b-pyramid --nf --weightb --analyse all --8x8dct --ipratio 1.0 --pbratio 1.0 --me umh --mixed-refs --progress --direct spatial --no-psnr --output "%1_sp.mp4" "%1\main.avs" 2> %1.log.txt
TP:
H:\mp4\x264.exe --qp 20 --ref 2 --bframes 12 --b-pyramid --nf --weightb --analyse all --8x8dct --ipratio 1.0 --pbratio 1.0 --me umh --mixed-refs --progress --no-psnr --output "%1_tp.mp4" "%1\main.avs" 2> %1.log.txt
Final works size: (video only)
SP: 106,012 KB
TP: 109,411 KB
I did an SSIM (Structural Similarity Index Metric 0.23) test. the overall result is:
SP Average SSIM = 87.92
TP Average SSIM = 87.89
(attention: x264 target file is in mp4, so i used directshowsource("xxx.mp4"))
SSIM peak image: (100 frame per pixel)
SP:
http://bbs.manmi.com/uploadFile/2006-2/200621017531927.gif
TP:
http://bbs.manmi.com/uploadFile/2006-2/2006210175358854.gif
Here the top of the image is 1.0, the bottom is 0.95.
The green line draws from the min SSIM value to its max(peak) per 100 frame.
The red point are the average SSIM per 100 frame.
There's some frames with SSIM 0.000 (don't know why) so there are long lines.
SSIM delta image:
delta value = SP SSIM - TP SSIM
Delta image:
http://bbs.manmi.com/uploadFile/2006-2/2006210175248349.gif
here the top of the image is 0.005, the bottom is -0.005.
the red point also average.
the white line is zero line.
and zoom more:
http://bbs.manmi.com/uploadfile/2006-2/2006210175141190.gif
here the top of the image is 0.002, the bottom is -0.002.
seems that spatial b-direct works better on this kind of materials ;)
============================================================
OK, the result of episode 2.
Size:
SP: 162,952 KB
TP: 165,404 KB
Average SSIM:
SP Average SSIM = 87.93
TP Average SSIM = 87.91
SSIM peak image:
SP:
http://bbs.manmi.com/UploadFile/2006-2/2006211193912233.gif
TP:
http://bbs.manmi.com/UploadFile/2006-2/2006211193928732.gif
SSIM delta image:
http://bbs.manmi.com/UploadFile/2006-2/2006211193938983.gif
zoom more:
http://bbs.manmi.com/UploadFile/2006-2/2006211193946841.gif
x264 core:37 svn-333M (built by Sharktooth)
SP: slice I:556 Avg QP:20.00 size: 23163 PSNR Mean Y:47.67 U:49.82 V:50.24 Avg:48.23 Global:47.37
TP: slice I:556 Avg QP:20.00 size: 23173 PSNR Mean Y:47.66 U:49.83 V:50.24 Avg:48.23 Global:47.37
SP: slice P:14410 Avg QP:20.00 size: 8412 PSNR Mean Y:45.60 U:47.70 V:47.78 Avg:46.15 Global:45.84
TP: slice P:14411 Avg QP:20.00 size: 8417 PSNR Mean Y:45.59 U:47.70 V:47.78 Avg:46.14 Global:45.84
SP: slice B:27504 Avg QP:20.00 size: 1176 PSNR Mean Y:46.05 U:48.24 V:48.31 Avg:46.63 Global:46.20
TP: slice B:27503 Avg QP:20.00 size: 1264 PSNR Mean Y:46.04 U:48.23 V:48.31 Avg:46.62 Global:46.19
SP: mb I I16..4: 31.4% 32.9% 35.7%
TP: mb I I16..4: 31.4% 32.8% 35.8%
SP: mb P I16..4: 4.3% 6.5% 5.1% P16..4: 16.5% 5.9% 4.6% 1.4% 0.9% skip:54.8%
TP: mb P I16..4: 4.3% 6.5% 5.1% P16..4: 16.4% 5.9% 4.6% 1.4% 0.9% skip:54.8%
SP: mb B I16..4: 0.2% 0.3% 0.4% B16..8: 5.9% 0.4% 0.7% direct: 5.6% skip:86.5%
TP: mb B I16..4: 0.2% 0.4% 0.4% B16..8: 12.8% 0.4% 0.7% direct: 3.5% skip:81.6%
SP: 8x8 transform intra:39.0% inter:20.4%
TP: 8x8 transform intra:39.0% inter:24.6%
SP: ref P 76.0% 24.0%
TP: ref P 76.5% 23.5%
SP: ref B 74.9% 25.1%
TP: ref B 80.9% 19.1%
SP: PSNR Mean Y:45.918 U:48.074 V:48.156 Avg:46.485 Global:46.086 kb/s:939.57
TP: PSNR Mean Y:45.911 U:48.073 V:48.155 Avg:46.480 Global:46.081 kb/s:953.75
so, spatial mode works fine, better than temporal in a low-motion, mid/high resolution, mid/high quality encoding.
============================================================
discussion welcomed. ;)