xref: /aosp_15_r20/external/libjpeg-turbo/README.android (revision dfc6aa5c1cfd4bc4e2018dc74aa96e29ee49c6da)
1*dfc6aa5cSAndroid Build Coastguard Worker# Android differences from upstream chromium
2*dfc6aa5cSAndroid Build Coastguard Worker
3*dfc6aa5cSAndroid Build Coastguard WorkerAndroid builds with `C_ARITH_CODING_SUPPORTED` and `D_ARITH_CODING_SUPPORTED`,
4*dfc6aa5cSAndroid Build Coastguard Workeradded in
5*dfc6aa5cSAndroid Build Coastguard Workerhttps://android-review.googlesource.com/c/platform/external/libjpeg-turbo/+/291407/
6*dfc6aa5cSAndroid Build Coastguard Workerto support a variant of jpeg files using arithmetic (instead of Huffman)
7*dfc6aa5cSAndroid Build Coastguard Workerencoding. This variant isn't often used because of a lack of support in many
8*dfc6aa5cSAndroid Build Coastguard Workerviewers (e.g. Chromium), but Android really values backwards compatibility, and
9*dfc6aa5cSAndroid Build Coastguard Workerthis might break some users. Android probably only needs to keep
10*dfc6aa5cSAndroid Build Coastguard Worker`D_ARITH_CODING_SUPPORTED`, but vendor code might also be encoding by setting
11*dfc6aa5cSAndroid Build Coastguard Workerjpeg_compress_struct.arith_code to true, so we enable both to ensure full
12*dfc6aa5cSAndroid Build Coastguard Workerbackwards compatibility since it's not really costing us anything.
13*dfc6aa5cSAndroid Build Coastguard WorkerWe `#define` these in jconfig.h rather than in Android.bp so that they're
14*dfc6aa5cSAndroid Build Coastguard Workercorrectly exported to any *users* (in particular, jerror.h only conditionally
15*dfc6aa5cSAndroid Build Coastguard Workerdefines the corresponding error codes if these `#define`s are present).
16*dfc6aa5cSAndroid Build Coastguard Worker
17*dfc6aa5cSAndroid Build Coastguard WorkerCherry-pick on 2024/01/08: https://github.com/libjpeg-turbo/libjpeg-turbo/commit/c27695a193a7cb265ef8e45c7b28bda3a71c70ce
18