7 template<
typename TPIXEL,
typename TCHANNEL>
class TCubicFInt;
10 #ifndef TCUBICFINT_HPP_
11 #define TCUBICFINT_HPP_
14 #include "../typedefs.hpp"
15 #include "../bitmaps/TBitmap.hpp"
20 #define INTERPOLATE_CUBIC(P0, P1, P2, P3, X, RES) \
21 RES = (-P0 + P3 + 3 * P1 - 3 * P2) * X * X * X / 0.2e1 + (-5 * P1 + 2 * P0 - P3 + 4 * P2) * X * X / 0.2e1 + (P2 - P0) * X / 0.2e1 + P1;
29 template<
typename TPIXEL,
typename TCHANNEL>
54 TCHANNEL * ptr = (TCHANNEL *) &retVal;
57 TCHANNEL p0, p1, p2, p3;
58 double tp0, tp1, tp2, tp3;
86 *ptr = (clamp >
maxVal) ?
maxVal : (clamp < 0) ? 0 : clamp;
114 *ptr = (clamp >
maxVal) ?
maxVal : (clamp < 0) ? 0 : clamp;
142 *ptr = (clamp >
maxVal) ?
maxVal : (clamp < 0) ? 0 : clamp;
170 *ptr = (clamp >
maxVal) ?
maxVal : (clamp < 0) ? 0 : clamp;
183 TCHANNEL * ptr = (TCHANNEL *) &retVal;
184 TCHANNEL p0, p1, p2, p3;
206 double tp0, tp1, tp2, tp3;
230 *ptr = (clamp >
maxVal) ?
maxVal : (clamp < 0) ? 0 : clamp;
254 *ptr = (clamp >
maxVal) ?
maxVal : (clamp < 0) ? 0 : clamp;
278 *ptr = (clamp >
maxVal) ?
maxVal : (clamp < 0) ? 0 : clamp;
302 *ptr = (clamp >
maxVal) ?
maxVal : (clamp < 0) ? 0 : clamp;
319 TPIXEL p0, p1, p2, p3;
320 double tp0, tp1, tp2, tp3;
347 retVal = (clamp >
maxVal) ?
maxVal : (clamp < 0) ? 0 : clamp;
360 TPIXEL p0, p1, p2, p3;
382 double tp0, tp1, tp2, tp3;
406 retVal = (clamp >
maxVal) ?
maxVal : (clamp < 0) ? 0 : clamp;
450 xReindex = (
int *) malloc((
unsigned long int) ((
srcWidth + 4) *
sizeof(
int)));
459 while (ptr < ptrEnd) {
475 while (ptr < ptrEnd) {
479 *ptr = srcHeight - 1;
481 *ptr = srcHeight - 1;
519 template<
typename TPIXEL,
typename TCHANNEL>
522 template<
typename TPIXEL,
typename TCHANNEL>