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