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