From 36c530dec917d548de24d5c31ed77a2ab565ed05 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 16 Aug 2013 13:58:39 +0000 Subject: Remove ifdef-ed code, it's still in SVn anyway. --- .../compositor/operations/COM_MapUVOperation.cpp | 29 ---------------------- .../COM_PlaneTrackWarpImageOperation.cpp | 27 -------------------- 2 files changed, 56 deletions(-) (limited to 'source/blender/compositor') diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp index 1cea8e84219..a9b6ad3edc1 100644 --- a/source/blender/compositor/operations/COM_MapUVOperation.cpp +++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp @@ -71,41 +71,12 @@ void MapUVOperation::executePixel(float output[4], float x, float y, PixelSample dy = 0.5f * (uv_u + uv_d); -#if 0 - /* more adaptive sampling, red and green (UV) channels */ - this->m_inputUVProgram->read(uv_a, x - 1, y - 1, COM_PS_NEAREST); - this->m_inputUVProgram->read(uv_b, x - 1, y + 1, COM_PS_NEAREST); - uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f; - uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f; - uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f; - uv_d = uv_b[2] != 0.f ? fabsf(inputUV[1] - uv_b[1]) : 0.f; - - dx += 0.25f * (uv_l + uv_r); - dy += 0.25f * (uv_u + uv_d); - - this->m_inputUVProgram->read(uv_a, x + 1, y - 1, COM_PS_NEAREST); - this->m_inputUVProgram->read(uv_b, x + 1, y + 1, COM_PS_NEAREST); - uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f; - uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f; - uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f; - uv_d = uv_b[2] != 0.f ? fabsf(inputUV[1] - uv_b[1]) : 0.f; - - dx += 0.25f * (uv_l + uv_r); - dy += 0.25f * (uv_u + uv_d); -#endif - /* UV to alpha threshold */ const float threshold = this->m_alpha * 0.05f; float alpha = 1.0f - threshold * (dx + dy); if (alpha < 0.f) alpha = 0.f; else alpha *= inputUV[2]; -#if 0 - /* should use mipmap */ - dx = min(dx, 0.2f); - dy = min(dy, 0.2f); -#endif - /* EWA filtering */ u = inputUV[0] * this->m_inputColorProgram->getWidth(); v = inputUV[1] * this->m_inputColorProgram->getHeight(); diff --git a/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp b/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp index 8e30a99b2a0..c90e915fcd5 100644 --- a/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp +++ b/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp @@ -93,35 +93,8 @@ BLI_INLINE void resolveUVAndDxDy(const float x, const float y, const float corne dy = 0.5f * (uv_u + uv_d); -#if 0 - /* more adaptive sampling, red and green (UV) channels */ - ok1 = resolveUV(x - 1, y - 1, corners, uv_a); - ok2 = resolveUV(x - 1, y + 1, corners, uv_b); - uv_l = ok1 ? fabsf(inputUV[0] - uv_a[0]) : 0.f; - uv_r = ok2 ? fabsf(inputUV[0] - uv_b[0]) : 0.f; - uv_u = ok1 ? fabsf(inputUV[1] - uv_a[1]) : 0.f; - uv_d = ok2 ? fabsf(inputUV[1] - uv_b[1]) : 0.f; - - dx += 0.25f * (uv_l + uv_r); - dy += 0.25f * (uv_u + uv_d); - - ok1 = resolveUV(x + 1, y - 1, corners, uv_a); - ok2 = resolveUV(x + 1, y + 1, corners, uv_b); - uv_l = ok1 ? fabsf(inputUV[0] - uv_a[0]) : 0.f; - uv_r = ok2 ? fabsf(inputUV[0] - uv_b[0]) : 0.f; - uv_u = ok1 ? fabsf(inputUV[1] - uv_a[1]) : 0.f; - uv_d = ok2 ? fabsf(inputUV[1] - uv_b[1]) : 0.f; - - dx += 0.25f * (uv_l + uv_r); - dy += 0.25f * (uv_u + uv_d); - - /* should use mipmap */ - *dx_r = min(dx, 0.2f); - *dy_r = min(dy, 0.2f); -#else *dx_r = dx; *dy_r = dy; -#endif *u_r = inputUV[0]; *v_r = inputUV[1]; -- cgit v1.2.3