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 11th August 2022, 14:56   #1401  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,041
SMDegrain(tr=2,"

Max possible temporal denoising amplitude is about doubled with about 4x of tr-value. So tr=2 with 4 ref frames may only about half of noise amplitude. To decrease noise more it is required something like 2x4=8 or 2x16=32 (about 4 times less noise in lucky case of all ref blocks found and used).

With too big noise level and too high thSAD it is good to set thSCD1 not below thSAD value.

I think it is visibly faster to increase tr-value with single pass. Also if any prefiltering used - all th-values require re-adjustment. Because prefiltering typically make SAD values lower.

Last edited by DTL; 11th August 2022 at 15:21.
DTL is offline   Reply With Quote
Old 13th August 2022, 01:49   #1402  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Hi, i report that deep_resize had problem when downscale from 4k to 1080p
I tried with this script:
deep_resize(1920,edge="Zopti1080")
But in video, her hair is wrong color
My sample: https://youtu.be/49R_nMEW7X8
kedautinh12 is offline   Reply With Quote
Old 13th August 2022, 10:37   #1403  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Thanks, updated TransformsPack - Main with a fix and some cosmetics.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 13th August 2022, 14:53   #1404  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by LeXXuz View Post
Dogway I noticed some faint distortions in my encodes, barely noticeable.
So I played around with the preview mode a little and saw a lot of erroneous frames of the prefiltered clip. See pics below:



EDIT: I turned off DGDenoise and the errors are gone. Tried with no prefilter (-1) and BM3DCUDA (6) with no errors.
Just a heads up regarding this issue. Sorry for the late reply.
It doesn't seem to be SMDegrain related. My old statement that DGDenoise() works fine is not valid. I get the very same errors when using DGDenoise() alone and denoising the chroma planes. With cstrength=0 the problem seems to be gone.

Will report this to DG. Maybe he can reproduce that error.

Last edited by LeXXuz; 13th August 2022 at 17:38.
LeXXuz is offline   Reply With Quote
Old 14th August 2022, 13:02   #1405  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
@LeXXuz, thanks for reporting back. Just retested with ConvertBits(16).DGDenoise(cstrength=2) and I don't get the issue so as it looks it's driver/GPU related. I'm still on Win7 so I use the latest 400 branch driver version.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 14th August 2022, 14:18   #1406  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
I'm on the lastest driver win10x64 - 3070TI, no issues here.
Post your script.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 15th August 2022, 07:32   #1407  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Problem is solved. And it was much simpler and stupider than expected. I downloaded a new mtmodes.avsi on that machine a few weeks back and some smart person thought it would be a good idea to set DGDenoise() as a NICE_FILTER. Well, you can guess the rest, I think.
LeXXuz is offline   Reply With Quote
Old 20th August 2022, 19:40   #1408  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Could you please suggest me some good quality resizer to resample from 720p to 1080p (1.5x)?

Unfortunately Waifu2x accepts 1.5 only. Any workaround or better to use deepresize or nnedi3resize?

How to use them with nnedi3cl? What about the parameters? I always hope you find the time to write some documentation.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 20th August 2022, 20:00   #1409  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
ResizersPack was updated with NNEDI3CL by default, you can switch to nnedi3 cpu with gpuid=-1 (read dependencies)

Yes, deep_resize is the way to go for quality resizing (like nnedi3_resize16() was before), it mixes different kernels for edge/flat/chroma areas. By default it's set to optimal kernels (check examples) but you can play with other ones if you want FCBI, etc.
I haven't implemented waifu2 yet.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 20th August 2022, 20:10   #1410  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by Dogway View Post
Yes, deep_resize is the way to go for quality resizing
Any hint for anime? As usual 1080p are 720p with bicubic. I inverted the process and now I want to rescale to proper resolution.
Quote:
Originally Posted by Dogway View Post
I haven't implemented waifu2 yet.
I have tried w2xncnnvk by Asd-g but, as I told, it supports only 2x.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 20th August 2022, 20:30   #1411  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,041
With typical non-linear resamplers of 2x you make processibg in 2 steps - make 2x resize to closer upper size and downsize with second variable scale method to required output size.
DTL is offline   Reply With Quote
Old 20th August 2022, 20:39   #1412  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by DTL View Post
With typical non-linear resamplers of 2x you make processibg in 2 steps - make 2x resize to closer upper size and downsize with second variable scale method to required output size.
Can you suggest me a good downsizer for anime (lineart)?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 20th August 2022, 20:46   #1413  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Quote:
Originally Posted by tormento View Post
I have tried w2xncnnvk by Asd-g but, as I told, it supports only 2x.
Then it's the same behavior than nnedi3, loop waifu2 until closest target dimensions then use alternative scaler to downscale or upscale. Didee bicubic coeffs are very good for small downscales.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 21st August 2022, 00:00   #1414  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
@Dogway where can I find some explanation of the deep_resize parameters? Some are obscure to me, even reading the avsi.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 21st August 2022, 02:31   #1415  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
What do you need to know, it's pretty straight forward.

Read the comments for the settings. In any case everything is already tuned for best results by default depending on up/dw scaling and the ratio of it.

Code:
    rth    = Default(th_rat, 1.25)                                                          # threshold for mix mode. Lower than this (target_size/source_size) will use only 'kernel1' kernel
    krn1   = Default(edge, rat<=rth*0.95 ?                       "Didee" :               /* # Resize kernel for the edge area. AI upscalers recommended here: nnedi3, FSRCNN, FCBI, SuperResXBR... or for downscaling: DPID, SSIM2, Zopti */
           \                rw<1 && rh<1 ? isUHD ? "Zopti1080" : "SSIM2" :               /* # By default, for small upscales   -> "blackman" (define *small* with 'th_rat' value) */
           \               rat<=rth      ?         "Blackman"  : "nnedi3")               /* # By default, for big   upscales   -> "nnedi3"
                                                                                            # By default, for small downscales -> "Didée"
                                                                                            # By default, for big   downscales -> "Zopti1080"
                                                                                            # By default, for mid   downscales -> "SSIM2" (DPID also fine for down to 720p) (Beware!! for UHD to HD against all logic I recommend going with Zopti1080 (b=-0.99,c=0.06) )  */
    krn1c  = Default(chroma,rw<1 && rh<1 ? "Zopti"  : "Blackman")                           # Chroma resizing kernel (no edge/flat discretion) *Remember you can directly call "kernel + taps". ie. Blackman6, Lanczos4
    krn2   = Default(flat,  rw<1 && rh<1 ? krn1     : isHD && isUHD2 ? "Sinc" : "Lanczos" ) # Resize kernel for the flat area (noop when downscaling). Ringing kernels are ok here (specially when up ratio is <1.7) like SincLin, Blackman, Lanczos, Sinc... ('Sinc' low taps -ie. 4- is worth testing, creates some faints halos specially for SD to HD so see whether it's faint enough for you)
    etp    = Default(e_taps, krn1 =="Blackman" ? 6  : krn1 =="Lanczos" ? 4 : 0)             # taps for edge   kernel (0 for undefined)
    ftp    = Default(f_taps, krn2 =="Blackman" ? 16 : krn2 =="Lanczos" ? 8 : 0)             # taps for flat   kernel (0 for undefined)
    ctp    = Default(c_taps, krn1c=="Blackman" ? 6  : krn1c=="Lanczos" ? 4 : 0)             # taps for chroma kernel (0 for undefined)
    thr    = Default(th,      1.0)                                                          # 0-255 (normally up to 10)
    ela    = Default(elast,   4.0)                                                          # 1-255 (normally up to 10)
    qual   = Default(qual,      1)
    sh     = Default(show, false)
    gpuid  = Default(gpuid,     0)                                                          # Set to -1 for "cpu" nnedi3
    dec    = Default(deconv,    0)                                                          # 0~10 (0 is disabled, raise to apply deconvolution when upscaling a very sharpened downscale -anything sharper than Catmull-Rom-)
    gr     = Default(grain, rw>1 && rh>1 && rat>rth ? 0.6 : 0 )                             # Grain strength. >0 Add grain to big upscales as a mean of cheap hallucination
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 21st August 2022, 09:34   #1416  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Code:
DGSource("test.dgi",ct=44,cb=44,cl=0,cr=0)
a=deep_resize(1920, 1040)
interleave(bicubicresize(1920, 1040, b=-0.5, c=0.25).propshow, a.propshow)
I was testing deep_resize with this simple script on a regular UHD (HDR) source, and I noticed that the colors of the deep_resize version are a bit warmer than in the source. Also the chroma location property seems to go missing.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 21st August 2022, 17:09   #1417  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Yes, the chroma loc property was already fixed internally yesterday, and about the warmer tones I don't get them, but as I said I made some changes and fixes to TransformsPack, will release tomorrow probably.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 21st August 2022, 19:02   #1418  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by Dogway View Post
about the warmer tones I don't get them
Dunno if related but have a look in the fmtc thread.

Seems planes and spaces sometimes don't mix well.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 21st August 2022, 23:15   #1419  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
fmtc hard codes 32-bit to full range so it's going to confuse you a little bit.
I have been refactoring a few things in ConvertFormat() to make it more robust, fixed quite a bit. With luck the next version after this one will finally be v1.0.
Also added waifu2xresize() a wrapper for w2xncnnvk. Quality is very good as expected, sharper than nnedi3 but very slow (~1fps on my card)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 22nd August 2022, 09:50   #1420  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by Dogway View Post
fmtc hard codes 32-bit to full range so it's going to confuse you a little bit.
I "solved" the issue from 32 bits to lower, with some obscure Converbits(32) switches. Now it's the planar to YUV that's bugging me.
__________________
@turment on Telegram
tormento 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 03:22.


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