#include <resampling_kernels.h>
template<class in_t, class out_t>
class Kernels::BilinearResampling< in_t, out_t >
Definition at line 122 of file resampling_kernels.h.
◆ process()
template<class in_t , class out_t >
Resamples a rectangle from an input bitmap to a rectangle in an output bitmap by bilinear interpolation.
Definition at line 128 of file resampling_kernels.h.
133 srcW =
src.width(), srcH =
src.height(),
135 shiftX = (srcW - dstW) / 2,
136 shiftY = (srcH - dstH) / 2;
143 for (
int y = sliceStart;
y < sliceStop; ++
y) {
145 const float fsy = (float)(
y * srcH + shiftY) / dstH;
146 const int isy = (int)fsy;
147 const float fy = fsy - (float)isy, _fy = 1 - fy;
148 const int sy =
src.a.y + isy;
151 lineJump = sy < srcH - 1 ? srcW - 1 : -1,
154 typename out_t::pixtype acc;
155 for (
int x = 0;
x < dstW; ++
x) {
157 const float fsx = (float)(
x * srcW + shiftX) / dstW;
158 const int isx = (int)fsx;
159 const float fx = fsx - (float)isx;
160 const int sx =
src.a.x + isx;
164 acc = in() * (1 - fx) * _fy;
166 acc = acc + in() * fx * _fy;
168 acc = acc + in() * (1 - fx) * fy;
170 acc = acc + in() * fx * fy;
175 acc = acc + in() * fy;
virtual ThreadIndex numThreads() const =0
ThreadIndex currentThread() const
virtual bool isTaskAborted() const =0
Returns true if the task is asked to stop from outside.
jobject jlong jint jint y
return(jlong) new Beatmup jlong jstring src
The documentation for this class was generated from the following file: