Log in

View Full Version : SmoothAdjust [v3.20 - Update 2015/11/15]


Pages : 1 2 3 4 5 6 7 8 9 [10]

LouieChuckyMerry
15th March 2016, 08:09
Hi LaTo, and thank you very much for SmoothAdjust :) . As I was poking through the ReadMe I came across, under IX. SMOOTHLEVELS - LIMITING SETTINGS :

protect [default: -1]
---------------------
-1 = protecting off
>=0 = black zone protection
---> don't apply conversion on pixels egal or below this value
(ex: with 16, the black areas like borders
and generic are untouched so they don't look washed out)


and was wondering what "egal" means (highlighted in blue above). I'm thinking that it should be "equal" but wanted to check. Thanks.

LaTo
15th March 2016, 10:03
Hi LaTo, and thank you very much for SmoothAdjust :) . As I was poking through the ReadMe I came across, under IX. SMOOTHLEVELS - LIMITING SETTINGS :

protect [default: -1]
---------------------
-1 = protecting off
>=0 = black zone protection
---> don't apply conversion on pixels egal or below this value
(ex: with 16, the black areas like borders
and generic are untouched so they don't look washed out)


and was wondering what "egal" means (highlighted in blue above). I'm thinking that it should be "equal" but wanted to check. Thanks.

égal = equal in french, oups :D

LouieChuckyMerry
16th March 2016, 04:50
Pas de problème, merci beaucoup ;) .

burfadel
23rd July 2017, 11:25
How do I get the following, for example, to work using the Smoothtools option:
smoothtweak(hue1=1,hue2=1,saturation=1.05,lmode=1,limitstr=25)
smoothlevels(8,0.98,255,0,255,lmode=2,chroma=0,protect=2,ecenter=255)
smoothlevels(0,1.04,248,0,255,lmode=1,chroma=0,protect=2,ecenter=60)

It says the syntax is not correct. Now, yes I did specific the input_low etc stuff, no success.

For example, in the default.smt file if I use the example:
SmoothLevels(gamma=1.4,Lmode=1)
SmoothCurve(Ycurve="0-255;255-0")
it works

However, as soon as I add (building up to the example above):
SmoothLevels(input_low=8,gamma=1.4,Lmode=1)
SmoothCurve(Ycurve="0-255;255-0")
it doesn't work.

Therefore, if I have in the file, even just the first line of the code in question:
smoothlevels(input_low=8, gamma=0.98, input_high=255, output_low=0, output_high=255, lmode=2, chroma=0, protect=2, ecenter=255) which is supposedly correct according to the documentation, it doesn't work.

How do I get the three lines of code I used in the first example to work, in terms of syntax with the smoothtools command? Keeping in mind that naming the parameters according to syntax doesn't seem to work as in the line above.

StainlessS
23rd July 2017, 12:16
Would be best if you give full failing script and error message with line numbers etc.

I was under the impression that latest v3.20 does not work on XP (according to first post), just tried getting
the function list (via RT_Stats included FSEL_Make_PluginFunctionList.AVS script, and it works
(at least for producing list, not tried functions in a script yet).

here, function list (LaTo tends not to make it easy to see types in function prototype, [EDIT: nor default values])



SmoothAdjust_ORDERED_Function_List v3.20


There follows a list of all function names together with CPP style argument specifiers that inform
Avisynth the argument types and optional names. Optional arguments have square brackets surrounding
their name as in [name] and are followed by a type specifier character that gives the type.
Unnamed arguments are not optional. eg "cc[arg1]b[arg2]i" would be two compulsory unnamed clip args,
followed by optional 'arg1' of type bool and optional 'arg2' of type int.

# Argument type specifier strings.
c - Video Clip
i - Integer number
f - Float number
s - String
b - boolean
. - Any type (dot)
# Array Specifiers
i* - Integer Array, zero or more
i+ - Integer Array, one or more
.* - Any type Array, zero or more
.+ - Any type Array, one or more
# Etc
###################################


SmoothCurve "c[Ycurve]s[Ucurve]s[Vcurve]s[mode]i[limiter]b[TVrange]i[interp]i[dither]i[HQ]b[useMT]i[useOPT]i[debug]b[screenW]i"
"[screenH]i[scale]b"
SmoothCurve16 "c[Ycurve]s[Ucurve]s[Vcurve]s[mode]i[limiter]b[TVrange]i[interp]i[dither]i[HQ]b[useMT]i[useOPT]i[debug]b[screenW]i"
"[screenH]i[scale]b"
SmoothCustom "c[Yexpr]s[Uexpr]s[Vexpr]s[limiter]b[TVrange]i[interp]i[dither]i[HQ]b[useMT]i[useOPT]i[debug]b[screenW]i[screenH]i"
"[scale]b"
SmoothCustom16 "c[Yexpr]s[Uexpr]s[Vexpr]s[limiter]b[TVrange]i[interp]i[dither]i[HQ]b[useMT]i[useOPT]i[debug]b[screenW]i[screenH]i"
"[scale]b"
SmoothLevels "c[input_low]i[gamma]f[input_high]i[output_low]i[output_high]i[chroma]i[limiter]i[TVrange]b[preset]s[Lmode]i[darkSTR]i"
"[brightSTR]i[Ecurve]i[Ecenter]i[protect]i[interp]i[dither]i[HQ]b[useMT]i[useOPT]i[debug]b[screenW]i[screenH]i[scale]b"
SmoothLevels16 "c[input_low]i[gamma]f[input_high]i[output_low]i[output_high]i[chroma]i[limiter]i[TVrange]b[preset]s[Lmode]i[darkSTR]i"
"[brightSTR]i[Ecurve]i[Ecenter]i[protect]i[interp]i[dither]i[HQ]b[useMT]i[useOPT]i[debug]b[screenW]i[screenH]i[scale]b"
SmoothTools "c[filename]s[interp]i[dither]i[HQ]b[useMT]i[useOPT]i[debug]b[screenW]i[screenH]i[scale]b"
SmoothTools16 "c[filename]s[interp]i[dither]i[HQ]b[useMT]i[useOPT]i[debug]b[screenW]i[screenH]i[scale]b"
SmoothTweak "c[brightness]i[contrast]f[saturation]f[hue1]i[hue2]i[limiter]b[TVrange]b[Lmode]i[limitSTR]i[Ecurve]i[interp]i[dither]i"
"[HQ]b[useMT]i[useOPT]i[debug]b[screenW]i[screenH]i[scale]b"
SmoothTweak16 "c[brightness]i[contrast]f[saturation]f[hue1]i[hue2]i[limiter]b[TVrange]b[Lmode]i[limitSTR]i[Ecurve]i[interp]i[dither]i"
"[HQ]b[useMT]i[useOPT]i[debug]b[screenW]i[screenH]i[scale]b"

EDIT: Above edited for line wrap


avisource("F:\v\Cabaret.avi")
smoothtweak(hue1=1,hue2=1,saturation=1.05,lmode=1,limitstr=25)
smoothlevels(8,0.98,255,0,255,lmode=2,chroma=0,protect=2,ecenter=255)
smoothlevels(0,1.04,248,0,255,lmode=1,chroma=0,protect=2,ecenter=60)

Works just fine on Windows XP with current latest v3.20 [never used it before today because of XP+ only, note in first post])
Cabaret.avi is YV12, I'm on AVS v2.6 Standard, XP32SP3.

EDIT: What version plug you using ?
Also, you could make things easier for bug reports, to comment out (or remove) lines that do not contribute to the error
(at which line does the error occur, so people dont have to examine lines that are nothing to do with the problem).

EDIT: None of your failing snippits fail here.

burfadel
23rd July 2017, 14:13
Running them in the script like your:
avisource("F:\v\Cabaret.avi")
smoothtweak(hue1=1,hue2=1,saturation=1.05,lmode=1,limitstr=25)
smoothlevels(8,0.98,255,0,255,lmode=2,chroma=0,protect=2,ecenter=255)
smoothlevels(0,1.04,248,0,255,lmode=1,chroma=0,protect=2,ecenter=60)

works perfectly fine. The issue I am having is with the smoothtools function, where you put the code in an external file (default.smt is the default), but you have to specify all the paramateres with their full names such that the second line (for example) becomes:
smoothlevels(input_low=8, gamma=0.98, input_high=255, output_low=0, output_high=255, lmode=2, chroma=0, protect=2, ecenter=255)

The reason why you would load them from the external file using smoothtools is that it does everything in one pass, according to the literature. Supposedly the result should be more accurate and also be faster. This is irrelevant if you run one line, but since there are three separate commands, running them as one function would be advantageous.

From the literature:

SmoothTools allows to use all the previous filters in one single pass.
The benefits are significant speedup, no rounding errors between each filters (internal 32-bits),
one pass smoothing/dithering (much better quality) and preset support (one file by settings).


filename [default: "default.smt"]
---------------------------------
File used for processing

---> SYNTAX:
-------
The file syntax is the same as avisynth but all parameters must be named.
Common settings between filters (smooth, dither, useMT, useOPT, ...) should not be used.
There is no limit to the number of filters in one file (but only one filter by line).
8-bits and 16-bits filters can not be mixed.

---> EXAMPLES:
---------
SmoothLevels(gamma=1.4,Lmode=1)
SmoothCurve(Ycurve="0-255;255-0")
OR
SmoothTweak16(saturation=1.6,Lmode=2)
SmoothCustom16(Yexpr="65535-Y")

The examples work! It's when you add the additional functions to smoothlevels (for example) where it doesnt.

burfadel
23rd July 2017, 15:51
Nevermind, I worked it out! You have to have the commands in the correct order even if specified, and it is fully case sensitive. For instance, you have to type SmoothLevels not Smoothlevels, you have to type Lmode not lmode, limitSTR not limitstr etc. If it isn't exact smoothtools doesn't work.

Logan9778
16th May 2018, 02:56
Never mind. I figured it out.

silverwing
7th September 2018, 06:38
Tell me, please, are there any new versions of SmoothAdjust? The latest version of the plug-in is 3.20, almost three years ago. Thank you for attention.

StainlessS
7th September 2018, 16:14
Dont think so, LaTo has not (I think) been around for some time, and the source (like most LaTo source), was never published.

kedautinh12
23rd October 2019, 16:30
link download died, anyone have alternative link?? thanks

ChaosKing
23rd October 2019, 16:52
The link on the first page works for me

kedautinh12
23rd October 2019, 18:14
The link on the first page works for me

Oh, now it work for me

foobar2000
25th March 2020, 11:54
I have a question, when do we add smoothlevels(), at the end of the script or before tfm or before crop and resize?

I add it or coloryuv at the end of script, hope it's fine.

real.finder
28th April 2020, 16:26
since SmoothAdjust is close source and original SmoothLevels Thread is closed

here a HBD update for the old SmoothLevels (now renamed as oSmoothLevels) https://github.com/realfinder/AVS-Stuff/raw/Community/avs%202.5%20and%20up/oSmoothLevels.avsi

try it with useGF=false for now

Selur
1st June 2020, 07:31
With debug enabled SmoothCurve gives an Access Violation with Avisynth 3.6.
-> any hope for an update?

kedautinh12
1st June 2020, 11:40
Can you use with 3.6.1 test 4??

StainlessS
1st June 2020, 15:14
How similar are oSmoothLevels results to Smoothadjust dll ?

[could it be used as source for CPP re-write]

real.finder
28th June 2020, 11:18
How similar are oSmoothLevels results to Smoothadjust dll ?

[could it be used as source for CPP re-write]

don't know, and didn't try it yet

anyway, I did another update to not use useGF by default in HBD and another changes that almost same as I did for MCTemporalDenoise (use GradFun2DB3 from my edit of GradFun2DBmod in avs26/avs+)

StainlessS
28th June 2020, 13:55
Thanks RF.

Sharc
7th July 2021, 12:09
For planar YUV input sources >8bit (e.g. using convertbits(12)) I am getting weird outputs with SmoothAdjust (SmoothTweak, SmoothLevels). Only the left half of the picture is affected and badly color distorted. The right half remains untouched. Using SmoothAdjust.dll version 3.20. Any explanation what could be wrong?

kedautinh12
7th July 2021, 12:53
Try use oSmoothLevels of real.finder replace
https://raw.githubusercontent.com/realfinder/AVS-Stuff/Community/avs%202.5%20and%20up/oSmoothLevels.avsi

Sharc
7th July 2021, 14:56
Yep, oSmoothLevels() works here for higher bitdepths. Thanks.
Is there also an "oSmoothTweak()" available?

kedautinh12
7th July 2021, 15:08
Try use internal function tweak() replace
http://avisynth.nl/index.php/Tweak

Sharc
7th July 2021, 15:19
The internal Tweak() is working, yes. It's just the SmoothTweak() which fails for higher bitdepths.

Emulgator
7th July 2021, 21:11
To use SmoothAdjust with 16 bit, just
vidcurve=SmoothCurve16(ConvertToStacked(vid), HQ=true, interp=100, Ycurve="0-0;15360-30720;65535-65535", Ucurve="0-0;65535-65535", Vcurve="0-0;65535-65535").ConvertFromStacked()

Reel.Deel
8th July 2021, 00:17
For planar YUV input sources >8bit (e.g. using convertbits(12)) I am getting weird outputs with SmoothAdjust (SmoothTweak, SmoothLevels). Only the left half of the picture is affected and badly color distorted. The right half remains untouched. Using SmoothAdjust.dll version 3.20. Any explanation what could be wrong?

SmoothAdjust does not support native HBD so the Stack-16 method must be used. Also all of the filter names end with 16, for example SmoothLevels16(...).


Source()
ConvertBits(16)
ConvertToStacked(16)
SmoothTweak16(saturation=1.6,Lmode=2)
ConvertFromStacked(16)

And as it states in the documentation, when working in 16 bits some parameters must be mapped to the [0-65535] range.

Edit: oops, I didn't see Emulgator's post, I started to reply some hours ago and had to leave :o

Sharc
8th July 2021, 12:50
Thanks Emulgator and Reel.Deel for the hints.

Selur
4th February 2024, 21:38
When using:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\LSMASHSource.dll")
LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\dither.dll")
LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\SmoothAdjust.dll")
Import("F:\Hybrid\64bit\Avisynth\avisynthPlugins\mtmodes.avsi")
# loading source: C:\Users\Selur\Desktop\Tonight (with Emma Hewitt) (M).mov
# color sampling YUY2@10, matrix: bt709, scantyp: progressive, luminance scale: limited
LWLibavVideoSource("C:\Users\Selur\Desktop\Tonight (with Emma Hewitt) (M).mov",cache=false,format="YUV422P16", prefer_hw=0,repeat=true)
# current resolution: 1920x815
# cropping
Crop(0,1,0,0)# 1920x814
SmoothTweak16(brightness=25600)
# adjust color to RGB32 (color matrix: Rec709)
ConvertToRGB32(matrix="Rec709")
# setting output fps to 25.000fps
AssumeFPS(25,1)
PreFetch(16)
# output: color sampling RGB32@16, matrix: bt709, scantyp: progressive, luminance scale: limited
return last
I get:
SmoothAdjust: Width and height must be MOD2! (J:\tmp\tempPreviewAvisynthFile21_32_41_409.avs, line 13)
but I don't understand why, both 1920 and 814 are mod2.

Cu Selur

Ps.: I'm using Avisynth+ 3.7.3

Rumbah
4th February 2024, 21:46
I had a similar problem with MCTemporalDenoise, the problem was that although the error message said mod2, it worked only with mod 4.

Selur
4th February 2024, 21:53
Got, it

LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\ConvertStacked.dll")
ConvertToStacked(16)
SmoothTweak16(brightness=25600)
ConvertFromStacked(16)


Cu Selur