[RESOLVED] DGAvcDecDI crashes when playing mkv-file

Support forum for DGAVCDecDI
prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 12:16 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj » Wed Jan 05, 2011 2:24 pm

Well. May be you are right regarding decoder misconfiguration. The matter is that trial version has no configuration tool at all. :) Only file diavc.ax. I know this is not your area. It's just my think aloud.

BTW. May be you will be interested. I've asked regarding my problem in DiAVC thread elsewhere.

I do not know really if this reply correct or not. But until now there are no others.

User avatar
admin
Site Admin
Posts: 4386
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin » Wed Jan 05, 2011 2:56 pm

As I said, do not attempt to MT the DGSource() filter. Use DiAVC's integral multithreading.

DGSource() code itself is thread-safe. It's the combination with DiAVC that causes the issue, I believe.

prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 12:16 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj » Wed Jan 05, 2011 3:50 pm

Ok. I think I understand you.

Can you propose some test case regarding stable multi-threading with DGSource+DiAVC? I mean some avisynth script. Because you've told that in your computer everything works fine.
I know that DiAVC is multithreaded and I see it using multiple threads on my PC.

User avatar
admin
Site Admin
Posts: 4386
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin » Wed Jan 05, 2011 5:09 pm

Just use DGSource() and enable multithreading in the DiAVC configuration.

prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 12:16 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj » Wed Jan 05, 2011 5:26 pm

I don't understand how it could be reached within Avisynth (and with trial version of DiAVC)?

Do you mean something like that?

Code: Select all

DGSource("my_file.dgi")

super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
or may be something like following?

Code: Select all

DGSource("my_file.dgi")

SetMTMode(2)

super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
Which one example is correct for using multithreading in Avisynth? Please specify.

User avatar
admin
Site Admin
Posts: 4386
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin » Wed Jan 05, 2011 11:15 pm

I've found some code that makes DGSource() not thread-safe, and therefore not compatible with MT. I have corrected it and slipstreamed it into build 2025. So redownload build 2025 and update DGAVCDecodeDI.dll. Please test it and report your results.

prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 12:16 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj » Thu Jan 06, 2011 4:37 am

Thank you. I've downloaded last version. And what I have.

This code works properly but only with 1 thread (please pay your attention on comments within script).

Code: Select all

DGSource("my_file.dgi")

SetMTMode(2)
# or SetMTMode(2,0) or SetMTMode(2,3) or SetMTMode(2,4)

super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
Following code crashes all time when I am using x264 coder.

Code: Select all

SetMTMode(5)
# or SetMTMode(5,0) or SetMTMode(5,2) or SetMTMode(5,3) or SetMTMode(5,4)

DGSource("my_file.dgi")

SetMTMode(2)

super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
Following code crashes all time when I am using x264 coder. And it only works once with VirtualDub(I was unable to repeat this result later).

Code: Select all

SetMTMode(5,4)

DGSource("my_file.dgi")

SetMTMode(2,4)

super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)

User avatar
admin
Site Admin
Posts: 4386
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin » Thu Jan 06, 2011 9:46 am

That's all I can do for you on this issue. Use your first script.

prokhozhijj
Posts: 30
Joined: Sat Jan 01, 2011 12:16 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by prokhozhijj » Thu Jan 06, 2011 11:07 am

This is certainly not what I expected. DSS2() can work stable with multi-threading in all these scripts. But... That's something at least.
Thanks.

User avatar
admin
Site Admin
Posts: 4386
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGAvcDecDI crashes when playing mkv-file

Post by admin » Thu Jan 06, 2011 11:41 am

You need to ask DiAVC about it. I have confirmed that DGSource() itself is threadsafe. I can open a script several times in simultaneous VirtualDub instances and they play fine and independently.

Beyond that, it's your problem to get MT working. I know nothing about it, and more precisely, I don't care at all about it. And what are you after anyway? The source filter is already multithreaded and the remainder of your script is running fine under MT. What are you trying to achieve by MT'ing the souce filter?

You are free to use DSS2() if that works better for you. :)

Post Reply