From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1eldBo-0006V9-Dg for ptxdist@pengutronix.de; Tue, 13 Feb 2018 17:12:16 +0100 Received: by mail-wm0-x22c.google.com with SMTP id a84so5755029wmi.5 for ; Tue, 13 Feb 2018 08:12:16 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20180213153742.iljambtbf7g2v6fd@pengutronix.de> References: <20180213153742.iljambtbf7g2v6fd@pengutronix.de> From: Guillermo Rodriguez Garcia Date: Tue, 13 Feb 2018 17:12:14 +0100 Message-ID: Subject: Re: [ptxdist] libjpeg-turbo and libjpeg List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============1714629752==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de --===============1714629752== Content-Type: multipart/alternative; boundary="001a114431ce0d8a0e05651a42c5" --001a114431ce0d8a0e05651a42c5 Content-Type: text/plain; charset="UTF-8" 2018-02-13 16:37 GMT+01:00 Michael Olbrich : > Hi, > > On Tue, Feb 13, 2018 at 10:23:09AM +0100, Guillermo Rodriguez Garcia wrote: > > I need to use libjpeg-turbo for some apps that rely on specific > > libjpeg-turbo extensions that are not available in the standard (IJG's) > > libjpeg library. So I started to create a set of ptxdist rules for > > libjpeg-turbo. > > > > libjpeg-turbo is supposed to provide a drop-in replacement for the > standard > > IJG's libjpeg, and in fact many Linux distributions have already switched > > to it. So most packages that currently depend on LIBJPEG should be able > to > > use libjpeg-turbo as well without any changes. > > > > Example: gst-plugins-good1.in currently does the following: > > > > select LIBJPEG if GST_PLUGINS_GOOD1_JPEG > > > > However, gst-plugins-good1 should work just fine with libjpeg-turbo as > > well. In fact the upstream gst-plugins already switched to libjpeg-turbo > > some time ago (see the Cerbero scripts) > > > > So, what is the recommended way to approach this in ptxdist? I can > imagine > > some options: > > > > 1. Provide a separate set of .in/.make files for libjpeg-turbo and a > > separate LIBJPEG_TURBO package. So new packages that want to use > > libjpeg-turbo would need to explicitly select LIBJPEG_TURBO (instead of > > LIBJPEG). But this means that packages that currently use libjpeg would > not > > be able to benefit from the performance improvements in libjpeg-turbo. > Also > > I am not sure whether these two libraries (libjpeg and libjpeg-turbo) can > > actually coexist in the same system. > > No. > > > 2. Modify the LIBJPEG rules to provide an option to select between the > > standard (IJG) libjpeg, or libjpeg-turbo. This would be similar to what > is > > done in alsa.in/alsa.make to select between the "full" and "light" > versions > > of the library. > > Either this ... > > > 3. Other? > > ... or change the libjpeg rule to always build libjpeg-turbo instead. > > I would prefer to avoid an option. But I'm not sure > 1. if there are use-cases where libjpeg is preferable > 2. if there are packages that fail to build with libjpeg-turbo > Judging from the wide adoption of libjpeg-turbo by many popular Linux distros, I'd say that if we had to choose one, libjpeg-turbo may actually be the "safe" choice. > > I have some libjpeg-turbo stuff lying around here somewhere. It was just > never finished. I've just dumped it in my test BSP so see if anythings > fails to build. I'll report the result later. > Let me know if you need help; I am also working on this now (since I do have an app that explicitly needs libjpeg-turbo and doesn't work with the stock libjpeg) Best, Guillermo Rodriguez Garcia guille.rodriguez@gmail.com --001a114431ce0d8a0e05651a42c5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


2018-02-13 16:37 GMT+01:00 Michael Olbrich <m.olbrich@pengutron= ix.de>:
Hi,

On Tue, Feb 13, 2018 at 10:23:09AM +0100, Guillermo Rodriguez Garcia wrote:=
> I need to use libjpeg-turbo for some apps that rely on specific
> libjpeg-turbo extensions that are not available in the standard (IJG&#= 39;s)
> libjpeg library. So I started to create a set of ptxdist rules for
> libjpeg-turbo.
>
> libjpeg-turbo is supposed to provide a drop-in replacement for the sta= ndard
> IJG's libjpeg, and in fact many Linux distributions have already s= witched
> to it. So most packages that currently depend on LIBJPEG should be abl= e to
> use libjpeg-turbo as well without any changes.
>
> Example: gst-plugins-good1.in currently does the following:
>
> select LIBJPEG if GST_PLUGINS_GOOD1_JPEG
>
> However, gst-plugins-good1 should work just fine with libjpeg-turbo as=
> well. In fact the upstream gst-plugins already switched to libjpeg-tur= bo
> some time ago (see the Cerbero scripts)
>
> So, what is the recommended way to approach this in ptxdist? I can ima= gine
> some options:
>
> 1. Provide a separate set of .in/.make files for libjpeg-turbo and a > separate LIBJPEG_TURBO package. So new packages that want to use
> libjpeg-turbo would need to explicitly select LIBJPEG_TURBO (instead o= f
> LIBJPEG). But this means that packages that currently use libjpeg woul= d not
> be able to benefit from the performance improvements in libjpeg-turbo.= Also
> I am not sure whether these two libraries (libjpeg and libjpeg-turbo) = can
> actually coexist in the same system.

No.

> 2. Modify the LIBJPEG rules to provide an option to select between the=
> standard (IJG) libjpeg, or libjpeg-turbo. This would be similar to wha= t is
> done in alsa.in/alsa.make to select between the "full" an= d "light" versions
> of the library.

Either this ...

> 3. Other?

... or change the libjpeg rule to always build libjpeg-turbo instead.

I would prefer to avoid an option. But I'm not sure
1. if there are use-cases where libjpeg is preferable
2. if there are packages that fail to build with libjpeg-turbo

Judging from the wide adoption of libjpeg-turbo by = many popular Linux distros, I'd say that if we had to choose one, libjp= eg-turbo may actually be the "safe" choice.
=C2=A0
<= /div>

I have some libjpeg-turbo stuff lying around here somewhere. It was just never finished. I've just dumped it in my test BSP so see if anythings<= br> fails to build. I'll report the result later.

=
Let me know if you need help; I am also working on this now (sin= ce I do have an app that explicitly needs libjpeg-turbo and doesn't wor= k with the stock libjpeg)

Best,

Guillermo Rodriguez Garcia
--001a114431ce0d8a0e05651a42c5-- --===============1714629752== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KcHR4ZGlzdCBt YWlsaW5nIGxpc3QKcHR4ZGlzdEBwZW5ndXRyb25peC5kZQ== --===============1714629752==--