[
https://issues.apache.org/jira/browse/PDFBOX-6157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140784#comment-18140784
]
Tilman Hausherr commented on PDFBOX-6157:
-----------------------------------------
With the change:
# Run progress: 0,00% complete, ETA 00:00:56
# Fork: N/A, test runs in the host VM
# *** WARNING: Non-forked runs may silently omit JVM options, mess up
profilers, disable compiler hints, etc. ***
# *** WARNING: Use non-forked runs only for debugging purposes, not for actual
performance runs. ***
# Warmup Iteration 1: 362988,633 us/op
# Warmup Iteration 2: 206976,830 us/op
# Warmup Iteration 3: 203871,990 us/op
Iteration 1: 207004,571 us/op
Iteration 2: 201704,736 us/op
Iteration 3: 198661,431 us/op
Iteration 4: 198077,465 us/op
Iteration 5: 198752,261 us/op
Result "org.apache.pdfbox.jbig2.SerenityTests.testSerenity":
200840,093 ±(99.9%) 14341,533 us/op [Average]
(min, avg, max) = (198077,465, 200840,093, 207004,571), stdev = 3724,451
CI (99.9%): [186498,560, 215181,626] (assumes normal distribution)
Without the change:
# Run progress: 0,00% complete, ETA 00:00:56
# Fork: N/A, test runs in the host VM
# *** WARNING: Non-forked runs may silently omit JVM options, mess up
profilers, disable compiler hints, etc. ***
# *** WARNING: Use non-forked runs only for debugging purposes, not for actual
performance runs. ***
# Warmup Iteration 1: 334117,400 us/op
# Warmup Iteration 2: 215685,290 us/op
# Warmup Iteration 3: 213509,670 us/op
Iteration 1: 214366,338 us/op
Iteration 2: 212723,783 us/op
Iteration 3: 211863,565 us/op
Iteration 4: 211669,379 us/op
Iteration 5: 208548,210 us/op
Result "org.apache.pdfbox.jbig2.SerenityTests.testSerenity":
211834,255 ±(99.9%) 8174,991 us/op [Average]
(min, avg, max) = (208548,210, 211834,255, 214366,338), stdev = 2123,019
CI (99.9%): [203659,265, 220009,246] (assumes normal distribution)
> Fix original Bitmaps.blit() code
> --------------------------------
>
> Key: PDFBOX-6157
> URL: https://issues.apache.org/jira/browse/PDFBOX-6157
> Project: PDFBox
> Issue Type: Task
> Components: JBIG2
> Affects Versions: 3.0.4 JBIG2
> Reporter: Tilman Hausherr
> Priority: Minor
> Attachments:
> 0001-PDFBOX-6156-fix-blitUnshifted-blitSpecialShifted-and.patch,
> Bitmaps.java, BitmapsBlitTest.java
>
>
> Follow-up to PDFBOX-6156, which was fixed with a correct but not very
> efficient solution. The original code should be fixed so that the last bits
> of a byte are handled without touching the other bits of the destination.
> How to test this: use the test code from PDFBOX-6151 on the file mentioned in
> PDFBOX-6156. To see intermediate images, save the bitmaps {{regionBitmap}}
> and {{pageBitmap}} in JBIG2Page.createNormalPage() with a call like this near
> {{Bitmaps.blit()}}:
> {code:java}
> ImageIO.write(Bitmaps.asBufferedImage(pageBitmap), "png", new
> File("XXXX","JPeg2PageResultBitmap-" + System.currentTimeMillis() + ".png"));
> {code}
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]