Which jpeg library to use?

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Which jpeg library to use?

Post by radad »

User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post 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.
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

I am trying to use it with gsKit and it seems as though the first one is the one it expects.
ubergeek42
Posts: 83
Joined: Wed Jul 13, 2005 12:25 am

Post 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.
Polo35
Posts: 25
Joined: Sun Apr 09, 2006 7:22 am

Post 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
dlanor
Posts: 258
Joined: Thu Oct 28, 2004 6:28 pm
Location: Stockholm, Sweden

Post 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
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post 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?
Post Reply