-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert src/core/jpg.js
to use the readUint16
helper function in src/core/core_utils.js
, rather than re-implementing it twice
#11482
Conversation
/botio-linux test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/b2b77c6f81b97f2/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/b2b77c6f81b97f2/output.txt Total script time: 19.00 mins
Image differences available at: http://54.67.70.0:8877/b2b77c6f81b97f2/reftest-analyzer.html#web=eq.log |
There's no images, of any kind, in the failing reference test above. |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/f5c5966b0d19a5b/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/8df3f121e43a543/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/f5c5966b0d19a5b/output.txt Total script time: 19.84 mins
Image differences available at: http://54.67.70.0:8877/f5c5966b0d19a5b/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.215.176.217:8877/8df3f121e43a543/output.txt Total script time: 60.00 mins |
97fc0b8
to
2fdb324
Compare
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 1 Live output at: http://54.67.70.0:8877/52f9e9deeab15fb/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 1 Live output at: http://54.215.176.217:8877/869052a2ab3f9a1/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/52f9e9deeab15fb/output.txt Total script time: 19.43 mins
Image differences available at: http://54.67.70.0:8877/52f9e9deeab15fb/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.215.176.217:8877/869052a2ab3f9a1/output.txt Total script time: 25.81 mins
Image differences available at: http://54.215.176.217:8877/869052a2ab3f9a1/reftest-analyzer.html#web=eq.log |
…` and into a `src/core/core_utils.js` instead This moves the `log2`, `readInt8`, `readUint16`, `readUint32`, and `isSpace` functions since they are only used in the worker-thread.
…`src/core/core_utils.js`, rather than re-implementing it twice The other image decoders, i.e. the JBIG2 and JPEG 2000 ones, are using the common helper function `readUint16`. Most likely, the only reason that the JPEG decoder is doing it this way is because it originated *outside* of the PDF.js library. Hence we can simply re-factor `src/core/jpg.js` to use the common `readUint16` helper function, which is especially nice given that the functionality was essentially *duplicated* in the code.
2fdb324
to
188b320
Compare
Nice refactoring! |
Please refer to the individual commit messages for additional details.