mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-20 20:24:45 +03:00
SIMD ColorLUT. remove unused utility
This commit is contained in:
parent
91dcda6b43
commit
0520521560
|
@ -15,30 +15,6 @@
|
||||||
|
|
||||||
#define SHIFT_BITS (16 - 1)
|
#define SHIFT_BITS (16 - 1)
|
||||||
|
|
||||||
static inline UINT8
|
|
||||||
clip8(int in) {
|
|
||||||
return clip8_lookups[(in + PRECISION_ROUNDING) >> PRECISION_BITS];
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
interpolate3(INT16 out[3], const INT16 a[3], const INT16 b[3], INT16 shift) {
|
|
||||||
out[0] = (a[0] * ((1 << SHIFT_BITS) - shift) + b[0] * shift) >> SHIFT_BITS;
|
|
||||||
out[1] = (a[1] * ((1 << SHIFT_BITS) - shift) + b[1] * shift) >> SHIFT_BITS;
|
|
||||||
out[2] = (a[2] * ((1 << SHIFT_BITS) - shift) + b[2] * shift) >> SHIFT_BITS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
interpolate4(INT16 out[4], const INT16 a[4], const INT16 b[4], INT16 shift) {
|
|
||||||
out[0] = (a[0] * ((1 << SHIFT_BITS) - shift) + b[0] * shift) >> SHIFT_BITS;
|
|
||||||
out[1] = (a[1] * ((1 << SHIFT_BITS) - shift) + b[1] * shift) >> SHIFT_BITS;
|
|
||||||
out[2] = (a[2] * ((1 << SHIFT_BITS) - shift) + b[2] * shift) >> SHIFT_BITS;
|
|
||||||
out[3] = (a[3] * ((1 << SHIFT_BITS) - shift) + b[3] * shift) >> SHIFT_BITS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int
|
|
||||||
table_index3D(int index1D, int index2D, int index3D, int size1D, int size1D_2D) {
|
|
||||||
return index1D + index2D * size1D + index3D * size1D_2D;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Transforms colors of imIn using provided 3D lookup table
|
Transforms colors of imIn using provided 3D lookup table
|
||||||
|
|
Loading…
Reference in New Issue
Block a user