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. |
5th June 2010, 14:42 | #1 | Link |
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
SmoothAdjust [v3.20 - Update 2015/11/15]
Code:
+-------------------------------------------------------------------------------------------------------+ | | | SmoothAdjust plugin: SmoothLevels(), SmoothTweak(), SmoothCurve(), SmoothCustom() & SmoothTools() | | | | v3.20 by "LaTo INV." | | | | 15 November 2015 | | | +-------------------------------------------------------------------------------------------------------+ I. DESCRIPTION II. DISCLAIMER III. INSTALLATION IV. REQUIREMENTS V. MULTITHREADING VI. USAGE VII. COMMON SETTINGS VIII. SMOOTHLEVELS - GENERAL SETTINGS IX. SMOOTHLEVELS - LIMITING SETTINGS X. SMOOTHTWEAK - GENERAL SETTINGS XI. SMOOTHTWEAK - LIMITING SETTINGS XII. SMOOTHCURVE SETTINGS XIII. SMOOTHCUSTOM SETTINGS XIV. SMOOTHTOOLS SETTINGS XV. 16 BITS SETTINGS XVI. CHANGELOG I. DESCRIPTION : ================ SmoothAdjust is a set of 5 plugins to make YUV adjustements: - SmoothLevels allows to change levels & gamma with optional limiting - SmoothTweak allows to change brightness, contrast, saturation & hue - SmoothCurve allows to change a plane according to a fixed curve - SmoothCustom allows to change a plane according to a custom expression - SmoothTools allows to use all the previous filters in one single pass These 5 plugins have a smoothing & dithering algorithm to avoid banding issue. Calculations are made in 32bits float to avoid rounding errors and artifacts. SmoothAdjust is multithreaded (up to 16 threads) and SSE2/AVX2 optimized. For automatic adjustments, see the "AutoAdjust" standalone plugin. II. DISCLAIMER : ================ This program is free for non-commercial use only and must be distributed in its original form without any modification, including this documentation file. This program is provided as-is in the hope it will be useful but without any warranty, including any hypothetical damages or issues. The official home page is "http://forum.doom9.org/showthread.php?t=154971", it always contains the latest version of this program. This page acts as the official support center, also the author is reachable through his member page: "http://forum.doom9.org/member.php?u=131032". This plugin has required a lot of work and hundreds of coding hours, so if you like it and feel the need to reward or inspire the author then please consider donating. Donations are a fast, easy and secure operation through Paypal: simply follow the link into the "Donate.url" shortcut (you do not need a Paypal account to donate). All donations will be very useful and I thank in advance all the generous people, also if you are on the doom9's forum please specify your nickname when donating. III. INSTALLATION : =================== There are different versions of SmoothAdjust to suit all installations of Avisynth: - x86 builds are for Avisynth 32bits - x64 builds are for Avisynth 64bits IV. REQUIREMENTS : ================== - Avisynth v2.6.x or Avisynth Plus - YUV Planar (Y8, YV411, YV12, YV16, YV24) - 8bits or 16bits (MSB/LSB) V. MULTITHREADING : =================== SmoothAdjust is internally multithreaded with official Avisynth version. If AvisynthPlus or AvisynthMT is detected, internal multithreading is automatically disabled even if external multithreading isn't used (this can be reactivated in parameters). SmoothAdjust is designed to work with external multithreading, so fastest MT mode can be used. With AvisynthPlus, this plugin is a MT_NICE_FILTER (automatic register, no need to call SetFilterMtMode). With AvisynthMT, SetMtMode(1) must be called before SmoothAdjust. VI. USAGE : =========== - SmoothLevels( input_low, gamma, input_high, output_low, output_high, chroma, limiter, TVrange, preset, Lmode, darkSTR, brightSTR, Ecurve, Ecenter, protect, interp, dither, HQ, useMT, useOPT, debug, screenW, screenH, scale ) - SmoothTweak( brightness, contrast, saturation, hue1, hue2, limiter, TVrange, Lmode, limitSTR, Ecenter, interp, dither, HQ, useMT, useOPT, debug, screenW, screenH, scale ) - SmoothCurve( Ycurve, Ucurve, Vcurve, mode, limiter, TVrange, interp, dither, HQ, useMT, useOPT, debug, screenW, screenH, scale ) - SmoothCustom( Yexpr, Uexpr, Vexpr, limiter, TVrange, interp, dither, HQ, useMT, useOPT, debug, screenW, screenH, scale ) - SmoothTools( filename, interp, dither, HQ, useMT, useOPT, debug, screenW, screenH, scale ) - SmoothLevels16(...), SmoothTweak16(...), SmoothCurve16(...), SmoothCustom16(...), SmoothTools16(...) for 16 bits Last version (2015/11/15): SmoothAdjust v3.20 Old version (for Avs2.5 or WinXP or Wine): SmoothAdjust v2.62 If you really like this filter, please consider donating... It will help me a lot to continue development and support. Thanks for all! (link in the .7z package) v3.20: updated for Avs v2.6.0 final fixed AVX2 crash with Win7 without SP1 v3.00: dropped Avs v2.5.x support added AVX2 code (10% faster) modified plugin to be thread-safe (MT_NICE_FILTER) v2.95: fixed minor things tweaked multi-threading code v2.90: fixed possible freeze in MT code added explicit error messages v2.85: fixed bugs inside multi-threading code removed user32 dependency added AVX2 detection (for future opt) v2.80: used new C++11 features rewritten multi-threading (native) speed optimization (40% faster) exception-safe code added a high quality interpolation mode changed some parameter names fixed bugs in SmoothTools parser v2.62: fixed minor things & bugs dropped ICL builds support v2.60: used new interface for v2.6.x builds v2.55: added small optimizations v2.51: fixed crash in SmoothCurve v2.50: added SmoothTools improved SmoothTweak improved dithering tweaked memory usage tweaked multithreading cleaned various stuff v2.00: added Avisynth 2.6.x support added Y8, YV411, YV16, YV24 support added 16bits support with stacked MSB/LSB added SmoothCustom filter added TVrange parameter added AVX optimization improved smoothing algorithm improved debug view improved startup delay improved speed with smoothing OFF added decimals support in SmoothCurve fixed interp scaling in SmoothCurve changed defaults in SmoothLevels fixed gamma clamping bug in SmoothLevels fixed crash with mod4 clip fixed freeze in debug view deleted Smode parameter switched from ICL11 to ICL12 cleaned a lot the code updated the documentation _ Last edited by LaTo; 15th November 2015 at 16:52. |
5th June 2010, 15:56 | #6 | Link | |
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
Quote:
It's on my todo list to add asm code, but before... I need to learn asm |
|
5th June 2010, 19:57 | #9 | Link |
I often say "maybe"...
Join Date: Jul 2009
Location: France
Posts: 583
|
Un grand merci !
I have to wait to test the dithering part of your plugin... Can it contain a 'shift' of the space like using a combination of different extra mirrored pixels for gradfun2db ? (Like 32 + 28) |
5th June 2010, 20:04 | #10 | Link | |
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
Quote:
GradFun2DB removes band in a video, but this one only prevents banding... So if the banding is already present in the clip, it will not remove it! It's not the same goal Last edited by LaTo; 5th June 2010 at 20:31. |
|
6th June 2010, 14:51 | #11 | Link |
I often say "maybe"...
Join Date: Jul 2009
Location: France
Posts: 583
|
Yeah...my english is so limited
Maybe you will better understand if you read my two posts in this page : http://forum.doom9.org/showthread.php?t=152127&page=25 (I hope you will ) |
6th June 2010, 14:53 | #12 | Link | |
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
Quote:
|
|
6th June 2010, 15:00 | #13 | Link |
I often say "maybe"...
Join Date: Jul 2009
Location: France
Posts: 583
|
Yes and no, this problem is known since a long time now but mirroring a different number of pixels doesn't give the same effect.
And the combination of the two, in serial or parallele, gives really nice results |
6th June 2010, 17:08 | #16 | Link |
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
Someone could test this x64 version please? SmoothAdjust-x64.dll
Last edited by LaTo; 6th June 2010 at 17:16. |
6th June 2010, 19:39 | #17 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Did only a very quick splash&go test, but the x64 dll it seems to work. (Calling all three filters with default() parameters.)
More later - a thunderstorm is coming up, I'll shut down now.
__________________
- 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!) |
6th June 2010, 22:47 | #18 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
So far, everything seems to work. No crashes, no garbled output. It works.
However, it seems that the dithered-smoothing operation could need a little more work. Example: Pretty dark Intro of an average DVD show. Target operation: Levels(16,2.6,235,0,255,false). Source frame: Results: The smoothing of the dark blocking isn't as effective as gradfun2db. Also, there is a problem at high-contrast transitions. (Sorry I didn't cross-check if it's the same with the 32bit build ... funnily, on the new machine the Avisynth64 setup is more complete then the 32bit counterpart...)
__________________
- 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!) |
7th June 2010, 07:13 | #20 | Link |
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
Quote:
Problem with high-contrast transitions should be fixed with 1.02 And I'll add later more options to be more aggressive with smoothing |
Thread Tools | Search this Thread |
Display Modes | |
|
|