[haiku-development] Re: Extracting out libjpeg.so from the JPEG translator

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 17 Aug 2009 11:06:28 +0200 CEST

Ryan Leavengood <leavengood@xxxxxxxxx> wrote:
> We already have a separate libpng.so, so I think it would be useful 
> to
> also have libjpeg.so. At the moment we could use this for the WebKit
> port until we get a BTranslator-based image decoder working. In
> addition libjpeg is on Haiku-ports so I assume it is needed by other
> ported software. Obviously it would be great if all software ported 
> to
> Haiku used the translator system, but short term this probably isn't
> an option.
> 
> If no one opposes this within the next day or so, I'll start working 
> on it.
> 
> Also why do all the translators embed their decoding libraries? For
> example even though we have libpng.so, the PNG translator embeds
> libpng.a. Is that a limitation of the translator system (they can't
> load other libraries)? Or is it just an optimization (for speed, 
> since
> it doesn't help memory usage if the .so is loaded by something else)?
> 
> Finally whether or not libjpeg.so is extracted I want to try and
> update our libjpeg to the latest from ijg.org (release 7, released
> June 27, 2009.)

Usually it is preferred to have libraries that are not really shared 
(but only have one common user, like a translator add-on), built-in. 
That also makes us independent of library versions, and 
incompatibilities. A package manager would certainly help, but why make 
a library shared if there is only one user of it, anyway?

In case of libpng.so, the app_server used it as well in the past, so 
that's how it got there, I suppose.

For a web browser, progressive loading is also important, which our 
translators currently don't provide AFAIK, so using libjpeg.so over our 
translators is probably the way to go (and only otherwise unsupported 
images should then be handled by translators).
Since the web browser is supposed to become part of Haiku, having 
shared libraries here sounds like the best solution to me.

Bye,
   Axel.


Other related posts: