1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00
pdf.js/src
Jonas Jenwald c5700211d6 Adjust decodeACSuccessive in src/core/jpg.js to improve the rendering quality of (progressive) JPEG images
I've been looking into the remaining point in 8637 about blurry images, to see if we could perhaps improve the rendering quality slightly there. After quite a bit of debugging, it seems that the issue is limited to certain progressive JPEG images.

As mentioned previously, I've got no detailed knowledge of the JPEG format, but this patch does seem to improve things quite a bit for the images in question.
Squinting at https://searchfox.org/mozilla-central/rev/6c33dde6ca02b389c52e8db3d22494df8b916f33/media/libjpeg/jdphuff.c#492-639, it seems reasonable that we should take the sign of the data into account. Furthermore, looking at the specification in https://www.w3.org/Graphics/JPEG/itu-t81.pdf#page=118, the "F.2.4.3 Decoding the binary decision sequence for non-zero DC differences and AC coefficients" section even contains a description of this (even though I cannot claim to really understand the details).
2017-12-30 15:24:09 +01:00
..
core Adjust decodeACSuccessive in src/core/jpg.js to improve the rendering quality of (progressive) JPEG images 2017-12-30 15:24:09 +01:00
display Avoid rendering errors by passing in the webGLContext when creating a new CanvasGraphics in getColorN_Pattern (PR 9095 follow-up) 2017-12-27 13:50:53 +01:00
images Vectorize the logo. 2012-10-29 14:08:52 -04:00
shared Remove the document.readyState polyfill 2017-12-19 15:05:19 +01:00
doc_helper.js Enable the --report-unused-disable-directives ESLint command line option 2017-10-15 13:45:12 +02:00
license_header.js Replace copyright headers; changes UMD to CommonJS. 2017-02-08 16:35:58 -06:00
license_header_libre.js PDFjs now compatible with Librejs 2017-12-19 15:13:50 +05:30
pdf.js [api-major] Only create a StatTimer for pages when enableStats == true (issue 5215) 2017-12-06 23:12:25 +01:00
pdf.worker.entry.js Enable the --report-unused-disable-directives ESLint command line option 2017-10-15 13:45:12 +02:00
pdf.worker.js Adds Streams API support for networking task of PDF.js project. 2017-07-28 02:32:30 +05:30
worker_loader.js Moves global scope out of shared/util. 2017-08-22 18:20:52 -05:00