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. |
|
|
Thread Tools | Search this Thread | Display Modes |
18th May 2019, 20:10 | #1 | Link |
Registered User
Join Date: Feb 2014
Posts: 355
|
Help Inserting Resizing Between Denoising And Line Darkening
Happy Saturday! I'm wanting to insert a resize after the denoising but before the line darkening in an existing script, but I'm having trouble negotiating the transition from 16-bit to 8-bit back to 16-bit. The existing script is:
Code:
### Overall Temporal Denoise ### SMDegrain(TR=2,ThSAD=200,ContraSharp=True,RefineMotion=True,Plane=0,Chroma=False,PreFilter=2,Lsb=True,Lsb_Out=True) ### Darken-Thin Lines ### F=DitherPost(Mode=-1) S=F.FastLineDarkenMod(Strength=24,Prot=6).aWarpSharp2(Blur=4,Type=1,Depth=8,Chroma=2) D=MT_MakeDiff(S,F).Dither_Convert_8_To_16() Dither_Add16(Last,D,Dif=True,U=2,V=2) Code:
### Resize ### NNEDI3_RPow2(4,CShift="Spline64Resize",FWidth=960,FHeight=720) aWarpSharp2(Depth=5) Sharpen(0.2) Code:
### Overall Temporal Denoise ### SMDegrain(TR=2,ThSAD=200,ContraSharp=True,RefineMotion=True,Plane=0,Chroma=False,PreFilter=2,LSB=True,LSB_Out=False) ### Resize ### NNEDI3_RPow2(4,CShift="Spline64Resize",FWidth=960,FHeight=720) aWarpSharp2(Depth=5) Sharpen(0.2) ### Darken-Thin Lines ### Dither_Convert_8_To_16() F=DitherPost(Mode=-1) S=F.FastLineDarkenMod(Strength=24,Prot=6).aWarpSharp2(Blur=4,Type=1,Depth=8,Chroma=2) D=MT_MakeDiff(S,F).Dither_Convert_8_To_16() Dither_Add16(Last,D,Dif=True,U=2,V=2) Last edited by LouieChuckyMerry; 19th May 2019 at 23:35. Reason: DoubleComma! |
19th May 2019, 18:46 | #2 | Link |
Registered User
Join Date: Jan 2010
Posts: 709
|
you are trying to merge 2 clips with different resolutions.
also jpsdr's nnedi3 works on avs+ 16bit too https://forum.doom9.org/showthread.php?t=170083
__________________
powered by Google Translator Last edited by Motenai Yoda; 19th May 2019 at 18:50. |
19th May 2019, 20:59 | #3 | Link | ||
Registered User
Join Date: Feb 2014
Posts: 355
|
Quote:
Quote:
Last edited by LouieChuckyMerry; 19th May 2019 at 21:00. Reason: Simplicity |
||
19th May 2019, 21:49 | #4 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
You got a typo in first line of code (double comma).
Just curious, what is original frame size (bigger/equal 240x180 AND smaller than 480x360) ? ... [ NNEDI3_RPow2(4) ] EDIT: Not sure I got them there bigger than smaller than numbers correct.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 19th May 2019 at 22:09. |
19th May 2019, 23:40 | #5 | Link |
Registered User
Join Date: Feb 2014
Posts: 355
|
Damn cut-and-paste...
PAL DVD, 720x576. I went with "4" because the thread from which I stole the upscale bit of the script states, to paraphrase: use 2 but change it to 4 if you've the patience because it'll look better. Thanks jagabo . |
19th May 2019, 23:56 | #6 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
nnedi3_rpow2:- http://avisynth.nl/index.php/Nnedi3/nnedi3_rpow2
Quote:
In other words, nnedi3_rpow2(2, ...) to double size and then downscale. (original script would quadruple size, and then down scale which would be slower than necessary and maybe not as good qual [methinks]). No idea about the rest of script, I gorra get a bit more into the hi bit stuff. EDIT: Some stuff about src_left,src_top removed.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 22nd May 2019 at 07:20. |
|
20th May 2019, 03:58 | #7 | Link | |
Registered User
Join Date: Feb 2014
Posts: 355
|
Quote:
|
|
20th May 2019, 04:56 | #8 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
EDIT: Ignore prev posted stuff about src_left/right, not arg in Nnedi3_rpow2
The CShift (resizer name) is just to resize to desired output size (and shift center correct). I personally dont [usually] care enough about it to be so bothered about centering, Centering required due to way nnedi3_rpow2() works (keeps some original pixels and synthesizers those in between). Nnedi3_rpow2 produces a shifted output (after upsize due to above synthesized pixels, before resize downscale). Think this is how it works::: If rFactor=4, then every output pixel coord that is evenly divisible by 4, is original, others synthesized. If rFactor=2, then every output even pixel is original, every odd is synthesized. You use rFactor = 2 where resizing larger than source and less or equal to 2* source dimension. You use rFactor = 4 where resizing larger than 2xSource and less or equal to 4* source dimension. Above rough estimate, eg if only a little over double size then might prefer to just use rfactor=2, significantly faster with little difference in result. If upscaling by eg 5%, then hardly worth using Nnedi3_rpow2() at all, simple resize would be a lot faster and little difference. If less than doubling size (as in your case), then rFactor=2 is already bigger than required and rpow2 upscale by 4 IS OVERKILL [if he is dead, stop wasting bullets]. EDIT: In your case, when downsize via CShift, if using rfactor=4, then would be using 1 src pixel for every group of 4 pixels [1 src and 3 synth], when rfactor=2, would use 1 src pixel for every pair of pixels, obviously rfactor=2 is [in this case] better [and quicker]. EDIT: Upsize shifted, O=Original Pixel, S synthesized, where rfactor=2, original Image O shifted left (needs right shift when downsize, ideally shifting src O mid way between upsize O and S ie 1/2 pixel shift) Code:
OSOSOSOS Code:
OSSSOSSSOSSSOSSS
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 20th May 2019 at 15:25. |
20th May 2019, 15:16 | #9 | Link |
Registered User
Join Date: Feb 2014
Posts: 355
|
Thank you very much for the information, StainlessS . I'll save some ammunition and use "RFactor=2" instead of 4. Of course, in the process of trying to figure out how to use NNEDI3_RPow2 in a 16-bit chain I encountered NNEDI3_Resize16, so now I have to learn which suits my needs best by reading the NNEDI3 thread (the high bit depth bit begins here).
|
20th May 2019, 15:35 | #10 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Thanx LCM, I was totally unaware of that NNEDI3_Resize16, I'll take a gander later (got to leave soon).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
20th May 2019, 23:25 | #11 | Link | |
Registered User
Join Date: Jan 2010
Posts: 709
|
Quote:
Code:
### Overall Temporal Denoise ### SMDegrain(Lsb=True,Lsb_Out=True) ### Darken-Thin Lines ### F=DitherPost(Mode=-1) S=F.FastLineDarkenMod(Strength=24,Prot=6).aWarpSharp2(Blur=4,Type=1,Depth=8,Chroma=2) D=MT_MakeDiff(S,F).Dither_Convert_8_To_16() Dither_Add16(Last,D,Dif=True,U=2,V=2) S is filtered 8 bit clip D is the difference between S and F (what the 8bit filter stage added), converted to 16bit Dither_Add16 re-add that difference into last which is the 16bit smdegrain output. this way is pretty lame as lsb data isn't related to what is in msb and while it can be useful with filters like linedarker changing only few masked pixels, I'm not sure about a warpsharp one it's like as you do round(pi) * 5 + (pi - round(pi)) = 3*5+.14 = 15.14 where pi*5 = 15,7 If you add a resize in the 8bit stage, D resolution change but last doesn't
__________________
powered by Google Translator Last edited by Motenai Yoda; 20th May 2019 at 23:31. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|