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 19th March 2021, 18:16   #721  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by LeXXuz View Post
How do I set sstring for chroma? Is there a 'new' parameter too?
there are string "chrnlocation", string "chrslocation", string "chrssx", string "chrssy", string "chrsst"

in neo style https://github.com/HomeOfAviSynthPlu..._DFTTest#usage
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 19th March 2021, 18:22   #722  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by real.finder View Post
there are string "chrnlocation", string "chrslocation", string "chrssx", string "chrssy", string "chrsst"

in neo style https://github.com/HomeOfAviSynthPlu..._DFTTest#usage
Ah perfect! Thanks a lot!


EDIT: File size of output differs quite a bit between those two settings:

Code:
dfttestMC(Y=true, U=true, V=true, sigma=48, MC=3, dither=0, dfttest_params=", chrsigma=16")
and
Code:
dfttestMC(Y=true, U=false, V=false, sigma=48, MC=3, dither=0)
dfttestMC(Y=false, U=true, V=true, sigma=16, MC=3, dither=0)


Any idea why this occurs?
LeXXuz is offline   Reply With Quote
Old 19th March 2021, 18:27   #723  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
motion Analysis in 2nd call of dfttestMC will not be the same of 1st one cuz it will use denoised input

maybe it will be same if you do it like this

dfttestMC(Y=true, U=false, V=false, sigma=48, MC=3, dither=0).MergeChroma(dfttestMC(Y=false, U=true, V=true, sigma=16, MC=3, dither=0))

or better dfttestMC(sigma=48, MC=3, dither=0).MergeChroma(dfttestMC(sigma=16, MC=3, dither=0))
__________________
See My Avisynth Stuff

Last edited by real.finder; 19th March 2021 at 18:36.
real.finder is offline   Reply With Quote
Old 19th March 2021, 19:38   #724  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by real.finder View Post
motion Analysis in 2nd call of dfttestMC will not be the same of 1st one cuz it will use denoised input
So motion analysis will always only be done in Y plane, even if you call dfttestMC to only process chroma planes? Does this mean the "new" variant (with dfttestMC(Y=true, U=true, V=true, sigma=48, MC=3, dither=0, dfttest_params=", chrsigma=16")) would be more precise?

Quote:
Originally Posted by real.finder View Post
maybe it will be same if you do it like this

dfttestMC(Y=true, U=false, V=false, sigma=48, MC=3, dither=0).MergeChroma(dfttestMC(Y=false, U=true, V=true, sigma=16, MC=3, dither=0))
Thank you. I will give it a try.

Quote:
Originally Posted by real.finder View Post
or better dfttestMC(sigma=48, MC=3, dither=0).MergeChroma(dfttestMC(sigma=16, MC=3, dither=0))
I don't understand this one actually. Wouldn't this process all three planes twice?

Last edited by LeXXuz; 19th March 2021 at 19:42.
LeXXuz is offline   Reply With Quote
Old 19th March 2021, 20:14   #725  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
motion analysis will always only be done in Y plane, even if you call dfttestMC to only process chroma planes
motion analysis will always use luma, but there are way to not use chroma in motion analysis

in dfttestMC the motion analysis of using chroma is linked with u and v parameters by default, so I just did update to add chromaMA

so now
Code:
dfttestMC(Y=true, U=false, V=false, sigma=48, MC=3, dither=0, chromama=true).MergeChroma(dfttestMC(Y=false, U=true, V=true, sigma=16, MC=3, dither=0))
output should be same as dfttestMC(Y=true, U=true, V=true, sigma=48, MC=3, dither=0, dfttest_params=", chrsigma=16")
__________________
See My Avisynth Stuff

Last edited by real.finder; 19th March 2021 at 20:26.
real.finder is offline   Reply With Quote
Old 19th March 2021, 22:41   #726  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Sorry to say it, but the difference in file size is still the same.

I've triple checked everything. I've updated both avsi once more to v2.122 and V1.146 and did another run with your code examples.

with
Code:
dfttestMC(Y=true, U=true, V=true, sigma=48, MC=3, dither=0, dfttest_params=", chrsigma=16")
Output is still ~161MB, encoding speed ~11.69 FPS

and with
Code:
dfttestMC(Y=true, U=false, V=false, sigma=48, MC=3, dither=0, chromama=true).MergeChroma(dfttestMC(Y=false, U=true, V=true, sigma=16, MC=3, dither=0))
Output is still ~150MB, encoding speed ~6.81 FPS

So the question is, which one is doing the job 'correctly'
LeXXuz is offline   Reply With Quote
Old 19th March 2021, 22:49   #727  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
can you try with sneo_dfttest(sigma=48, chrsigma=16) vs sneo_dfttest(sigma=48).MergeChroma(sneo_dfttest(sigma=16)) ?
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 20th March 2021, 00:49   #728  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
ok, I find many problems with sneo_dfttest, fixed in Zs_RF_Shared V1.147

aside from that there was some compatibility problems with old dfttest since neo_dfttest is based on VS dfttest port which has some default settings changes, now they should be fixed
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 20th March 2021, 10:47   #729  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by real.finder View Post
can you try with sneo_dfttest(sigma=48, chrsigma=16) vs sneo_dfttest(sigma=48).MergeChroma(sneo_dfttest(sigma=16)) ?
Quite close but not identical.

sneo_dfttest(sigma=48, chrsigma=16): 149.835.776 Bytes @ 13.45FPS

sneo_dfttest(sigma=48).MergeChroma(sneo_dfttest(sigma=16)): 149.848.064 Bytes @ 10.26FPS

Both for exact 10,000 frames of the same source material. At least far closer than with MC.

EDIT: Didn't see your new post. This is still with ZS 1.146 Shall I try it again with 1.147?
LeXXuz is offline   Reply With Quote
Old 20th March 2021, 11:16   #730  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
yes, try with last one for all tests (both MC and without MC)

100% identical I think is something improbable, it's ok if it 99% in this case
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 20th March 2021, 12:28   #731  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by real.finder View Post
Zs_RF_Shared.avsi (Shared Functions and utility V1.05 or up) is needed
I don't know how but there are two versions floating on GitHub: 1.143 and 1.147.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 20th March 2021, 15:07   #732  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Well, here we go:

Code:
1)
sneo_dfttest(sigma=48, chrsigma=16):
(149.680.128 Bytes) ~ 11.29FPS
Code:
2)
sneo_dfttest(sigma=48).MergeChroma(sneo_dfttest(sigma=16)):
(149.639.168 Bytes) ~ 7.52FPS
Code:
3)
dfttestMC(Y=true, U=true, V=true, sigma=48, MC=3, dither=0, dfttest_params=", chrsigma=16"):
(128.700.416 Bytes) ~ 9.11FPS
Code:
4)
dfttestMC(Y=true, U=false, V=false, sigma=48, MC=3, dither=0, chromama=true).MergeChroma(dfttestMC(Y=false, U=true, V=true, sigma=16, MC=3, dither=0)):
(128.708.608 Bytes) ~ 8.08FPS

=>
-All four tests with exact 10,000 frames of the same source material.
-With v1.147 encoding speed dropped for all 4 tests compared to V1.146.
-Output file size with MC much smaller, as expected. But I'm quite suprised MC reduces speed only by such a little margin. Is that correct???
-Why is 4) faster than 2)? Because x265 encoder had less grain to analyze?



Filters used:
Code:
Zs_RF_Shared.avsi V1.147
dfttestMC_and_MC_things.avsi V2.122
mvtools-2.7.44\x64\mvtools2.dll (pinterf's version)
neo-dfttest\64\neo-dfttest.dll  (still use the version you provided me with here)
mtmodes.avsi (from here )
Avisynth+ 3.6.1 (r3300, 3.6, x86_64)
Prefetch(8)
Avisynth script:
Code:
SetMemoryMax(10240)
#
LoadPlugin("C:\MeGUI (x64)\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("D:\WORK\source.mkv")
#
crop(240, 0, -240, 0)
#
LoadPlugin("C:\MeGUI (x64)\tools\avisynth_plugin\neo-dfttest\64\neo-dfttest.dll")
LoadPlugin("c:\MeGUI (x64)\tools\avisynth_plugin\mvtools-2.7.44\x64\mvtools2.dll")
#
Import("C:\MeGUI (x64)\tools\avisynth_plugin\dfttestMC_and_MC_things.avsi") #v2.122
Import("C:\MeGUI (x64)\tools\avisynth_plugin\Zs_RF_Shared.avsi") #v1.146
Import("C:\MeGUI (x64)\tools\avisynth_plugin\mtmodes.avsi")
#
ConvertBits(16)
#
<INSERT DENOISER HERE>
#
Trim(0,10000)
Prefetch(8)
Return(Last)
x265 Settings:
Code:
-[Information] [20.03.2021 14:19:37] custom command line: --qpfile "D:\WORK\chp.qpf" --output-depth 10 --ctu 32 
--aq-mode 2 --limit-refs 3 --rd 4 --psy-rd 3 --psy-rdoq 15 --colorprim bt709 --transfer bt709 --colormatrix bt709

...

-[Information] [20.03.2021 14:19:39] y4m  [info]: 1440x1080 fps 24000/1001 i420p16 sar 1:1 unknown frame count
-[Information] [20.03.2021 14:19:39] raw  [info]: output file: D:\WORK\Output.hevc
-[Information] [20.03.2021 14:19:39] x265 [info]: HEVC encoder version 3.5+8-57e817329
-[Information] [20.03.2021 14:19:39] x265 [info]: build info [Windows][GCC 10.2.0][64 bit] 10bit
-[Information] [20.03.2021 14:19:39] x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
-[Information] [20.03.2021 14:19:39] x265 [info]: Main 10 profile, Level-4 (Main tier)
-[Information] [20.03.2021 14:19:39] x265 [info]: Thread pool created using 32 threads
-[Information] [20.03.2021 14:19:39] x265 [info]: Slices                              : 1
-[Information] [20.03.2021 14:19:39] x265 [info]: frame threads / pool features       : 5 / wpp(34 rows)
-[Information] [20.03.2021 14:19:39] x265 [info]: Coding QT: max CU size, min CU size : 32 / 8
-[Information] [20.03.2021 14:19:39] x265 [info]: Residual QT: max TU size, max depth : 32 / 3 inter / 3 intra
-[Information] [20.03.2021 14:19:39] x265 [info]: ME / range / subpel / merge         : star / 57 / 4 / 4
-[Information] [20.03.2021 14:19:39] x265 [info]: Keyframe min / max / scenecut / bias  : 23 / 250 / 40 / 5.00 
-[Information] [20.03.2021 14:19:39] x265 [info]: Lookahead / bframes / badapt        : 40 / 8 / 2
-[Information] [20.03.2021 14:19:39] x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 1
-[Information] [20.03.2021 14:19:39] x265 [info]: References / ref-limit  cu / depth  : 5 / on / on
-[Information] [20.03.2021 14:19:39] x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
-[Information] [20.03.2021 14:19:39] x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
-[Information] [20.03.2021 14:19:39] x265 [info]: tools: rect amp limit-modes rd=4 psy-rd=3.00 rdoq=2 psy-rdoq=15.00
-[Information] [20.03.2021 14:19:39] x265 [info]: tools: rskip mode=1 limit-tu=4 signhide tmvp b-intra
-[Information] [20.03.2021 14:19:39] x265 [info]: tools: strong-intra-smoothing deblock sao
LeXXuz is offline   Reply With Quote
Old 20th March 2021, 17:27   #733  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by tormento View Post
I don't know how but there are two versions floating on GitHub: 1.143 and 1.147.
because I didn't update the master tree yet

Quote:
Originally Posted by LeXXuz View Post

=>
-All four tests with exact 10,000 frames of the same source material.
-With v1.147 encoding speed dropped for all 4 tests compared to V1.146.
-Output file size with MC much smaller, as expected. But I'm quite suprised MC reduces speed only by such a little margin. Is that correct???
-Why is 4) faster than 2)? Because x265 encoder had less grain to analyze?

as I said

Quote:
aside from that there was some compatibility problems with old dfttest since neo_dfttest is based on VS dfttest port which has some default settings changes, now they should be fixed
the default of tbsize in neo is 3 but in original it was 5 and that why now it's slower, in mc you set the mc=3 and that will make tbsize=3
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 20th March 2021, 17:53   #734  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by real.finder View Post
in mc you set the mc=3 and that will make tbsize=3
I'm confused now. Isn't tbsize set to 2*MC+1 in dfttestMC()? Or is this not valid anymore?
LeXXuz is offline   Reply With Quote
Old 20th March 2021, 17:59   #735  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by LeXXuz View Post
I'm confused now. Isn't tbsize set to 2*MC+1 in dfttestMC()?
yes, but it's kinda equivalent to non MC tbsize if you think of it that way, since you compare the sizes and speed

edit: also 4) is faster than 2) since 2 process all planes twice
__________________
See My Avisynth Stuff

Last edited by real.finder; 20th March 2021 at 18:13.
real.finder is offline   Reply With Quote
Old 20th March 2021, 18:37   #736  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Ok, so I guess option 3) would be my best bet, right?

Just one last thing, I have to use slocation not sstring if I want to give a sigma curve via dfttest_params to neo-dfttest. Is that correct?

My final denoiser line with option 3) would look like this now:
Code:
dfttestMC(Y=true, U=true, V=true, MC=3, dither=0, dfttest_params=""", slocation="0.0:64 0.1:8 0.2:16 0.3:32 0.4:64 1.0:64", chrslocation="0.0:16 0.1:2 0.2:4 0.3:8 0.4:16 1.0:16" """)
To use "0.0:64 0.1:8 0.2:16 0.3:32 0.4:64 1.0:64" as the sigma frequency-curve for luma and "0.0:16 0.1:2 0.2:4 0.3:8 0.4:16 1.0:16" for chroma.

In the past I would have used these lines:
Code:
dfttestMC(Y=true, U=false, V=false, sstring="0.0:64 0.1:8 0.2:16 0.3:32 0.4:64 1.0:64", MC=3, dither=0)
dfttestMC(Y=false, U=true, V=true, sstring="0.0:16 0.1:2 0.2:4 0.3:8 0.4:16 1.0:16", MC=3, dither=0)
Which I learned now, wasn't quite correct because the 2nd instance used the already denoised output of the 1st instance.

Just want to make sure I understood the syntax correctly now and get what I intend to, before I start lots of encoding jobs.^^
LeXXuz is offline   Reply With Quote
Old 20th March 2021, 18:55   #737  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
like this dfttestMC(Y=true, U=true, V=true, MC=3, dither=0, sstring="0.0:64 0.1:8 0.2:16 0.3:32 0.4:64 1.0:64", chrslocation="0.0:16 0.1:2 0.2:4 0.3:8 0.4:16 1.0:16")
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 20th March 2021, 19:09   #738  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Perfect! Thanks a lot real.finder. Once again, you've been a tremendous help!
LeXXuz is offline   Reply With Quote
Old 5th May 2021, 18:06   #739  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
real.finder can you explain what the "rStr" parameter does in dfttestMC()?

And is "mdgSAD" or "thSAD" here the parameter to modify the 'strength' of the optional degrain filter?

Right now I have a source that is so noisy that dfttest alone couldn't cut it without losing way too much detail in dark areas.
LeXXuz is offline   Reply With Quote
Old 5th May 2021, 19:13   #740  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by LeXXuz View Post
real.finder can you explain what the "rStr" parameter does in dfttestMC()?

And is "mdgSAD" or "thSAD" here the parameter to modify the 'strength' of the optional degrain filter?

Right now I have a source that is so noisy that dfttest alone couldn't cut it without losing way too much detail in dark areas.
it's same as Str in SMDegrain

Quote:
Str float (0.0-8.0, default 1.0)

Gamma correction. With this parameter you control the strength of the brightening of the prefilter clip, good for when problems with dark areas arise. Using this internally instead of externally creates less quantization artifacts, since it's done in the same stage as the TV->PC range conversion.
but not same effect.


mdgSAD is for optional degrain filter, thSAD is not
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Reply

Tags
avisynth, avs script, avs+, banding, generator, hbd, mod

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 08:18.


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