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 10th July 2012, 08:23   #321  |  Link
kutjong
Registered User
 
kutjong's Avatar
 
Join Date: Nov 2007
Posts: 114
What would the syntax look like if I simply want to convert a clip with PC range luma to TV range? Would it be as simple as:
Code:
ffvideosource("file.avi")
Smoothlevels(preset="pc2tv")
Input is YV12, btw.

I'm still quite a noob at Avisynth, so please excuse me for such novice questions.
kutjong is offline   Reply With Quote
Old 13th August 2012, 14:36   #322  |  Link
matfra
Registered User
 
Join Date: Jul 2009
Posts: 111
Hi Guys,
I would like to know if someone code a function of smoothadjust in AVSP.
Smoothadjust is Reall good. But there is so mutch parameter.
I would be nice to have Slider and in AVSP to test live the effect.
matfra is offline   Reply With Quote
Old 13th August 2012, 14:53   #323  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by matfra View Post
Hi Guys,
I would like to know if someone code a function of smoothadjust in AVSP.
Smoothadjust is Reall good. But there is so mutch parameter.
I would be nice to have Slider and in AVSP to test live the effect.
A QT-GUI for SmoothAdjust was planned just after v2.00 but I'm tired about this community so I gave up... Too bad it would have been nice.

I will release a new version soon (I hope) with a new plugin. The code is almost finished, just need motivation to end it.

The ultimate release will be after this one, when avisynth 2.6 final will come out. So it might not be before a long time.
LaTo is offline   Reply With Quote
Old 13th August 2012, 16:19   #324  |  Link
matfra
Registered User
 
Join Date: Jul 2009
Posts: 111
I hope you find the motivation to do it.
You are a master of AVISynth
matfra is offline   Reply With Quote
Old 14th August 2012, 22:05   #325  |  Link
Yellow_
Registered User
 
Join Date: Sep 2009
Posts: 378
Quote:
Originally Posted by matfra View Post
Hi Guys,
I would like to know if someone code a function of smoothadjust in AVSP.
Smoothadjust is Reall good. But there is so mutch parameter.
I would be nice to have Slider and in AVSP to test live the effect.
You can define the sliders in avsp for any avsynth functions, plugins, scripts etc:

From avspmod Options -> Avisynth Function Definition

Choose function, plugin or script from the tabs, define sliders, fill in the values.

If you copy paste this into a text file and use the import settings from file option under Avisynth Function Definition, then open a script with some smoothadjust functions in it you should see the sliders for the functions defined below, it's a start anyway, just smoothcurve missing but 16bit versions are there.

[PLUGINS]

SmoothAdjust_SmoothCurve16(
clip,
string Ycurve="0-0;65536-65536" (""),
string Ucurve="0-0;65536-65536" (""),
string Vcurve="0-0;65536-65536" (""),
int interp=100 (0 to 100 by 1),
bool limiter=False,
int TVrange=0 (0 to 2 by 1),
int smooth=100 (0 to 200 by 1),
int dither=50 (-1 to 100 by 1),
int useMT=-1 (-1 to 16 by 1),
int useOPT=-1 (-1 to 2 by 1),
bool show=False,
int screenW=-1 (-1 to 1 by 1),
int screenH=-1 (-1 to 1 by 1),
bool scale=False
)

SmoothAdjust_SmoothCustom16(
clip,
string Yexpr="0-0;65535-65535" (""),
string Uexpr="0-0;65535-65535" (""),
string Vexpr="0-0;65535-65535" (""),
bool limiter=False,
int TVrange=0 (0 to 2 by 1),
int smooth=100 (0 to 200 by 1),
int dither=50 (-1 to 100 by 1),
int useMT=-1 (-1 to 16 by 1),
int useOPT=-1 (-1 to 2 by 1),
bool show=False,
int screenW=-1 (-1 to 1 by 1),
int screenH=-1 (-1 to 1 by 1),
bool scale=False
)

SmoothAdjust_SmoothLevels(
clip,
int input_low=0 (0 to 255 by 1),
float gamma=1.0 (0.0 to 5.0 by 0.1),
int input_high=255 (0 to 255 by 1),
int output_low=0 (0 to 255 by 1),
int output_high=255 (0 to 255 by 1),
int chroma=100 (0 to 200 by 1),
int limiter=0 (0 to 2 by 1),
bool TVrange=False,
string preset="Default" ("fullrange"/ "pc2tv"/ "tv2pc"),
int Lmode=0 (0 to 3 by 1),
int darkSTR=100 (0 to 500 by 1),
int brightSTR=100 (0 to 500 by 1),
int Ecurve=0 (0 to 1 by 1),
int Ecenter=128 (0 to 255 by 1),
int protect=-1 (-1 to 255 by 1),
int smooth=100 (0 to 200 by 1),
int dither=-1 (-1 to 100 by 1),
int useMT=-1 (-1 to 16 by 1),
int useOPT=-1 (-1 to 2 by 1),
bool show=False,
int screenW=-1 (-1 to 1 by 1),
int screenH=-1 (-1 to 1 by 1),
bool scale=True
)

SmoothAdjust_SmoothLevels16(
clip,
int input_low=0 (0 to 65535 by 1),
float gamma=1.0 (0.0 to 10.0 by 0.01),
int input_high=65535 (0 to 65535 by 1),
int output_low=0 (0 to 65535 by 1),
int output_high=65535 (1 to 65535 by 1),
int chroma=100 (0 to 200 by 1),
int limiter=0 (0 to 2 by 1),
bool TVrange=False,
string preset="fullrange" ("fullrange"/ "pc2tv"/ "tv2pc"),
int Lmode=0 (0 to 3 by 1),
int darkSTR=100 (0 to 200 by 1),
int brightSTR=100 (0 to 200 by 1),
int Ecurve=0 (0 to 1 by 1),
int Ecenter=32768 (0 to 65535 by 1),
int protect=-1 (-1 to 65535 by 1),
int smooth=100 (0 to 200 by 1),
int dither=50 (-1 to 100 by 1),
int useMT=-1 (-1 to 16 by 1),
int useOPT=-1 (-1 to 2 by 1),
bool show=False,
int screenW=-1 (-1 to 1 by 1),
int screenH=-1 (-1 to 1 by 1),
bool scale=False
)

SmoothAdjust_SmoothTweak(
clip,
int brightness=0 (-255 to 255 by 1),
float contrast=1.0 (0.0 to 10.0 by 1),
float saturation=1.0 (0.0 to 10.0 by 1),
int hue1=0 (-255 to 255 by 1),
int hue2=0 (-255 to 255 by 1),
bool limiter=False,
bool TVrange=False,
int smooth=100 (0 to 200 by 1),
int dither=50 (-1 to 100 by 1),
int useMT=-1 (-1 to 16 by 1),
int useOPT=-1 (-1 to 2 by 1),
bool show=False,
int screenW=-1 (-1 to 1 by 1),
int screenH=-1 (-1 to 1 by 1),
bool scale=False
)

SmoothAdjust_SmoothTweak16(
clip,
int brightness=0 (0 to 65535 by 1),
float contrast=0.0 (0.0 to 10.0 by 0.1),
float saturation=1.0 (0.0 to 10.0 by 0.1),
int hue1=0 (-65535 to 65535 by 1),
int hue2=0 (-65535 to 65535 by 1),
bool limiter=False,
bool TVrange=False,
int smooth=100 (0 to 200 by 1),
int dither=50 (-1 to 100 by 1),
int useMT=-1 (-1 to 16 by 1),
int useOPT=-1 (-1 to 2 by 1),
bool show=False,
int screenW=-1 (-1 to 1 by 1),
int screenH=-1 (-1 to 1 by 1),
bool scale=False
)

Last edited by Yellow_; 14th August 2012 at 22:25.
Yellow_ is offline   Reply With Quote
Old 15th August 2012, 00:22   #326  |  Link
matfra
Registered User
 
Join Date: Jul 2009
Posts: 111
Thanks Yellow,
I knew that is was possible to do it manually. But I just wasnt too sure the parameter for this plugin. Thank you very mutch.
Is there a ( Database ) on the internet where people create the script for all kind of mods in avsp ? It would be useful.
matfra is offline   Reply With Quote
Old 15th August 2012, 00:44   #327  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
Quote:
Originally Posted by LaTo View Post
I'm tired about this community so I gave up... Too bad it would have been nice.

I will release a new version soon (I hope) with a new plugin. The code is almost finished, just need motivation to end it.
Yay, sorry to hear that! To me your filter is as important as madVR or Reclock because it drastically increases the enjoyment I get from using my HTPC

A new version would be full of win,
leeperry is offline   Reply With Quote
Old 17th November 2012, 16:01   #328  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
Hi LaTo, any news on an updated build by any chance please? I still adore your plugin on CRT/DLP, it's only on LCD that it seems to be fighting against their controller dithering(6bit?)
leeperry is offline   Reply With Quote
Old 17th November 2012, 17:18   #329  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by leeperry View Post
Hi LaTo, any news on an updated build by any chance please? I still adore your plugin on CRT/DLP, it's only on LCD that it seems to be fighting against their controller dithering(6bit?)
A new version is in development, but I don't know when I will release it...

(check your MPs)
LaTo is offline   Reply With Quote
Old 3rd March 2013, 19:08   #330  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Version 2.50 is almost finished, some features requests before releasing?!?
LaTo is offline   Reply With Quote
Old 3rd March 2013, 19:49   #331  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
One thing that would be nice to have: Autolevels, with max.change limiting, and taking the input min/max from a separate analysis clip. Current Autolevels in Coloryuv is too crude / too simple, and not (not always) temporally stable.

AutoLevels(clip, analyse_clip, darklimit, brightlimit)

analyse_clip would be an (optional) user-provided preprocessed clip to take the frame's present min & max values from.
- possibly: spatial smoothing to eliminate stray pixels that are very dark / very bright, but are not relevant.
- possibly: temporal smoothing to make operation temporally stable, i.e. avoiding jumping-around of black level.
-- but that's up to the user.

darklimit & brightlimit are clamping the maximum change. I.e. if darklimit=16,brightlimit=20, then a frame covering [20,230] would be spread to [16,235], but a frame covering [50,200] would be spread to only [50-16,200+20).

TV_range switch to specify wether to spread to [16,235] or to [0,255].


Just a rough outline, all points are open for discussion.

What do you think about that? Feasable? Too much work / too little time?
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 5th March 2013, 10:57   #332  |  Link
Kisa_AG
Registered User
 
Join Date: Sep 2005
Location: Moscow, Russia
Posts: 66
Quote:
Originally Posted by LaTo View Post
Version 2.50 is almost finished, some features requests before releasing?!?
Hello LaTo!

It would be interesting to have cross-reference between Y, U and U in SMOOTHCUSTOM.

I mean the possibility to use any of three plans (Y, U, V) in any three expressions (Yexpr, Uexpr, Vexpr).
Lets say, Uexpr=U+5*(Y/255).
Now it's not possible.
Kisa_AG is offline   Reply With Quote
Old 5th March 2013, 14:27   #333  |  Link
Yellow_
Registered User
 
Join Date: Sep 2009
Posts: 378
Quote:
Originally Posted by LaTo View Post
Version 2.50 is almost finished, some features requests before releasing?!?
Curve Editor?

Detail Level Adjustments ie: image frame separated into say 5 detail levels, Coarse to Fine ability to apply SmoothAdjust adjustments individually to each level to tweak contrast?

Generate contrast, luma and saturation masks, apply SmoothAdjust Curve and Tweak through them. http://goodlight.us/writing/tutorials.html

Last edited by Yellow_; 6th March 2013 at 22:35.
Yellow_ is offline   Reply With Quote
Old 6th March 2013, 08:58   #334  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
Quote:
Originally Posted by LaTo View Post
Version 2.50 is almost finished, some features requests before releasing?!?
Custom histogram (as good as it can be simulated with finite bitdepth input).
Give a function between 0 and 1, the filter normalizes it and adjusts the levels.
ajp_anton is offline   Reply With Quote
Old 10th March 2013, 12:03   #335  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by Didée View Post
One thing that would be nice to have: Autolevels, with max.change limiting, and taking the input min/max from a separate analysis clip.
It was on my to-do list, but I wanted to do everything inside the plugin (no external clip used).
It introduced a lot of work: need to build a robust scene change detector, temporal stabilizing and put aside the not relevant values with spatial smoothing (as you said).
In the end, too much work compared to my free time.

Using an external clip simplifies things a lot. In a first time, why not make a standalone filter that can be integrated later into SmoothAdjust if it is convincing. But this introduces an incompatibility with SmoothTools (in version 2.50) and it bothers me a little.


Quote:
Originally Posted by Kisa_AG View Post
It would be interesting to have cross-reference between Y, U and U in SMOOTHCUSTOM.
Sorry, this can't be done in SmoothAdjust.


Quote:
Originally Posted by Yellow_ View Post
Curve Editor?
I was planning a QT-Gui but too much work for now.


Quote:
Originally Posted by Yellow_ View Post
Detail Level Adjustments ie: image frame separated into say 5 detail levels, Coarse to Fine ability to apply SmoothAdjust adjustments individually to each level to tweak contrast?

Generate contrast, luma and saturation masks, apply SmoothAdjust Curve and Tweak through them. http://goodlight.us/writing/tutorials.html
If I understand correctly, all this can be done in an avisynth script


Quote:
Originally Posted by ajp_anton View Post
Custom histogram (as good as it can be simulated with finite bitdepth input).
Give a function between 0 and 1, the filter normalizes it and adjusts the levels.
I don't really understand, can you elaborate please?
LaTo is offline   Reply With Quote
Old 10th March 2013, 19:23   #336  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Update 2013/03/11

Quote:
v2.50:
added SmoothTools
improved SmoothTweak
improved dithering
tweaked memory usage
tweaked multithreading
cleaned various stuff
Finally a new version, many changes have been made since the last one.
So this version should be considered as beta because some bugs may occurs.

Just one more thing, the v2.00 final release have been downloaded nearly 6000 times in 18 months.
That's a lot but I have received only 4 donations, it's less than 0.001%...
Seriously I was expecting a bit more generosity, anyways thanks to donators!

So I don't know if I will still get involved much in this project,
because it does not seem to interest many people in the end.

That is, I stop complaining

Don't hesitate to report bugs if you find some and enjoy this release!
LaTo is offline   Reply With Quote
Old 11th March 2013, 09:57   #337  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
Quote:
Originally Posted by LaTo View Post
I don't really understand, can you elaborate please?
You write down a function, for example "1" or "x" or "-x*(x-1)". It will then create a curve that, as closely as possible, makes the new histogram the same shape as the desired function between 0 and 1.
I realize you can't make it exact with discrete values, peaks can only be moved and added but never split up. However, this is compensated with a gap with a width proportional to the peak's height, and dithering should partly combat this (plus the result will look about correct anyway).
I also realize there might be functions that mess up everything, but it's the user's fault if he uses one.
ajp_anton is offline   Reply With Quote
Old 11th March 2013, 22:22   #338  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by Didée View Post
One thing that would be nice to have: Autolevels, with max.change limiting, and taking the input min/max from a separate analysis clip. Current Autolevels in Coloryuv is too crude / too simple, and not (not always) temporally stable.

AutoLevels(clip, analyse_clip, darklimit, brightlimit)

analyse_clip would be an (optional) user-provided preprocessed clip to take the frame's present min & max values from.
- possibly: spatial smoothing to eliminate stray pixels that are very dark / very bright, but are not relevant.
- possibly: temporal smoothing to make operation temporally stable, i.e. avoiding jumping-around of black level.
-- but that's up to the user.

darklimit & brightlimit are clamping the maximum change. I.e. if darklimit=16,brightlimit=20, then a frame covering [20,230] would be spread to [16,235], but a frame covering [50,200] would be spread to only [50-16,200+20).

TV_range switch to specify wether to spread to [16,235] or to [0,255].


Just a rough outline, all points are open for discussion.

What do you think about that? Feasable? Too much work / too little time?
A first try: AutoGain-alpha1

Last edited by LaTo; 16th March 2013 at 12:00.
LaTo is offline   Reply With Quote
Old 14th March 2013, 16:45   #339  |  Link
travolter
Registered User
 
Join Date: Apr 2009
Posts: 138
Hi!

Im using these Ylevels settings:

YLevelsg(1,0.65,255,1,255)
YLevelsc(1,0.5,255,1,255)
but I want to remove the banding

can I get same result with smoothlevels?

What smoothlevels settings are the equivalent for:
Ylevelsg
Ylevelsc

I ask because Im testing but I cannt get same results.. maybe Im missing some parameter.

Last edited by travolter; 14th March 2013 at 16:52.
travolter is offline   Reply With Quote
Old 14th March 2013, 17:10   #340  |  Link
ganymede
Registered User
 
Join Date: Aug 2010
Location: Paris
Posts: 52
With version 2.50, my typical use of SmoothCurve always triggers an "Access violation" error.
Code:
SmoothCurve(YCurve="0-0;16-16;128-126;255-235")
The error is like :
Code:
Avisynth: access violation at 0x0001E4D5 in C:\Program Files (x86)\AviSynth 2.5\plugins\SmoothAdjust.dll,
attempting to read from 0x00000000
I'm using latest 2.6 MT from SEt (20130309), under Win7 professional.
I tried both ICL and MSVC builds of SmoothAdjust.dll (x86 only). Enabling or disabling MT mode (with SetMTMode) doesn't change anything.
With SmoothAdjust-2.0, SmoothCurve is working fine.
ganymede 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 17:19.


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