Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #72

Merged
merged 31 commits into from
Dec 6, 2024
Merged

Cherry-pick #72

merged 31 commits into from
Dec 6, 2024

Conversation

eustas
Copy link
Collaborator

@eustas eustas commented Dec 6, 2024

Picked: 878b9bd9 .. 7609879f

Next: b0947a80 binary releases for Ubuntu 24.04 (#3831)

sboukortt and others added 30 commits December 6, 2024 08:55
This lets us detect and handle failure in initialisation without
requiring that we make Allotment movable for use with
JXL_ASSIGN_OR_RETURN.

(cherry picked from commit 878b9bd98db1c46eb319f72d83361442f37dcb8a)
(cherry picked from commit 21ecfa3a4046551d893fa04bd6f238dadfb9b728)
Added a line describing rawtherapee's support of jxl

(cherry picked from commit 308487cb81d3e6b293edbf6f85a2fc77b4b64589)
Windows stdin and stdout default to text mode, but they can be changed
to binary mode with _setmode from <io.h>. This is relevant because text
mode enables LF <-> CRLF translation, and binary mode disables it, and
it needs to be disabled for image reading/writing. This is technically
also true on Unix-like operating systems, but text and binary do the
same thing on macOS, Linux, etc.

Signed-off-by: Leo Izen <[email protected]>
(cherry picked from commit 309b637d8a2a78708a2b806d9523ae0de562a997)
(cherry picked from commit 9b7ffdb03467c1bfd2a3bc9364ce3927f13261a1)
(cherry picked from commit a22c0769f4002c0e683b4bb90fac05002ab80a72)
* add Status to reserve

* add Status to push_back

* add Status to first kind of resize (part 1)

* adding Status to AppendUint32

* more Status returning

* add Status to the other resize

* add Status to clear

* add Status to assign

* add Status to append and AppendKeyword

* lint

* don't return Status for clear

* Status for TakeBytes()

* Revert "Status for TakeBytes()"

This reverts commit 0b750d7f53d669e6629efb77d28b1efe19bb1236.

* refactor BitWriter::Allotment

Co-authored-by: Sami Boukortt <[email protected]>

* No more need to set capacity and size to zero to notice a failure to reallocate

* No more need for these checks either

* return directly

* not QUIET

---------

Co-authored-by: Sami Boukortt <[email protected]>
(cherry picked from commit 637806b163fec69869a13465cb7b126cec68ae97)
JXL_CRASH_ON_ERROR is always defined (which is why it was possible to
use it in the runtime condition), so DuplicatePoints ended up always
disabled.

(cherry picked from commit 17db92d4ffb25f6963cccb30695eb3e2f7c01ef2)
…se” (0) (#3780)

* If InitializePPF fails in cjxl, return EXIT_FAILURE rather than “false” (0)

* Flushing std::cerr is redundant (the unitbuf flag is on by default)

(cherry picked from commit 35e7376a4b895e0d9468e35cd9eb2b6eb71bf394)
* stop loading uninitialized memory from MaskingPtr1x1

* use mask1x1_xsize

(cherry picked from commit 0d303cc6c3bb198c76c0ae182c515cf35d02f97e)
* Reduce compute and increase density of e11

First, run a test to differentiate images by palette performance (e.g. photo vs text), then run trials optimized for that content.

84 images, 20 threads:
```
         bpp (mean)        unique mins            Mpx/s real (mean)
B        |         mins    |       Mpx/s CPU (mean)            best of
7320243  3.488567  65.48%  40.48%  0.004631646    0.02237144   cjxl_0.11.0-637806b1-p24t21_d0e11
7325717  3.488910  59.52%  34.52%  0.00025005346  0.004543083  cjxl_0.11.0-637806b1_d0e11
```

* Update AUTHORS

* Provide functions for content settings in e11

(cherry picked from commit 95246e5387d8c9ee2554ac37627ea4172a143657)
* Message when InitializePPF fails

* Don’t add unnecessary -- to error messages related to flag parsing

Before:

    $ tools/cjxl --streaming_input=0 in.ppm out.jxl
    ----streaming_input=0 didn't expect any argument passed to it.
    Error parsing flag --streaming_input=0
    Use 'tools/cjxl -h' for more information

    $ tools/cjxl in.ppm out.jxl -d
    ---d expected an argument but none passed.
    Error parsing flag -d
    Use 'tools/cjxl -h' for more information

After:

    $ tools/cjxl --streaming_input=0 in.ppm out.jxl
    --streaming_input didn't expect any argument passed to it.
    Error parsing flag --streaming_input=0
    Use 'tools/cjxl -h' for more information

    $ tools/cjxl in.ppm out.jxl -d
    -d expected an argument but none passed.
    Error parsing flag -d
    Use 'tools/cjxl -h' for more information

(cherry picked from commit 84f862853221fa09647279f85814f111e1f32fae)
84 images, 20 threads:
```
         bpp (mean)        unique mins            Mpx/s real (mean)
B        |         mins    |       Mpx/s CPU (mean)            best of
7318553  3.482824  73.81%  42.86%  0.003986642    0.02157361   cjxl_0.11.0-637806b1-p24t21-fix_d0e11
7325717  3.488910  57.14%  26.19%  0.00025005346  0.004543083  cjxl_0.11.0-637806b1_d0e11
```

(cherry picked from commit 579837b5d406be94a300d37be965e6f0534f3390)
* ClangTidy fixes

* format

(cherry picked from commit 65f06314aa78751312cc7c8fa7a4d260a4c2b2c3)
(cherry picked from commit 9ffc2e0fc1a31513db01eb1c458310ad71a475f8)
(cherry picked from commit db689b27648bf5a657dee0e2065aad5f3d36f2c8)
about 0.15 % on BPP*pnorm

```
Before:

104 images
Encoding      kPixels    Bytes          BPP  E MP/s  D MP/s     Max norm  SSIMULACRA2   PSNR        pnorm       BPP*pnorm   QABPP   Bugs
----------------------------------------------------------------------------------------------------------------------------------------
jxl:d0.1        20315 17234055    6.7864714   0.795   8.565   0.26921220  95.72922587  56.47   0.09149990  0.620961464563   6.786      0
jxl:d0.5        20315  7112515    2.8007848   0.940  12.078   0.85998310  91.46395356  46.44   0.34487223  0.965912919133   2.941      0
jxl:d0.8        20315  5380024    2.1185600   0.861  11.031   1.10730124  88.87286260  44.43   0.46413467  0.983297134681   2.471      0
jxl:d1          20315  4616590    1.8179329   0.861  11.503   1.32266768  87.04284922  43.20   0.55278192  1.004920452626   2.499      0
jxl:d1.5        20315  3501542    1.3788464   0.879  11.142   1.84924045  82.85156040  41.07   0.75456129  1.040424113923   2.644      0
jxl:d2.0        20315  2846638    1.1209566   0.881  11.101   2.40151432  78.80988790  39.56   0.94325779  1.057351028760   2.835      0
jxl:d2.5        20315  2396802    0.9438190   0.893  11.413   2.82912128  74.97206547  38.37   1.11707140  1.054313198037   2.814      0
jxl:d3          20315  2085594    0.8212707   0.870  11.541   3.25567966  71.58518909  37.51   1.27852510  1.050015177507   2.801      0
jxl:d5          20315  1398149    0.5505668   0.873   7.995   4.58800935  60.07606195  35.23   1.80660922  0.994659027562   2.622      0
jxl:d10         20315   843981    0.3323451   0.865   8.538   7.68431602  38.42064210  32.46   2.92598859  0.972437834700   2.534      0
Aggregate:      20315  3351858    1.3199034   0.871  10.385   1.85750610  76.98242982  41.01   0.73089142  0.964706041010   2.941      0

After:

104 images
Encoding      kPixels    Bytes          BPP  E MP/s  D MP/s     Max norm  SSIMULACRA2   PSNR        pnorm       BPP*pnorm   QABPP   Bugs
----------------------------------------------------------------------------------------------------------------------------------------
jxl:d0.1        20315 17266997    6.7994434   0.815   8.802   0.26883625  95.74016251  56.48   0.09126255  0.620534568214   6.799      0
jxl:d0.5        20315  7125011    2.8057055   0.962  12.895   0.85243631  91.45559592  46.45   0.34403907  0.965272309787   2.931      0
jxl:d0.8        20315  5394265    2.1241678   0.894  11.084   1.09960077  88.89451775  44.49   0.46027287  0.977696821726   2.466      0
jxl:d1          20315  4624207    1.8209324   0.892  11.385   1.31717842  87.04791994  43.25   0.54900805  0.999706533924   2.495      0
jxl:d1.5        20315  3504409    1.3799754   0.912  11.012   1.85527307  82.85677175  41.09   0.75216350  1.037967114212   2.655      0
jxl:d2.0        20315  2844789    1.1202285   0.923  11.199   2.40613996  78.78007662  39.57   0.94250548  1.055821484127   2.840      0
jxl:d2.5        20315  2393011    0.9423262   0.923  11.503   2.83238352  74.92339850  38.38   1.11739846  1.052953789398   2.809      0
jxl:d3          20315  2079292    0.8187891   0.891  11.957   3.25359934  71.51771710  37.50   1.28061805  1.048556056115   2.794      0
jxl:d5          20315  1395949    0.5497005   0.903   8.354   4.62224705  60.04091153  35.21   1.81152423  0.995795707602   2.640      0
jxl:d10         20315   842166    0.3316303   0.892   8.832   7.70488447  38.44032069  32.44   2.93156275  0.972195146095   2.540      0
Aggregate:      20315  3351787    1.3198755   0.900  10.601   1.85647607  76.96973923  41.02   0.72960225  0.962984133078   2.942      0
```

(cherry picked from commit f28befab0b0ef113ffdca3786757737bce01d4c7)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.2 to 3.26.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@429e197...4dd1613)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 2650e5cbc0df13735b9ed96f066cc3ff315c8c7b)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.6 to 4.4.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@834a144...5076954)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 960d97c0b73fe081a7cd00afc3fac1bfaf441452)
(cherry picked from commit 43221c84373494a21cab532e7bc2f51128c73207)
(cherry picked from commit 724646620d1d2e706c30876fa94ba94f14f6dda3)
This might help with #3666.

(cherry picked from commit b5cb2464c6d42c3688b4f51e5101adf2ae291bfd)
* check realloc in basicinfo

* format

* reset box_foo

* no need for else

(cherry picked from commit 4d77514fc8ce156cb135238248502ca3eeab8b2e)
(cherry picked from commit 3786abba487582b22f484bfb22832d31af62bc84)
… (#3805)

Fixes regression since 5df155d975bd8ecf091f2b808d41cdd1f37e09b8. This
commit restores compatibility with these functions using libavif before
major version 1, as they didn't return a result in those cases.

Signed-off-by: Leo Izen <[email protected]>
(cherry picked from commit 4a24ceb55dacba6b0308f14ffdee206a11f47720)
This might address #3807.

(cherry picked from commit 95123121c1e3a0f3a8961d153480aae9864cbf99)
(cherry picked from commit a4f67292d1cd99f969ad86aa5ceb272a6bec737a)
* Lower PNG compression

* Try level 1

(cherry picked from commit 0185fcd0df1b3901972752172b188e3c085777f8)
(cherry picked from commit 33f7c03d89a33e24d7504acfa485cf246252e8bb)
(cherry picked from commit 94819f129c9531fb59b9c70121ab2ceb94368ad4)
* bump version to 0.12.0

* update JPEGXL_SO_MINOR_VERSION

(cherry picked from commit 7609879f3d9071506dea8f537ad56d744ee83617)
@eustas eustas requested a review from mo271 December 6, 2024 09:21
@eustas eustas merged commit 10ad490 into google:main Dec 6, 2024
55 of 69 checks passed
@eustas eustas deleted the cherry8 branch December 6, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants