aboutsummaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
authorBastien Bouclet2012-02-08 09:37:27 +0100
committerBastien Bouclet2012-02-09 16:10:47 +0100
commit9d85382c153bd4bcb58b7683f4d06658bf18c4d7 (patch)
tree1395fbd19c8a2dc6d077b521406f67674a07a3ac /video
parent734b1e738ef36b7966563f7711de911aec177445 (diff)
downloadscummvm-rg350-9d85382c153bd4bcb58b7683f4d06658bf18c4d7.tar.gz
scummvm-rg350-9d85382c153bd4bcb58b7683f4d06658bf18c4d7.tar.bz2
scummvm-rg350-9d85382c153bd4bcb58b7683f4d06658bf18c4d7.zip
VIDEO: Fix the BINK decoder to play file whose width is 24px
See https://ffmpeg.org/trac/ffmpeg/ticket/962
Diffstat (limited to 'video')
-rw-r--r--video/bink_decoder.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp
index c5dc5f280b..884ca69f17 100644
--- a/video/bink_decoder.cpp
+++ b/video/bink_decoder.cpp
@@ -717,15 +717,15 @@ void BinkDecoder::initBundles() {
for (int i = 0; i < 2; i++) {
int width = MAX<uint32>(cw[i], 8);
- _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((cbw[i] )*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((cbw[i] )*48 + 511) + 1;
+ _bundles[kSourceBlockTypes ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1;
+ _bundles[kSourceSubBlockTypes].countLengths[i] = Common::intLog2(((width + 7) >> 4) + 511) + 1;
+ _bundles[kSourceColors ].countLengths[i] = Common::intLog2((cbw[i]) * 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((cbw[i]) * 48 + 511) + 1;
}
}