Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd March 2023, 18:13   #2281  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,434
Quote:
Originally Posted by pinterf View Post
Problem found and maybe fixed. A sample or telling the dimensions of your video would helped a lot


3840x1608
Sorry, i didn't thought about it, i was too much focussed on just the format part.
I can PM you my ftp server information and put the video on it if necessary, it's "small", less than 100 frames, it's was just a small thing for test purpose.
__________________
My github.

Last edited by jpsdr; 2nd March 2023 at 18:23.
jpsdr is offline   Reply With Quote
Old 2nd March 2023, 18:29   #2282  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,473
Quote:
Originally Posted by FranceBB View Post
Yeah, I know.
It's a shame that they haven't updated anything since 2006 and I'm also sad to see it failing to compile while targeting new Avisynth+ headers...

Someone should really pick up the Sox filters and properly maintain them instead of leaving them in the Avisynth 2.5 abandonware...
Just wait and you'll see
pinterf is offline   Reply With Quote
Old 7th March 2023, 19:39   #2283  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,434
Out of curiousity, why the Clang and Intel build don't have the DirectShowSource plugin ?
__________________
My github.
jpsdr is offline   Reply With Quote
Old 7th March 2023, 21:41   #2284  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,169
Quote:
Originally Posted by jpsdr View Post
Out of curiousity, why the Clang and Intel build don't have the DirectShowSource plugin ?
Cause Directshowsource don't had any change very long. So can got from old ver avs+
kedautinh12 is offline   Reply With Quote
Old 7th March 2023, 22:55   #2285  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,675
Quote:
Originally Posted by kedautinh12 View Post
Cause Directshowsource don't had any change very long. So can got from old ver avs+
Other core plugins have not been updated in sometime also but yet they are always recompiled. So there's probably a good reason why DirectShowSource is not included in the Clang and Intel builds.
Reel.Deel is offline   Reply With Quote
Old 7th March 2023, 23:32   #2286  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,470
DirectShowSource does not get built by default, you have to specifically opt-in to build it. This is intentional, because unlike the other core plugins, DSS has a dependency on the DirectShow baseclasses library that, for whatever reason, is not part of a default install of either MSVC or the DirectX SDK. You have to build that library from the SDK samples, and because that's so non-intuitive (and because DSS should only ever be used as a last resort), it's better to leave it off by default so it doesn't impede the build process. Not to mention that for MinGW-w64/GCC builds, the MSVC-built baseclasses library is *probably* a no-go. There is something of a port of the baseclasses library to MinGW, but because DirectShowSource doesn't build with GCC, there's not really any way of vetting whether it works as intended.

That's not even touching the question of whether Clang or Intel compilers can build the baseclasses library at all, although I would assume that they can at least link to an existing build of it just fine ('Clang' in this case being assumed to be the clang-cl MSVC compatibility frontend, not the regular version of Clang that uses GCC's conventions).
qyot27 is offline   Reply With Quote
Old 7th March 2023, 23:43   #2287  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,169
Quote:
Originally Posted by Reel.Deel View Post
Other core plugins have not been updated in sometime also but yet they are always recompiled. So there's probably a good reason why DirectShowSource is not included in the Clang and Intel builds.
I don't know but when Pinterf still use old date directshowsource.dll in his new build
kedautinh12 is offline   Reply With Quote
Old 8th March 2023, 19:16   #2288  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,434
Quote:
Originally Posted by pinterf View Post
Problem found and maybe fixed.
Tested the clang git build r3950, still the issue, so it's probably not pushed yet.
__________________
My github.
jpsdr is offline   Reply With Quote
Old 9th March 2023, 14:38   #2289  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,473
Quote:
Originally Posted by jpsdr View Post
Tested the clang git build r3950, still the issue, so it's probably not pushed yet.
It's pushed; could you upload your sample clip fragment?
pinterf is offline   Reply With Quote
Old 9th March 2023, 18:41   #2290  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,434
Quote:
Originally Posted by pinterf View Post
It's pushed; could you upload your sample clip fragment?
I've PM you informations.
__________________
My github.
jpsdr is offline   Reply With Quote
Old 10th March 2023, 19:14   #2291  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,434
Ok, i made more tests.

When i test a new avs+ version, i always do the same thing : open in VirtualDub2 the same avs file reading the same 10bit422 UTVideo file.
When VDub2 throw me an error message (it wasn't a crash), i thought there was an issue with AVISource in the clang build.
Well... There was indeed an issue in AVISource, but this was a fluke. As, for me, it wasn't a crash.

So i finaly thought to test with AVSMeter, result was "error, unable to load avisynth.dll"... Ah....
So i tried with Virtualdub (not VDub2) to open others avs files reading "nice" 8 bits avi. Same error message. Same thing x86 or x64 version.

Result is that clang and Intel version, from both r3950 git and Test7 zip file are not running at all, x86 or x64. It seems to be a build issue.
Or... is there some redistributable needed ?
I allready have the Intel 20.0.311 redistributable installed...
__________________
My github.
jpsdr is offline   Reply With Quote
Old 10th March 2023, 20:52   #2292  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,473
Quote:
Originally Posted by jpsdr View Post
Ok, i made more tests.

So i finaly thought to test with AVSMeter, result was "error, unable to load avisynth.dll"... Ah....
So i tried with Virtualdub (not VDub2) to open others avs files reading "nice" 8 bits avi. Same error message. Same thing x86 or x64 version.

Result is that clang and Intel version, from both r3950 git and Test7 zip file are not running at all, x86 or x64. It seems to be a build issue.
Or... is there some redistributable needed ?
I allready have the Intel 20.0.311 redistributable installed...
Strange, temporarily I'd try to get rid of all autoloaded plugins, move them away, to make sure if one of them is making avisynth crash when loading. I don't have any other idea. My avsmeter is 3.0.0.4, and happily consumes any avisynth version
pinterf is offline   Reply With Quote
Old 10th March 2023, 21:01   #2293  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,473
Quote:
Originally Posted by pinterf View Post
Just wait and you'll see
When you spend ~40 hours on understanding what sox really is and slowly get the latest sox library work again, test its various filters, and then try UpSoundOnSound which is using the same SoxFilter'ed clip four times, and realize that Avisynth+ has NO audio cache implemented... The feeling is priceless.
pinterf is offline   Reply With Quote
Old 11th March 2023, 10:22   #2294  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,320
It looks GeneralConvolution() is somehow broken between 201x and 202x years.

In old decade
Code:
GeneralConvolution(0, "
-1 -1 -2 -1 -1
-1 -2 -2 -2 -1
-2 -2 37 -2 -2
-1 -2 -2 -2 -1
-1 -1 -2 -1 -1", auto=true, luma=true, chroma=false)
Make some sharpening effect on more medium frequencies in compare with Sharpen() because Sharpen use only 3x3 kernel. Now it return significantly distorted frame with lots of banding. The sum of coefficients is =1 so auto=true/false do nothing.

For simple YV12 format. Tried RGB32, tried 16bit.
At Windows7 tried AVS versions from 2.6 to +3.6 , +3.7 and still the same distortion. May be GeneralConvolution depends on some updated VisualC++ libs or other windows7 components ?


Here most simple form of bug with GeneralConvolution:

GeneralConvolution(0, "
-0.4 -2 -0.4
-2 9 -2
-0.4 -2 -0.4", auto=true, luma=true, chroma=false)

Make sharpening about as expected.

GeneralConvolution(0, "
-0.5 -2 -0.5
-2 9 -2
-0.5 -2 -0.5", auto=true, luma=true, chroma=false)

Turn to significant blurring. The switch from about good to significantly bad result occur when diagonal angle coefficients of simplest 3x3 matrix go from -0.4 to -0.5. Looks like some rounding or auto-normalization error ?

Same is with documentation example:
GeneralConvolution(0, "
-0.4 -1 -0.4
-1 5 -1
-0.4 -1 -0.4 ", auto=true, luma=true, chroma=false)
Still make sharpening as expected.

GeneralConvolution(0, "
-0.5 -1 -0.5
-1 5 -1
-0.5 -1 -0.5 ", auto=true, luma=true, chroma=false)
Switch to very blurry.

Same result with 3.7.2 release, 3.7.3 test 7 x64, x64_xp (x64_clang and x64_IntelClassic not work with AVI import filter error).

Last edited by DTL; 11th March 2023 at 10:43.
DTL is offline   Reply With Quote
Old 11th March 2023, 13:24   #2295  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,212
Quote:
Originally Posted by pinterf View Post
When you spend ~40 hours on understanding what sox really is and slowly get the latest sox library work again


Quote:
Originally Posted by pinterf View Post
test its various filters, and then try UpSoundOnSound



Quote:
Originally Posted by pinterf View Post
, and realize that Avisynth+ has NO audio cache implemented...



Jokes aside, thank you so so so much for taking a look at this. It means the world to me and I'm really grateful to see how every time I highlight something you always go above and beyond to get it working.
We're really lucky to have you in this community, Ferenc! I mean it.
FranceBB is offline   Reply With Quote
Old 11th March 2023, 18:01   #2296  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,654
Quote:
Originally Posted by DTL View Post
Looks like some rounding
Not sure about the rest of your trouble with GeneralConvolution but bear in mind that the Wiki states:

Code:
float values are converted to integers for 8-16 bit clips
So -0.5->-1, and -0.4->0.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 11th March 2023, 19:13   #2297  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,320
Kernel of 5 at the center and -1 surround also should not be blur kernel. Now the significant discontinuity in output effect from corners kernel members 0 to -1 also not look like correct action. If even floats not accepted it is only expected more significant step from light sharp with
0 -1 0
-1 5 -1
0 -1 0

to stronger sharp with
-1 -1 -1
-1 5 -1
-1 -1 -1.

But now last kernel cause switching to blur. The visible difference - sum of 1st kernel is 5+(-4)=1 and sum of last is 5+(-8)=-3. May this negative sum sign also play role in the issue ?

Checked (YV12 8bit 4:2:0):
-1 -1 -1
-1 5 -1
-1 -1 -1 - blur

-1 -1 -1
-1 6 -1
-1 -1 -1 - slightly sharper

-1 -1 -1
-1 7 -1
-1 -1 -1 - sharper, horizontal and vertical double contour

-1 -1 -1
-1 8 -1
-1 -1 -1 - almost black frame ! (zero sum), still auto=true

-1 -1 -1
-1 9 -1
-1 -1 -1 - finally sharping, auto=true/false - equally.

-1 -1 -1
-1 10 -1
-1 -1 -1 (auto=true - less sharp, auto=false - significant level offset to white)

So auto=true do not work with zero and negative integer sum ?

But kernel of 5x5 of
-1 -1 -2 -1 -1
-1 -2 -2 -2 -1
-2 -2 37 -2 -2
-1 -2 -2 -2 -1
-1 -1 -2 -1 -1", auto=true,

with sum=1 still return sort of HigiPassFilter only with about removed DC component and very low frequencies. DC component (median level and very low frequecies) start to recover to about
-1 -1 -2 -1 -1
-1 -2 -2 -2 -1
-2 -2 45 -2 -2
-1 -2 -2 -2 -1
-1 -1 -2 -1 -1", auto=true,

45..50..60 value of the 'central' value. So sum is much higher 1. With auto=false and center 80 - return white frame. May be something is changed in 'auto=true' internal processing ?

Attempt to float32:
ConvertBits(32)
GeneralConvolution(0, "
-1 -1 -1
-1 5 -1
-1 -1 -1 ", auto=true, luma=true, chroma=false)
ConvertBits(8)

change nothing from 8bit luma - still blur.

So it looks logic of GeneralConvolution kernel coefficients processing is changed somehow and now for 'sharp' kernels the total sum must be >>1 and only auto=true is working ?
For example now about good linear sharpener is
GeneralConvolution(0, "
-1 -2 -2 -2 -1
-2 -2 -3 -2 -2
-2 -3 70 -3 -2
-2 -2 -3 -2 -2
-1 -2 -2 -2 -1", auto=true, luma=true, chroma=false) - result demo https://imgsli.com/MTYxNDkz
And adjusting center member in range about 60..100 it is now possible to adjust 'strength'. Where 60 is very strong, 100 is very weak and 50 is sort of high-pass filter only. May it is also valuable mode but it looks old versions work differently and old matrices require re-adjustment of 'center' member.

Last edited by DTL; 11th March 2023 at 20:09.
DTL is offline   Reply With Quote
Old 11th March 2023, 20:22   #2298  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,654
Quote:
Originally Posted by DTL View Post
So auto=true do not work with zero and negative integer sum ?
auto is disabled when the sum is zero. If the sum is negative, then it divides by that negative sum, and I think that's where it's not behaving as you'd expect. But it is behaving correctly. I put the same maths through a different filter and got the same result.

The negative sum means the pixel with the positive value (the center one) makes a negative contribution to the output, while the surrounding negative coefficient pixels end up making a positive contribution. And the negative contribution of the center pixel is smaller than the positive contribution of the surrounding pixels, so the result looks like a blur.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 11th March 2023, 21:12   #2299  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,320
May be auto (normalizing) not needed when sum=1 ? Typical kernel normalizing process is:
1. calculate sum of all members.
2. divide each member to sum.

Convolution with kernel with sum=1 at least keep DC and very low frequencies components unchanged.
DTL is offline   Reply With Quote
Old 11th March 2023, 22:23   #2300  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,688
Quote:
Originally Posted by FranceBB View Post

We're really lucky to have you in this community, Ferenc! I mean it.
Ferenc needs to have his details in the forum changed from "Registered User" to Avisynth GOAT.
ryrynz is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:17.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.