View Full Version : DGAVCDecNV 1.0.13: GPU decoding on Nvidia
sazanon
19th September 2008, 11:22
Great tip, i will test it, when i'm at home
Yes, it works that way
Guest
19th September 2008, 11:52
Thanks a lot for your clarification - donīt have the time to check the forum daily, so I must have missed it. With dumb bob you mean a simple SeparateFields()? Going to check if I find this thread... Please take this off-topic discussion to the appropriate thread.
JK1974
19th September 2008, 12:08
Please take this off-topic discussion to the appropriate thread.
I have found the thread in the meantime, so no more discussion on this apart from a little request: If there is a special bobbing function inside the drivers that can be implemented with just a few commands, please give it a try - we can compare the results then - in a separate thread ;)
squid_80
19th September 2008, 12:26
I haven't tried it but bobbing should be possible by setting the deinterlace mode to cudaVideoDeinterlaceMode_Bob and toggling the second_field flag of the CUVIDPROCPARAMS struct when mapping the frame (set to 0 when an even frame is requested, 1 for an odd frame). No idea if this functionality is implemented in cuda yet though.
rack04
19th September 2008, 13:15
As I said, I'm curious what the results would be on a workhorse like I just described :) I plan on upgrading to such a system in the near future so this will be helpful having one thing offloaded from my chain.
Also, the encode doesn't need to run at "50+ fps" for it to be a bottleneck. The decode eats up a significant portion of my cpu time on my desktop computer, where I have a lowly Opteron 170.
My Q6600 was running at 3.2GHz.
Guest
19th September 2008, 13:16
It affects the entire infrastructure of DGAVCIndex and DGAVCDecode. Even if CUDA can support it, I don't plan to.
Sagekilla
19th September 2008, 20:24
I suppose this is, at the very least, a big win for anyone with a nvidia card and some HD interlaced material :)
Inventive Software
19th September 2008, 20:42
Ok, here are my results dgavcdecode vs. dgavcdecodeNV:
First good news: Using x264 cli two pass encodings are no problem.
Second good news: Acceleration is massive especially on the first pass.
Third good news: The quality of the final encode seems to be higher. I don't know why and have to do more tests.
Source: 1080p30 Apple music clip downscaled to 720p30
CPU: Q6600 2.4GHz
GPU: GF 8600 GTS 1.450 GHz
dgavcdecode:
pass #1: encoded 6580 frames, 32.68 fps, 4811.95 kb/s
pass #2: encoded 6580 frames, 21.48 fps, 5005.68 kb/s
x264 [info]: SSIM Mean Y:0.9689052
x264 [info]: PSNR Mean Y:41.892 U:48.994 V:48.284 Avg:43.078 Global:42.345 kb/s:5005.53
dgavcdecodeNV:
pass #1: encoded 6580 frames, 57.11 fps, 4811.95 kb/s
pass #2: encoded 6580 frames, 24.45 fps, 5005.42 kb/s
x264 [info]: SSIM Mean Y:0.9691189
x264 [info]: PSNR Mean Y:41.931 U:49.607 V:49.447 Avg:43.258 Global:42.404 kb/s:5005.27
Wow, that's a big increase! Same encoder settings I assume? :)
Don't really know how to translate the results but here goes:
Q6600
8800GT
DGAVCDecode
http://i11.photobucket.com/albums/a199/rack04/CRF_DGAVCDecode.jpg
DGAVCDecodeNV
http://i11.photobucket.com/albums/a199/rack04/CRF_DGAVCDecodeNV.jpg
Directshow
http://i11.photobucket.com/albums/a199/rack04/CRF_Directshow.jpg
Only a slight increase, but it helps. Good one. :)
Atak_Snajpera
19th September 2008, 22:49
I suppose this is, at the very least, a big win for anyone with a nvidia card and some HD interlaced material
Exactly! High-quality deinterlacer for free along with PAFF decoding are the most important for me however I'm ATI user :)
ooferomen
19th September 2008, 23:51
Vista SP1
Athlon64 3500+ 2.25ghz
1GB ram
8400GS with VP3
i took a 1080p hd-dvd clip and cropped a few lines off the top and bottom then bilinear resized to 640x352 and encoded using megui iphone profile.
no gpu:
pass 1 encoded 2168 frames, 6.03 fps, 1003.51 kb/s
pass 2 encoded 2168 frames, 6.06 fps, 1000.23 kb/s
gpu:
pass 1 encoded 2170 frames, 11.91 fps, 1003.26 kb/s
pass 2 encoded 2170 frames, 12.06 fps, 1000.27 kb/s
crypto
20th September 2008, 00:25
Wow, that's a big increase! Same encoder settings I assume? :)
You mean between the test runs (NV vs. non-NV)? Sure.
Between the passes? No. I was using my normal "production" batches for ATV (Main Profile 5 MB/s), which are optimized on multi pass. There is even some heavy preprocessing (LFS) on pass #2. Without it would be a lot faster. I think, I redo the tests with some simpler scripts.
Exactly! High-quality deinterlacer for free along with PAFF decoding are the most important for me however I'm ATI user :)
Exactly the point.
I would also add: high boost on fast first passes and on single pass encodes at high fps (HD realtime encoding)
All in all a big win. Thanks Don.
Guest
20th September 2008, 00:42
I'm going to try to fix multi-instance this weekend. It probably won't support interleaved access, but at least the GUIs will be able to do two-pass (hopefully) without choking to death.
ooferomen
20th September 2008, 03:57
is it too much work to implement mpeg2/vc1 decoding? nvidia's vp3 has the same level of decoding for mpeg2/vc1 as vp2 has for h264. getting that purevideo deinterlacing for mpeg2 1080i would be cool :)
Guest
20th September 2008, 04:11
Please read existing threads thoroughly.
crypto
20th September 2008, 08:57
I'm going to try to fix multi-instance this weekend. It probably won't support interleaved access, but at least the GUIs will be able to do two-pass (hopefully) without choking to death.
I hope this is not too complicated. This is clearly an issue of the GUI and not of dgavcdecodenv. Multipasses are clearly sequentially serialized. There is no need to overlap them.
I know, that there is currently no place for additional features, but would it be possible to access the scaler via CUDA maybe in a similar way like the deinterlacer.
lucassp
20th September 2008, 12:38
Which chips support full hardware VC-1 decoding?
Which chips have VP3? I didn't hear anything about it.
Sharktooth
20th September 2008, 15:00
I hope this is not too complicated. This is clearly an issue of the GUI and not of dgavcdecodenv. Multipasses are clearly sequentially serialized. There is no need to overlap them.
I know, that there is currently no place for additional features, but would it be possible to access the scaler via CUDA maybe in a similar way like the deinterlacer.
issue of the gui?
so if you cant to a stackorizontal or stackvertical with 2 avc sources is still an "issue of the GUI"?
i dont think so.
Guest
20th September 2008, 15:25
Hey Sharktooth,
Why does MeGUI have to open the script twice? Why can't you open the script once and then just start requesting at frame 0 again for the encode phase?
And if preview is disabled, why do you open the script for it anyway?
I found that you can do multipass DivX in VirtualDub because it opens the filter once only and then starts requesting again at frame 0 for the second pass.
HCEnc also opens the script twice. It makes no sense to me, even for other reasons such as memory efficiency.
pwolfamv
20th September 2008, 22:20
Do not put it in your Avisynth plugins directory. Do not try to use it with any GUI.
too late... It works though, no issues :P simple script resizing down to 640x360 is giving me +10fps while encoding in vdub using PicVideo mjpeg codec.
Only thing worth mentioning would be that seeking is still slow.
i'm not really into h264 encoding so this is the best way for me test something, heh.
Pookie
21st September 2008, 21:20
I've been feeding it AVCHD camcorder files from various sources and the vast majority have worked flawlessly. The two I'm posting seem to seize the transcoding 4-6 frames short of completion when running them through x264 or VirtualDub
17MB
http://www.mediafire.com/?jamzuytnvso
8MB
http://www.mediafire.com/?tg1pysyytfw
Guest
21st September 2008, 23:45
Thanks, Pookie, I'll have a look at it. I can always rely on you for good trouble reports giving me everything I need to duplicate it without me having to ask!
On another front... Woo hoo! I have multi instance working. And it supports interleaving from different processes, too, not just serialized (most of the GUIs are serial, however, and I can't vouch for the performance if you do interleaved access). I tested it in 2-pass HCEnc, which went mammary glands up before (gotta watch out for rule 4, doncha know). New package coming tonight or tomorrow then.
What I did was move all CUDA code and variables into the filter instance DGAVCDecoder object. Then each new filter instance starts up an entire complete new CUDA instance. CUDA already manages context switching between threads. I can open a script in two instances of VirtualDub and step and seek independently without them interfering with each other. I was shocked to see CUDA managing that without me having to explicitly push/pop contexts, but hey, no complaints from me. :)
I also did it for DGAVCIndexNV, so that you can open multiple DGAVCIndexNV instances at once if you so desire, although I don't see much reason for that.
rack04
21st September 2008, 23:49
Thanks, Pookie, I'll have a look at it. I can always rely on you for good trouble reports giving me everything I need to duplicate it without me having to ask!
On another front... Woo hoo! I have multi instance working. And it supports interleaving from different procees, too, not just serialized (most of the GUIs are serial, however, and I can't vouch for the performance if you do interleaved access). I tested it in 2-pass HCEnc, which went mammary glands up before (gotta watch out for rule 4, doncha know). New package with extended expiration tonight or tomorrow then.
Excellent work.
Atak_Snajpera
22nd September 2008, 00:13
Can somebody check if .avs with hardware decoding work in Sony Vegas or adobe premiere
Guest
22nd September 2008, 00:15
You might want to wait for the new version as I don't know if those apps open the script more than once. With the new version, I don't see why there would be any problem, as long as they can already open AVS scripts.
Atak_Snajpera
22nd September 2008, 00:22
now I am really thinking about selling my just bought 4850. Hardware decoding AVCHD footage via avs in premiere or vegas = priceless :) ATI WEAK UP!!!!
Zwitterion
22nd September 2008, 00:42
Can you tell CUDA which field to keep when Deinterlacing? Then, with two instances of DGAVCDecodeNV, one could hack together a CUDA bobber.
a=DGAVCDecodeNV_AVCSource("00001_NV.dga", deinterlace=true, order=1)
b=DGAVCDecodeNV_AVCSource("00001_NV.dga", deinterlace=true, order=0)
Interleave(a,b)
Guest
22nd September 2008, 00:52
Can you tell CUDA which field to keep when Deinterlacing? Then, with two instances of DGAVCDecodeNV, one could hack together a CUDA bobber.
a=DGAVCDecodeNV_AVCSource("00001_NV.dga", deinterlace=true, order=1)
b=DGAVCDecodeNV_AVCSource("00001_NV.dga", deinterlace=true, order=0)
Interleave(a,b) Brilliant! Yes, in fact you can. I'll see if it works and, if so, add the parameter.
Sharktooth
22nd September 2008, 00:52
Hey Sharktooth,
Why does MeGUI have to open the script twice? Why can't you open the script once and then just start requesting at frame 0 again for the encode phase?
And if preview is disabled, why do you open the script for it anyway?
I found that you can do multipass DivX in VirtualDub because it opens the filter once only and then starts requesting again at frame 0 for the second pass.
HCEnc also opens the script twice. It makes no sense to me, even for other reasons such as memory efficiency.
there are multiple reasons. changing that behaviour would mean changing a lot of code and using a single instance would also mean you cant re-use the avs for other tasks.
Guest
22nd September 2008, 01:19
Brilliant! Yes, in fact you can. I'll see if it works and, if so, add the parameter. Both instances returned the same field, so I wrote to Nvidia about it. It may be a CUDA bug.
Guest
22nd September 2008, 01:20
there are multiple reasons. Your not telling us what the reasons are suggests that you don't know what they are. :)
using a single instance would also mean you cant re-use the avs for other tasks. That doesn't sound right. Why can't you re-use the AVS just as you can load the same script multiple times in VirtualDub?
Anyway, it's a moot point as I have multi-instance working, but I was curious about that design decision.
Guest
22nd September 2008, 01:52
now I am really thinking about selling my just bought 4850. Hardware decoding AVCHD footage via avs in premiere or vegas = priceless :) ATI WEAK UP!!!! As I mentioned, I believe you can install an Nvidia card as a secondary adapter and CUDA will work just fine with it.
Guest
22nd September 2008, 02:18
Only thing worth mentioning would be that seeking is still slow. It depends on your IDR or RPS frequency. If you have 300 frame long GOPs, then yes, seeking can be slow. But it's pretty fast for my 25 frame GOPs. Also, be aware that a random seek is only needed when you ask for a frame either behind the last one or more than 10 frames ahead (otherwise the decoder just decodes linearly until the needed frame is reached). Not too many scripts do that. The torture script is Reverse(). :)
rack04
22nd September 2008, 02:39
How will the end user update CUDA when Nvidia fixes these problems? Are they part of the Nvidia drivers, CUDA toolkit, or CUDA SDK?
Sharktooth
22nd September 2008, 03:25
Your not telling us what the reasons are suggests that you don't know what they are. :)
That doesn't sound right. Why can't you re-use the AVS just as you can load the same script multiple times in VirtualDub?
Anyway, it's a moot point as I have multi-instance working, but I was curious about that design decision.
well, megui stores the AR in the avs, so it have to read it before the encoding (and that requires an instance since we read the AR using a wrapper) and then during the encoding... also megui keeps an instance open for displaying the preview (you can also watch the preview while encoding)... also the user may want to open another instance of another avs or even the same for multiple encodings even after an encoding has been started... also megui has multiple workers so there may be more than one instance running... etc...
so, in short, having a single instance will cripple many megui functionalities and would require workarounds everywhere in the code.
however, since you've sorted the instancing problems, we're all happy :)
tre31
22nd September 2008, 06:04
As I mentioned, I believe you can install an Nvidia card as a secondary adapter and CUDA will work just fine with it.
Well just thought I'd add this since it is kind of relevant, and for ATI users its the final blow, time too get an nvidia card for CUDA me thinks. In a nutshell - no access too UVD via Stream SDK.
http://forums.amd.com/devforum/messageview.cfm?catid=328&threadid=99872&enterthread=y
Atak_Snajpera
22nd September 2008, 07:10
Well just thought I'd add this since it is kind of relevant, and for ATI users its the final blow, time too get an nvidia card for CUDA me thinks. In a nutshell - no access too UVD via Stream SDK.
This may change if they will feel that they are staying behind... So WEAK UP Canadians!!!!
As I mentioned, I believe you can install an Nvidia card as a secondary adapter and CUDA will work just fine with it.
true but i dont like to have two GFX in my small case.
lucassp
22nd September 2008, 07:35
true but i dont like to have two GFX in my small case.
I guess a low profile 8400 won't hurt a lot :)
Quark.Fusion
22nd September 2008, 12:10
How will the end user update CUDA when Nvidia fixes these problems? Are they part of the Nvidia drivers, CUDA toolkit, or CUDA SDK?
Update drivers.
Guest
22nd September 2008, 12:59
Here's the multi-instance version, also with the bobbing capability.
http://neuron2.net/dgavcdec/dgavcdecnv100a3.zip
EDIT: MeGUI somehow manages to crash in d3d9.dll when enqueueing the job. I don't know why at this time.
Renzz
22nd September 2008, 13:23
Just trying the new version but am now getting "ERROR: Failed to find CUDA-compatible D3D device(2)" error when running the GUI. Previous version worked fine. I have an 8600GT running on Vista SP1. I've tried moving the supplied DLLs into system32 but still get the same error.
Guest
22nd September 2008, 13:27
Just trying the new version but am now getting "ERROR: Failed to find CUDA-compatible D3D device(2)" error when running the GUI. I don't know what you mean by "when running the GUI".
kemuri-_9
22nd September 2008, 13:36
I don't know what you mean by "when running the GUI".
referring to DGAVCIndexNV, when i've gotten that error, a restart was in order to fix.
Renzz
22nd September 2008, 13:40
I don't know what you mean by "when running the GUI".
I mean when running DGAVCIndexNV.exe.
Just to confirm, do we need to do anything with the supplied DLLs? Should they be in the same directory as DGAVCIndexNV.exe or moved to windows/system32?
Guest
22nd September 2008, 13:44
The DLLs are the same as with the previous version. They should all be in system32 (for Windows XP).
You say that DGAVCIndexNV alpha 2 works and alpha 3 doesn't?
That's hard to believe because the only change was to the name of a windows event (changed name to NULL to avoid name space collision for multiple instances).
Please put alpha3 and alpha 2 EXEs right next to each other in the same directory (to rule out any path differences) and try again.
Renzz
22nd September 2008, 14:51
Please put alpha3 and alpha 2 EXEs right next to each other in the same directory (to rule out any path differences) and try again.
So alpha 2 was failing in the same way, despite working ok a few days ago. I reinstalled the NVIDIA drivers - and they still both failed. Finally, I deleted the NV DLLs from the directory containing dgavcindexnv.exe - and they both now work.
So a word of warning to Vista users - don't use the two DLLs supplied in the package (nvapi.dll and ncuda.dll) as I think they are from Winxp and must be different to the Vista ones (which are already in system32). Looks like nvcuvid.dll is still needed.
Guest
22nd September 2008, 15:20
I'm glad you got it working and thank you for reporting your experiences. I will make a document summarizing all these findings.
First, though, I am going to use the debugger to see why MeGUI crahes things when none of the other apps do.
Inventive Software
22nd September 2008, 16:10
It's MeGUI... there's a reason I don't use it and stick with the CLI tools themselves. IMHO, it's gone down-hill in trying to make itself an all-in-one app.
Did the CUDA Bob end up working properly then? I'm amazed that's allowed, really. How does it compare to, say, DGBob?
Zwitterion
22nd September 2008, 16:24
The only interlaced material I have is the bonus content in SD from a Blu-ray. I tried to decode it with dgavcdecnv100a3 and got weird artifacts:
http://img225.imageshack.us/img225/8017/artdq7.th.png (http://img225.imageshack.us/my.php?image=artdq7.png)http://img225.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)
It looks like it decodes the stream, but messed up the lines or something like that.
The indexer shows no such artifacts and I can preview the deinterlacer there.
Here (http://rapidshare.com/files/147441106/00014.m2ts.html) is a sample (first 15 MB of the stream). Can anyone else replicate it?
Guest
22nd September 2008, 16:44
It's MeGUI... there's a reason I don't use it and stick with the CLI tools themselves. IMHO, it's gone down-hill in trying to make itself an all-in-one app. If it's coded in some silly managed language, I'm not going to bother trying to debug it.
Did the CUDA Bob end up working properly then? I'm amazed that's allowed, really. How does it compare to, say, DGBob? Yes, it seems to work fine. Why would you be amazed? Allowed by what? I haven't done any comparisons yet.
Guest
22nd September 2008, 16:45
The only interlaced material I have is the bonus content in SD from a Blu-ray. I tried to decode it with dgavcdecnv100a3 and got weird artifacts Post your script please.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.