Skip to content

[AI] Move segmentation from src/ai to src/common/ai for consistency#20542

Merged
TurboGit merged 1 commit intodarktable-org:masterfrom
andriiryzhkov:seg
Mar 16, 2026
Merged

[AI] Move segmentation from src/ai to src/common/ai for consistency#20542
TurboGit merged 1 commit intodarktable-org:masterfrom
andriiryzhkov:seg

Conversation

@andriiryzhkov
Copy link
Copy Markdown
Collaborator

This is just a refactoring, no new functionality introduced.

Rationale

Establishes a clean separation between the two AI layers:

  • src/ai/ - pure ONNX Runtime backend (backend.h, backend_common.c, backend_onnx.c). Self-contained, no darktable core dependencies. Builds as darktable_ai static library.
  • src/common/ai/ - higher-level AI modules that bridge the AI backend with darktable core. Compiled conditionally (USE_AI=ON) as part of the main lib_darktable target.

This ensures that any AI module in src/common/ai/ can freely use darktable core APIs without introducing cross-library link dependencies - which would break the Windows build where the linker is stricter about unresolved symbols in static libraries.

Aligns with the same refactoring done for restore.c in PR #20523, moving all non-backend AI code to src/common/ai/ for consistency and maintainability.

@andriiryzhkov andriiryzhkov changed the title Move segmentation from src/ai to src/common/ai for consistency [AI] Move segmentation from src/ai to src/common/ai for consistency Mar 16, 2026
Copy link
Copy Markdown
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

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

Thanks!

@TurboGit TurboGit merged commit 27d40cd into darktable-org:master Mar 16, 2026
5 checks passed
@TurboGit TurboGit added this to the 5.6 milestone Mar 16, 2026
@TurboGit TurboGit added priority: high core features are broken and not usable at all, software crashes scope: codebase making darktable source code easier to manage labels Mar 16, 2026
@andriiryzhkov andriiryzhkov deleted the seg branch April 3, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: high core features are broken and not usable at all, software crashes scope: codebase making darktable source code easier to manage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants