Backwoods: Yes. but you've hawk's eyes, and are probably trying on cartoon or animee. Try bicubic(25%, 0.33,0.33).bicubic(100%, 1.0,0.0) instead of lanczos
I'm too tired right now to work it all through. But please, just try the following:
- raise strength in layer() from "10" to, say, "32" or "64"
- *do check* the result via interleave() & histogram(mode="levels") as I said.
Then you will see what really is going on. Nothing against the method. It is a simple method, working very fast. And so is the result: fast and, well, simple.
Put shortly, the method is nothing more than a combination of
{reduction of dynamic range} plus
{unsharp masking}.
In particular, one is loosing blacks and whites.
BTW, using MaskTools, one cane do exactly the same as one-liner:
without any blurring (ultrafast):
Code:
strength = 10
yv12lut(source, "x 128 - 128 x - "+string(strength)+" 128 / * + 128 +", U=2,V=2)
# interleave( source, last ) .histogram(mode="levels")
with custom blurring:
Code:
strength = 10
blurred = source.blur(0.2,0.2)
#blurred = source.bicubicresize(source.width/16*4,source.height/16*4)
# \ .bicubicresize(source.width,source.height, 1.0, 0.0)
yv12lutxy(source,blurred,"x 128 - 128 y - "+string(strength)+" 128 / * + 128 +",U=2,V=2)
# interleave( source, last ) .histogram(mode="levels")
That's exactly the same, with following exceptions:
- chroma is not touched (original script washes out colors, too)
- it is faster
- it works in YV12
- it is more precise: one-step-operation, hence no rounding errors.
Also, try both blurring versions of the 2nd scriptlet. You'll notice that the first one (weak blurring @ 0.2) destroys the homogenity of a frame's histogram, and the output also looses sharpness. With the gaussian blurring, the histogram stays smooth, and the output doesn't loose sharpness.
Good night then ... /*snoozes away*/