Upgrade nvimgcodec to 0.9.0#6426
Conversation
Signed-off-by: Joaquin Anton Guirao <janton@nvidia.com>
- cmake: prefer local third_party/nvimgcodec/include over FetchContent download, falling back to download if the local header is absent - third_party/nvimgcodec/include: bundle nvimgcodec 0.9.0 headers (nvimgcodec.h + nvimgcodec_version.h) so builds compile against the matching ABI for the runtime library this branch targets Signed-off-by: Joaquin Anton Guirao <janton@nvidia.com>
nvImageCodec 0.9.0 fixes the contract bug where the decoder validated the ROI against raw codestream dimensions while interpreting it in post-EXIF-orientation coordinates. With the bug fixed upstream, DALI can pass ROIs in display coordinates directly and let the decoder apply the EXIF orientation in one step. This drops: - ImageDecoder::roi_orient_war_ flag (always false now that the minimum required version is 0.9.0) - SampleState::post_decode_orientation (only set by the workaround) - ImageDecoder::OutputToRawROI() helper (only used by the workaround) - The decode_shape height/width swap in PrepareOutput for 90/270 rotation (only needed because the decoder produced raw-orientation output) - The post_decode_orient term in the need_processing predicate - The roi_orient_war_-gated branches in setup_block ConvertCPU/ConvertGPU now receive a default-constructed orientation (a no-op) from this code path; their orientation API stays unchanged for any other callers and the rotation/flip tests in convert_test.cc keep exercising it. Signed-off-by: Joaquin Anton Guirao <janton@nvidia.com>
|
| Filename | Overview |
|---|---|
| cmake/Dependencies.common.cmake | Version bounds, FetchContent URL/hash, and ExternalProject GIT_TAG all updated to 0.9.0; one bare message() without STATUS prefix is a leftover debug print. |
| dali/operators/imgcodec/image_decoder.h | ROI/orientation workaround removed cleanly; apply_exif_orientation now unconditionally reflects use_orientation_; no residual branching on roi_orient_war_ remains. |
| dali/operators/imgcodec/util/convert_test.cc | Comment updated to remove the reference to the now-deleted WAR; no logic changes. |
| conda/dali_native_libs/recipe/meta.yaml | All four libnvimgcodec* version pins updated from >=0.8.0,<0.9.0 to >=0.9.0,<0.10.0 consistently. |
| conda/dali_python_bindings/recipe/meta.yaml | All four libnvimgcodec* version pins updated from >=0.8.0,<0.9.0 to >=0.9.0,<0.10.0 consistently. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[BUILD_NVIMAGECODEC] --> B{WITH_DYNAMIC_NVIMGCODEC?}
B -- Yes --> C{find_package nvimgcodec 0.9.0..0.10.0}
C -- Found --> D[Use system headers]
C -- Not Found --> E{CUDA_VERSION_MAJOR?}
E -- 13 --> F[FetchContent cuda13 tarball 0.9.0.20]
E -- 12 --> G[FetchContent cuda12 tarball 0.9.0.20]
E -- Other --> H[FATAL_ERROR]
F --> I[include_dirs source_dir/include]
G --> I
B -- No --> J[ExternalProject_Add GIT_TAG v0.9.0]
J --> K[Static link nvimgcodec 0.9.0]
D --> L[Dynamic load nvimgcodec >= 0.9.0 < 0.10.0]
I --> L
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[BUILD_NVIMAGECODEC] --> B{WITH_DYNAMIC_NVIMGCODEC?}
B -- Yes --> C{find_package nvimgcodec 0.9.0..0.10.0}
C -- Found --> D[Use system headers]
C -- Not Found --> E{CUDA_VERSION_MAJOR?}
E -- 13 --> F[FetchContent cuda13 tarball 0.9.0.20]
E -- 12 --> G[FetchContent cuda12 tarball 0.9.0.20]
E -- Other --> H[FATAL_ERROR]
F --> I[include_dirs source_dir/include]
G --> I
B -- No --> J[ExternalProject_Add GIT_TAG v0.9.0]
J --> K[Static link nvimgcodec 0.9.0]
D --> L[Dynamic load nvimgcodec >= 0.9.0 < 0.10.0]
I --> L
Reviews (3): Last reviewed commit: "Use upstream nvimgcodec." | Re-trigger Greptile
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
|
CI MESSAGE: [58774048]: BUILD STARTED |
|
@greptileai Please review again |
|
CI MESSAGE: [58785890]: BUILD STARTED |
|
CI MESSAGE: [58785874]: BUILD STARTED |
|
CI MESSAGE: [58774048]: BUILD PASSED |
|
CI MESSAGE: [58785890]: BUILD PASSED |
|
CI MESSAGE: [58785874]: BUILD PASSED |
|
CI MESSAGE: [58896425]: BUILD STARTED |
| URL https://developer.download.nvidia.com/compute/nvimgcodec/redist/nvimgcodec/linux-x86_64/nvimgcodec-linux-x86_64-0.8.0.22-archive.tar.xz | ||
| URL_HASH SHA512=2a400f75c619a10c3dbcd298a83ef3307f6e08453b2cfb5040f6b22c64c7be0ac4552a2a80ed057afe7657cf0bb8cc2d54cdccf8bc50ffdf34cfd05b45082978 | ||
| ) | ||
| if ("${CUDA_VERSION_MAJOR}" EQUAL "13") |
There was a problem hiding this comment.
Now there are separate archives for CUDA 12 and 13.
|
CI MESSAGE: [58896425]: BUILD PASSED |
Category:
Other (e.g. Documentation, Tests, Configuration)
Description:
This PR updates the nvimgcodec dependency to version 0.9 and removes the workarounds needed for 0.8.
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: DALI-4811