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 4th September 2021, 13:04   #301  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,364
Quote:
Originally Posted by real.finder View Post
Code:
#ex_boxblur(5,mode="mean")
Dither_convert_8_to_16().Dither_box_filter16(5).DitherPost()
but I can see that they are not similar
They are the same, the only difference is that Dither_box_filter16 is frequency domain based so it's faster for higher sigma, when above 5 in ex_boxblur().
Code:
a=Dither_convert_8_to_16().Dither_box_filter16(5).DitherPost()
ex_boxblur(4,mode="mean")
ex_makediff(a, aug=true, UV=128)
So if the question is if we need a DFT box filter, probably the answer is yes, same with binomial blur. Of course with HBD support and asymmetric blur option. I would also vouch for porting CTM (Constant Time Median) from VapourSynth, so doing a 5x5 or 7x7 median isn't as slow as it is now.

ex_bilateral() gives same output as vsTBilateral(), speed is similar as well. Dither_bilateral16() employs shortcuts to speed up the process but in my opinion the output doesn't look nice.

Excerpt from docs.
Quote:
"Actually, this implementation is an approximation of a bilateral filter, like many other image processing tools do. The spatial weighting is not a gaussian curve but a box, and the value weighting is a trapezoid."
Thanks for LimitFilter link, I will have a look when I got time, I've been busy porting *.mp4 sharpeners
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 4th September 2021, 13:11   #302  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,589
Quote:
Code:
a=Dither_convert_8_to_16().Dither_box_filter16(5).DitherPost()
ex_boxblur(4,mode="mean")
ex_makediff(a, aug=true, UV=128
)
so Dither_box_filter16(x) = ex_boxblur(x-1, mode="mean")

Quote:
CTM (Constant Time Median) from VapourSynth
https://github.com/pinterf/MedianBlur2

Quote:
Dither_bilateral16() employs shortcuts to speed up the process but in my opinion the output doesn't look nice.
but there are people who like the Dither_bilateral16 more than others
__________________
See My Avisynth Stuff

Last edited by real.finder; 4th September 2021 at 13:21.
real.finder is offline   Reply With Quote
Old 4th September 2021, 13:36   #303  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,364
MedianBlur2 didn't perform well on my benchmarks, something is going on there, occasionally it would perform "fine" but must of the time it crawls so I don't know.

I will try to post comparison shots for ex_bilateral() and Dither_bilateral16() when I got some time.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 4th September 2021, 15:27   #304  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,364
Here's the comparison (brighten to see better):

Converttostacked().Dither_bilateral16(radius=2,thr=10,flat=1.0,u=1,v=1).Convertfromstacked()


ex_bilateral(1)


As you can see Dither_bilateral16() output is very dirty/grainy, and artifacts similar to combing.



By the way, updated SharpenersPack with new sharpeners; SSSharp, ReCon, blah, MedSharp, ex_unsharp and SharpenComplex2
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 4th September 2021, 17:16   #305  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,589
Quote:
Originally Posted by Dogway View Post
Here's the comparison (brighten to see better):

Converttostacked().Dither_bilateral16(radius=2,thr=10,flat=1.0,u=1,v=1).Convertfromstacked()


ex_bilateral(1)


As you can see Dither_bilateral16() output is very dirty/grainy, and artifacts similar to combing.



By the way, updated SharpenersPack with new sharpeners; SSSharp, ReCon, blah, MedSharp, ex_unsharp and SharpenComplex2
I think it depends on the settings and the source

here a friend words



__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 5th September 2021, 10:26   #306  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 692
Quote:
Originally Posted by Pauly Dunne View Post
Well, I have tried a lot of different things to diagnose this, but it seems to be on only 4 servers that I use for the Distributed Encoding function of RipBot.

So they are simply connected via a LAN, and don't need the complete program to encode (very clever, actually), and yet other pc's on the LAN don't have the problem,

So I think my only recourse is a fresh setup of Windows.

Update:- It turned out that I needed to update these:-VC_redist.x86.exe & VC_redist.x64.exe

There must be some subtle change in Dog's ExTools & SMDegrain.
I've finally figured out what the problem is....

Even tho it was good to update VC, it's an OpenCL problem when using KNLMeansCL, as a pre-filter in Doggy's SMDegrain !!!

The pc's that have this error haven't got a compatible GPU, and I'm not sure if you can get a "driver" for older Xeon Intel CPU's for OpenCL Support.
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)
Pauly Dunne is offline   Reply With Quote
Old 5th September 2021, 11:11   #307  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,160
Wait a minute, i remember you said you had Ryzen cpu??

Last edited by kedautinh12; 5th September 2021 at 11:25.
kedautinh12 is offline   Reply With Quote
Old 5th September 2021, 12:41   #308  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 692
Quote:
Originally Posted by kedautinh12 View Post
Wait a minute, i remember you said you had Ryzen cpu??
Good memory, I actually have 2

I also have a few I7 Intels, some E5 Xeons, And a LOT of older X series Xeons.

And the older Xeons have no "proper" Gpu's....

Its a RipBot264 Distributed Encoding set up...
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)
Pauly Dunne is offline   Reply With Quote
Old 5th September 2021, 12:57   #309  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,160
Quote:
Originally Posted by Pauly Dunne View Post
Good memory, I actually have 2

I also have a few I7 Intels, some E5 Xeons, And a LOT of older X series Xeons.

And the older Xeons have no "proper" Gpu's....

Its a RipBot264 Distributed Encoding set up...
Rich oldman. When you want discard any old amd ryzen 5000 series, can you give me
kedautinh12 is offline   Reply With Quote
Old 5th September 2021, 21:23   #310  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,598
Be kind, ask for grannys. These are good too ;-)
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Old 6th September 2021, 07:15   #311  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 692
Quote:
Originally Posted by kedautinh12 View Post
You welcome


I'll see you @ the other Forum.
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)
Pauly Dunne is offline   Reply With Quote
Old 6th September 2021, 23:12   #312  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,364
ExTools updated to v5.4
-ex_vinverse() - small optimization
-ex_blur() - 'bifit' arg to toggle between gaussian or binomial distribution
-ex_guidedblur(), ex_ANguidedblur() - moved to yugefunc.avsi
-ex_GaussianBlur() - New. Optimized true gaussian blur approximation for high sigma
-ex_luts() - bugfix when using two clips. 'exprf' arg to append code to the end.
-ex_shape() - add anisotropy for shapes (except 'cross')
-sel_med() - more medians, fill up to n=49

Just updated ExTools to v5.4, required for my recent updates (from today updates, and before for SharpenersPack). This feels like the last version although I will fix any reported bugs or add things if it feels convenient, but my update rate on ExTools will be much slower from now on.
I also uploaded today v1.0 of SharpenersPack, because it feels very solid. There are possible additions like Oyster, qUINT Sharp, NLM Sharp and other kind of sharpeners, but for now it will stay like this.
Also updated SMDegrain to refine ex_retinex() with the new ex_GaussianBlur() function.

Now I will focus on yugefunc and port worthy functions from VapourSynth, I added a list in the header for the filters I wish to port.
I will also have a look at QTGMC to optimize it more, port Didée's LTSMC, remake ex_vibrance() and whatever arises.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 7th September 2021, 00:57   #313  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 692
Quote:
Originally Posted by Dogway View Post
ExTools updated to v5.4
-ex_vinverse() - small optimization
-ex_blur() - 'bifit' arg to toggle between gaussian or binomial distribution
-ex_guidedblur(), ex_ANguidedblur() - moved to yugefunc.avsi
-ex_GaussianBlur() - New. Optimized true gaussian blur approximation for high sigma
-ex_luts() - bugfix when using two clips. 'exprf' arg to append code to the end.
-ex_shape() - add anisotropy for shapes (except 'cross')
-sel_med() - more medians, fill up to n=49

Just updated ExTools to v5.4, required for my recent updates (from today updates, and before for SharpenersPack). This feels like the last version although I will fix any reported bugs or add things if it feels convenient, but my update rate on ExTools will be much slower from now on.
I also uploaded today v1.0 of SharpenersPack, because it feels very solid. There are possible additions like Oyster, qUINT Sharp, NLM Sharp and other kind of sharpeners, but for now it will stay like this.
Also updated SMDegrain to refine ex_retinex() with the new ex_GaussianBlur() function.

Now I will focus on yugefunc and port worthy functions from VapourSynth, I added a list in the header for the filters I wish to port.
I will also have a look at QTGMC to optimize it more, port Didée's LTSMC, remake ex_vibrance() and whatever arises.
Busy, busy, busy...I'm having a hard time just keeping up



Edit :- Unfortunately, since changing up to SMDegrain 3.2.8, I'm getting another Line 161 error...go back to 3.2.7, it's good , when using BM3D in CPU mode.

On further investigation, the difference was :-
Quote:
function ex_BM3D(clip a, float "sigma", int "radius", int "UV") {

rgb = isRGB(a)
isy = isy(a)
bi = BitsPerComponent(a)

s = Default(sigma, 3)
r = Default(radius, 1)
UV = Default(UV, rgb ? 3 : 1)

ch = !(isy || UV!=3)
ch ? ConverttoYUV444(a,chromaresample="spline16") : a
ConvertBits(bits=32, fulls=fs)

BM3D_CPU(sigma=[s,ch?s/2:0,ch?s/2:0], radius=r, chroma=ch)
BM3D_VAggregate(radius=r)

if (bi < 32) {
ConvertBits(bits=16, dither=-1, fulls=fs)
ConvertBits(bits=bi, dither= 1, fulls=fs)
}
ch ? MatchColorFormat(a) : mergechroma(a) }
full=fs was the only change I could see, so whatever that's for, didn't work for me.

Also note other change in "red" (thanks to kedautinh12)
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)

Last edited by Pauly Dunne; 7th September 2021 at 04:05.
Pauly Dunne is offline   Reply With Quote
Old 7th September 2021, 11:36   #314  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,616
Quote:
Originally Posted by Pauly Dunne View Post
Unfortunately, since changing up to SMDegrain 3.2.8, I'm getting another Line 161 error...go back to 3.2.7, it's good , when using BM3D in CPU mode.
Updated to last BM3D of a few days ago?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 7th September 2021, 11:41   #315  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,616
Quote:
Originally Posted by Dogway View Post
I will also have a look at QTGMC to optimize it more, port Didée's LTSMC, remake ex_vibrance() and whatever arises.
Is Zs_RF_Shared still required to use SMDegrain?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 7th September 2021, 12:55   #316  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 692
Quote:
Originally Posted by tormento View Post
Updated to last BM3D of a few days ago?
I only have a problem when using it in CPU mode..
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)
Pauly Dunne is offline   Reply With Quote
Old 7th September 2021, 15:33   #317  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,364
@Pauly Dunne: Thanks for the report! I updated SMDegrain, last minute changes are never good. Also added CPU mode but it's not callable from SMDegrain args, just change to CUDA=false in line 159.

@tormento: I think it's needed only for sh_GetUserGlobalIMTint(), but when I used it it didn't report my threads. I still don't know how AviSynth doesn't have a thread reporting internal function...
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 7th September 2021, 17:28   #318  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,589
Quote:
Originally Posted by Dogway View Post
@tormento: I think it's needed only for sh_GetUserGlobalIMTint(), but when I used it it didn't report my threads. I still don't know how AviSynth doesn't have a thread reporting internal function...
there are https://forum.doom9.org/showthread.p...53#post1925253 but seems no one use it
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 7th September 2021, 18:37   #319  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,364
Can avstp report cores/thread as string?

Here an image for ex_shapes(), still need to work out cross anisotropy (EDIT: fixed):
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 15th September 2021 at 00:13.
Dogway is offline   Reply With Quote
Old 8th September 2021, 05:08   #320  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,589
Quote:
Originally Posted by Dogway View Post
Can avstp report cores/thread as string?
don't think so, I didn't mean avstp but https://forum.doom9.org/showthread.p...21#post1777021 and https://forum.doom9.org/showthread.p...46#post1778346
__________________
See My Avisynth Stuff
real.finder 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 00:00.


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