View Single Post
Old 20th May 2019, 04:56   #8  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
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
Upsize shifted, O=Original Pixel, S synthesized, where rfactor=4, original Image O shifted left (needs right shift)
Code:
OSSSOSSSOSSSOSSS
EDIT: If any of above wrong, then someone please say.
__________________
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.
StainlessS is offline   Reply With Quote