aboutsummaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2017-07-11 01:31:23 +0200
committerWillem Jan Palenstijn2017-07-11 01:32:05 +0200
commit4ec3c2875b5699e45a9467c297cd61b04e3e967a (patch)
tree1282c000686fe917524e5e627320d02b71cde8c6 /image
parent7fc69ebdea10101d8d59eed400eff9da7c0b3b4c (diff)
downloadscummvm-rg350-4ec3c2875b5699e45a9467c297cd61b04e3e967a.tar.gz
scummvm-rg350-4ec3c2875b5699e45a9467c297cd61b04e3e967a.tar.bz2
scummvm-rg350-4ec3c2875b5699e45a9467c297cd61b04e3e967a.zip
IMAGE: Inline two simple indeo functions
Diffstat (limited to 'image')
-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];