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 4th October 2021, 07:13   #461  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
Quote:
Originally Posted by Dogway View Post
why don't you try the other ones?
I gave the consecutive clip to the community but here I am testing with CompTest.

Where can I find SantiagMod, deconv_h and mt_convolution?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 4th October 2021, 08:02   #462  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
This is SantiagMod, my go-to antialiaser, I simply replaced GScript with internal syntax:

Code:
### 
### SantiagMod
### 
### Antialiasing function by Archimedes,
### mod from original cretindesalpes's santiag.
### 
### 
### Requires:
### 
### LoadPlugin("plugins\EEDI3\eedi3.dll")
### LoadPlugin("plugins\NNEDI2\nnedi2.dll")
### LoadPlugin("plugins\NNEDI3\nnedi3.dll")
### 
### I've changed the posted function santiag a little bit.
### 
### Santiag has now three parameters: type, strh and strv. Type means the antialiasing type.
### Possible values are "EEDI3", "NNEDI2" and "NNEDI3". strh is the strength for the horizontal
### anti aliasing and strv is the strength for the vertical anti aliasing. Default values are:
### type="nnedi3", strh=1 and strv=1.
### 
### Contrary to the first posted function, santiag(strh=0, strv=0) now means no anti aliasing.
### I've also corected the center shift. With NNEDI3 as type, the center shift now works correct
### for all possible input clips (YV12, YUY2 and RGB24).


function SantiagMod(clip input, string "type", int "strh", int "strv") {
  type = Default(type, "NNEDI3")
  strh = Default(strh, 1)
  strv = Default(strv, strh)

  input

  strh > 0 ? AntiAliasing1(type=type, strength=strh) : NOP()
  TurnLeft()
  strv > 0 ? AntiAliasing1(type=type, strength=strv) : NOP()
  TurnRight()

  function AntiAliasing1(clip input, string "type", int "strength") {
    input

      if (type == "EEDI3") {
        EEDI3(dh=True, field=0)
        for (i = 2, strength) {
          EEDI3(dh=False, field=(i + 1) % 2)
        }
      }
      else if (type == "NNEDI2") {
        NNEDI2(dh=True, field=0)
        for (i = 2, strength) {
          NNEDI2(dh=False, field=(i + 1) % 2)
        }
      }
      else {
        NNEDI3(dh=True, field=0,qual=2)
        for (i = 2, strength) {
          NNEDI3(qual=2,dh=False, field=(i + 1) % 2)
        }
      }

    Spline36Resize(input.Width(), input.Height(), 0, 0.5, input.Width(), input.Height() * 2)
  }
}
mt_convolution() is from masktools2, I was too lazy to port to Expr() but if it works for you I can craft it.


By the way I have to ask if anyone is able to compile this program for Windows, I need it to optimize the latest medians from 35 and up. For example "median7" has the potential to increase from current 7.8% to 12%.
median7 (48 inputs) can be composed from two 24 sorting networks and finally a batcher's odd-even merge, but before I spend more days on it I want to test if the program can find an optimized sorting network.

On another note I have been reading about Julia, a new programming (scripting?) language. As fast as C, and as "easy" as Python. I might start to learn it.


EDIT: Also I want to comment that I have been testing GradFun3 and a DFT box filter is unbeatable for large radii, so I might just keep it (if I go for back compatibility). Dither_bilateral16() can't also be replaced, I tested with vsTBilateral() at large radii but something is going on, it appears as it denoises the same as Dither_bilateral16() but when passed dithered down it doesn't deband as much, this might have to do with particular settings like flat or wmin. So rather than a revolution I might do an in-place adaptation for HBD.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 4th October 2021 at 08:17.
Dogway is offline   Reply With Quote
Old 4th October 2021, 10:04   #463  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
Quote:
Originally Posted by Dogway View Post
This is SantiagMod
I have tried with the other filters.

SMDegrain (tr=4, thSAD=400, refinemotion=true, contrasharp=false, PreFilter=4, plane=4, chroma=true)
deconv_h = "0 -5 25 100 25 -5 0 "
mt_convolution (deconv_h, deconv_h, Y=3, U=2, V=2)


encoded 5053 frames, 4.98 fps, 7831.54 kb/s, duration 0:16:54.68

SMDegrain (tr=4, thSAD=400, refinemotion=true, contrasharp=false, PreFilter=4, plane=4, chroma=true)
SantiagMod(strh=2,strv=2)
a=last
ex_luts(last,last.removegrain(12,0),mode="clamp",UV=1)
ex_lutxy(last,a,"x y - abs 7 > y x y min ?")


encoded 5053 frames, 4.50 fps, 8190.77 kb/s, duration 0:18:43.92

SMDegrain (tr=4, thSAD=400, refinemotion=true, contrasharp=false, PreFilter=4, plane=4, chroma=true)
SantiagMod(strh=2,strv=2)
a=last
ex_luts(last,last.removegrain(12,0),mode="clamp",UV=1)
ex_lutxy(last,a,"x y - abs 7 > y x y min ?")
ex_boxblur(0.15,mode="weighted")


encoded 5053 frames, 4.36 fps, 7953.44 kb/s, duration 0:19:18.57


As you can see, not many changes at all.

Very hard video to compress.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 4th October 2021, 10:43   #464  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
Put SMDegrain last, and as I commented those 5000 frames are not representative of the movie pace. Use SelectRangeEvery() to get evenly spaced chunks and get a better estimate of final bitrate. Or simply encode with target bitrate 2 passes.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 4th October 2021, 10:46   #465  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
New ver santiag
https://github.com/realfinder/AVS-St...p/Santiag.avsi
kedautinh12 is offline   Reply With Quote
Old 4th October 2021, 11:12   #466  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
Quote:
Originally Posted by kedautinh12 View Post
Oh my god, who said to keep it simple.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 5th October 2021, 21:30   #467  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
I am having a problem with the following script

SetMemoryMax()
SetFilterMTMode("DEFAULT_MT_MODE", 2)
LoadPlugin("D:\Eseguibili\Media\DGDecNV\DGDecodeNV.dll")
DGSource("F:\In\1_48 Fantozzi\fantozzi.dgi",ct=24,cb=24,cl=0,cr=0)
ConvertBits(16)
Spresso(10,30).STpresso(10,30,4,22,8,49,1,mc=true) #last updates
fmtc_bitdepth (bits=8,dmode=8)
Prefetch(6)


with error

mt_lutxy : Error at position 3: cannot convert to number: 1.000000
(D:/Programmi/Media/AviSynth+/plugins64/STPresso-2020_0507.avsi, line 40)


Could you please convert STPresso too to use your ex_tools?
__________________
@turment on Telegram

Last edited by tormento; 5th October 2021 at 21:35.
tormento is offline   Reply With Quote
Old 6th October 2021, 00:01   #468  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
I made STTWM() 2 months ago. Did you try it?
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 6th October 2021, 00:13   #469  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
You don't upload that to github. I think it's only test build
kedautinh12 is offline   Reply With Quote
Old 6th October 2021, 00:35   #470  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
It was only an example script I crafted for tormento. I don't know to what degree it works or people find it useful so I can't vouch for that.


EDIT: By the way, compiled SorterHunter just to know it doesn't work with inputs larger than 32, oh well...
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 6th October 2021 at 02:04.
Dogway is offline   Reply With Quote
Old 6th October 2021, 09:38   #471  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
Quote:
Originally Posted by Dogway View Post
I made STTWM
Sorry, it jumped out of my mind. Have I to replace into

Spresso(10,30).STpresso(10,30,4,22,8,49,1,mc=true) #last updates

or use per se?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 6th October 2021, 09:42   #472  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
No, it's not a port it's an alternative, it uses the same concept, thresholded temporal, thresholded spatial then mix with another threshold. It's way faster. When I tested I liked the results but I normally don't use STPresso anyway. These are impulse noise denoisers (salt'n'pepper, etc) which I don't use much.

I just tested STPresso and worked for me with latest masktools and AVS+
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 6th October 2021, 09:55   #473  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
Quote:
Originally Posted by Dogway View Post
No, it's not a port it's an alternative, it uses the same concept, thresholded temporal, thresholded spatial then mix with another threshold.
I am just looking for an alternative for very grainy and oddly noised video, where SMDegrain simply surrender, even with 9/900.
Quote:
Originally Posted by Dogway View Post
I just tested STPresso and worked for me with latest masktools and AVS+
Any suggested parameter? The defaults are ok?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 6th October 2021, 10:18   #474  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
Ah for heavy grain I implemented temporalsoften into SMDegrain, it works great so far as I ported it from TSMC() mod and some bits from LTSMC() from Didée. Yes, there's some low frequency (motion) blur like, I'm working on it.

I tested STPresso with default values, maybe it might be something on your end. What line/call is giving you issues?
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 6th October 2021, 14:05   #475  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
Quote:
Originally Posted by Dogway View Post
Ah for heavy grain I implemented temporalsoften into SMDegrain
Please explain me how to use it, as I can't see in the documentation.
Quote:
Originally Posted by Dogway View Post
I tested STPresso with default values, maybe it might be something on your end. What line/call is giving you issues?
I saw a new release of MaskTools is out, allowing TAB, CR and LF characters as symbol separators in expression strings.

Will give it a try.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 7th October 2021, 00:02   #476  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
Quote:
Originally Posted by tormento View Post
Please explain me how to use it, as I can't see in the documentation.
I explained it to you in this post 2 weeks back.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 7th October 2021, 09:29   #477  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
Quote:
Originally Posted by Dogway View Post
I explained it to you
Oops.

I saw you mentioned ex_retinex too.

I am trying to recover some color cast, probably from film degradation, as you can see in the Retinex thread.

So, is it possible to integrate my separate line for color restoration inside SMDegrain? As you can see there, I am having some problems with too much red restoration.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 7th October 2021, 10:06   #478  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
My version of retinex is not for color balance but for contrast enhancement.
I think there are better tools to remove the color cast like Gammac or RGBadapt. See here.

Also check here from videoFred
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 7th October 2021, 10:45   #479  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
Quote:
Originally Posted by Dogway View Post
My version of retinex is not for color balance but for contrast enhancement.
Thanks for your links, I will read them.

The issue with that film is that every component aged in a different manner and it's really hard to balance the hues of each one.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 8th October 2021, 04:39   #480  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 991
What is the actual function on the "pre-filters" in SMDegrain ? eg:- Dfttest, KNLMeansCL, & BM3D.

Are they to compliment the main SMDegrain function ?, 'cause SMDegrain works pretty well, by itself !

And can the "strengths" be easily changed ?
__________________
Long term RipBot264 user.

RipBot264 modded builds..
TDS 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 20:31.


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