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

Support brotli compressed boxes in JPEG XL #2381

Merged
merged 8 commits into from
Oct 24, 2022
Merged

Support brotli compressed boxes in JPEG XL #2381

merged 8 commits into from
Oct 24, 2022

Conversation

kmilos
Copy link
Collaborator

@kmilos kmilos commented Oct 18, 2022

This introduces a dependency on the brotli library.

For some reason the Conan builds cannot find it, but the lib is found otherwise on macOS, MinGW, and Cygwin builds.

@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Merging #2381 (6eb0956) into main (9767e37) will decrease coverage by 0.32%.
The diff coverage is 5.76%.

❗ Current head 6eb0956 differs from pull request most recent head a58e52e. Consider uploading reports for the commit a58e52e to get more accurate results

@@            Coverage Diff             @@
##             main    #2381      +/-   ##
==========================================
- Coverage   64.37%   64.05%   -0.33%     
==========================================
  Files         119      119              
  Lines       21090    21133      +43     
  Branches    10399    10426      +27     
==========================================
- Hits        13577    13537      -40     
- Misses       5363     5441      +78     
- Partials     2150     2155       +5     
Impacted Files Coverage Δ
include/exiv2/bmffimage.hpp 100.00% <ø> (ø)
src/bmffimage.cpp 67.98% <0.00%> (-7.77%) ⬇️
src/version.cpp 88.16% <100.00%> (+0.21%) ⬆️
src/minoltamn_int.cpp 60.98% <0.00%> (-8.08%) ⬇️
src/makernote_int.cpp 65.39% <0.00%> (-0.96%) ⬇️
src/olympusmn_int.cpp 40.79% <0.00%> (-0.73%) ⬇️
src/nikonmn_int.cpp 61.46% <0.00%> (-0.44%) ⬇️
src/easyaccess.cpp 93.10% <0.00%> (-0.40%) ⬇️
src/tiffvisitor_int.cpp 79.38% <0.00%> (-0.36%) ⬇️
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@kmilos kmilos added enhancement feature / functionality enhancements imageHandler Anything related to specific ImageHandlers labels Oct 18, 2022
1div0
1div0 previously approved these changes Oct 18, 2022
Copy link
Collaborator

@1div0 1div0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@postscript-dev
Copy link
Collaborator

@kmilos
Is it worth updating README.md to reflect the new build option?

@kmilos
Copy link
Collaborator Author

kmilos commented Oct 19, 2022

@postscript-dev Good catch - will do at some point, and then you can comment on the changes.

The bigger stopper here is the Conan build problem, no ideas there...

1div0
1div0 previously approved these changes Oct 19, 2022
Copy link
Collaborator

@1div0 1div0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gr8.

src/bmffimage.cpp Outdated Show resolved Hide resolved
@mergify mergify bot dismissed 1div0’s stale review October 20, 2022 07:37

Pull request has been modified.

@kmilos
Copy link
Collaborator Author

kmilos commented Oct 20, 2022

@piponazo Do you have an idea about Conan problems? Is it related to case matching of files and variables? I saw Conan generates FindBrotli.cmake (no idea about its contents), while the working, hand-crafted one is FindBROTLI.cmake...

@kmilos kmilos requested a review from piponazo October 20, 2022 08:29
@kmilos kmilos force-pushed the jxl_brotli branch 4 times, most recently from 3b69da0 to 6c707b0 Compare October 21, 2022 12:03
piponazo
piponazo previously approved these changes Oct 21, 2022
Copy link
Collaborator

@piponazo piponazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a quick look to the changes from my tablet (I'm on vacations at the moment) and they look good.

cmake/FindBrotli.cmake Show resolved Hide resolved
cmake/findDependencies.cmake Outdated Show resolved Hide resolved
cmake/findDependencies.cmake Show resolved Hide resolved
cmake/findDependencies.cmake Outdated Show resolved Hide resolved
@piponazo
Copy link
Collaborator

@piponazo Do you have an idea about Conan problems? Is it related to case matching of files and variables? I saw Conan generates FindBrotli.cmake (no idea about its contents), while the working, hand-crafted one is FindBROTLI.cmake...

When I look at the checks from my tablet, I do not see any issues. Could you provide me a link to look at these issues?

What you describe is the normal behavior of Conan. The new Conan recipe that you are consuming will generate a FindBrotli.CMake in the build folder. In our CMake code we modify the CMAKE_PREFIX_PATH to include the CMake folder and the build in order to find such FindXXX.cmake files.

@kmilos
Copy link
Collaborator Author

kmilos commented Oct 21, 2022

Thanks @piponazo that was exactly it - I had to change the CMAKE_MODULE_PATH list order so the Conan modules are searched for first (if they exist), and make sure Conan's and the handcrafted module use the same letter case for variables.

All seems good now.

@mergify mergify bot dismissed piponazo’s stale review October 21, 2022 14:24

Pull request has been modified.

@kmilos
Copy link
Collaborator Author

kmilos commented Oct 21, 2022

Ok, now CIFuzz and CodeQL are failing because brotli is on by default and now required: can someone update the docker images to include "libbrotli-dev" as well please, I have no idea how...? @piponazo @kevinbackhouse

Edit: Ok, CodeQL was easy enough to handle...

@kevinbackhouse
Copy link
Collaborator

@kmilos: For CIFuzz, I think need to update this file:

https://github.com/google/oss-fuzz/blob/master/projects/exiv2/Dockerfile

Maybe we can change that to use ci/install_dependencies.sh so that it's less fragile in future.

@kmilos kmilos added the CI Issues related with CI jobs label Oct 21, 2022
@kmilos
Copy link
Collaborator Author

kmilos commented Oct 21, 2022

@kevinbackhouse Please go ahead, I'm running out of time/steam on this one...

src/bmffimage.cpp Outdated Show resolved Hide resolved
@kevinbackhouse
Copy link
Collaborator

@kmilos: google/oss-fuzz#8835

src/bmffimage.cpp Outdated Show resolved Hide resolved
DavidKorczynski pushed a commit to google/oss-fuzz that referenced this pull request Oct 21, 2022
Call exiv2's `install_dependencies.sh` script rather than using a
hard-coded list of packages. This should make the build less fragile
when we add new dependencies to exiv2. (Example:
Exiv2/exiv2#2381.)
@kmilos
Copy link
Collaborator Author

kmilos commented Oct 24, 2022

@kevinbackhouse I guess we have a chicken vs egg situation: the CIFuzz image still uses the install script from main, and not from this branch...

@kevinbackhouse
Copy link
Collaborator

@kmilos: No problem. We can merge without CIFuzz passing. Let me just check the latest changes before I approve.

@kmilos
Copy link
Collaborator Author

kmilos commented Oct 24, 2022

Thanks, merging then.

@kmilos kmilos merged commit 1ae3a83 into main Oct 24, 2022
@kmilos kmilos deleted the jxl_brotli branch October 24, 2022 11:14
onionpsy pushed a commit to CodeIntelligenceTesting/oss-fuzz that referenced this pull request Oct 26, 2022
Call exiv2's `install_dependencies.sh` script rather than using a
hard-coded list of packages. This should make the build less fragile
when we add new dependencies to exiv2. (Example:
Exiv2/exiv2#2381.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Issues related with CI jobs enhancement feature / functionality enhancements imageHandler Anything related to specific ImageHandlers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants