summaryrefslogtreecommitdiffstats
path: root/src/filter/sobel/sobel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/filter/sobel/sobel.cpp')
-rw-r--r--src/filter/sobel/sobel.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/filter/sobel/sobel.cpp b/src/filter/sobel/sobel.cpp
index f0f2961..60c5020 100644
--- a/src/filter/sobel/sobel.cpp
+++ b/src/filter/sobel/sobel.cpp
@@ -18,16 +18,9 @@
*/
#include "frei0r.hpp"
+#include "frei0r_math.h"
#include <stdlib.h>
-/* Clamps a int32-range int between 0 and 255 inclusive. */
-unsigned char CLAMP0255(int32_t a)
-{
- return (unsigned char)
- ( (((-a) >> 31) & a) // 0 if the number was negative
- | (255 - a) >> 31); // -1 if the number was greater than 255
-}
-
class sobel : public frei0r::filter
{
public: