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 Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th September 2021, 22:15   #321  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
Yes, the MT resizers. I used them some time ago, then I benchmarked recently and wasn't as fast as internal. Maybe you need several resizer calls to see the improvement, I will test that but IMO these kind of things should be dealt directly in AVS+, I for one am aware of the issue and try to merge redundant Expr() calls into one to reduce the call penalty (used registers).

By the way, big update day. SMDegrain, QTGMC, ExTools, GradePack, etc
SMDegrain: reworked ex_retinex() to don't cause flicker in new 'lvl' mode 2 while keeping performance, 'lvl' 1 uses fixed levels (Default)
ExTools: basically adding 'tv_in', 'tv_out' args to ex_bs() so you can convert values from PC levels to TV levels and opposite.
QTGMC: Performance update, some cleanup, and a few small bugs. Still needs 32-bit support.
GradePack: reworked chroma in ex_contrast() and ex_levels() to make more sense. Actually ex_levels() reaches parity with Levels() regarding chroma. Also added more dither modes to ex_posterize() by using fmtc_bitdepth(). Still need to update ex_vibrance().
Other: Small updates to ResizersPack, DeStripe, FastLineDarkenMOD, LSFMod, FrameRateConverter and GrainFactory3mod.

Please report if you find any issue.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 9th September 2021 at 22:19.
Dogway is offline   Reply With Quote
Old 10th September 2021, 06:34   #322  |  Link
guest
Guest
 
Posts: n/a
Quote:
Originally Posted by Dogway View Post
Yes, the MT resizers. I used them some time ago, then I benchmarked recently and wasn't as fast as internal. Maybe you need several resizer calls to see the improvement, I will test that but IMO these kind of things should be dealt directly in AVS+, I for one am aware of the issue and try to merge redundant Expr() calls into one to reduce the call penalty (used registers).

By the way, big update day. SMDegrain, QTGMC, ExTools, GradePack, etc
SMDegrain: reworked ex_retinex() to don't cause flicker in new 'lvl' mode 2 while keeping performance, 'lvl' 1 uses fixed levels (Default)
ExTools: basically adding 'tv_in', 'tv_out' args to ex_bs() so you can convert values from PC levels to TV levels and opposite.
QTGMC: Performance update, some cleanup, and a few small bugs. Still needs 32-bit support.
GradePack: reworked chroma in ex_contrast() and ex_levels() to make more sense. Actually ex_levels() reaches parity with Levels() regarding chroma. Also added more dither modes to ex_posterize() by using fmtc_bitdepth(). Still need to update ex_vibrance().
Other: Small updates to ResizersPack, DeStripe, FastLineDarkenMOD, LSFMod, FrameRateConverter and GrainFactory3mod.

Please report if you find any issue.
I thought you'd finished modding these....

No problems for me
  Reply With Quote
Old 10th September 2021, 14:20   #323  |  Link
Julek
Registered User
 
Julek's Avatar
 
Join Date: Dec 2020
Posts: 99
I don't know if this has been ported to AVS yet, but chroma recontructing would be a good function for you.
And since the AVS's Expr is more complete than the VS's Expr you might get an even better result.

Func:
https://github.com/Irrational-Encodi...on.py#L70-L119
https://en.wikipedia.org/wiki/Simple_linear_regression

Usage:
https://github.com/Ichunjo/encode-sc...u03.py#L72-L93
https://github.com/Ichunjo/encode-sc...3.py#L182-L207
https://github.com/Ichunjo/encode-sc..._02.py#L68-L90

Result: https://slow.pics/c/MfqBYVId
Julek is offline   Reply With Quote
Old 10th September 2021, 17:46   #324  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
Quote:
Originally Posted by Pauly Dunne View Post
I thought you'd finished modding these....
ex_retinex() always had problems with the autolevels, so it was prone to change. Yesterday I also tested gamma aware blurring for retinex and results were worse even after normalization, so I'm always testing how to improve things or make them faster. The core of SMDegrain though is pretty much done with the current concept. MatteCrop needs an update for the lookback loop, I will replace it with frameProps but didn't have time yet to implement. GrainFactory3mod is slow, I want to replace it with something new. It's a bit of a cleanup before I move to yugefunc.


@Julek: Looks good! anything that is math clean and fast is welcome. I will have a look at linear regression and see how it fits although the chroma reconstruction function shown includes some over the top filtering with MaskedDHA, QTGMC, etc. I already had a chroma reconstruction function ported from feisty2.
By the way yesterday I ported adaptive threshold successfully, I'm still on optimization stage. Do you have performance numbers for 1080p@16-bit (without bitdepth down) and CPU? I'm managing 3 parameters, threshold, blur scale, and integral size.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 10th September 2021, 22:56   #325  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 721
Tried using ex_median() and I get error:
Code:
Script error: Expr: Failed to convert 'max to float' (extools.avsi, line 2511)
Am I missing something?
anton_foy is offline   Reply With Quote
Old 10th September 2021, 23:42   #326  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
"DGM0" ? Works fine here. Are you in avs+ 3.7.1?
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 10th September 2021, 23:51   #327  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 721
Quote:
Originally Posted by Dogway View Post
"DGM0" ? Works fine here. Are you in avs+ 3.7.1?
I sure hope so, because it gave me another error message "need to upgrade to avisynth 3.7.1+" before so I upgraded and now this error message turned up (I replaced the old avisynth.dll with the new x86 3.7.1 one in sysWOW64 and system32 folder)
anton_foy is offline   Reply With Quote
Old 11th September 2021, 00:04   #328  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
In system32 goes the one with CRC32: D12B9040 and in SysWOW64 the one: 4B48E737 (size is bigger here)

EDIT: you need version test9, check here.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 11th September 2021 at 00:15.
Dogway is offline   Reply With Quote
Old 11th September 2021, 00:15   #329  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 721
Quote:
Originally Posted by Dogway View Post
In system32 goes the one with CRC32: D12B9040 and in SysWOW64 the one: 4B48E737 (size is bigger here)
Sorry for the stupid off topic questions. I use 32-bit Avisynth+.
Which ones are CRC32: D12B9040 and 4B48E737?
Two different avisynth.dll's?
anton_foy is offline   Reply With Quote
Old 11th September 2021, 00:21   #330  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
Yes, x64 version goes to system32 and x86 goes to sysWOW64 if I reckon correctly. Check the link in my edit above. Then with avsmeter you can check your install is fine: "avsmeter64 avsinfo -lf"

@Julek: ex_athres(th=40,sigma=6) running here at 194fps for my CPU with Prefetch(8). It can be sped up slightly but I need this avs+ bug fixed.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 11th September 2021 at 01:11.
Dogway is offline   Reply With Quote
Old 11th September 2021, 00:54   #331  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 721
Quote:
Originally Posted by Dogway View Post
Yes, x64 version goes to system32 and x86 goes to sysWOW64 if I reckon correctly. Check the link in my edit above. Then with avsmeter you can check your install is fine: "avsmeter64 avsinfo -lf"
it is working now!
anton_foy is offline   Reply With Quote
Old 11th September 2021, 01:26   #332  |  Link
Julek
Registered User
 
Julek's Avatar
 
Join Date: Dec 2020
Posts: 99
Quote:
Originally Posted by Dogway View Post
@Julek: ex_athres(th=40,sigma=6) running here at 194fps for my CPU with Prefetch(8). It can be sped up slightly but I need this avs+ bug fixed.
3001 frames 1080p (AMD 3700X)
src: Time elapsed: 0:06.013 - 499.10511998696642876894 FPS
VS + OpenCV adaptiveThresh (luma only) : Time elapsed: 0:11.184 - 268.33492243462092119444 FPS

I can only test in 8 bits, because that's how VS+CV works
Julek is offline   Reply With Quote
Old 11th September 2021, 01:59   #333  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
Then more or less the same if it was processed in 16-bit, will upload tomorrow if possible with multi-otsu or adaptive histogram.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 12th September 2021, 06:19   #334  |  Link
guest
Guest
 
Posts: n/a
Quote:
Originally Posted by Dogway View Post
In system32 goes the one with CRC32: D12B9040 and in SysWOW64 the one: 4B48E737 (size is bigger here)

EDIT: you need version test9, check here.
Hey Dogway,

After clicking on the link, I found test 11 & test 12 of 3.7.1, so naturally I grabbed them, unfortunately both test 11 & 12 give me a Line 161 error in SMDegrain 3.2.9d

So I had to return to test 9 or
  Reply With Quote
Old 12th September 2021, 09:27   #335  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
Yeah, it's because this commit yesterday, guess my trick doesn't work now, will have to ask WolframRhodium to make sigma arg array type. I will update it.

@Julek: Just uploaded ex_athres(). It's not mathematically exact to the OpenCV implementation because I didn't check its source code but comparing with your test clips and other samples I found it works wonders. Now it looks to me more like an edge detection filter than a threshold per se. You need AVS+ 3.7.1 test12 released yesterday for the integral optimizations. It's basically a DoBtG (Difference of Box to Gaussian) but the integral helps to clean the output a bit more.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 12th September 2021 at 10:01.
Dogway is offline   Reply With Quote
Old 12th September 2021, 13:44   #336  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,620
Quote:
Originally Posted by Dogway View Post
Yeah, it's because this commit yesterday, guess my trick doesn't work now, will have to ask WolframRhodium to make sigma arg array type. I will update it.
https://github.com/WolframRhodium/Va...uns/1215772307
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 13th September 2021, 03:39   #337  |  Link
guest
Guest
 
Posts: n/a
Quote:
Originally Posted by Dogway View Post
Yeah, it's because this commit yesterday, guess my trick doesn't work now, will have to ask WolframRhodium to make sigma arg array type. I will update it.
Hey Dogway,

Have been updating things again, with Extools 5.6, etc. and I grabbed this :-

https://github.com/WolframRhodium/Va...uns/1215772307 (thanks real.finder)

Wolfram changed quite a bit in the latest build

re-addressed my scripts, and it now seems to be working with AVS test 12
  Reply With Quote
Old 13th September 2021, 03:44   #338  |  Link
Julek
Registered User
 
Julek's Avatar
 
Join Date: Dec 2020
Posts: 99
Quote:
Originally Posted by Dogway View Post
@Julek: Just uploaded ex_athres()
It's not working here.
Expr: Failed to convert 'B^' to float
Same thing with 3.7.1 test12
Julek is offline   Reply With Quote
Old 13th September 2021, 09:52   #339  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
Are you on linux? It certainly looks like it's not returning the next string line correctly, this was implemented a few test versions earlier but at least it works for me on Windows.

EDIT: Can you run the next?
Code:
Expr(last," x X^
range_max X - abs","")
The line carriage in ExTools should be Line Feed -> "LF"

Test other examples like ex_median(mode="median5")
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 13th September 2021 at 10:24.
Dogway is offline   Reply With Quote
Old 13th September 2021, 15:44   #340  |  Link
Julek
Registered User
 
Julek's Avatar
 
Join Date: Dec 2020
Posts: 99
I am on windows 10, the problem was the line break, I edited it to one line and it worked.
I'm not very familiar with AVS and may not have installed test12 correctly.
I will do more tests tonight.
Julek is offline   Reply With Quote
Reply

Tags
avisynth, dogway, filters, hbd, packs

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 12:12.


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