1# Android differences from upstream chromium
2
3Android 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).
16