-
-
Notifications
You must be signed in to change notification settings - Fork 99
Description
New kernel for 2D/polar resampling engine - weighed sum of jincs by user-provided 4 coefficients.
Implemented in AVS plugin - https://github.com/jpsdr/JincResizeMT
Kernel function for k10, k20, k11, k21 user-provided coefficients:
https://github.com/jpsdr/JincResizeMT/blob/f85e6f09f792e4da333cd023eb15249fda51d2c3/Src/JincResizeMT.cpp#L527
2D kernel of sum of jincs of max size 5x5 with trimmed out corner samples (XX), so 21 jincs in sum total
kernel samples placement in 2D full numbering (x,y)
where k(+0,+0) = 1.0 - center sample of kernel
XX k(-1,+2) k(+0,+2) k(+1,+2) XX
k(-2,+1) k(-1,+1) k(+0,+1) k(+1,+1) k(+2,+1)
k(-2,+0) k(-1,+0) k(+0,+0) k(+1,+0) k(+2,+0)
k(-2,-1) k(-1,-1) k(+0,-1) k(+1,-1) k(+2,-1)
XX k(-1,-2) k(+0,-2) k(+1,-2) XX
copy of k10, k20, k11, k21 by symmethry:
XX k21 k20 k21 XX
k21 k11 k10 k11 k21
k20 k10 1.0 k10 k20
k21 k11 k10 k11 k21
XX k21 k20 k21 XX
Recommended kernel coefficients values from flat to sharp look/make-up in the attached image (table). Defined in 8bit limited video range. Internal mapping to 0..1 float range -
k10 = (k10-16.0f)/219.0f;
k20 = (k20-16.0f)/219.0f;
k11 = (k11-16.0f)/219.0f;
k21 = (k21-16.0f)/219.0f;
