Skip to content
This repository
Browse code

VIDEO: Fix the BINK decoder to play file whose width is 24px

  • Loading branch information...
commit 096e4af64a20757661dcab85ff5c23b80c633540 1 parent d1a064e
Bastien Bouclet authored February 08, 2012

Showing 1 changed file with 9 additions and 9 deletions. Show diff stats Hide diff stats

  1. 18  video/bink_decoder.cpp
18  video/bink_decoder.cpp
@@ -717,15 +717,15 @@ void BinkDecoder::initBundles() {
717 717
 	for (int i = 0; i < 2; i++) {
718 718
 		int width = MAX<uint32>(cw[i], 8);
719 719
 
720  
-		_bundles[kSourceBlockTypes   ].countLengths[i] = Common::intLog2((width  >> 3)    + 511) + 1;
721  
-		_bundles[kSourceSubBlockTypes].countLengths[i] = Common::intLog2((width  >> 4)    + 511) + 1;
722  
-		_bundles[kSourceColors       ].countLengths[i] = Common::intLog2((cbw[i]     )*64 + 511) + 1;
723  
-		_bundles[kSourceIntraDC      ].countLengths[i] = Common::intLog2((width  >> 3)    + 511) + 1;
724  
-		_bundles[kSourceInterDC      ].countLengths[i] = Common::intLog2((width  >> 3)    + 511) + 1;
725  
-		_bundles[kSourceXOff         ].countLengths[i] = Common::intLog2((width  >> 3)    + 511) + 1;
726  
-		_bundles[kSourceYOff         ].countLengths[i] = Common::intLog2((width  >> 3)    + 511) + 1;
727  
-		_bundles[kSourcePattern      ].countLengths[i] = Common::intLog2((cbw[i] << 3)    + 511) + 1;
728  
-		_bundles[kSourceRun          ].countLengths[i] = Common::intLog2((cbw[i]     )*48 + 511) + 1;
  720
+		_bundles[kSourceBlockTypes   ].countLengths[i] = Common::intLog2((width       >> 3) + 511) + 1;
  721
+		_bundles[kSourceSubBlockTypes].countLengths[i] = Common::intLog2(((width + 7) >> 4) + 511) + 1;
  722
+		_bundles[kSourceColors       ].countLengths[i] = Common::intLog2((cbw[i])     * 64  + 511) + 1;
  723
+		_bundles[kSourceIntraDC      ].countLengths[i] = Common::intLog2((width       >> 3) + 511) + 1;
  724
+		_bundles[kSourceInterDC      ].countLengths[i] = Common::intLog2((width       >> 3) + 511) + 1;
  725
+		_bundles[kSourceXOff         ].countLengths[i] = Common::intLog2((width       >> 3) + 511) + 1;
  726
+		_bundles[kSourceYOff         ].countLengths[i] = Common::intLog2((width       >> 3) + 511) + 1;
  727
+		_bundles[kSourcePattern      ].countLengths[i] = Common::intLog2((cbw[i]      << 3) + 511) + 1;
  728
+		_bundles[kSourceRun          ].countLengths[i] = Common::intLog2((cbw[i])     * 48  + 511) + 1;
729 729
 	}
730 730
 }
731 731
 

0 notes on commit 096e4af

Please sign in to comment.
Something went wrong with that request. Please try again.