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. |
11th March 2010, 13:46 | #41 | Link |
Registered User
Join Date: Apr 2005
Posts: 213
|
No essential updates at the moment. In the meanwhile, if you want to use the layer function for each filter, you can do something like this: Create two scripts with the following content and copy them into the template directory (may be in a subdirectory called "Layer").
"LayerBegin.avs": Code:
base_clip = last Code:
# ============================================================================== # http://avisynth.org/mediawiki/Layer # ============================================================================== op = "add" level = 256 threshold = 255 use_chroma = True # ============================================================================== Import("lib\FritzPhoto\FritzPhoto.avs") base_clip.isYV12() <> isYV12() ? Eval(""" base_clip = isYV12() ? base_clip.RGB32ToYV12() : base_clip.YV12toRGB32() """) : Eval(""" NOP() """) base_clip = base_clip.isYV12() ? base_clip.ConvertToYUY2() : base_clip last = isYV12() ? ConvertToYUY2() : last Layer(base_clip.Crop(0, 0, last.Width, last.Height), last, op=op, level=level, threshold=threshold, use_chroma=use_chroma) isYUY2() ? ConvertToYV12() : last Last edited by Archimedes; 11th March 2010 at 13:54. |
12th March 2010, 13:03 | #42 | Link |
Registered User
Join Date: Apr 2005
Posts: 213
|
I made a small update.
Assuming that we have the following filters in our job list: Code:
Spline36Resize SuperSlowSharpen dfttest I have added context menus to the preview windows. Now, you can refresh each preview window separateley (click on the right mouse button and click on "Refresh"). Last edited by Archimedes; 12th March 2010 at 13:09. |
23rd April 2010, 15:23 | #44 | Link |
Registered User
Join Date: Apr 2006
Posts: 299
|
Thanks for adding median sharpening template. It really adds definition to small detail without too many I'll side effects.
I love following the development of Frtizphoto! I've had fun "hacking" the NNEDI2 template, replacing strings with 'NNEDI3'. Same with the 'deinterlace' template which I use with 'turnleft' and 'turnright' for antialiasing. It's indispensable for working with low-res, blocky and aliased images! How do you use the average function? Last edited by markanini; 23rd April 2010 at 15:29. |
23rd April 2010, 17:02 | #45 | Link |
Registered User
Join Date: Apr 2005
Posts: 213
|
Take "AverageBegin" in front of any filter and "AverageEnd" afterwards. In "AverageEnd" you can adjust the weight parameter. Same behavior with layer function.
Example: Code:
AverageBegin dfttest AverageEnd Example: If you want to hide the parameter "denoise" (used in "SuperSlowSharpen") in script inspector, do this: Code:
denoise = 0 # %%ScriptInspectorIgnore%% Last edited by Archimedes; 23rd April 2010 at 20:02. |
30th April 2010, 14:41 | #46 | Link |
Registered User
Join Date: Apr 2005
Posts: 213
|
Removed support for the script "FritzPhotoResize". With the implementation of the script inspector this script is no longer needed.
Depending on the AviSynth type, the script inspector do a simple validation of the input characters. Added the ability to show tooltips for each parameter and value in script inspector. The information will be stored in the scripts. A simple tooltip can be achieved with this: Code:
# ============================================================================== # http://forum.doom9.org/showthread.php?t=100626 # ============================================================================== weight = 1.0 # ============================================================================== # weight = Defines how much influence the previous filter should have # ============================================================================== If you want to show individual tooltips for parameter and its value, do this: Code:
# ============================================================================== # http://forum.doom9.org/showthread.php?t=100626 # ============================================================================== weight = 1.0 # ============================================================================== # weight = Defines how much influence the previous filter should have | [0.0, 1.0] # ============================================================================== Some AviSynth types can only have discret values. For the boolean values "False" and "True" the script inspector automaticly add a pick list. If you want to create a pick list for other values, do this: Code:
# ============================================================================== # http://forum.doom9.org/showthread.php?p=1045226 # ============================================================================== field = 0 # ============================================================================== # field = PickList, False, {0, 1} # ============================================================================== I've added already all pick list information i've found to the templates, but there are no informations for the tooltips at the moment. But the templates are already prepared for that. Keep in mind, that all tooltips have to be translated (from english to german). |
7th May 2010, 03:28 | #47 | Link |
Registered User
Join Date: Apr 2005
Posts: 213
|
Added tooltip informations to the scripts. If you have better explanations for the tooltips, please let me know.
Also added some levels to the script inspector: "Beginner", "Intermediate" and "Expert". An "Expert" see all parameters, an "Intermediate" only the essential parameters and so on. Script inspector informations are structured as follows (example: GradFun2DBMod): Code:
# ============================================================================== # http://forum.doom9.org/showthread.php?t=144537 # ============================================================================== thr = 1.2 thrC = 1.2 mode = 2 str = 0.8 strC = 0.0 temp = 50 adapt = 64 custom = "empty" mask = True radius = 2 range = 2 # ============================================================================== # thr = True, False, Beginner, Strength for the luma channel | float # thrC = True, False, Beginner, Strength for the chroma channel | float # mode = True, False, Beginner, PickList, {1, 2, 3}, Mode for the addition of 16 pixels around the image | int, [1, 3] # str = True, False, Beginner, Standard deviation (strength) of the luma noise | float # strC = True, False, Beginner, Standard deviation (strength) of the chroma noise | float # temp = True, False, Beginner, Strength for temporal stabilization | int # adapt = True, False, Beginner, Threshold for luma-adaptative grain | int # custom = True, False, Expert, PickList, {"empty"}, Use your own grain generator instead of AddGrain | string # mask = True, False, Beginner, Adaptative deband mask | bool, {False, True} # radius = True, False, Beginner, Radius for the mask | int # range = True, False, Beginner, Range used in the mask | int # ============================================================================== After that there may be a definiton of a pick list. And after that, there can be the information for the tooltips. If no parameter information is available, the program works with default values. "True, False, Beginner" in a script are identical with this default values. Last edited by Archimedes; 7th May 2010 at 03:32. |
9th May 2010, 16:45 | #48 | Link |
Registered User
Join Date: Apr 2005
Posts: 213
|
The script inspector can show now a font and color dialog (see script "Subtitle").
Fixed script inspector input checking. Added a checkbox to disable script inspectors input checking. So you can enter "values" like "1.0/3.0" in a float type field. |
9th June 2010, 11:20 | #51 | Link |
Registered User
Join Date: Apr 2005
Posts: 213
|
It seems, GradFun2DBMod needs a mod4 input. As we are working with double sized YY12 images, we need mod8 before feeding it to GradFun2DBMod.
In such cases, I simply crop the pixels on the right and bottom side. Here is the corrected script. Code:
# ============================================================================== # http://forum.doom9.org/showthread.php?t=144537 # ============================================================================== thr = 1.2 thrC = 1.2 mode = 2 str = 0.8 strC = 0.0 temp = 50 adapt = 64 custom = "empty" mask = True radius = 2 range = 2 # ============================================================================== # thr = True, False, Beginner, Strength for the luma channel | float # thrC = True, False, Beginner, Strength for the chroma channel | float # mode = True, False, Beginner, PickList, {1, 2, 3}, Mode for the addition of 16 pixels around the image | int, [1, 3] # str = True, False, Beginner, Standard deviation (strength) of the luma noise | float # strC = True, False, Beginner, Standard deviation (strength) of the chroma noise | float # temp = True, False, Beginner, Strength for temporal stabilization | int # adapt = True, False, Beginner, Threshold for luma-adaptative grain | int # custom = True, False, Expert, PickList, {"empty"}, Use your own grain generator instead of AddGrain | string # mask = True, False, Beginner, Adaptative deband mask | bool, {False, True} # radius = True, False, Beginner, Radius for the mask | int # range = True, False, Beginner, Range used in the mask | int # ============================================================================== LoadPlugin("plugins\AddGrainC\AddGrainC.dll") LoadPlugin("plugins\GradFun2DB\gradfun2db.dll") LoadPlugin("plugins\GScript\GScript.dll") LoadPlugin("plugins\MaskTools 2\mt_masktools.dll") LoadPlugin("plugins\RemoveGrain 1.0\RemoveGrain.dll") Import("lib\FritzPhoto\FritzPhoto.avs") Import("lib\GradFun2DBMod\GradFun2DBMod.avs") isYV12() ? GEval(""" fp_GradFun2DBMod(thr, thrC, mode, str, strC, temp, adapt, custom, mask, radius, range) """) : GEval(""" if (%%KeepAlphaChannel%%) { fp_alpha = last } else { NOP() } RGB32toYV12() fp_GradFun2DBMod(thr, thrC, mode, str, strC, temp, adapt, custom, mask, radius, range) if (%%KeepAlphaChannel%%) { YV12toRGB32() MergeARGB(fp_alpha.Crop(0, 0, last.Width, last.Height), last, last, last) } else { NOP() } """) function fp_GradFun2DBMod(clip input, float thr, float thrC, int mode, float str, float strC, int temp, int adapt, string custom, bool mask, int radius, int range) { input = input.Crop(0, 0, -(input.Width % 8), -(input.Height % 8)) luma = thr < 1.0 ? input : input.PointResize(input.Width / 2, input.Height / 2).\ GradFun2DBMod( \ thr = thr, \ thrC = 1.0, \ mode = mode, \ str = str, \ strC = 0.0, \ temp = temp, \ adapt = adapt, \ custom = custom, \ mask = mask, \ radius = radius, \ range = range \ ).\ PointResize(input.Width, input.Height) chroma = thrC < 1.0 ? input : input.\ GradFun2DBMod( \ thr = 1.0, \ thrC = thrC, \ mode = mode, \ str = 0.0, \ strC = strC, \ temp = temp, \ adapt = adapt, \ custom = custom, \ mask = mask, \ radius = radius, \ range = range \ ) luma.MergeChroma(chroma, 1) } Last edited by Archimedes; 9th June 2010 at 11:26. |
9th June 2010, 14:07 | #56 | Link | |
Registered User
Join Date: Apr 2005
Posts: 213
|
New update is available.
Changes: Quote:
|
|
9th June 2010, 14:53 | #57 | Link | |
Registered User
Join Date: Apr 2005
Posts: 213
|
Quote:
May be, the "motion" between the shots was to big. Last edited by Archimedes; 9th June 2010 at 14:56. |
|
10th June 2010, 11:44 | #59 | Link |
Registered User
Join Date: Apr 2005
Posts: 213
|
Adding (black) borders to an image before filtering and cropping the added borders afterwards is not always a good idea (depends on the filter), so i generally crop the needles pixels at the right and/or bottom side, if needed.
If the missing pixels are a problem for you, just add borders before filtering and crop the added borders afterwards. Example: Code:
# clip is RGB32 or (double sized) YV12 m = 4 # must be a power of 2, when clip is YV12 right = Width % m == 0 ? 0 : m - Width % m bottom = Height % m == 0 ? 0 : m - Height % m AddBorders(0, 0, right, bottom) # Filter() Crop(0, 0, -right, -bottom) Last edited by Archimedes; 10th June 2010 at 12:09. |
11th June 2010, 00:42 | #60 | Link |
Registered User
Join Date: Apr 2008
Posts: 58
|
The script is giving out odd numbers for cropping (if the mod4 remainer is an odd number) and that's causing trouble with cropping. I am not so experienced with scripting so I ask, is there a way to get the right and bottom variables to force even numbers?
|
Thread Tools | Search this Thread |
Display Modes | |
|
|