Issue 31102 - Reducing the patch set for libjpeg
Summary: Reducing the patch set for libjpeg
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: recent-trunk
Hardware: All All
: P1 (highest) Trivial (vote)
Target Milestone: OOo 2.0
Assignee: caolanm
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-05 13:13 UTC by caolanm
Modified: 2004-09-17 16:27 UTC (History)
4 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
patch to jpeg module (2.07 KB, patch)
2004-07-05 13:14 UTC, caolanm
no flags Details | Diff
patch to svtools module (10.63 KB, patch)
2004-07-05 13:15 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2004-07-05 13:13:22 UTC
Attached is two patches to use libjpeg without hacking libjpeg sources so much,
i.e. implement a source and destination manager to use SvStreams, rather than
modify libjpeg directly to do that.

cmc->sj: what do you think ? Long term I'm thinking about using the system jpeg
libraries, but for now I'm just interested in shrinking the jpeg patch in the
OOo cvs down to the bits that are really needed.
Comment 1 caolanm 2004-07-05 13:14:34 UTC
Created attachment 16268 [details]
patch to jpeg module
Comment 2 caolanm 2004-07-05 13:15:27 UTC
Created attachment 16269 [details]
patch to svtools module
Comment 3 caolanm 2004-07-05 13:17:05 UTC
cmc->sj: Do you think this is a good idea ?, if so bounce it back to me and I
can commit in these changes.
Comment 4 sven.jacobi 2004-07-05 14:13:48 UTC
As long as we need to modifiy the jpeg library itself we will not get rid of the
patch, I am thinking of the requirement that we are currently changing the red
and blue color component, without changing this in the jpeg library itself the
scanlines can't be used directly with our bitmap object.
Another problem seems to be that the jpeg library interface may vary between
each Linux and this would raise the requirements to install OOo (And I am not
sure what to do on Windows).

Using the a manager instead of directly hacking jpeg sources sounds good, but
please be careful not to break any functionality, the patch should be tested a lot.

Sven
Comment 5 caolanm 2004-07-05 14:22:58 UTC
Yeah, the RGB order to BGR change would requre that the swapping be done by OOo
rather than by the patched libjpeg as it is currently, but that's not too hard.
The real problem in trying to use a system jpeg is the additional CMYK to RGB
support that OOo has in its libjpeg that isn't available otherwise. But you
never know.
Comment 6 caolanm 2004-07-09 16:54:13 UTC
done
Comment 7 quetschke 2004-07-10 13:43:11 UTC
This checkin to 0704 broke the build for W32. Adding Sander to the cc's because
he wanted to close the branch tomorrow. 

in svtools/source/filter.vcl/jpeg/jpeg.cxx you added an include for jpeglib.h,
this fails with:

guw.pl /cygdrive/c/PROGRA~1/MICROS~1.NET/Vc7/bin/cl.exe @/tmp/mkb01860
jpeg.cxx
d:\v1\cws_src680_ooo20040704\solver\680\wntmsci8.pro\inc\external\jpeglib.h(910)
 : error C2061: Syntaxfehler : Bezeichner 'FILE'
d:\v1\cws_src680_ooo20040704\solver\680\wntmsci8.pro\inc\external\jpeglib.h(911)
 : error C2061: Syntaxfehler : Bezeichner 'FILE'
dmake:  Error code 2, while making '../../../wntmsci8.pro/slo/jpeg.obj'
Comment 8 quetschke 2004-07-10 14:44:56 UTC
Fixed with:

+++ svtools/source/filter.vcl/jpeg/jpeg.cxx     10 Jul 2004 13:41:50 -0000
@@ -61,6 +61,7 @@
 
 extern "C"
 {
+       #include "stdio.h"
        #include "jpeg.h"
        #include "jpeglib.h"
        #include "jerror.h"
Comment 9 caolanm 2004-09-17 16:27:45 UTC
closed, fixed long time