JPEG decoder
Posted: Sat Nov 28, 2009 5:27 pm
I've built a version of libjpeg for the 32X so I thought I should post it here.
Decoding demo ROM plus source code and a prebuilt version of libjpeg.a (tested and works on a real 32X): http://jiggawatt.org/badc0de/djpeg32x.zip
And here are my modified libjpeg sources: http://jiggawatt.org/badc0de/jpeg-7-32x.zip
To build the library just do make -f makefile.unix libjpeg.a
If you're on a non-Windows system you'll have to rebuild ansi2knr first with your regular gcc, i.e:
gcc ansi2knr.c
make -f makefile.unix libjpeg.a
I borrowed the memory allocator from the Wolf32X sources. Since bss_end isn't known at the time when the library is built I just hardcoded the heap address (you can find it in jdapimin.c - look for the call to MSYS_Init). The library should work on the Saturn as well if you modify the heap start/endpoint and rebuild it.
Note that I've removed the compression parts of the library in the makefile since I only considered the decompression routines to be relevant.
Decoding demo ROM plus source code and a prebuilt version of libjpeg.a (tested and works on a real 32X): http://jiggawatt.org/badc0de/djpeg32x.zip
And here are my modified libjpeg sources: http://jiggawatt.org/badc0de/jpeg-7-32x.zip
To build the library just do make -f makefile.unix libjpeg.a
If you're on a non-Windows system you'll have to rebuild ansi2knr first with your regular gcc, i.e:
gcc ansi2knr.c
make -f makefile.unix libjpeg.a
I borrowed the memory allocator from the Wolf32X sources. Since bss_end isn't known at the time when the library is built I just hardcoded the heap address (you can find it in jdapimin.c - look for the call to MSYS_Init). The library should work on the Saturn as well if you modify the heap start/endpoint and rebuild it.
Note that I've removed the compression parts of the library in the makefile since I only considered the decompression routines to be relevant.