aboutsummaryrefslogtreecommitdiff
path: root/image/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'image/codecs')
-rw-r--r--image/codecs/indeo/mem.cpp14
-rw-r--r--image/codecs/indeo/mem.h14
2 files changed, 12 insertions, 16 deletions
diff --git a/image/codecs/indeo/mem.cpp b/image/codecs/indeo/mem.cpp
index 736b3b4de9..e85a945639 100644
--- a/image/codecs/indeo/mem.cpp
+++ b/image/codecs/indeo/mem.cpp
@@ -132,19 +132,5 @@ uint16 invertBits(uint16 val, int nbits) {
return res;
}
-uint8 avClipUint8(int a) {
- if (a & (~0xFF))
- return (-a) >> 31;
- else
- return a;
-}
-
-unsigned avClipUintp2(int a, int p) {
- if (a & ~((1 << p) - 1))
- return -a >> 31 & ((1 << p) - 1);
- else
- return a;
-}
-
} // End of namespace Indeo
} // End of namespace Image
diff --git a/image/codecs/indeo/mem.h b/image/codecs/indeo/mem.h
index c4001bdfa2..8a3910983f 100644
--- a/image/codecs/indeo/mem.h
+++ b/image/codecs/indeo/mem.h
@@ -82,7 +82,12 @@ extern uint32 bitswap32(uint32 x);
* @param a value to clip
* @return clipped value
*/
-extern uint8 avClipUint8(int a);
+inline uint8 avClipUint8(int a) {
+ if (a & (~0xFF))
+ return (-a) >> 31;
+ else
+ return a;
+}
/**
* Clip a signed integer to an unsigned power of two range.
@@ -90,7 +95,12 @@ extern uint8 avClipUint8(int a);
* @param p bit position to clip at
* @return clipped value
*/
-extern unsigned avClipUintp2(int a, int p);
+inline unsigned avClipUintp2(int a, int p) {
+ if (a & ~((1 << p) - 1))
+ return -a >> 31 & ((1 << p) - 1);
+ else
+ return a;
+}
extern const uint8 ffZigZagDirect[64];