Commit Graph

12 Commits

Author SHA1 Message Date
fkaelberer
f9cde5d93e faster JPEG transform 2014-06-17 10:09:17 +02:00
Yury Delendik
cff2c3afc1 Merge pull request #4892 from yurydelendik/issue4890
Fixes masked JPEG image
2014-06-10 09:16:12 -05:00
Yury Delendik
9308c7c82f Merge pull request #4896 from CodingFabian/cleanup-jpgjs-buildComponentData
Deleted unused variables in jpgjs buildComponentData.
2014-06-06 09:48:30 -05:00
Fabian Lange
030a188af7 Deleted unused variables in jpgjs buildComponentData. 2014-06-05 16:20:29 +02:00
Fabian Lange
0a42edf82f Optimize JPG.js receiveAndExtend for 1 bit case.
Profiling showed that receiveAndExtend is frequently called with the length of
one bit. This happens for example in decodeBaseline.
For a single bit, the loop and shift in receive, as well as the shifts in
receiveAndExtend are overhead.
This shortcut manually calculates the shifts by either returning 1 or -1 from
receiveAndExtend by reading the bit and deciding on the return value.
While it comes with an overhead for each non-one length, the speedup is at about
10% in the hot parse/decode path.
2014-06-05 12:24:53 +02:00
Yury Delendik
6b411b559d Fixes masked JPEG image 2014-06-04 15:53:46 -05:00
Yury Delendik
43a103d5d3 Merge pull request #4889 from CodingFabian/optimize-jpg-loops
Optimized loops in JPG conversion.
2014-06-04 15:34:48 -05:00
Fabian Lange
dcde59fa76 Optimized loops in JPG conversion.
This change makes the 4 conversion loops look the same.
It optimizes access of the array length and access of the property
numComponents, which is known to be constant.
2014-06-04 10:02:47 +02:00
Yury Delendik
6235e3a61c Adds color components decoding to the JPEG 2014-06-03 08:51:57 -05:00
p01
14a2d74d16 Optimized JPG.js - 33% faster convertCmykToRgb 2014-05-05 14:36:46 +02:00
p01
287274d3dc Optimized JPG.js - reduced memory usage + 2.16x faster getLinearizedBlockData
Linearize and scale the mcu blocks into the destination buffer in a single pass
2014-05-05 14:36:46 +02:00
Thorben Bochenek
e8f0700bfa Move the colour conversion to jpg.js
Benchmarking shows that this improves performance for the invitation document
from https://github.com/mozilla/pdf.js/issues/3809 by 35%
2014-04-24 15:07:12 +02:00