Page 1 of 1

Which jpeg library to use?

Posted: Mon May 14, 2007 1:22 pm
by radad

Posted: Mon May 14, 2007 11:38 pm
by Lukasz
I'd use ps2sdk-port one, just because it is a ps2sdk port and it therefor should work out of the box.

I think the other libjpeg is a older port.

Posted: Tue May 15, 2007 12:08 am
by radad
I am trying to use it with gsKit and it seems as though the first one is the one it expects.

Posted: Tue May 15, 2007 5:22 am
by ubergeek42
I have always used the one from myPS2, its got some changes to it, and I also apply the changes from uLaunchElf; I forget what the reasons for using it were. They also have a slightly patched version of gskit, again, no idea what they changed in it. Their changes are available in the release packages they make.

Posted: Wed May 16, 2007 8:08 am
by Polo35
Hey,

I've made some improvement some time ago on libjpg to sove all unsupported jpg file problems. ( try myps2 and you will see the problem :) ).

You can found needed modified file under Ulaunchelf source code.
Get libjpg from svn first ( the one under ps2/trunk ), and copy/overwrite modified file from ule source in your libjpg folder.

The fonction i wrote is name "jpgData *jpgOpenFILE(FILE *in_file, int mode)", and can open all jpg file, without restriction.

Best regards

Polo

Posted: Wed May 16, 2007 3:50 pm
by dlanor
Polo35 wrote:The fonction i wrote is name "jpgData *jpgOpenFILE(FILE *in_file, int mode)", and can open all jpg file, without restriction.
Please be aware that the next version of uLE (v4.13) will have a modified form of that patch. This is not because the methods of jpgOpenFILE were a problem, but only because some other software has a problem with the jpgPrivate struct being defined differently in the uLE patch from how it was defined both in the original libjpg and in the one modified by ntba2. This could make such software malfunction when compiled with the same lib used for uLE, because they somehow rely on the original struct definition. (Which they shouldn't for a 'private' struct.)

But the best solution for such problems is to eliminate the deviation, which I have done.

For the new uLE version I have made that structure conform to the original usage, using substructs for two jpgPrivate struct elements that the old uLE patch only used pointers to external structs for. This also required changing one statement in jpgOpenFILE, where one of those elements is assigned a value, which for the old lib patch was directly copied from another pointer while the new version does it by an indirect fetch of the pointer's value (a jpeg_source_mgr struct).

Best regards: dlanor

Posted: Thu May 17, 2007 10:13 am
by radad
I have had a quick look over the changes to libjpg. It is hard to see what is actually changed because it has been reformatted also. As yet I havent't any problem with the jpgs I have tried. What problems do your changes fix?