-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Align opencv image codec option default values to upstream defaults #24814
Align opencv image codec option default values to upstream defaults #24814
Conversation
The OpenCV projects sets the default of this value to true, there is no reason to change this. If anything, not enabling this by default can lead to unexpected fails at runtime which can be hard to debug.
This comment has been minimized.
This comment has been minimized.
Should probably enable the other imgcodecs as well if they are enabled by default in OpenCV (I have not checked). |
I thought about that, too. Here is a quickly compiled overview (didn't double check it, take with care).
My suggestion is to update
and leave the other options alone. |
Indeed, these 2 options are enabled by default in CMakeLists of OpenCV, BUT in cmake/OpenCVFindLibsGrfmt.cmake, there is a logic where openjpeg has precedence over jasper when both options are enabled (jasper branch is disabled when openjpeg is found). What should be done: default value of with_jpeg2000: openjpeg |
And yes regarding all these with_imgcodec options, I don't see any reason to not change their default value to True. There default values in conanfile come from #6802 |
@SpaceIm please have a look again. |
This comment has been minimized.
This comment has been minimized.
Thanks @pasbi for noticing - indeed if these have no additional dependencies and they are enabled by default, perhaps the original PR that introduced the options was too conservative by setting them to Running this on CI. I appreciate everyone's help on the matter and the detail discussion - however please consider that suggesting additional changes unrelated to the issue to fix does make reviewing more difficult for us which can cause delays. The description says "Changing the default value for option with_imgcodec_pfm from False to True.", and seeing the changeset, it goes beyond that in ways that requires us to validate and understand the reasoning further. Anything related to the handling of jpeg2000 is unrelated to the original issue - and can delay reviewing. |
Co-authored-by: Martin Valgur <martin.valgur@gmail.com>
@jcar87 thanks for answering. My intention was just to update the default of Merging this PR is not urgent for me, so I'm fine. |
Thanks for updating the title! But it becomes more difficult when we review the "files changed" tab - and there are changes that touch other options not mentioned in the description, and also changes the default value for a dependency depending on the version (which we need to validate separately). They are valid changes by all means - but given the high volume of requests and the size of the backlog - those changes become secondary to the issue you have reported and the jpeg changes, altogether unrelated. Not your fault at all - we are trying to go through the backlog while at the same time we also need support from the community to ensure the PR descriptions have all the context needed for us for a quick review. |
Conan v1 pipeline ✔️All green in build 4 (
Conan v2 pipeline ✔️
All green in build 4 (
|
Hooks produced the following warnings for commit 8e6566copencv/4.5.5@#2d1655f8fc10bb3b9b0b7dd9d24bcb3c
opencv/4.9.0@#3593ca7d1cdd0d449dfb9e5898f05a68
opencv/4.10.0@#2e6d30371a742880ea9167a012697646
opencv/4.8.1@#206beb6aefe57048135a68cd92e40ee8
opencv/4.1.2@#b3ea5a040ac87445ec6b445c8c7c00e9
opencv/4.5.3@#e904666fbbb4a065bb741e53cbaa1484
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Unfortunately this PR breaks building OpenCV on iOS completely, because option with_jpeg2000 is accessed unconditionally on line 1218, but is deleted when the target is iOS, which this crashes in verify(). I will open a PR to address this shortly. |
Thanks @mologie - we will be more careful in the future, should have followed the gut instinct of just solving the problem that was reported, rather than additional things that had nothing to do with it :( |
No worries, thanks for helping out with Conan either way, was a quick fix after all o/ Our CI at @authenticvision happens to catch iOS-specific bugs in Conan recipes all the time since there unfortunately is no official CI that builds for mobile systems, which makes these bugs quite hard to spot during review. |
The OpenCV projects sets the default of this value to true, there is no reason to change this. If anything, not enabling this by default can lead to unexpected fails at runtime which can be hard to debug.
Summary
Changes to recipe: lib/opencv
Motivation
The OpenCV projects sets the default of this value to true, there is no reason to change this.
If anything, not enabling this by default can lead to unexpected fails at runtime which can be hard to debug.
See #24813.
Details
Changing the default value for option
with_imgcodec_pfm
fromFalse
toTrue
.