Bug 1809861 - Part 3: Reorder off-thread compilation methods r=smaug
[gecko.git] / third_party / jpeg-xl / CHANGELOG.md
bloba6174ee51bec483c6f2eb9748c98fc2e32bed883
1 # Changelog
3 All notable changes to this project will be documented in this file.
5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8 ## Unreleased
10 ### Added
11  - decoder API: new function `JxlDecoderSetImageBitDepth` to set the bit depth
12    of the output buffer.
13  - decoder API proposal: add `JxlDecoderSetOutputColorProfile` and
14    `JxlDecoderSetCms` to enable decoding to desired colorspace; NB: not
15    implemented yet.
16  - encoder API: new function `JxlEncoderSetFrameBitDepth` to set the bit depth
17    of the input buffer.
18  - encoder API: add an effort 10 option for lossless compression; using this
19    setting requires calling `JxlEncoderAllowExpertOptions`.
20  - encoder API: new `JXL_ENC_FRAME_SETTING_JPEG_COMPRESS_BOXES` enum value to
21    allow explicit control of metadata compression
23 ### Removed
24  - common API: removed `JxlIntrinsicSizeHeader`
25  - decoder API: removed deprecated `JXL_DEC_NEED_DC_OUT_BUFFER` and
26    `JXL_DEC_DC_IMAGE` events, `JxlDecoderDCOutBufferSize` and
27    `JxlDecoderSetDCOutBuffer` functions
29 ### Changed / clarified
30  - encoder API: `JxlEncoderProcessOutput` requires at least 32 bytes of output
31    space to proceed and guarantees that at least one byte will be written
32 ## [0.7] - 2022-07-21
34 ### Added
35  - Export version information in headers.
36  - decoder API: Ability to decode the content of metadata boxes:
37    `JXL_DEC_BOX`, `JXL_DEC_BOX_NEED_MORE_OUTPUT`, `JxlDecoderSetBoxBuffer`,
38    `JxlDecoderGetBoxType`, `JxlDecoderGetBoxSizeRaw` and
39    `JxlDecoderSetDecompressBoxes`.
40  - decoder API: ability to mark the input is finished: `JxlDecoderCloseInput`.
41  - decoder API: ability to request updates on different progressive events using
42    `JxlDecoderSetProgressiveDetail`; currently supported events are
43    `kDC`, `kLastPasses` and `kPasses`.
44  - decoder API: ability to specify desired intensity target using
45    `JxlDecoderSetDesiredIntensityTarget`
46  - decoder API: new function `JxlDecoderSetCoalesced` to allow decoding
47    non-coalesced (unblended) frames, e.g. layers of a composite still image
48    or the cropped frames of a recompressed GIF/APNG.
49  - decoder API: new function `JxlDecoderSetUnpremultiplyAlpha` to set
50    preference for getting an associated alpha channel with premultiplied or
51    unpremultiplied colors.
52  - decoder API: field added to `JxlFrameHeader`: a `JxlLayerInfo` struct
53    that contains crop dimensions and offsets and blending information for
54    the non-coalesced case.
55  - decoder API: new function `JxlDecoderGetExtraChannelBlendInfo` to get
56    the blending information for extra channels in the non-coalesced case.
57  - decoder API: new function `JxlDecoderSetMultithreadedImageOutCallback`,
58    allowing output callbacks to receive more information about the number of
59    threads on which they are running.
60  - decoder API: new function `JxlDecoderSkipCurrentFrame` to skip processing
61    the current frame after a progressive detail is reached.
62  - decoder API: new function `JxlDecoderGetIntendedDownsamplingRatio` to get
63    the intended downsampling ratio of progressive steps, based on the
64    information in the frame header.
65  - decoder API: new function `JxlDecoderSetRenderSpotcolors` to allow disabling
66    rendering of spot colors.
67  - decoder/encoder API: add two fields to `JXLBasicInfo`: `intrinsic_xsize`
68    and `intrinsic_ysize` to signal the intrinsic size.
69  - encoder API: ability to add metadata boxes, added new functions
70    `JxlEncoderAddBox`, `JxlEncoderUseBoxes`, `JxlEncoderCloseBoxes` and
71    `JxlEncoderCloseFrames`.
72  - encoder API: added ability to set several encoder options / extra fields to
73    frames using `JxlEncoderSetFrameName`, `JxlEncoderFrameSettingsSetOption`,
74    `JxlEncoderFrameSettingsSetFloatOption`.
75  - encoder API: added ability to check required codestream compatibility level
76    and force specified using `JxlEncoderGetRequiredCodestreamLevel` and
77    `JxlEncoderSetCodestreamLevel`.
78  - encoder API: added ability to force emitting box-based container format
79    using `JxlEncoderUseContainer`.
80  - encoder API: added ability to store JPEG metadata for lossless reconstruction
81    using `JxlEncoderStoreJPEGMetadata`
82  - encoder API: new functions `JxlEncoderSetFrameHeader` and
83    `JxlEncoderSetExtraChannelBlendInfo` to set animation
84    and blending parameters of the frame, and `JxlEncoderInitFrameHeader` and
85    `JxlEncoderInitBlendInfo` to initialize the structs to set.
86  - encoder API: ability to encode arbitrary extra channels:
87   `JxlEncoderInitExtraChannelInfo`, `JxlEncoderSetExtraChannelInfo`,
88   `JxlEncoderSetExtraChannelName` and `JxlEncoderSetExtraChannelBuffer`.
89  - encoder API: ability to plug custom CMS implementation using
90    `JxlEncoderSetCms(JxlEncoder* enc, JxlCmsInterface cms)`
91  - encoder API: added `JxlEncoderGetError` to retrieve last encoder error.
93 ### Changed
94 - decoder API: using `JxlDecoderCloseInput` at the end of all input is required
95   when using JXL_DEC_BOX, and is now also encouraged in other cases, but not
96   required in those other cases for backwards compatibility.
97 - encoder API: `JxlEncoderCloseInput` now closes both frames and boxes input.
98 - CLI: `cjxl` and `djxl` have been reimplemented on the base of public decoder
99   and encoder API; dropped dependency on `gflags` for argument parsing.
101 ### Deprecated
102 - decoder API: `JXL_DEC_EXTENSIONS` event: use `JXL_DEC_BASIC_INFO`
103 - decoder / encoder API: pixel types `JXL_TYPE_BOOLEAN` and `JXL_TYPE_UINT32`:
104   consider using `JXL_TYPE_UINT8` and `JXL_TYPE_FLOAT` correspondingly.
105 - decoder API: pixel format parameter for `JxlDecoderGetColorAsEncodedProfile`
106   and `JxlDecoderGetICCProfileSize`: pass `NULL`.
107 - decoder API: `JxlDecoderDefaultPixelFormat`
108 - encoder API: `JxlEncoderOptions`: use `JxlEncoderFrameSettings` instead.
109 - encoder API: `JxlEncoderOptionsCreate`: use `JxlEncoderFrameSettingsCreate`
110   instead.
111 - encoder API: `JxlEncoderOptionsSetDistance`: use `JxlEncoderSetFrameDistance`
112   instead.
113 - encoder API: `JxlEncoderOptionsSetLossless`: use `JxlEncoderSetFrameLossless`
114   instead.
115 - encoder API: `JxlEncoderOptionsSetEffort`: use
116   `JxlEncoderFrameSettingsSetOption(frame_settings, JXL_ENC_FRAME_SETTING_EFFORT, effort)`
117   instead.
118 - encoder API: `JxlEncoderOptionsSetDecodingSpeed`: use
119   `JxlEncoderFrameSettingsSetOption(frame_settings, JXL_ENC_FRAME_SETTING_DECODING_SPEED, tier)`
120   instead.
121 - encoder API: deprecated `JXL_ENC_NOT_SUPPORTED`, the encoder returns
122   `JXL_ENC_ERROR` instead and there is no need to handle
123   `JXL_ENC_NOT_SUPPORTED`.
125 ## [0.6.1] - 2021-10-29
126 ### Changed
127  - Security: Fix OOB read in splines rendering (#735 -
128    [CVE-2021-22563](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-22563))
129  - Security: Fix OOB copy (read/write) in out-of-order/multi-threaded decoding
130    (#708 - [CVE-2021-22564](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-22564))
131  - Fix segfault in `djxl` tool with `--allow_partial_files` flag (#781).
132  - Fix border in extra channels when using upsampling (#796)
134 ## [0.6] - 2021-10-04
135 ### Added
136  - API: New functions to decode extra channels:
137    `JxlDecoderExtraChannelBufferSize` and `JxlDecoderSetExtraChannelBuffer`.
138  - API: New function `JxlEncoderInitBasicInfo` to initialize `JxlBasicInfo`
139    (only needed when encoding). NOTE: it is now required to call this function
140    when using the encoder. Padding was added to the struct for forward
141    compatibility.
142  - API: Support for encoding oriented images.
143  - API: FLOAT16 support in the encoder API.
144  - Rewrite of the GDK pixbuf loader plugin. Added proper color management and
145    animation support.
146  - Rewrite of GIMP plugin. Added compression parameters dialog and switched to
147    using the public C API.
148  - Debian packages for GDK pixbuf loader (`libjxl-gdk-pixbuf`) and GIMP
149    (`libjxl-gimp-plugin`) plugins.
150  - `cjxl`/`djxl` support for `stdin` and `stdout`.
152 ### Changed
153  - API: Renamed the field `alpha_associated` in `JxlExtraChannelInfo` to
154    `alpha_premultiplied`, to match the corresponding name in `JxlBasicInfo`.
155  - Improved the 2x2 downscaling method in the encoder for the optional color
156    channel resampling for low bit rates.
157  - Fixed: the combination of floating point original data, XYB color encoding,
158    and Modular mode was broken (in both encoder and decoder). It now works.
159    NOTE: this can cause the current encoder to write jxl bitstreams that do
160    not decode with the old decoder. In particular this will happen when using
161    cjxl with PFM, EXR, or floating point PSD input, and a combination of XYB
162    and modular mode is used (which caused an encoder error before), e.g.
163    using options like `-m -q 80` (lossy modular), `-d 4.5` or `--progressive_dc=1`
164    (modular DC frame), or default lossy encoding on an image where patches
165    end up being used. There is no problem when using cjxl with PNG, JPEG, GIF,
166    APNG, PPM, PGM, PGX, or integer (8-bit or 16-bit) PSD input.
167  - `libjxl` static library now bundles skcms, fixing static linking in
168    downstream projects when skcms is used.
169  - Spline rendering performance improvements.
170  - Butteraugli changes for less visual masking.
172 ## [0.5] - 2021-08-02
173 ### Added
174  - API: New function to decode the image using a callback outputting a part of a
175    row per call.
176  - API: 16-bit float output support.
177  - API: `JxlDecoderRewind` and `JxlDecoderSkipFrames` functions to skip more
178    efficiently to earlier animation frames.
179  - API: `JxlDecoderSetPreferredColorProfile` function to choose color profile in
180    certain circumstances.
181  - encoder: Adding `center_x` and `center_y` flags for more control of the tile
182    order.
183  - New encoder speeds `lightning` (1) and `thunder` (2).
185 ### Changed
186  - Re-licensed the project under a BSD 3-Clause license. See the
187    [LICENSE](LICENSE) and [PATENTS](PATENTS) files for details.
188  - Full JPEG XL part 1 specification support: Implemented all the spec required
189    to decode files to pixels, including cases that are not used by the encoder
190    yet. Part 2 of the spec (container format) is final but not fully implemented
191    here.
192  - Butteraugli metric improvements. Exact numbers are different from previous
193    versions.
194  - Memory reductions during decoding.
195  - Reduce the size of the jxl_dec library by removing dependencies.
196  - A few encoding speedups.
197  - Clarify the security policy.
198  - Significant encoding improvements (~5 %) and less ringing.
199  - Butteraugli metric to have some less masking.
200  - `cjxl` flag `--speed` is deprecated and replaced by the `--effort` synonym.
202 ### Removed
203 - API for returning a downsampled DC was deprecated
204   (`JxlDecoderDCOutBufferSize` and `JxlDecoderSetDCOutBuffer`) and will be
205   removed in the next release.
207 ## [0.3.7] - 2021-03-29
208 ### Changed
209  - Fix a rounding issue in 8-bit decoding.
211 ## [0.3.6] - 2021-03-25
212 ### Changed
213  - Fix a bug that could result in the generation of invalid codestreams as
214    well as failure to decode valid streams.
216 ## [0.3.5] - 2021-03-23
217 ### Added
218  - New encode-time options for faster decoding at the cost of quality.
219  - Man pages for cjxl and djxl.
221 ### Changed
222  - Memory usage improvements.
223  - Faster decoding to 8-bit output with the C API.
224  - GIMP plugin: avoid the sRGB conversion dialog for sRGB images, do not show
225    a console window on Windows.
226  - Various bug fixes.
228 ## [0.3.4] - 2021-03-16
229 ### Changed
230  - Improved box parsing.
231  - Improved metadata handling.
232  - Performance and memory usage improvements.
234 ## [0.3.3] - 2021-03-05
235 ### Changed
236  - Performance improvements for small images.
237  - Add a (flag-protected) non-high-precision mode with better speed.
238  - Significantly speed up the PQ EOTF.
239  - Allow optional HDR tone mapping in djxl (--tone_map, --display_nits).
240  - Change the behavior of djxl -j to make it consistent with cjxl (#153).
241  - Improve image quality.
242  - Improve EXIF handling.
244 ## [0.3.2] - 2021-02-12
245 ### Changed
246  - Fix embedded ICC encoding regression
247    [#149](https://gitlab.com/wg1/jpeg-xl/-/issues/149).
249 ## [0.3.1] - 2021-02-10
250 ### Changed
251  - New experimental Butteraugli API (`jxl/butteraugli.h`).
252  - Encoder improvements to low quality settings.
253  - Bug fixes, including fuzzer-found potential security bug fixes.
254  - Fixed `-q 100` and `-d 0` not triggering lossless modes.
256 ## [0.3] - 2021-01-29
257 ### Changed
258  - Minor change to the Decoder C API to accommodate future work for other ways
259    to provide input.
260  - Future decoder C API changes will be backwards compatible.
261  - Lots of bug fixes since the previous version.
263 ## [0.2] - 2020-12-24
264 ### Added
265  - JPEG XL bitstream format is frozen. Files encoded with 0.2 will be supported
266    by future versions.
268 ### Changed
269  - Files encoded with previous versions are not supported.
271 ## [0.1.1] - 2020-12-01
273 ## [0.1] - 2020-11-14
274 ### Added
275  - Initial release of an encoder (`cjxl`) and decoder (`djxl`) that work
276    together as well as a benchmark tool for comparison with other codecs
277    (`benchmark_xl`).
278  - Note: JPEG XL format is in the final stages of standardization, minor changes
279    to the codestream format are still possible but we are not expecting any
280    changes beyond what is required by bug fixing.
281  - API: new decoder API in C, check the `examples/` directory for its example
282    usage. The C API is a work in progress and likely to change both in API and
283    ABI in future releases.