Bug 90171 - speed up of rendering icc based images
Summary: speed up of rendering icc based images
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: splash backend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
: 76821 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-25 12:34 UTC by Thomas Freitag
Modified: 2016-03-17 14:30 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Increase speed for ICC based images (10.38 KB, patch)
2015-04-25 13:24 UTC, Thomas Freitag
Details | Splinter Review
add splashModeXBGR8 implementation (11.17 KB, patch)
2015-04-29 09:26 UTC, Thomas Freitag
Details | Splinter Review

Description Thomas Freitag 2015-04-25 12:34:55 UTC
When poppler renders an icc based image with lcms2 enabled it read the image lines, transform the lines with lcms2 and then handle the image, i.e. downscale it. But because lcms2 transformations are rather slow, we can speed it up dramatically when we read the image lines, THEN handle the image and then transform just the result image with lcms2 especially when the image is downscaled.
Comment 1 Thomas Freitag 2015-04-25 13:05:19 UTC
This is the rendering time on my laptop of a PDF with just a high resolution icc base image:

time ./utils/pdftoppm -png -cropbox /media/thomas/HD-PCTU3/Testdaten/bug-poppler90171.pdf output/the.png

real	0m11.711s
user	0m11.217s
sys	0m0.029s

(Since the PDF is quite huge, 9.4 MByte, and I don't have the rights of the image, I send it in private on monday, I've problems with my network at home)

But when I do it the other way round:

time ./utils/pdftoppm -png -cropbox /media/thomas/HD-PCTU3/Testdaten/bug-poppler90171.pdf output/the.png

real	0m1.266s
user	0m1.221s
sys	0m0.047s
Comment 2 Thomas Freitag 2015-04-25 13:24:49 UTC
Created attachment 115321 [details] [review]
Increase speed for ICC based images

This patch transforms the image bitmap after scaling
Comment 3 Thomas Freitag 2015-04-25 13:37:30 UTC
I have regtested the patch with my PDF suite and checked it for memory leaks with valgrind
Comment 4 Albert Astals Cid 2015-04-25 13:45:49 UTC
Nice, please send the file when you can, and let's see if i can find for this, i'm really behind in poppler stuff lately :/
Comment 5 Albert Astals Cid 2015-04-28 23:14:58 UTC
Do you think there's a possibility of getting the splashModeXBGR8 implemented or it just can't happen?
Comment 6 Thomas Freitag 2015-04-29 09:26:51 UTC
Created attachment 115433 [details] [review]
add splashModeXBGR8 implementation

(In reply to Albert Astals Cid from comment #5)
> Do you think there's a possibility of getting the splashModeXBGR8
> implemented or it just can't happen?

Yes, it can happen, I tested it with a modified pdftoppm.
So here the patch where I add the splashModeXBGR8 implementation with nearly the same increase of speed.
Comment 7 Albert Astals Cid 2015-05-24 16:42:17 UTC
Pushed
Comment 8 Thomas Freitag 2016-03-17 14:30:55 UTC
*** Bug 76821 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.