mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Optmized decodeRefinement, moving the prediction error outside the inner loop
There is no need to slow down the inner loop with a test for ltp as it can only change if prediction is true in which case it only changes in the outer loop.
This commit is contained in:
parent
840d9d40b6
commit
2b6cb317db
1 changed files with 3 additions and 3 deletions
|
@ -376,13 +376,13 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
|||
if (prediction) {
|
||||
var sltp = decoder.readBit(contexts, pseudoPixelContext);
|
||||
ltp ^= sltp;
|
||||
if (ltp) {
|
||||
error('JBIG2 error: prediction is not supported');
|
||||
}
|
||||
}
|
||||
var row = new Uint8Array(width);
|
||||
bitmap.push(row);
|
||||
for (var j = 0; j < width; j++) {
|
||||
if (ltp) {
|
||||
error('JBIG2 error: prediction is not supported');
|
||||
}
|
||||
|
||||
var contextLabel = 0;
|
||||
for (var k = 0; k < codingTemplateLength; k++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue