Log in

View Full Version : Problem with MPEG2Source deblocking with tritical's and tsp's Avisynth builds


Boulder
28th August 2006, 13:05
I recently posted a bug report for DGDecode v1.4.8 in the DGIndex forum. However, I noticed that the problem appears only with tritical's and tsp's Avisynth builds and not with the latest official release v2.5.7a3 or v2.5.6.

The problem is that MPEG2Source("path\clip.d2v",cpu=4) won't do any deblocking but MPEG2Source("path\clip.d2v",cpu=4,iPP=true) (or iPP=false) does. Also MPEG2Source("path\clip.d2v",cpu2="xxxxoo") works.

tritical
28th August 2006, 22:50
I can't duplicate the issue, for me both:

mpeg2source("",cpu=4)

and

mpeg2source("",cpu2="xxxxoo")

give exactly the same result without having to set iPP. That's with my build from June 25 and dgdecode 1.4.8. The script I used to test was simply:

s1 = dgdecode_mpeg2source("",cpu=4)
s2 = dgdecode_mpeg2source("",cpu2="xxxxoo")
subtract(s1,s2)
coloryuv(analyze=true)

Boulder
29th August 2006, 04:53
I still cannot get it to work.

I've used this script to see the effects:video1=MPEG2Source("E:\Temp\Captures\test.d2v")
video2=MPEG2Source("E:\Temp\Captures\test.d2v",cpu=4)
Subtract(video1,video2).Levels(127, 1, 129, 0, 255)Alternatively I've used interleaving.

The first picture is without iPP, the second one with it.
http://www.saunalahti.fi/sainki/noipp.png
http://www.saunalahti.fi/sainki/ipp.png

If I install Avisynth v2.5.7a3, both work. You can download the sample clip I've used here : www.saunalahti.fi/sainki/test.m2v . If you have any ideas what to try next, I'm all ears.

tritical
29th August 2006, 20:34
Very weird, I tested the clip and everything works fine here. Could you try this version of dgdecode.dll (http://bengal.missouri.edu/~kes25c/DGDecode.dll). I added PP_MODE/iPP to the on screen output for info=1. Try running with info=1 and see what it says. iPP should show -1 if iPP isn't set, 0 if set to false, and 1 if set to true. The PP_MODE value will be the sum of whichever of the following are enabled:

deblock_y_h = 1
deblock_y_v = 2
deblock_c_h = 4
deblock_c_v = 8
dering_y = 16
dering_c = 32

so cpu=4 would be: 1+2+4+8 = 15. So for just:

mpeg2source("",cpu=4,info=1)

the PP_MODE/iPP line should show: "15,-1"

Boulder
29th August 2006, 20:44
The information is shown correctly and the deblocking occurs with cpu=4,info=1. When I remove info=1, no deblocking again:confused:

tritical
29th August 2006, 21:02
Hm, could you redownload that dll and test again without info=1. I added some debug output lines to print out the values without needing info=1 (use debugview to capture it). I have no idea what could be causing the difference between having and not having info=1.

Boulder
30th August 2006, 07:44
I found at least one thing that has something to do with it.

When the order is this:
video1=MPEG2Source("E:\Temp\Captures\test.d2v")
video2=MPEG2Source("E:\Temp\Captures\test.d2v",cpu=4)
interleave(video1,video2)

it doesn't work. DebugView shows 0,-1 for all frames.

With this:
video1=MPEG2Source("E:\Temp\Captures\test.d2v",cpu=4)
video2=MPEG2Source("E:\Temp\Captures\test.d2v")
interleave(video1,video2)

it does work and DebugView shows 15,-1 , 0,-1 and so on.

I tried without interleaving or subtracting and it looks like postprocessing works in every case. That was a test I should have done in the first place though..

Wilbert
30th August 2006, 21:40
The problem with the use of global variables (in DGDecode.dll) again?

tritical
30th August 2006, 21:50
Everything works fine here, regardless of the order of the calls or using interleave/subtract/etc... I doubt it has anything to do with globals since dgdecode doesn't currently use any global variables (that I'm aware of at least).

@Boulder
I updated the dll again with more print statements in the filter creation and constructor parts. Could you redownload it and try it on one of the scripts that doesn't work correctly? Post the debug output back here.

Boulder
31st August 2006, 07:51
For some odd reason, the most recent version you built works with the script I cannot get to work with the official DGDecode v1.4.8 (or the earlier ones you built).

Here's the DebugView log : http://www.saunalahti.fi/sainki/debugview.log

tritical
31st August 2006, 08:38
Unfortunately, the only change I made vs the previous builds I put up and vs 1.4.8 source was the addition of some sprintf()/OutputDebugString() lines which shouldn't be having any effect at all. Considering that fact, and the fact that adding info=1 or iPP=true or false somehow makes it work correctly, I think that tracking down what is actually happening could be pretty difficult. I'm out of ideas atm.

EDIT: one last thing. I made a debug build (http://bengal.missouri.edu/~kes25c/DGDecodeD.dll) of the original 1.4.8 source. Could you try it and see if it shows the problem or not?

Boulder
1st September 2006, 05:37
EDIT: one last thing. I made a debug build (http://bengal.missouri.edu/~kes25c/DGDecodeD.dll) of the original 1.4.8 source. Could you try it and see if it shows the problem or not?
That one works too :)

Can you think of anything that could make the difference between your Avisynth build and the official v2.5.7a3?

tritical
1st September 2006, 20:30
There aren't any changes in my build vs the official cvs sources that would cause this type of bug. In fact, I can't think of anything one could change in avisynth itself that would lead to that type of error occuring only when using mpeg2source() (it should be happening with other functions as well). The fact that it works fine when a debug build of dgdecode is used or a slightly modified release build of dgdecode is used would lead me to believe it is a problem with dgdecode, but exactly what the problem is or how to easily track it down is another question.

Boulder
2nd September 2006, 09:00
Could it be anything related to compiling Avisynth since the original DGDecode works with the official Avisynth but not with your or tsp's build. To me the whole thing sounds like a problem with variables somewhere.

Still, the most important thing is that deblocking works if MPEG2Source is called only once in the script.