diff options
author | simon <none@none> | 2015-02-19 17:22:13 -0800 |
---|---|---|
committer | simon <none@none> | 2015-02-19 17:22:13 -0800 |
commit | c5f281913ec83652ee2a2304dd435690c74de591 (patch) | |
tree | 9cf08c14e3d0cbd0061b78595714f8d20090aa30 /indra/llmath | |
parent | 9db4fc7be298870ea289b9401c5f2726e4af6f0c (diff) | |
parent | 96e5fc9f9b185f846b978984c673f0114409513d (diff) |
Merge downstream code
Diffstat (limited to 'indra/llmath')
-rwxr-xr-x | indra/llmath/llmath.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index 7f39e58f71..5f696381fa 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -32,7 +32,6 @@ #include <vector> #include <limits> #include "lldefs.h" -#include "llerror.h" //#include "llstl.h" // *TODO: Remove when LLString is gone //#include "llstring.h" // *TODO: Remove when LLString is gone // lltut.h uses is_approx_equal_fraction(). This was moved to its own header @@ -557,36 +556,7 @@ inline void ll_remove_outliers(std::vector<VEC_TYPE>& data, F32 k) } } -inline void ll_nn2d_interpolation(const U8 *const src, U32 srcW, U32 srcH, U8 srcCh, U8 *const dst, U32 dstW, U32 dstH, U8 dstCh) -{ llassert(NULL != src && NULL != dst); - llassert(srcCh>=dstCh); - - S32 tmp_x = 0, tmp_y = 0, tmp_x1 = 0, tmp_x2 = 0; - - const S32 x_r = ((srcW<<16)/dstW)+1; - const S32 y_r = ((srcH<<16)/dstH)+1; - const S32 srcW_ch = srcW*srcCh; - const S32 dstW_ch = dstW*dstCh; - - for(U32 y = 0; y < dstH; ++y) - { - tmp_y = ((y*y_r)>>16)*srcW_ch; - tmp_x1 = y*dstW_ch; - - for(U32 x = 0; x < dstW; x++) - { - tmp_x = (((x*x_r)>>16)*srcCh)+tmp_y; - tmp_x2 = tmp_x1+x*dstCh; - - for(U8 c = 0; c < dstCh; ++c) - { - dst[tmp_x2+c] = src[tmp_x+c]; - } - } - } -} - // Include simd math header #include "llsimdmath.h" |