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 17th March 2014, 19:50   #441  |  Link
TheSkiller
Registered User
 
Join Date: Dec 2007
Location: Germany
Posts: 632
I'm not sure you understand me.^^
I'm currently using version 3.00 with Win XP SP2 no problems at all. It does load and work even though there's no SP3 installed which is great.
TheSkiller is offline   Reply With Quote
Old 17th March 2014, 20:56   #442  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by TheSkiller View Post
I'm not sure you understand me.^^
I'm currently using version 3.00 with Win XP SP2 no problems at all. It does load and work even though there's no SP3 installed which is great.
It seems I was tired...
I don't know why it's working now, but that's great!
LaTo is offline   Reply With Quote
Old 3rd September 2014, 20:33   #443  |  Link
killerteengohan
Registered User
 
Join Date: Feb 2013
Posts: 68
This is a great filter and I really like it.
killerteengohan is offline   Reply With Quote
Old 14th October 2014, 14:17   #444  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
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:
Originally Posted by LaTo View Post
Code:
function SmoothYlevels(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,  255  )
    output_low  = Default(output_low,  0    )
    output_high = Default(output_high, 255  )
    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*(255-Y)))/255)" : "((("+string(exprY)+"*(255-Y))+(Y*Y))/255)"
    exprS = "((("+string(exprY)+"*(sin((Y/162.97466))*255))+(Y*(255-(sin((Y/162.97466))*255))))/255)"
    exprC = "((("+string(exprY)+"*(255-(cos((Y/162.97466))*255)))+(Y*(cos((Y/162.97466))*255)))/255)"
    expr  = (mode == "G") ? exprG : (mode == "S") ? exprS : (mode == "C") ? exprC : exprY
        
    return clp.SmoothCustom(Yexpr=expr,TVrange=TVrange,limiter=limiter,show=show)
}

Last edited by Reel.Deel; 14th October 2014 at 14:22. Reason: typo
Reel.Deel is offline   Reply With Quote
Old 14th October 2014, 14:23   #445  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
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.
StainlessS is offline   Reply With Quote
Old 14th October 2014, 14:30   #446  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
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.
Reel.Deel is offline   Reply With Quote
Old 14th October 2014, 14:43   #447  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
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 ???
StainlessS is offline   Reply With Quote
Old 14th October 2014, 14:57   #448  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
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.
StainlessS is offline   Reply With Quote
Old 14th October 2014, 17:59   #449  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
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:
Originally Posted by LaTo View Post
255 in 16 bit is 65280, so your conversion will never be the same as 8 bit.
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  
}
Reel.Deel is offline   Reply With Quote
Old 15th November 2015, 17:02   #450  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
SmoothAdjust [v3.20 - Update 2015/11/15]

Quote:
v3.20:
updated for Avs v2.6.0 final
fixed AVX2 crash with Win7 without SP1
Despite ongoing events in my country, life must go on...
This small update was already planned, so here it is!
LaTo is offline   Reply With Quote
Old 15th March 2016, 08:09   #451  |  Link
LouieChuckyMerry
Registered User
 
LouieChuckyMerry's Avatar
 
Join Date: Feb 2014
Posts: 355
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)
and was wondering what "egal" means (highlighted in blue above). I'm thinking that it should be "equal" but wanted to check. Thanks.
LouieChuckyMerry is offline   Reply With Quote
Old 15th March 2016, 10:03   #452  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by LouieChuckyMerry View Post
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)
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
LaTo is offline   Reply With Quote
Old 16th March 2016, 04:50   #453  |  Link
LouieChuckyMerry
Registered User
 
LouieChuckyMerry's Avatar
 
Join Date: Feb 2014
Posts: 355
Pas de problème, merci beaucoup .
LouieChuckyMerry is offline   Reply With Quote
Old 23rd July 2017, 11:25   #454  |  Link
burfadel
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)
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:
Code:
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):
Code:
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:
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)
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.
burfadel is offline   Reply With Quote
Old 23rd July 2017, 12:16   #455  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
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"
EDIT: Above edited for line wrap

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)
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.
__________________
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.
StainlessS is offline   Reply With Quote
Old 23rd July 2017, 14:13   #456  |  Link
burfadel
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)
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:
Quote:
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.

Last edited by burfadel; 23rd July 2017 at 14:17.
burfadel is offline   Reply With Quote
Old 23rd July 2017, 15:51   #457  |  Link
burfadel
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.
burfadel is offline   Reply With Quote
Old 16th May 2018, 02:56   #458  |  Link
Logan9778
Registered User
 
Join Date: Mar 2017
Posts: 118
Never mind. I figured it out.

Last edited by Logan9778; 17th May 2018 at 08:22.
Logan9778 is offline   Reply With Quote
Old 7th September 2018, 06:38   #459  |  Link
silverwing
Registered User
 
Join Date: Nov 2017
Location: Russia, Nizhny Novgorod
Posts: 25
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.
silverwing is offline   Reply With Quote
Old 7th September 2018, 16:14   #460  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
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 ???
StainlessS 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 23:45.


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