1*dfc6aa5cSAndroid Build Coastguard WorkerName: libjpeg-turbo 2*dfc6aa5cSAndroid Build Coastguard WorkerURL: https://github.com/libjpeg-turbo/libjpeg-turbo/ 3*dfc6aa5cSAndroid Build Coastguard WorkerVersion: 2.1.5.1 4*dfc6aa5cSAndroid Build Coastguard WorkerLicense: IJG, BSD-3, Zlib 5*dfc6aa5cSAndroid Build Coastguard WorkerLicense File: LICENSE.md 6*dfc6aa5cSAndroid Build Coastguard WorkerSecurity Critical: yes 7*dfc6aa5cSAndroid Build Coastguard WorkerShipped: yes 8*dfc6aa5cSAndroid Build Coastguard WorkerLicense Android Compatible: yes 9*dfc6aa5cSAndroid Build Coastguard Worker 10*dfc6aa5cSAndroid Build Coastguard WorkerDescription: 11*dfc6aa5cSAndroid Build Coastguard WorkerThis consists of the components: 12*dfc6aa5cSAndroid Build Coastguard Worker* libjpeg-turbo 2.1.5.1 13*dfc6aa5cSAndroid Build Coastguard Worker* This file (README.chromium) 14*dfc6aa5cSAndroid Build Coastguard Worker* A build file (BUILD.gn) 15*dfc6aa5cSAndroid Build Coastguard Worker* An OWNERS file 16*dfc6aa5cSAndroid Build Coastguard Worker* A codereview.settings file 17*dfc6aa5cSAndroid Build Coastguard Worker* A DIR_METADATA file 18*dfc6aa5cSAndroid Build Coastguard Worker* Patched header files used by Chromium 19*dfc6aa5cSAndroid Build Coastguard Worker* Deleted unused directories: .github, cmakescripts, doc, fuzz, java, release, 20*dfc6aa5cSAndroid Build Coastguard Worker sharedlib, simd/mips, simd/mips64, simd/powerpc, and win 21*dfc6aa5cSAndroid Build Coastguard Worker* Deleted unused files: appveyor.yml, CMakeLists.txt, cjpeg.1, croptest.in, 22*dfc6aa5cSAndroid Build Coastguard Worker djpeg.1, doxygen.config, doxygen-extra.css, example.txt, .gitattributes, 23*dfc6aa5cSAndroid Build Coastguard Worker jpegtran.1, md5/CMakeLists.txt, md5/md5cmp.c, rdjpgcom.1, simd/CMakeLists.txt, 24*dfc6aa5cSAndroid Build Coastguard Worker strtest.c, tjbenchtest.in, tjbenchtest.java.in, tjexample.c, tjexampletest.in, 25*dfc6aa5cSAndroid Build Coastguard Worker tjexampletest.java.in and wrjpgcom.1 26*dfc6aa5cSAndroid Build Coastguard Worker* Deleted legacy Arm Neon assembly files (supporting old compiler versions that 27*dfc6aa5cSAndroid Build Coastguard Worker do not generate performant code from intrinsics): 28*dfc6aa5cSAndroid Build Coastguard Worker simd/arm/aarch32/jsimd_neon.S, simd/arm/aarch64/jsimd_neon.S. 29*dfc6aa5cSAndroid Build Coastguard Worker 30*dfc6aa5cSAndroid Build Coastguard WorkerThis libjpeg-turbo can replace our libjpeg-6b without any modifications in the 31*dfc6aa5cSAndroid Build Coastguard WorkerChromium code. 32*dfc6aa5cSAndroid Build Coastguard Worker 33*dfc6aa5cSAndroid Build Coastguard WorkerSame as our copy of libjpeg-6b, this libjpeg-turbo also added a new file 34*dfc6aa5cSAndroid Build Coastguard Workerjpeglibmangler.h and included it from jpeglib.h that changes the names of all 35*dfc6aa5cSAndroid Build Coastguard Workerexternally visible functions to chromium_* so that we can avoid conflicts that 36*dfc6aa5cSAndroid Build Coastguard Workerarise when system libraries attempt to use our libjpeg. Also, we applied the 37*dfc6aa5cSAndroid Build Coastguard Workerfollowing changes which are not merged to upstream: 38*dfc6aa5cSAndroid Build Coastguard Worker 39*dfc6aa5cSAndroid Build Coastguard Worker* Configuration files jconfig.h, jconfigint.h and neon-compat.h were generated 40*dfc6aa5cSAndroid Build Coastguard Worker and then altered manually to be compatible on all of Chromium's platforms. 41*dfc6aa5cSAndroid Build Coastguard Worker http://crbug.com/608347 42*dfc6aa5cSAndroid Build Coastguard Worker* Fix static const data duplication of jpeg_nbits_table. A unique copy 43*dfc6aa5cSAndroid Build Coastguard Worker was in the jchuff.obj and jcphuff.obj resulting in an added 65k in 44*dfc6aa5cSAndroid Build Coastguard Worker .rdata in chrome.dll and chrome_child.dll. Declaring extern const 45*dfc6aa5cSAndroid Build Coastguard Worker in the header instead of static const and moving the definition to 46*dfc6aa5cSAndroid Build Coastguard Worker a new .c file fixes this so only one copy is referenced. Also added 47*dfc6aa5cSAndroid Build Coastguard Worker extern wrappers around usage in asm files. The jpeg_nbits_table.inc 48*dfc6aa5cSAndroid Build Coastguard Worker file was also deleted. It was also necessary to give this table hidden 49*dfc6aa5cSAndroid Build Coastguard Worker visibility to avoid invalid relocations (ignored by ld but rejected by 50*dfc6aa5cSAndroid Build Coastguard Worker lld) arising from attempts to reference the table from assembler on 51*dfc6aa5cSAndroid Build Coastguard Worker 32-bit x86. This only affects shared libraries, but that's important 52*dfc6aa5cSAndroid Build Coastguard Worker for downstream Android builds. 53*dfc6aa5cSAndroid Build Coastguard Worker* Merged upstream patch https://github.com/libjpeg-turbo/libjpeg-turbo/commit/0fc7313e545a3ff499c19ee6591bb87f0ad8b2a4 54*dfc6aa5cSAndroid Build Coastguard Worker This patch resolves an O(n^2) slowdown issue when JPEG files contain an 55*dfc6aa5cSAndroid Build Coastguard Worker enormous number of markers; this would only occur in a maliciouly-crafted 56*dfc6aa5cSAndroid Build Coastguard Worker image, or through fuzzing. 57*dfc6aa5cSAndroid Build Coastguard Worker* Patches to enable running the upstream unit tests through GTest. 58*dfc6aa5cSAndroid Build Coastguard Worker The upstream unit tests are defined here under the section 'TESTS': 59*dfc6aa5cSAndroid Build Coastguard Worker https://github.com/libjpeg-turbo/libjpeg-turbo/blob/master/CMakeLists.txt 60*dfc6aa5cSAndroid Build Coastguard Worker These changes are tracked by Chromium issue: https://crbug.com/993876 61*dfc6aa5cSAndroid Build Coastguard Worker - Refactor tjunittest.c to provide test interface 62*dfc6aa5cSAndroid Build Coastguard Worker - Move tjunittest logs from stdout to stderr 63*dfc6aa5cSAndroid Build Coastguard Worker - Refactor tjbench.c to provide test interface 64*dfc6aa5cSAndroid Build Coastguard Worker - Move tbench logs from stdout to stderr 65*dfc6aa5cSAndroid Build Coastguard Worker - Write tjunittest output files to sdcard on Android 66*dfc6aa5cSAndroid Build Coastguard Worker - Refactor cjpeg.c to provide test interface 67*dfc6aa5cSAndroid Build Coastguard Worker - Refactor jpegtran.c to provide test interface 68*dfc6aa5cSAndroid Build Coastguard Worker - Add input JPEG images for djpeg and jpegtran tests 69*dfc6aa5cSAndroid Build Coastguard Worker - Refactor djpeg.c to provide test interface 70*dfc6aa5cSAndroid Build Coastguard Worker A new gtest directory contains GTest wrappers (and associated utilities) for 71*dfc6aa5cSAndroid Build Coastguard Worker each of tjunittest, tjbench, cjpeg, djpeg and jpegtran. 72*dfc6aa5cSAndroid Build Coastguard Worker 73*dfc6aa5cSAndroid Build Coastguard WorkerRefer to working-with-nested-repos [1] for details of how to setup your git 74*dfc6aa5cSAndroid Build Coastguard Workersvn client to update the code (for making local changes, cherry picking from 75*dfc6aa5cSAndroid Build Coastguard Workerupstream, etc). 76*dfc6aa5cSAndroid Build Coastguard Worker 77*dfc6aa5cSAndroid Build Coastguard Worker[1] https://www.chromium.org/developers/how-tos/get-the-code/working-with-nested-repos 78