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. |
17th March 2014, 20:56 | #442 | Link | |
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
Quote:
I don't know why it's working now, but that's great! |
|
14th October 2014, 14:17 | #444 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Hi LaTo, I was wondering how can I convert your SmoothYLevels function to work on 16-bit content? Change all 255's to 65535? But how about the other numbers (162.97466)?
Quote:
Last edited by Reel.Deel; 14th October 2014 at 14:22. Reason: typo |
|
14th October 2014, 14:23 | #445 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Reel.Deel,
Quick answer, just leave that number as it is and try it out, LaTo should (I think) confirm. EDIT: OOps, Above is RUBBISH. Perhaps 65535 should be 65280 (255 * 256), and 162.97466 should be 41721.51296 (162.97466 *256.0).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 14th October 2014 at 15:04. |
14th October 2014, 14:30 | #446 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
I tried just switching SmoothCustom to SmoothCustom16 and leaving the rest as is but with SmoothYLevels(gamma=1.1) the result is different (darker).
Edit: StainlessS: I had 65280 in my previous post but changed it to 65535 since I wasn't sure. Last edited by Reel.Deel; 14th October 2014 at 14:47. |
14th October 2014, 14:43 | #447 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Prev post fixed, Not sure but I think 16 bit max is 255 *256 (ie $FF00).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
14th October 2014, 14:57 | #448 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Perhaps: (max is I think $FF00 in Stack16),
If max is 65280 (255*256 ie $FF00) then 65280 (255 * 256), and 162.97466 should be 41721.51296 (162.97466 *256.0). If max is 65535 (255*257 ie $FFFF) then 65535 (255 * 257), and 162.97466 should be 41884.48762 (162.97466 *257.0).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 14th October 2014 at 15:21. |
14th October 2014, 17:59 | #449 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Ok, due to this comment I decided to go with 65280 and 41721.51296 as suggested by StainlessS. Visually it looks identical to the original SmoothYLevels. (I hope it's correct)
Quote:
Code:
function SmoothYlevels16(clip clp, \ int "input_low", float "gamma", int "input_high", \ int "output_low", int "output_high", \ string "mode", int "TVrange", bool "limiter", bool "show") { input_low = Default(input_low, 0 ) gamma = Default(gamma, 1.0 ) input_high = Default(input_high, 65280 ) output_low = Default(output_low, 0 ) output_high = Default(output_high, 65280 ) mode = Default(mode, "Y" ) TVrange = Default(TVrange, 0 ) limiter = Default(limiter, false ) show = Default(show, false ) exprY = "(((((Y-"+string(input_low)+")/("+string(input_high)+"-"+string(input_low)+"))^(1/"+string(gamma)+"))*("+string(output_high)+"-"+string(output_low)+"))+"+string(output_low)+")" exprG = (gamma>1.0) ? "((("+string(exprY)+"*Y)+(Y*(65280-Y)))/65280)" : "((("+string(exprY)+"*(65280-Y))+(Y*Y))/65280)" exprS = "((("+string(exprY)+"*(sin((Y/41721.51296))*65280))+(Y*(65280-(sin((Y/41721.51296))*65280))))/65280)" exprC = "((("+string(exprY)+"*(65280-(cos((Y/41721.51296))*65280)))+(Y*(cos((Y/41721.51296))*65280)))/65280)" expr = (mode == "G") ? exprG : (mode == "S") ? exprS : (mode == "C") ? exprC : exprY return clp.SmoothCustom16(Yexpr=expr,TVrange=TVrange,limiter=limiter,debug=show) # changed "show" to "debug" to be in compliance with the latest SmoothAdjust } |
|
15th November 2015, 17:02 | #450 | Link | |
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
SmoothAdjust [v3.20 - Update 2015/11/15]
Quote:
This small update was already planned, so here it is! |
|
15th March 2016, 08:09 | #451 | Link |
Registered User
Join Date: Feb 2014
Posts: 356
|
Hi LaTo, and thank you very much for SmoothAdjust . As I was poking through the ReadMe I came across, under IX. SMOOTHLEVELS - LIMITING SETTINGS :
Code:
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) |
15th March 2016, 10:03 | #452 | Link | |
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
Quote:
|
|
23rd July 2017, 11:25 | #454 | Link |
Registered User
Join Date: Aug 2006
Posts: 2,229
|
How do I get the following, for example, to work using the Smoothtools option:
Code:
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) For example, in the default.smt file if I use the example: Code:
SmoothLevels(gamma=1.4,Lmode=1) SmoothCurve(Ycurve="0-255;255-0") However, as soon as I add (building up to the example above): Code:
SmoothLevels(input_low=8,gamma=1.4,Lmode=1) SmoothCurve(Ycurve="0-255;255-0") Therefore, if I have in the file, even just the first line of the code in question: Code:
smoothlevels(input_low=8, gamma=0.98, input_high=255, output_low=0, output_high=255, lmode=2, chroma=0, protect=2, ecenter=255) 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. |
23rd July 2017, 12:16 | #455 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
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]) Code:
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" Code:
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) 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.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 23rd July 2017 at 13:12. |
23rd July 2017, 14:13 | #456 | Link | |
Registered User
Join Date: Aug 2006
Posts: 2,229
|
Running them in the script like your:
Code:
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) 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: Quote:
Last edited by burfadel; 23rd July 2017 at 14:17. |
|
23rd July 2017, 15:51 | #457 | Link |
Registered User
Join Date: Aug 2006
Posts: 2,229
|
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.
|
7th September 2018, 16:14 | #460 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Dont think so, LaTo has not (I think) been around for some time, and the source (like most LaTo source), was never published.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
|