[opensuse] libjpeg and libjpeg-turbo
I am looking at libjpeg on openSUSE 11.4. There is a variation of the good old libjpeg which is called libjpeg-turbo. It enables some intel processor instructions to supposedly speed up encoding and decoding byu a factor of 2x - 4x. I see that I have libjpeg-turbo installed. The odd thing is that the RPM does not actually contain a libjpeg. It is only the wrapper programs like cjpeg. These programs just seem to use the regular /usr/lib/libjpeg.so.62 that comes with the usual libjpeg rpm. So, what is libjpeg-turbo really installing? Surely the turbo improvements must be in the library itself. If the standard libjpeg.so.62 is compiled with these extensions, what could a turbo cjpeg add? As usual, I'm confused. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 SHAW'S PRINCIPAL Build a system that even a fool can use, and only a fool will want to use it. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, Aug 10, 2011 at 2:52 PM, Roger Oberholtzer <roger@opq.se> wrote:
I am looking at libjpeg on openSUSE 11.4. There is a variation of the good old libjpeg which is called libjpeg-turbo. It enables some intel processor instructions to supposedly speed up encoding and decoding byu a factor of 2x - 4x.
I see that I have libjpeg-turbo installed. The odd thing is that the RPM does not actually contain a libjpeg. It is only the wrapper programs like cjpeg. These programs just seem to use the regular /usr/lib/libjpeg.so.62 that comes with the usual libjpeg rpm.
So, what is libjpeg-turbo really installing? Surely the turbo improvements must be in the library itself. If the standard libjpeg.so.62 is compiled with these extensions, what could a turbo cjpeg add?
As usual, I'm confused.
Roger, I don't recall the details, but there were lots of discussions about libjpeg-turbo on the factory list back before 11.4 came out. You may need to go back and read some of that if no one here knows the answer. Or just post to factory and ask for a summary. It may be easier than reading through 100 or messages. Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, 2011-08-10 at 15:28 -0400, Greg Freemyer wrote:
On Wed, Aug 10, 2011 at 2:52 PM, Roger Oberholtzer <roger@opq.se> wrote:
I am looking at libjpeg on openSUSE 11.4. There is a variation of the good old libjpeg which is called libjpeg-turbo. It enables some intel processor instructions to supposedly speed up encoding and decoding byu a factor of 2x - 4x.
I see that I have libjpeg-turbo installed. The odd thing is that the RPM does not actually contain a libjpeg. It is only the wrapper programs like cjpeg. These programs just seem to use the regular /usr/lib/libjpeg.so.62 that comes with the usual libjpeg rpm.
So, what is libjpeg-turbo really installing? Surely the turbo improvements must be in the library itself. If the standard libjpeg.so.62 is compiled with these extensions, what could a turbo cjpeg add?
As usual, I'm confused.
Roger,
I don't recall the details, but there were lots of discussions about libjpeg-turbo on the factory list back before 11.4 came out. You may need to go back and read some of that if no one here knows the answer.
Or just post to factory and ask for a summary. It may be easier than reading through 100 or messages.
Do you mean this thread? http://comments.gmane.org/gmane.linux.suse.opensuse.packaging/6475 Seems unclear if the standard libjpeg lib turned out to be the -turbo variant. And there is no note in the docs that comes with libjpeg62 to say that it is compiled form -turbo sources. Still, I do not seem to see an actual libjpeg-turbo.so anywhere. So it mist be the intention that the turbo stuff is in /usr/lib/libjpeg.so.62.0.0. But who want to assume? So I downloaded the source rpm for libjpeg-turbo and built it. It makes libjpeg62-62.0.0-6.1.i586.rpm libjpeg62-devel-62.0.0-6.1.i586.rpm libjpeg-turbo-1.1.1-6.1.i586.rpm So it looks like the 'standard' /usr/lib/libjpeg.so.62.0.0 'might' be this. The problem is that you get the same name for the RPM and library if you build with the standard non-turbo sources. So, following the pedigree of libjpeg.so.62.0.0 installed on some system seems rather uncertain. Anyway, when I installed the library from my own build of the jpeg-turbo lib (from the openSUSE source RPM), I get a 2x improvement in jpeg compression over the standard install. Which I had thought would have been the turbo one... Not sure if it is just me having done something wrong or if there is something odd in the packaging. Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 2011-08-11 at 09:05 +0200, Roger Oberholtzer wrote:
On Wed, 2011-08-10 at 15:28 -0400, Greg Freemyer wrote: Do you mean this thread?
http://comments.gmane.org/gmane.linux.suse.opensuse.packaging/6475
Seems unclear if the standard libjpeg lib turned out to be the -turbo variant. And there is no note in the docs that comes with libjpeg62 to say that it is compiled form -turbo sources. Still, I do not seem to see an actual libjpeg-turbo.so anywhere. So it mist be the intention that the turbo stuff is in /usr/lib/libjpeg.so.62.0.0. But who want to assume?
So I downloaded the source rpm for libjpeg-turbo and built it. It makes
libjpeg62-62.0.0-6.1.i586.rpm libjpeg62-devel-62.0.0-6.1.i586.rpm libjpeg-turbo-1.1.1-6.1.i586.rpm
So it looks like the 'standard' /usr/lib/libjpeg.so.62.0.0 'might' be this. The problem is that you get the same name for the RPM and library if you build with the standard non-turbo sources. So, following the pedigree of libjpeg.so.62.0.0 installed on some system seems rather uncertain.
Hi, The strong point of libjpeg-turbo is that it's an drop-in replacement for the standard libjpeg. For this to work, obviously, the library name needs to be equal. As such it's not surprising that both install libjpeg.so.62.0.0. If th elib would have a different name, apps would need to be rebuilt explicitly against libjpeg-turbo. Hth, Dominique -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 2011-08-11 at 09:12 +0200, Dimstar / Dominique Leuenberger wrote:
Hi,
The strong point of libjpeg-turbo is that it's an drop-in replacement for the standard libjpeg. For this to work, obviously, the library name needs to be equal. As such it's not surprising that both install libjpeg.so.62.0.0.
If th elib would have a different name, apps would need to be rebuilt explicitly against libjpeg-turbo.
I agree that having the name of the installed lib the same is exactly what one wants. I disagree, however, that the name of the RPM to get this installed is the same and offers no clue as to the nature of the library that will be installed. So, I cannot look at the list of installed RPMs to determine if libjpeg.so.62.0.0 is the -turbo or the non-turbo variant. Having said all that, I am glad the turbo version is available. I guess I am just nit picking about how one can easily verify that it is installed. Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 2011-08-11 at 09:30 +0200, Roger Oberholtzer wrote:
I agree that having the name of the installed lib the same is exactly what one wants. I disagree, however, that the name of the RPM to get this installed is the same and offers no clue as to the nature of the library that will be installed. So, I cannot look at the list of installed RPMs to determine if libjpeg.so.62.0.0 is the -turbo or the non-turbo variant.
Having said all that, I am glad the turbo version is available. I guess I am just nit picking about how one can easily verify that it is installed.
Well, the name of the package is dictated by the shared library packaging policy. Additionally, having the same PKG name for libjpeg and libjpeg-turbo (so in both cases libjpeg62) actually guarantees that the two packages are not installable in parallel (which would certainly conflict on file level). As to find out which version you have, you can: rpm -qi libjpeg62 The source rpm aas well as the Url field yield the hint if you have the right version installed. Additionally, the provided symbols in the rpm database: rpm -q --provides libjpeg62 libjpeg.so.62()(64bit) libjpeg.so.62(LIBJPEGTURBO_6.2)(64bit) By querying the library directly: readelf -a /usr/lib64/libjpeg.so.62 | grep -i Name: If it's the -turbo version, you will see something along: 000000: Rev: 1 Flags: BASE Index: 1 Cnt: 1 Name: libjpeg.so.62 0x001c: Rev: 1 Flags: none Index: 2 Cnt: 1 Name: LIBJPEGTURBO_6.2 Thus knowing you DO have the turbo edition. Hth, Dominique -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 2011-08-11 at 09:37 +0200, Dimstar / Dominique Leuenberger wrote:
On Thu, 2011-08-11 at 09:30 +0200, Roger Oberholtzer wrote:
I agree that having the name of the installed lib the same is exactly what one wants. I disagree, however, that the name of the RPM to get this installed is the same and offers no clue as to the nature of the library that will be installed. So, I cannot look at the list of installed RPMs to determine if libjpeg.so.62.0.0 is the -turbo or the non-turbo variant.
Having said all that, I am glad the turbo version is available. I guess I am just nit picking about how one can easily verify that it is installed.
Well, the name of the package is dictated by the shared library packaging policy. Additionally, having the same PKG name for libjpeg and libjpeg-turbo (so in both cases libjpeg62) actually guarantees that the two packages are not installable in parallel (which would certainly conflict on file level).
Really? libjpeg-turbo does NOT even contain a library. It is only the command line wrappers. So it in fact does NOT contain anything -turbo. This was what confused me. I could very well have libjpeg-turbo installed, and a standard (non-turbo version) libjpeg. There is no overlap in the binaries in these two RPMS and they have different names. Both can very easily be installed. The installation of the -turbo package does not contain or require that the -turbo version of the library is installed. It only requires /usr/lib/libjpeg.so.62, which can come from any RPM and, by name, cannot be forced to be turbo or otherwise. I suspect that you are getting the effect you describe because you install both libjpeg and libjpeg-turbo from openSUSE - and from the same repo. Nothing in the RPMs themselves requires this. I know. I have tried.
As to find out which version you have, you can: rpm -qi libjpeg62 The source rpm aas well as the Url field yield the hint if you have the right version installed.
Additionally, the provided symbols in the rpm database: rpm -q --provides libjpeg62 libjpeg.so.62()(64bit) libjpeg.so.62(LIBJPEGTURBO_6.2)(64bit)
By querying the library directly: readelf -a /usr/lib64/libjpeg.so.62 | grep -i Name: If it's the -turbo version, you will see something along:
000000: Rev: 1 Flags: BASE Index: 1 Cnt: 1 Name: libjpeg.so.62 0x001c: Rev: 1 Flags: none Index: 2 Cnt: 1 Name: LIBJPEGTURBO_6.2
Thus knowing you DO have the turbo edition.
This is useful. Thanks for that. It does help me know what is installed. Which was my ultimate goal here. But I stand by the feeling that installing the libjpeg-turbo package does not in any way guarantee that the turbo library is installed. It is very misleading. Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 2011-08-11 at 12:57 +0200, Roger Oberholtzer wrote:
On Thu, 2011-08-11 at 09:37 +0200, Dimstar / Dominique Leuenberger wrote:
On Thu, 2011-08-11 at 09:30 +0200, Roger Oberholtzer wrote:
I agree that having the name of the installed lib the same is exactly what one wants. I disagree, however, that the name of the RPM to get this installed is the same and offers no clue as to the nature of the library that will be installed. So, I cannot look at the list of installed RPMs to determine if libjpeg.so.62.0.0 is the -turbo or the non-turbo variant.
Having said all that, I am glad the turbo version is available. I guess I am just nit picking about how one can easily verify that it is installed.
Well, the name of the package is dictated by the shared library packaging policy. Additionally, having the same PKG name for libjpeg and libjpeg-turbo (so in both cases libjpeg62) actually guarantees that the two packages are not installable in parallel (which would certainly conflict on file level).
Really? libjpeg-turbo does NOT even contain a library. It is only the command line wrappers. So it in fact does NOT contain anything -turbo. This was what confused me. I could very well have libjpeg-turbo installed, and a standard (non-turbo version) libjpeg. There is no overlap in the binaries in these two RPMS and they have different names. Both can very easily be installed.
PKG name for the lib is in both cases libjpeg62 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 2011-08-11 at 13:59 +0200, Dimstar / Dominique Leuenberger wrote:
PKG name for the lib is in both cases libjpeg62
Exactly. Which may or may not be the -turbo. Depends on the repo. And the libjpeg-turbo will not, despite what the name implies, be sure you have the matching - and significant - -turbo library. It is perhaps not an issue when you know about it. But is very easy to loose the -turbo capability, even though libjpeg-turbo remains installed. Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Dimstar / Dominique Leuenberger
-
Greg Freemyer
-
Roger Oberholtzer