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