Log in

View Full Version : awarpsharp2 detail shrink


tormento
6th April 2024, 09:29
I am trying to rescale the anime 'The dangers in my heart' from BD, as it is too blurred and the black lines are too soft.

Tried both:

LoadPlugin("D:\Eseguibili\Media\DGDecNV\DGDecodeNV.dll")
DGSource("M:\In\The dangers 1 00000.dgi")
Convertbits(16)
libplacebo_Resample(1358,764,filter="lanczos")
nnedi3CL_rpow2(rfactor=2, nsize=6, nns=4, qual=2, etype=0, cshift="lanczos")
Edgelevel(strength=20,bc=10)
libplacebo_Resample(1920,1080,filter="lanczos")
libplacebo_Deband(iterations=3,temporal=true)
fmtc_bitdepth (bits=10,dmode=7)

and

LoadPlugin("D:\Eseguibili\Media\DGDecNV\DGDecodeNV.dll")
DGSource("M:\In\The dangers 1 00000.dgi")
Convertbits(16)
libplacebo_Resample(1358,764,filter="lanczos")
nnedi3CL_rpow2(rfactor=2, nsize=6, nns=4, qual=2, etype=0, cshift="lanczos")
aWarpSharp2(thresh=128, blur=2, type=1, depth=4, chroma=4)
Edgelevel(strength=20,bc=10)
libplacebo_Resample(1920,1080,filter="lanczos")
libplacebo_Deband(iterations=3,temporal=true)
fmtc_bitdepth (bits=10,dmode=7)

The second gives the best results in the line definition but I can't cope with the detail shrink that awarpsharp2 gives.

Any help about how to deal with that? Suggested values?

Didée
10th April 2024, 18:09
Accidentially, I'm playing with aWarpSharp2 these days, however in the haze circle of natural content with halos and SD>HD upscaling.

You have filters in your script that I've never heard of, seems I'm out of the game for more than just a few days. :scared:

Regarding aWarpSharp2:
1) read the docs. "type=1 needs 8x more blur passes than type=0" => you should use blur=16 rather than blur=2, or something like that.

2) consider using 1st/2nd derivative warp processing. The "geometrical distortions" of warpsharp are an old story. It can be improved (not perfectly, but often better) by applying a highpass difference map, applying the warp to that highpass, then applying the warped highpass to the lowpass. Like:

src = whatever
lowpass = src.bicubicresize(half). [removegrain(4)]. bicubicresize(original,1,0)
diff = mt_makediff(lowpass,src)
diffWarp = diff.aWarpSharp2(...)
mt_makediff(lowpass,diffWarp) #.mergechroma(src)

I found that this way, halo shrinking & line thinning produce less geometrical distortions in many occasions. Within certain limits.
Resize/Blur values need to be adjusted acc. to sources and their special problems. WarpSharp depth still shouldn't be too large, but depth=4 is a reasonable value. Maype, try concatenating a series of aWarpSharp2 with depth=5 + depth=4 + depth=3

tormento
10th April 2024, 20:45
You have filters in your script that I've never heard of, seems I'm out of the game for more than just a few days. :scared:

Long time no see. Welcome back! :)

Here (https://slow.pics/c/8V8zp1Xd) and here (https://slow.pics/c/8RFj9bix) you can find the difference between original, rescale w/o awarp2 and rescale w/ awarp2.

The entire picture seems to be zoomed out and the small details, such as the shining of the eyes get smaller.

Didée
10th April 2024, 21:28
Wow, that's about the level where you Anime guys always lose me. From that comparison, I don't see any problem with the warpsharp processing. If anything, the small details of the non-warpsharp processed image seem a tiny bit widened, and the warpsharp version puts it just right back. Maybe it's just my weak old eyes, but we're talking about subpixel-differences, aren't we.

lollo2
10th April 2024, 22:51
Accidentially, I'm playing with aWarpSharp2 these days

Welcome back, master!