Commit Graph
89 Commits
Author SHA1 Message Date
Mike-Solar e5eeaddf2f format: reformatting files 2026-07-13 15:30:43 +08:00
Mike-Solar e52570c89f Add diagnostics and robust direction reading for OCIO LUT node
- Introduce ReadDirectionInput() helper that accepts both integer and
  string ('Forward'/'Inverse') representations of the direction combo.
- Log every processor creation with the raw direction value and the OCIO
  transform direction being used, along with whether it is main or worker.
- This helps determine why Forward/Inverse switching reportedly has no
  effect in the viewer/worker.

Tests still pass.
2026-07-13 10:19:30 +08:00
Mike-Solar f131abc5f7 Fix OCIOLutNode direction changes being ignored
EnsureProcessor() was returning early whenever a processor existed and
processor_dirty_ was false, without checking whether the file or direction
input had changed. As a result, switching Forward/Inverse in the main GUI
re-used the old processor and produced no visible difference.

Now EnsureProcessor() also compares the current inputs against the values
used to create last_processor_, so direction/file changes always trigger a
regeneration before the color transform job is emitted.
2026-07-13 10:19:30 +08:00
Mike-Solar ca22028a52 Defer OCIO LUT processor generation in render worker and fix stale graph snapshots
- Override OCIOLutNode::Value() to ensure the processor is created/updated
  before the color transform job is emitted.
- In the worker process, mark the processor dirty on input/config changes
  instead of creating it synchronously during LoadGraph, which blocked the
  main process waiting for the graph load acknowledgement.
- Keep eager processor generation in the main GUI process so the viewer
  cache is invalidated immediately when the LUT file or direction changes.
- Mark the ProjectCopier's internal render-proxy project as modified when
  its update queue is processed, and reset the flag after RenderWorkerPool
  writes a new graph snapshot. This fixes the worker loading a stale graph
  snapshot after switching cube files or direction, which caused the old
  LUT effect to persist.

All existing tests pass.
2026-07-13 10:19:30 +08:00
Mike-Solar a753d2f787 Always recreate LUT processor when input changes (debug)
Temporarily disable the last_path_/last_direction_ reuse check to rule
out stale processor reuse as the cause of LUT changes not appearing in
the viewer.
2026-07-13 10:19:30 +08:00
Mike-Solar 632ef5b495 Invalidate cache before cancelling tasks on LUT change
Reversing the order ensures that any render tasks that finish after the
cancel request will find the cache already invalidated, preventing stale
LUT-processed frames from being written back and shown in the viewer.
2026-07-13 10:19:30 +08:00
Mike-Solar fb50b5202e Do not block while cancelling video cache tasks on LUT change 2026-07-13 10:19:30 +08:00
Mike-Solar a4aaf10357 Use QApplication presence to detect main GUI process for LUT refresh
Checking applicationName was not reliable. The worker process uses
QGuiApplication while the main process uses QApplication, so use
qobject_cast<QApplication*> to determine whether it is safe to access
RenderManager/PreviewAutoCacher. This prevents the worker from crashing
when loading or switching LUT files.
2026-07-13 10:19:30 +08:00
Mike-Solar d83569c08e Fix worker crash when loading LUT node
The LUT processor generation was calling RenderManager::GetCacher()
during project load in the render worker, but the worker has no
RenderManager/PreviewAutoCacher. This caused a SEGV and made the main
process hang waiting for the worker. Only cancel/invalidate caches in
the main GUI process.
2026-07-13 10:19:30 +08:00
Mike-Solar 9185b6fd60 Auto-refresh viewer after LUT change without freezing
After synchronously generating the new LUT processor, cancel any
running background video cache jobs before invalidating the cache.
This prevents the preview autocacher from re-rendering the entire
timeline, which was causing the UI to freeze, while still updating
the current visible frame with the new LUT.
2026-07-13 10:19:30 +08:00
Mike-Solar d88341f9db Revert OCIO LUT processor generation to synchronous
Background generation caused the UI to freeze indefinitely when
switching LUT files, likely due to a deadlock between the worker
process, the preview autocacher, and the asynchronous set_processor
path. Synchronous generation is fast enough for typical 33^3 .cube
files and keeps the cache invalidation logic simple and safe.

The passthrough fix in OCIOBaseNode::Value() is retained so the
viewer shows the input frame while a processor is being created.
2026-07-13 10:19:30 +08:00
Mike-Solar 8636ee0dc6 Remove automatic full-cache invalidation on LUT processor change
InvalidateAll() on the OCIO LUT node caused the preview autocacher to
re-render the entire timeline, freezing the UI when switching LUT files.
Instead, let the new processor be used naturally on the next render
request (scrubbing/playback).
2026-07-13 10:19:30 +08:00
Mike-Solar 63a4008ce4 Avoid full cache invalidation in render worker after LUT processor is ready
InvalidateAll() on the OCIO LUT node triggered the worker's
PreviewAutoCacher to re-cache the entire timeline, causing the main
process to freeze while waiting for frames. Only invalidate in the
main GUI process so the viewer refreshes; the worker will naturally
use the new processor on its next render request.
2026-07-13 10:19:30 +08:00
Mike-Solar 800859b0ef Fix OCIO LUT async processor black screen and freeze
- Pass through input texture when the LUT processor is not ready yet,
  preventing black frames while the processor is being generated.
- Serialize processor generation with a single in-flight task to avoid
  concurrent OCIO lock contention that could freeze the UI.
- Invalidate cached frames after the async processor is set so the viewer
  refreshes automatically without requiring the playhead to be moved.
- Add OAK_DISABLE_HWACCEL environment variable to force software decoding.
- Add FFmpegDecoderHW regression test for H.264 4:2:2 10-bit decoding.
2026-07-13 10:19:30 +08:00
Mike-Solar 68c0477715 Add hardware decoding support 2026-07-13 10:19:30 +08:00
Mike-Solar 5b069b47fd Fix CI compatibility for LUT and decoder tests 2026-07-13 10:19:29 +08:00
Mike-Solar cac5a40b58 Implement color LUT v0.4 features 2026-06-07 00:24:08 +08:00
Mike-Solar bfb1b2fce4 update copyright back 2026-01-16 21:22:05 +08:00
Mike-Solar b8669f6a11 Change project name; 2026-01-05 16:22:26 +08:00
Mike Solar 6fdfd03ffd update: update copyright 2025-08-05 17:12:49 +08:00
Mike Solar 74f73ab3be change: change code style to Linux style except indent. 2025-08-03 03:09:40 +08:00
itsmattkc b88b738071 project: moved color manager outside of node graph 2023-02-28 15:20:05 -08:00
itsmattkc 71e8665fbf move item setting to a node flag 2023-02-19 21:30:49 -08:00
itsmattkc 9745b536f6 nodes: remove graph and merge into project 2023-02-17 14:13:03 -08:00
itsmattkc c0d8ff403f nodes: rework so that jobs can be completely deferred
Big optimization requiring a lot of refactoring.
2022-09-24 18:44:59 -07:00
itsmattkc 044551cca9 colormanager: reset default cs on config change 2022-09-16 11:54:35 -07:00
itsmattkc 1809d908cd ociobase: detect removal from parent too
Fixes crash when copying and pasting an OCIOBase node
2022-05-11 19:55:03 -07:00
itsmattkc 4b366a9b73 update copyright year to 2022 2022-05-10 10:38:56 -07:00
itsmattkc b88e15b8cf accleratedjob: simplified function calls 2022-05-09 15:16:46 -07:00
itsmattkc 58c4600d04 nodevalue: begin abstracting qvariant 2022-05-09 13:07:34 -07:00
itsmattkc 30c22690c1 code: minor cleanup 2022-05-08 11:56:57 -07:00
itsmattkc accdbe8dfb ociogradingtransformlinear: disable limits
Unfortunately I realized these will break if the input they are using are keyframed or connected in any way. At some point we may implement something to get around that, but currently there is nothing so they are temporarily disabled
2022-05-08 11:50:40 -07:00
itsmattkc 75a3275936 ociogradingtransformlinear: reorder sliders
Most people will probably want master controls, so it makes sense to have them first, particularly since we aren't using GradingRGBMs anymore
2022-05-08 11:49:49 -07:00
Thomas Wilshaw 31eeddeb08 Merge branch 'ocio_node' of https://github.com/ThomasWilshaw/olive into ocio_node 2022-05-07 23:40:57 +01:00
Thomas Wilshaw 471064df04 Ensure white clamp is always greater than black clamp 2022-05-07 23:40:25 +01:00
itsmattkc 8b0eca4396 Merge branch 'ocio_node' of https://github.com/ThomasWilshaw/olive into pr/1875 2022-05-07 15:38:22 -07:00
itsmattkc ab9114947d ociogradingtransformlinear: update for dynamic processor 2022-05-07 15:38:20 -07:00
Thomas Wilshaw 2ef4f9440b Set contrast to OCIO specified minimum 2022-05-07 22:30:15 +01:00
Thomas Wilshaw 6d84df8288 Add tooltip property to node parameters. 2022-05-07 21:47:52 +01:00
Thomas Wilshaw f46f8e50dc Swap clamp disables for enables 2022-05-07 21:26:34 +01:00
itsmattkc 0403ad8fce ociogradingtransformlinear: fix other potential merge conflict 2022-05-07 12:37:24 -07:00
itsmattkc ceffff3f82 ociogradingtransformlinear: fix potential merge conflict 2022-05-07 12:36:06 -07:00
itsmattkc 67516a5d45 ociogradingtransformlinear: add base for easier dragging 2022-05-07 12:34:42 -07:00
Thomas Wilshaw e4b7d33af1 Add new nodes to Video Effects list 2022-05-07 19:37:12 +01:00
Thomas Wilshaw d08c46aaab Add disable options for black and white clamp
Also sets sensible pivot default and add a config check around
GenerateProcessor
app/node/color/ociogradingtransformlinear/ociogradingtransformlinear.cpp
app/node/color/ociogradingtransformlinear/ociogradingtransformlinear.h
2022-05-07 19:33:47 +01:00
Thomas Wilshaw 7c23ad0b51 Set default input for the ociobase node 2022-05-06 18:51:35 +01:00
itsmattkc 0775143485 nodes: slightly improve descriptions 2022-05-05 17:30:54 -07:00
itsmattkc 6286b7091c sliders: implement color coding for clarity 2022-05-05 17:29:40 -07:00
itsmattkc 81e2628cbb Merge branch 'master' into pr/1875 2022-05-04 15:04:28 -07:00
itsmattkc d55d9c820f code: use macros for default node functions
Easier to maintain
2022-05-04 11:01:17 -07:00