[Scummvm-git-logs] scummvm master -> 4ec3c2875b5699e45a9467c297cd61b04e3e967a

wjp wjp at usecode.org
Tue Jul 11 01:43:47 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4ec3c2875b IMAGE: Inline two simple indeo functions


Commit: 4ec3c2875b5699e45a9467c297cd61b04e3e967a
    https://github.com/scummvm/scummvm/commit/4ec3c2875b5699e45a9467c297cd61b04e3e967a
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2017-07-11T01:32:05+02:00

Commit Message:
IMAGE: Inline two simple indeo functions

Changed paths:
    image/codecs/indeo/mem.cpp
    image/codecs/indeo/mem.h


diff --git a/image/codecs/indeo/mem.cpp b/image/codecs/indeo/mem.cpp
index 736b3b4..e85a945 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 c4001bd..8a39109 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];
 





More information about the Scummvm-git-logs mailing list