blob: b2003e8e3e194d1d1e8768028e6777c5b47b2993 [file] [log] [blame]
Elliott Hughes98e581f2020-12-02 18:09:57 -08001# Android differences from upstream chromium
Matt Sarettb3ffc5a2015-11-24 12:18:04 -05002
Elliott Hughes98e581f2020-12-02 18:09:57 -08003Android builds with `C_ARITH_CODING_SUPPORTED` and `D_ARITH_CODING_SUPPORTED`,
4added in
5https://android-review.googlesource.com/c/platform/external/libjpeg-turbo/+/291407/
6to support a variant of jpeg files using arithmetic (instead of Huffman)
7encoding. This variant isn't often used because of a lack of support in many
8viewers (e.g. Chromium), but Android really values backwards compatibility, and
9this might break some users. Android probably only needs to keep
10`D_ARITH_CODING_SUPPORTED`, but vendor code might also be encoding by setting
11jpeg_compress_struct.arith_code to true, so we enable both to ensure full
12backwards compatibility since it's not really costing us anything.
13We `#define` these in jconfig.h rather than in Android.bp so that they're
14correctly exported to any *users* (in particular, jerror.h only conditionally
15defines the corresponding error codes if these `#define`s are present).