libsdl-org / SDL_image

Image decoding for many popular formats for Simple Directmedia Layer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

upgrading libjpeg to 9f

sezero opened this issue · comments

IJG has recently released libjpeg-9f and I am preparing an upgrade
for it in SDL_image.

Our changes are adding a cmake script and an Android build support.

(i) Android build support from earlier version(s) seems to work.
I am moving its pregenerated jconfig.h to a dedicated android dir,
so that we can generate for other targets / compilers: That brings
the cmake issue:

(ii) Cmake: The cmake script from earlier 9e version works. However
it used to use the android version of jconfig.h and didn't generate
one itself: I am preparing it to generate the config instead. Here
is the question:

Android jconfig.h curiously defines AVOID_TABLES, and our cmake
script defines it too. However, no other build system in libjpeg
configuration does that. It obviously affects jdhuff.c. Why did we
decide to define this? I can keep that define in android version,
but I plan to remove that from the cmake script.

The rest of config generation is mostly about pre-ANSI systems,
except for a few such as CHAR_IS_UNSIGNED which obviously need
detection: will handle those. (Looking at two libjpeg cmake ports
to not make a mistake: https://github.com/stohrendorf/libjpeg-cmake
and also https://github.com/csparker247/jpeg-cmake )

CC: @slouken, @1bsyl (for possible insight on android config), @madebr