aboutsummaryrefslogtreecommitdiff
path: root/README.chromium
blob: e8b0bc6755ae0fe3d98a61e301baeb77c9e41e49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Name: libjpeg-turbo
URL: https://github.com/libjpeg-turbo/libjpeg-turbo/
Version: 2.0.90 (2.1 Beta 1)
License: Custom license
License File: LICENSE.md
Security Critical: yes
License Android Compatible: yes

Description:
This consists of the components:
* libjpeg-turbo 2.0.90 (2.1 Beta 1)
* This file (README.chromium)
* A build file (BUILD.gn)
* An OWNERS file
* A codereview.settings file
* Patched header files used by Chromium
* Additional patches cherry-picked from upstream master to fix various bugs:
  https://github.com/libjpeg-turbo/libjpeg-turbo/commit/ccaba5d7894ecfb5a8f11e48d3f86e1f14d5a469
  https://github.com/libjpeg-turbo/libjpeg-turbo/commit/c7ca521bc85b57d41d3ad4963c13fc0100481084
  https://github.com/libjpeg-turbo/libjpeg-turbo/commit/110d8d6dcafaed517e8f77a6253169535ee3a20e
  https://github.com/libjpeg-turbo/libjpeg-turbo/commit/d2c407995992be1f128704ae2479adfd7906c158
  https://github.com/libjpeg-turbo/libjpeg-turbo/commit/74e6ea45e3547ae85cd43efcdfc24a6907a2154e
* Deleted unused directories: ci, cmakescripts, doc, java, release, sharedlib,
  simd/loongson, simd/mips, simd/powerpc, and win
* Deleted unused files: appveyor.yml, CMakeLists.txt, doxygen.config,
  doxygen-extra.css, .gitattributes, tjexample.c, tjexampletest.in,
  tjexampletest.java.in, .travis.yml
* Deleted legacy Arm Neon assembly files (supporting old compiler versions that
  do not generate performant code from intrinsics):
  simd/arm/aarch32/jsimd_neon.S, simd/arm/aarch64/jsimd_neon.S.

This libjpeg-turbo can replace our libjpeg-6b without any modifications in the
Chromium code.

Same as our copy of libjpeg-6b, this libjpeg-turbo also added a new file
jpeglibmangler.h and included it from jpeglib.h that changes the names of all
externally visible functions to chromium_* so that we can avoid conflicts that
arise when system libraries attempt to use our libjpeg. Also, we applied the
following changes which are not merged to upstream:

* Fix libjpeg_turbo svn r64 libjpeg6b compat issue: make the fast path Huffman
  decoder fallback to slow decoding if the Huffman decoding bit sentinel > 16,
  this to match the exact behavior of jpeg_huff_decode().
  http://crbug.com/398235
  The patch in the above bug removed "& 0xFF". It has been restored from
  upstream:
  https://github.com/libjpeg-turbo/libjpeg-turbo/commit/fa1d18385d904d530b4aec83ab7757a33397de6e
* Configuration files jconfig.h, jconfigint.h and neon-compat.h were generated
  and then altered manually to be compatible on all of Chromium's platforms.
  http://crbug.com/608347
* Fix static const data duplication of jpeg_nbits_table. A unique copy
  was in the jchuff.obj and jcphuff.obj resulting in an added 65k in
  .rdata in chrome.dll and chrome_child.dll.  Declaring extern const
  in the header instead of static const and moving the definition to
  a new .c file fixes this so only one copy is referenced. Also added
  extern wrappers around usage in asm files. The jpeg_nbits_table.inc
  file was also deleted. It was also necessary to give this table hidden
  visibility to avoid invalid relocations (ignored by ld but rejected by
  lld) arising from attempts to reference the table from assembler on
  32-bit x86. This only affects shared libraries, but that's important
  for downstream Android builds.
* Patches to enable running the upstream unit tests through GTest.
  The upstream unit tests are defined here under the section 'TESTS':
  https://github.com/libjpeg-turbo/libjpeg-turbo/blob/master/CMakeLists.txt
  These changes are tracked by Chromium issue: https://crbug.com/993876
  - Refactor tjunittest.c to provide test interface
  - Move tjunittest logs from stdout to stderr
  - Refactor tjbench.c to provide test interface
  - Move tbench logs from stdout to stderr
  - Write tjunittest output files to sdcard on Android
  - Refactor cjpeg.c to provide test interface
  - Refactor jpegtran.c to provide test interface
  - Add input JPEG images for djpeg and jpegtran tests
  - Refactor djpeg.c to provide test interface
  A new gtest directory contains GTest wrappers (and associated utilities) for
  each of tjunittest, tjbench, cjpeg, djpeg and jpegtran.

Refer to working-with-nested-repos [1] for details of how to setup your git
svn client to update the code (for making local changes, cherry picking from
upstream, etc).

[1] https://www.chromium.org/developers/how-tos/get-the-code/working-with-nested-repos