diff --git a/source/scale_uv.cc b/source/scale_uv.cc index 7094cd0e6..78ec765c4 100644 --- a/source/scale_uv.cc +++ b/source/scale_uv.cc @@ -51,10 +51,6 @@ extern "C" { #define HAS_SCALEPLANEVERTICAL 1 #endif -static __inline int Abs(int v) { - return v >= 0 ? v : -v; -} - #define MIN1(x) ((x) < 1 ? 1 : (x)) // ScaleUV, 1/2 @@ -1154,7 +1150,6 @@ static int ScaleUV(const uint8_t* src, } ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, &x, &y, &dx, &dy); - src_width = Abs(src_width); if (clip_x) { int64_t clipf = (int64_t)(clip_x)*dx; x += (clipf & 0xffff); @@ -1312,7 +1307,6 @@ int UVScale_16(const uint16_t* src_uv, src_uv = src_uv + (src_height - 1) * (ptrdiff_t)src_stride_uv; src_stride_uv = -src_stride_uv; } - src_width = Abs(src_width); #ifdef HAS_UVCOPY if (!filtering && src_width == dst_width && (src_height % dst_height == 0)) {