View Single Post
Old 19th September 2008, 10:54   #245  |  Link
NanoBot
Registered User
 
Join Date: Sep 2003
Posts: 209
Hi,

since Sagekilla asked for a comparision between DGAVCIndex and DGAVCIndexNV on a quadcore CPU, a ran a few tests.

My PC is a Q6600 @ 3,4GHz with 2GBytes DDR2-800 RAM running at 756MHz. The graphics card is a 9600GT with forceware 177.83 drivers, and the OS is Windows XP Pro 32bit. To get DGAVCIndexNV to run, I only had to unpack it and to copy the nvcuvid.dll into my system32 directory, like instructed. Both the denoising and the sharpening sliders in the Nvidia control panel where set to 0% during this tests.


The first clip I used for my tests is a DVB recording from "Anixe HD", which is about 2 minutes long. It is 1080i50, the footage seems to be shot with a video camera, since it really is interlaced, it has an AR of 1,78:1 and looks very clear ( no noise or grain )

1.) Decoded with DGAVCDecode and encoded as interlaced:

Code:
LoadPlugin("D:\MPEG\AVISYNTH\PLUGINS\DGAVCDecode.DLL")
AVCsource("anixe.dga")

D:\MPEG\megui\tools\x264>x264.exe --crf 22.0 --level 4.1 --ref 4 --mixed-refs --no-fast-pskip --bframes 3 --b-rdo --bime --weightb -
-trellis 1 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --threads auto --thread-input --sar 1:1 --progress --no-psnr --interla
ced --output "H:\anixe.mkv" "G:\Aufnahmen\anixe.avs"

avis [info]: 1920x1080 @ 25.00 fps (3023 frames)
x264 [warning]: NAL HRD parameters require VBV max bitrate and buffer size to be specified
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: slice I:14    Avg QP:21.34  size:229347
x264 [info]: slice P:1330  Avg QP:23.36  size: 65230
x264 [info]: slice B:1679  Avg QP:25.90  size: 20724
x264 [info]: consecutive B-frames:  9.8% 41.6% 17.0% 31.5%
x264 [info]: mb I  I16..4: 13.0% 50.0% 37.0%
x264 [info]: mb P  I16..4:  1.4%  6.9%  3.2%  P16..4: 44.7% 15.1% 10.9%  0.0%  0.0%    skip:17.8%
x264 [info]: mb B  I16..4:  0.1%  0.3%  0.3%  B16..8: 39.7%  1.1%  2.0%  direct: 6.7%  skip:49.8%  L0:36.9% L1:54.5% BI: 8.6%
x264 [info]: 8x8 transform  intra:58.1%  inter:55.6%
x264 [info]: ref P L0  52.5% 20.0% 12.9%  4.0%  3.7%  2.1%  3.6%  1.2%
x264 [info]: ref B L0  65.5% 20.6%  7.2%  2.4%  3.0%  1.3%
x264 [info]: ref B L1  70.9% 29.1%
x264 [info]: SSIM Mean Y:0.9713192
x264 [info]: kb/s:8254.2

encoded 3023 frames, 5.64 fps, 8254.32 kb/s
2.) Decoded with DGAVCDecodeNV with "deinterlace=false" and encoded as interlaced:

Code:
LoadPlugin("D:\MPEG\AVISYNTH\PLUGINS\DGAVCDecodeNV.DLL")
AVCsource("anixe_nv.dga", deinterlace=false)

D:\MPEG\megui\tools\x264>x264.exe --crf 22.0 --level 4.1 --ref 4 --mixed-refs --no-fast-pskip --bframes 3 --b-rdo --bime --weightb -
-trellis 1 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --threads auto --thread-input --sar 1:1 --progress --no-psnr --interla
ced --output "H:\anixe_nv.mkv" "G:\Aufnahmen\anixe_nv.avs"
avis [info]: 1920x1080 @ 25.00 fps (3026 frames)
x264 [warning]: NAL HRD parameters require VBV max bitrate and buffer size to be specified
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: slice I:14    Avg QP:21.01  size:228003
x264 [info]: slice P:1162  Avg QP:22.76  size: 66468
x264 [info]: slice B:1850  Avg QP:24.86  size: 16716
x264 [info]: consecutive B-frames:  9.0% 18.8% 25.3% 46.9%
x264 [info]: mb I  I16..4: 12.9% 47.7% 39.4%
x264 [info]: mb P  I16..4:  1.3%  7.5%  3.3%  P16..4: 40.3% 15.9% 11.0%  0.0%  0.0%    skip:20.9%
x264 [info]: mb B  I16..4:  0.1%  0.2%  0.3%  B16..8: 37.4%  0.9%  1.5%  direct: 5.2%  skip:54.5%  L0:33.0% L1:58.9% BI: 8.1%
x264 [info]: 8x8 transform  intra:59.7%  inter:55.5%
x264 [info]: ref P L0  56.6% 22.8%  8.5%  3.8%  2.7%  2.1%  2.3%  1.2%
x264 [info]: ref B L0  71.8% 20.6%  3.7%  2.0%  1.0%  0.9%
x264 [info]: ref B L1  76.9% 23.1%
x264 [info]: SSIM Mean Y:0.9719650
x264 [info]: kb/s:7359.7

encoded 3026 frames, 5.99 fps, 7359.81 kb/s
3.) Decoded with DGAVCDecodeNV with "deinterlace=true" and encoded as progressive:

Code:
LoadPlugin("D:\MPEG\AVISYNTH\PLUGINS\DGAVCDecodeNV.DLL")
AVCsource("anixe_nv.dga", deinterlace=true)

D:\MPEG\megui\tools\x264>x264.exe --crf 22.0 --level 4.1 --ref 4 --mixed-refs --no-fast-pskip --bframes 3 --b-rdo --bime --weightb -
-trellis 1 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --threads auto --thread-input --sar 1:1 --progress --no-psnr --output
"H:\anixe_nv_deint.mkv" "G:\Aufnahmen\anixe_nv_deint.avs"
avis [info]: 1920x1080 @ 25.00 fps (3026 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: slice I:14    Avg QP:19.71  size:161555
x264 [info]: slice P:1117  Avg QP:21.46  size: 54310
x264 [info]: slice B:1895  Avg QP:23.47  size: 14413
x264 [info]: consecutive B-frames:  8.6% 15.1% 22.5% 53.8%
x264 [info]: mb I  I16..4: 10.8% 70.6% 18.7%
x264 [info]: mb P  I16..4:  1.8% 14.8%  1.6%  P16..4: 41.4% 11.9%  7.8%  0.0%  0.0%    skip:20.7%
x264 [info]: mb B  I16..4:  0.2%  0.7%  0.1%  B16..8: 32.7%  0.7%  1.1%  direct: 6.1%  skip:58.3%  L0:34.0% L1:58.0% BI: 7.9%
x264 [info]: 8x8 transform  intra:80.1%  inter:68.1%
x264 [info]: ref P L0  74.8% 13.3%  7.6%  4.2%
x264 [info]: ref B L0  89.6%  7.0%  3.4%
x264 [info]: SSIM Mean Y:0.9820854
x264 [info]: kb/s:5964.2

encoded 3026 frames, 9.01 fps, 5964.27 kb/s

The second clip I used is also a DVB recording, this time from "Premiere HD", which also is about 2 minutes long. It is 1080i50 and seems to be shot on celluloid since the footage is progressive. This clip has an AR of 1,85:1 and looks quite noisy to be, might be film grain.


4.) Decoded by DGAVCDecode and encoded as progressive:

Code:
LoadPlugin("D:\MPEG\AVISYNTH\PLUGINS\DGAVCDecode.DLL")
AVCsource("Premiere.dga")

D:\MPEG\megui\tools\x264>x264.exe --crf 22.0 --level 4.1 --ref 4 --mixed-refs --no-fast-pskip --bframes 3 --b-rdo --bime --weightb -
-trellis 1 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --threads auto --thread-input --sar 1:1 --progress --no-psnr --output
"H:\Premiere.mkv" "G:\Aufnahmen\Premiere.avs"
avis [info]: 1920x1080 @ 25.00 fps (2977 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: slice I:42    Avg QP:14.42  size:171198
x264 [info]: slice P:2020  Avg QP:16.96  size: 84495
x264 [info]: slice B:915   Avg QP:19.28  size: 27135
x264 [info]: consecutive B-frames: 39.6% 55.8%  2.1%  2.5%
x264 [info]: mb I  I16..4: 14.2% 77.5%  8.4%
x264 [info]: mb P  I16..4:  2.4% 11.8%  0.7%  P16..4: 45.1% 20.9% 10.1%  0.0%  0.0%    skip: 8.9%
x264 [info]: mb B  I16..4:  0.3%  0.8%  0.0%  B16..8: 35.5%  0.8%  1.3%  direct:16.4%  skip:44.8%  L0:43.3% L1:50.3% BI: 6.3%
x264 [info]: 8x8 transform  intra:78.7%  inter:60.6%
x264 [info]: ref P L0  57.8% 20.9% 11.3%  9.9%
x264 [info]: ref B L0  80.5% 10.5%  9.0%
x264 [info]: SSIM Mean Y:0.9782869
x264 [info]: kb/s:13617.7

encoded 2977 frames, 5.89 fps, 13617.88 kb/s
5.) Decoded by DGAVCDecodeNV with "deinterlace=false" and encoded as progressive:

Code:
LoadPlugin("D:\MPEG\AVISYNTH\PLUGINS\DGAVCDecodeNV.DLL")
AVCsource("Premiere_nv.dga",deinterlace=false)

D:\MPEG\megui\tools\x264>x264.exe --crf 22.0 --level 4.1 --ref 4 --mixed-refs --no-fast-pskip --bframes 3 --b-rdo --bime --weightb -
-trellis 1 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --threads auto --thread-input --sar 1:1 --progress --no-psnr --output
"H:\Premiere_nv.mkv" "G:\Aufnahmen\Premiere_nv.avs"
avis [info]: 1920x1080 @ 25.00 fps (2980 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: slice I:37    Avg QP:14.35  size:149138
x264 [info]: slice P:1752  Avg QP:16.64  size: 78769
x264 [info]: slice B:1191  Avg QP:19.28  size: 25838
x264 [info]: consecutive B-frames: 24.9% 59.9% 10.1%  5.0%
x264 [info]: mb I  I16..4: 14.3% 77.9%  7.8%
x264 [info]: mb P  I16..4:  2.4% 12.1%  0.5%  P16..4: 44.7% 20.5% 10.0%  0.0%  0.0%    skip: 9.9%
x264 [info]: mb B  I16..4:  0.2%  0.7%  0.0%  B16..8: 39.4%  0.6%  1.2%  direct:14.4%  skip:43.4%  L0:39.8% L1:54.4% BI: 5.8%
x264 [info]: 8x8 transform  intra:80.1%  inter:60.0%
x264 [info]: ref P L0  63.5% 18.4% 12.5%  5.6%
x264 [info]: ref B L0  81.5% 11.8%  6.7%
x264 [info]: SSIM Mean Y:0.9784119
x264 [info]: kb/s:11697.7

encoded 2980 frames, 6.41 fps, 11697.84 kb/s
Since the second clip is noisy, I ran two more tests on this one while adjusting the denoiser slider in the Nvidia control panel to 25% and 51%. Nevertheless this has no impact on the result, both the performance and the file size are not influenced in anyway by the adjustment of the denoise slider. This makes me think that might it be necessary do explicitely activate the denoise postprocessing through the cuda api.


My preliminary conclusions are:

When using a quadcore CPU, offloading the decoding process to the GPU without deinterlacing at least atm speeds up things about 5% - 10%. This is a good step into the right direction, but it's such a big one as somebody might have hoped for. Nevertheless I suppose that the performance gain by GPU decoding might be much higher when using a single ore a dual core CPU.

On the other hand, the GPU decoding has a huge impact when used together with the GPU deinterlacing feature. Here I could observe a performace gain over 50%.

I also observed that decoding the video through the GPU seems to have an notable impact on the picture quality resulting in a significantly higher compressibility of the video during the encoding process.

And at last, the libavcodec.dll seems to have a bug which makes it loosing 3 frames compared to GPU decoding.

Subsuming the results of my tests it's my opinion that, even at this early stage of development, the usage of the GPU decoding through DGAVCDecodeNV is absolutely recommendable, if you own a suitable graphics card. Even if you might "only" get a speedup of 5% - 10% in the worst case, the better compressibility, the better picture quality and the very good deinterlacing feature are making DGAVCDecodeNV superior over DGAVCDecode.


C.U. NanoBot

Last edited by NanoBot; 19th September 2008 at 10:57. Reason: Typo
NanoBot is offline