Releases: AmusementClub/descale
r8.A3
introduced border_handling parameter
r8.A2 "It Will Be an Unforgettable Day"
Switched to upstream implementation of custom kernels and integrated vs-api3.
Restored parameter ordering api break so that existing scripts continue to work.
r7.A "It is The Beginning of Amusement"
Compared to upstream r7 release, this release introduces support for descaling with custom arbitrary kernel (specified as a Python function and its support).
For example, here is yet another way to implement Debilinear(src, dw, dh)
:
dsed = core.descale.Descale(src, dw, dh, custom=lambda x: max(0, 1-abs(x)), support=1)
Assume custom=f
, the support
argument is the radius of x's support, i.e.
if |x| > support, then f(x) must be zero.
The max support for existing kernels is 4 for spline64, but descale only has optimized code path for 1 and 2.
(see https://github.com/AmusementClub/descale/blob/4a288cf57e65f7c098ac049a2fa34b5cac95c07d/src/descale.c#L166 if you want some kernel function references.)
The corresponding fmtconv change, see r28.A:
scaled = core.fmtc.resample(src, scale=2, custom=lambda x: max(0, 1-abs(x)), support=1) # bilinear upscale
Added parameters: custom
/support
, custom_h
/support_h
, custom_v
/support_v
. They should behave as the rest of fmtconv parameters (including specifying different custom kernel for horizontal/vertical scaling and/or each plane.) Also note that fmtconv will apply an additional anti-aliasing low-pass filter for downscales.
This is experimental and the question of how to actually determine the custom kernel to use is left as an exercise for the users.
rA.0alpha test for custom kernel support
For example, here is yet another way to implement Debilinear(src, dw, dh)
:
dsed = core.descale.Descale(src, dw, dh, custom=lambda x: max(0, 1-abs(x)), support=1)
Assume custom=f
, the support
argument is the radius of x's support, i.e.
if |x| > support, then f(x) must be zero.
The max support for existing kernels is 4 for spline64, but descale only has optimized code path for 1 and 2.
(see https://github.com/AmusementClub/descale/blob/4a288cf57e65f7c098ac049a2fa34b5cac95c07d/src/descale.c#L166 if you want some kernel function references.)
The corresponding fmtconv change:
scaled = core.fmtc.resample(src, scale=2, custom=lambda x: max(0, 1-abs(x)), support=1) # bilinear upscale
Added parameters: custom
/support
, custom_h
/support_h
, custom_v
/support_v
. They should behave as the rest of fmtconv parameters (including specifying different custom kernel for horizontal/vertical scaling and/or each plane.) Also note that fmtconv will apply an additional anti-aliasing low-pass filter for downscales.
This is very experimental and of alpha quality (read: only tested bilinear (de-)scaling).