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 5th November 2021, 09:40   #601  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,168
I seen DNR is best result just look detail of bath towel in left-top corner
kedautinh12 is offline   Reply With Quote
Old 5th November 2021, 15:06   #602  |  Link
Blankmedia
Registered User
 
Join Date: Oct 2011
Location: Dans le nord
Posts: 65
I have some problem with oyster_deringing

I've added float "h" in the function :

Code:
oyster_Deringing(clip src, clip ref, int "radius", float "h", float "sigma", float "mse0",

I've change the lesser or equel for greater or equal to 0 here:
Code:
Assert(h>=0,                     "Oyster.Deringing: h has to be greater than 0!")
Now "strength2" isn't being defined before being called in line 364.

If I put strength2 = 1.1 before the function call in line 364 I get script error:invalid arguments to function oy_loop.
Blankmedia is offline   Reply With Quote
Old 5th November 2021, 18:04   #603  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
Thanks for the report! I will have a look and report back, but Oyster and Plum are both WIP (work in progress) so I'm not positive it works even when fixed. To start with the BM3D plugin isn't fully ported so many settings are missing which may be critical for the correct output, and second I'm not sure mvtools is as robust in AviSynth+ as it is in VapourSynth, one example is 32-bit support which has some issues as reported here.


EDIT: ok updated. Good luck making it work, it hangs on my rig. I guess iterating KNLMeansCL four times isn't actually avisynth friendly.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 5th November 2021 at 18:30.
Dogway is offline   Reply With Quote
Old 5th November 2021, 20:37   #604  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,823
Quote:
Originally Posted by Dogway View Post
Check below with the great sample clip from tormento.
A great sample from a great movie.

Anyway, look at the lower white part corner of the top left towel.

Detalis disappear everywhere but in the LFR only.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 6th November 2021, 12:45   #605  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
Sorry guys, but I don't see what you guys are seeing.

DNR..........................................................................DNR+LFR+DCTR
............

Anyway I have some ideas to improve the DCTFlicker pass.

On another note, yes MatchClip() which is required for prefilter=5 and some other functions as a replacement for Utils-r41's MatchColorFormat() is not yet released (due in TransformsPack). I'm trying to catch up with all the frameprops changes by pinterf.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 6th November 2021, 14:25   #606  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,823
Quote:
Originally Posted by Dogway View Post
Sorry guys, but I don't see what you guys are seeing.


This part (present in raw) plain and simply disappears. The only one with some hint of it is DNR+LFR only.

Plus, I am having the error:

Script error: There is no function named 'MatchClip'.
(D:/Programmi/Media/AviSynth+/plugins64/SMDegrain-3.3.5d~Dogway.avsi, line 887)
(D:/Programmi/Media/AviSynth+/plugins64/SMDegrain-3.3.5d~Dogway.avsi, line 217)


Perhaps I have deleted some necessary plugin. Which is which?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 7th November 2021, 03:48   #607  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,168
I seen only DNR better than DNR+LFR in perfome part of bath towel deatails
kedautinh12 is offline   Reply With Quote
Old 7th November 2021, 04:25   #608  |  Link
Blankmedia
Registered User
 
Join Date: Oct 2011
Location: Dans le nord
Posts: 65
My pleasure! I like seafood so it was compelling to use.
Blankmedia is offline   Reply With Quote
Old 7th November 2021, 18:08   #609  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
Ok, maybe I did wrong by presenting all the steps, but I like to keep transparent always. My point was DNR+LFR+DCTR improving over DNR/DNR+LFR, which I think it does. There are dozens of different ways to fix the pointed issue, one of them is raising the cutoff but it wasn't my intention to show an example of perfect denoising, because it simply doesn't exist as stated by Didée. I'm trying hard and have some things in mind to improve low frequency denoising.

@tormento, read my previous post. MatchClip is included in yet-to-be-released TransformsPack, which got delayed due to latest avisynth changes in frameprops. Hopefully I can release tomorrow. It replaces MatchColorFormat from Utils-r41 so one less dependency. It's only needed for prefilter=5 though.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 7th November 2021, 19:06   #610  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,823
Quote:
Originally Posted by Dogway View Post
read my previous post
Yep I read.

Please, next time, don't implement functions you need to write yet
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 7th November 2021, 20:00   #611  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
It's written but not released. I was holding back all my scripts for over a week solely because MatchClip (read about the conventions disaster here), so I pulled the trigger.

If you are too desperate use this (disclaimer, use latest avs+):

Code:
# Matches 'a' to 'b' clip format (size, length, color model, Jab, bitdepth)
function MatchClip (clip a, clip b, string "kernel", string "matrix", bool "length", bool "fast") {

    krn    = Default (kernel, "Spline16")
    fst    = Default (fast,         true)
    mfc    = Default (length,      false) # Match also framecount

    YUY2   = b.IsYUY2()
    rgbb   = b.isRGB()             rgba    = a.isRGB()
    w      = b.width()             wa      = a.width()
    h      = b.height()            ha      = a.height()
    fc     = b.FrameCount()        fca     = a.FrameCount()
    p_type = b.PixelType()         p_typea = a.PixelType()
    bib    = b.BitsPerComponent()  bia     = a.BitsPerComponent()

    isHD    = (w  > 1099 ||  h  > 599)       isHDa   = (wa > 1099 ||  ha > 599)
    isUHD   = (w  > 2599 ||  h  > 1499)      isUHDa  = (wa > 2599 ||  ha > 1499)
    mat     = Default(matrix, rgbb != rgba ? isUHD  ? "Rec2020" : isHD  ? "Rec709" : "Rec601" : Undefined())

        a
        bib > bia ? ConvertBits(bib, fulls=rgba) : last

    if (!fst) {

        ConvertFormat(w, h, fmt_i=p_typea, fmt_o=p_type, cs_in=mat, cs_out="", kernel=krn, gamma=false, tv_range_in=!rgba, tv_range_out=!rgbb, fulls=rgba, fulld=rgbb, show=false)

    } else {

        rgbp   = rgbb && b.isPlanar()
        isScl  = w != wa || h != ha
        mod    = rgba && rgbb || isy(a) && isy(b) ? 1 : 2

        yv411  = b.isYV411()      yv411a = a.isYV411()
        yv444  = b.is444()        yv444a = a.is444()
        fmt    = Format_fuzzy_search(b, p_type,  bib)
        fmta   = Format_fuzzy_search(a, p_typea, bia)
        bc     = bicubic_coeffs(krn)
        krn    = bc[1]>=0. ? "Bicubic" : krn

        cplace  = rgbb || yv444  || yv411  ? "MPEG1" : isUHD  ? "top_left" : "MPEG2"
        cplacea = rgba || yv444a || yv411a ? "MPEG1" : isUHDa ? "top_left" : "MPEG2"
        not42   = LeftStr(fmta[1],2) != "42"

        # Match dimensions
        isScl ? w > h ? RatioResize(w,mode="adjust2w",kernel=krn,mod=mod,b=bc[0],c=bc[1]) : \
                        RatioResize(h,mode="adjust2h",kernel=krn,mod=mod,b=bc[0],c=bc[1]) : last
                        PadResize(w,h,mode="dilate",             mod=mod)

        # ConvertBackToYUY2 bug: https://forum.doom9.org/showthread.php?p=1038027#post1038027
        isy(b) ? rgba ? DotClip([0.298967,0.586421,0.114612]) : ConvertToY(mat)                                                                                 : \
        rgbb   ? rgbp ? Eval(  "ConvertToPlanarRGB            (mat,interlaced=false"+(yv411a ? ""  :  ",ChromaInPlacement=cplacea")+",  chromaresample=krn)")   : \
                        Eval(  "ConvertTo"   +string(fmt[3])+"(mat,interlaced=false"+(yv411a ? ")" :  ",ChromaInPlacement=cplacea,      chromaresample=krn)"))  : \
        yv411         ? Eval(  "ConvertToYV411                (false,mat,"          +(not42 ? ""   : """ChromaInPlacement=cplacea,""")+"chromaresample=krn)")   : \
        YUY2  && rgba ? Eval("""ConvertBackToYUY2             (mat                                                                                       """)   : \
                        Eval(  "ConvertToYUV"+string(fmt[1])+"(false,mat,"          +(not42 ? ""   :   "ChromaInPlacement=cplacea,")+"  chromaresample=krn"+(yv444 ? ")" : ",ChromaOutPlacement=cplace)"))
    }

    bia > bib      ? ConvertBits(bib, dither= 1, fulls=rgbb)   : last
    mfc ? fca > fc ? Trim(last, fc-1) : last+BlankClip(b,fc-1) : last

    # Planar to Interleaved
    YUY2 && !rgba  ? ConvertToYUY2()  : last }
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 8th November 2021, 08:20   #612  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,823
Quote:
Originally Posted by Dogway View Post
If you are too desperate use this
Not desperate but I can't simply use prefilter=5 with newer features of SMDegrain.

It works, thanks.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 8th November 2021, 17:59   #613  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,823
Quote:
Originally Posted by Dogway View Post
use this
Another needed function:

Script error: There is no function named 'Format_fuzzy_search'.
(D:/Programmi/Media/AviSynth+/plugins64/MatchClip~Dogway.avsi, line 35)
(D:/Programmi/Media/AviSynth+/plugins64/MatchClip~Dogway.avsi, line 56)
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 8th November 2021, 18:07   #614  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
That's in TransformsPack. I'm finishing the script (QC) just waiting for pinterf input so I don't do things twice.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 11th November 2021, 20:59   #615  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
Updated DCTFilter, hope it's fine now:



I will upload tomorrow with TransformsPack, which isn't finished of course but it's fine to play with already.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 19th November 2021, 11:12   #616  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,823
Quote:
Originally Posted by Dogway View Post
Updated DCTFilter, hope it's fine now
Much better. Thanks.

Did you alredy implemented atan2 expr from Avisynth+ 3.7.1 test build 27 (20211117) in your scripts? I saw some legacy comments but the functions are still there.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 19th November 2021, 17:46   #617  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
Yes, I forgot to add in the changelog. So far it's only used for the cylindrical models in TransformsPack. It's a tiny bit faster than my approx. but it's internal and more precise so a winner for me. I don't think 'atan' is yet optimized but I didn't see it used in any of my scripts.

I will keep the legacy functions for reference, this is also some kind of algo spread sheet for learning.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 19th November 2021, 19:28   #618  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
By the way, I want to introduce SoftLimiter() a filter I have been working on for the last days. It's an inclusive limiter, that means not only it drops out out of range values, but also will include out of range values in a rolloff manner. This is adaptive in the sense that further out of range values will rolloff stronger.
There's also a dynamic mode where you don't need to input the range floor/ceil after inspection. It uses ShowChannels() which works only over 8-bit so precision is not very granular.
dyn=0 is static (default), dyn=1 uses accumulative loose min/max, which is a set and forget safe mode, dyn=2 is more granular and probably better when the source range floor/ceil varies, and dyn=3 which is very granular.



For comparison this is SoftLimiter2() by raffriff42



And here an example with a tailored sample with range floor at 11 and ceil at 245:
Limiter()

SoftLimiter()



I also optimized the HSV, IPT and OkLab conversion functions and they are ready to shine, now work over any bitdepth.
Here's a comparison for the hue perceptual uniformity. Since Luma and Chroma channels are mapped differently I matched those by eye.

HSV

IPT

OkLab
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 26th November 2021 at 17:32.
Dogway is offline   Reply With Quote
Old 19th November 2021, 20:55   #619  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,823
Quote:
Originally Posted by Dogway View Post
I also optimized the HSV, IPT and OkLab conversion functions and they are ready to shine, now work over any bitdepth.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 19th November 2021, 23:13   #620  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 1,052
Quote:
Originally Posted by Dogway View Post
And here an example with a tailored sample with range floor at 11 and ceil at 245...
Looks nice. What is that Limiter() there? Could you compare SafeColorLimiter too?
VoodooFX is offline   Reply With Quote
Reply

Tags
avisynth, dogway, filters, hbd, packs

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 16:34.


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