aboutsummaryrefslogtreecommitdiff
path: root/video/bink_decoder.cpp
diff options
context:
space:
mode:
authorD G Turner2011-07-19 02:29:13 +0100
committerD G Turner2011-07-19 02:29:13 +0100
commit54f25aa84373715001c56155673fb59cfe44b573 (patch)
tree636cbbacffd6b5adfcf125917bbb70ed38503dea /video/bink_decoder.cpp
parent1f3ccd4eed78c94da4856044d5351c1fccc53607 (diff)
downloadscummvm-rg350-54f25aa84373715001c56155673fb59cfe44b573.tar.gz
scummvm-rg350-54f25aa84373715001c56155673fb59cfe44b573.tar.bz2
scummvm-rg350-54f25aa84373715001c56155673fb59cfe44b573.zip
COMMON: Renamed Integer Log2 function from log2 to intLog2.
This avoids naming collisions with system libraries on some platforms i.e. DS, DC where the log2 is realised by macro.
Diffstat (limited to 'video/bink_decoder.cpp')
-rw-r--r--video/bink_decoder.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp
index a21582e5f3..1f3190dff1 100644
--- a/video/bink_decoder.cpp
+++ b/video/bink_decoder.cpp
@@ -701,15 +701,15 @@ void BinkDecoder::initBundles() {
for (int i = 0; i < 2; i++) {
int width = MAX<uint32>(cw[i], 8);
- _bundles[kSourceBlockTypes ].countLengths[i] = Common::log2((width >> 3) + 511) + 1;
- _bundles[kSourceSubBlockTypes].countLengths[i] = Common::log2((width >> 4) + 511) + 1;
- _bundles[kSourceColors ].countLengths[i] = Common::log2((width >> 3)*64 + 511) + 1;
- _bundles[kSourceIntraDC ].countLengths[i] = Common::log2((width >> 3) + 511) + 1;
- _bundles[kSourceInterDC ].countLengths[i] = Common::log2((width >> 3) + 511) + 1;
- _bundles[kSourceXOff ].countLengths[i] = Common::log2((width >> 3) + 511) + 1;
- _bundles[kSourceYOff ].countLengths[i] = Common::log2((width >> 3) + 511) + 1;
- _bundles[kSourcePattern ].countLengths[i] = Common::log2((cbw[i] << 3) + 511) + 1;
- _bundles[kSourceRun ].countLengths[i] = Common::log2((width >> 3)*48 + 511) + 1;
+ _bundles[kSourceBlockTypes ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1;
+ _bundles[kSourceSubBlockTypes].countLengths[i] = Common::intLog2((width >> 4) + 511) + 1;
+ _bundles[kSourceColors ].countLengths[i] = Common::intLog2((width >> 3)*64 + 511) + 1;
+ _bundles[kSourceIntraDC ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1;
+ _bundles[kSourceInterDC ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1;
+ _bundles[kSourceXOff ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1;
+ _bundles[kSourceYOff ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1;
+ _bundles[kSourcePattern ].countLengths[i] = Common::intLog2((cbw[i] << 3) + 511) + 1;
+ _bundles[kSourceRun ].countLengths[i] = Common::intLog2((width >> 3)*48 + 511) + 1;
}
}
@@ -1426,7 +1426,7 @@ void BinkDecoder::audioBlock(AudioTrack &audio, int16 *out) {
if (!audio.first) {
int count = audio.overlapLen * audio.channels;
- int shift = Common::log2(count);
+ int shift = Common::intLog2(count);
for (int i = 0; i < count; i++) {
out[i] = (audio.prevCoeffs[i] * (count - i) + out[i] * i) >> shift;
}