Commit Graph
321 Commits
Author SHA1 Message Date
Mike-Solar a7ddc0f114 audio: master-clock playback timing, output clock compensation, buffer config, interpolated speed
- playback timer uses the audio output device as its master clock: the
  PortAudio callback counts consumed frames (including underrun
  zero-fill) so video cannot drift away from what is heard; wall clock
  remains as fallback when no clocked output is running
- output clock compensates for device output latency; new Preferences >
  Audio buffer size setting (0 = auto)
- SampleBuffer::speed() now uses linear interpolation instead of
  nearest-neighbor sampling
- regression tests: audio-clock driven timer (fwd/rev/speed), wall
  clock fallback, interpolation correctness
2026-07-19 21:44:34 +08:00
Mike-Solar bb40b4923e style: unify identifier naming per updated conventions
Automated with clang-tidy readability-identifier-naming (config added to
.clang-tidy) plus scripted passes, per the updated rules now documented
in CONTRIBUTING.md:

- types (class/struct/enum/alias/template params): PascalCase
- functions, variables, members: snake_case (incl. rational -> Rational)
- private/protected members: trailing underscore; static member
  variables likewise (instance_, available_themes_)
- constants and enum values: snake_case (kLinear -> k_linear,
  F32P -> f32p); ALL_CAPS reserved for macros
- macros: OAK_ prefix (OLIVE_ADD_TEST/OLIVE_ASSERT/OLIVE_CONFIG ->
  OAK_ADD_TEST/OAK_ASSERT/OAK_CONFIG, GL_PREAMBLE -> OAK_GL_PREAMBLE,
  include guards -> OAK_*)
- file names: all lowercase (Current/Plugin/OliveHost/OliveClip/
  OlivePluginInstance -> current/plugin/olivehost/oliveclip/
  oliveplugininstance)
- getters share the member name sans underscore, setters set_foo()
- Qt and third-party (OpenFX) virtual overrides and framework callbacks
  keep their original names (exempt in .clang-tidy)

Manual follow-ups required where automation could not reach:
- string-based QMetaObject/SIGNAL/SLOT references updated to renamed
  methods (AddTask, CreatedFile, DeleteSpecificFile, moveSelectionUp, ...)
- macro bodies referencing renamed methods (OLIVE_CONFIG,
  NODE_DEFAULT_DESTRUCTOR, MANAGEDDISPLAYWIDGET_*)
- self-shadowing locals renamed where signals/methods became same-named
  (size_changed, worker_count, selected_items, import param, filters)
- third_party OFX member/namespace usages restored (OFX::Host::*,
  _created, _clipPrefsDirty, createInstance, clearPersistentMessage)
- STL protocol aliases restored (const_iterator) with .clang-tidy
  ignore rules; qHash overloads restored

Full build and test suite pass: ctest 4/4, ~1960 gtest cases green.
2026-07-19 16:10:54 +08:00
Mike-Solar 016341ea7c fix: honor DirectoryIsValid create flag; unbreak Windows CI tests
DirectoryIsValid() ignored try_to_create_if_not_exists and always
called mkpath(). On the Windows CI runner (which may create dirs at
the drive root) PathWidget validation both created bogus directories
and never flagged invalid paths; on Linux the mkpath just failed.

- filefunctions: only mkpath when try_to_create_if_not_exists is set
- TaskProjectLoadTest: Project::set_filename() stores native
  separators on Windows, normalize before comparing paths
- DialogProjectProperties: use a nonexistent file inside a temp dir
  instead of a fixed /definitely/... path that prior tests may have
  partially created on a writable drive
2026-07-17 20:35:25 +08:00
Mike-Solar dd7427f51a fix: bugs surfaced by new gtest coverage
- html.cpp: rgba() colors parsed with setRedF/GreenF/BlueF (0-1) while the
  writer emits 0-255 integers, so semi-transparent text colors lost their
  RGB on round-trip; parse with integer setters instead
- CLIProgressDialog: percentage padding compared normalized progress
  (0.0-1.0) against 10/100, so padding was always fully applied; compute
  the percentage first
- TimelineUndoPointer BlockTrimCommand: remove_block_from_graph_ was
  never initialized (UB on redo)
- TimelineUndoGeneral TransitionRemoveCommand: track_ was never
  initialized; GetRelevantProject() could dereference it before redo()
- ProjectLoadTask::Run(): failure path deleted project_ without
  resetting it, leaving GetLoadedProject() dangling
2026-07-17 13:07:43 +08:00
Mike-Solar 3a3ead6fc0 app: route all FFmpeg access through the ffmpeg_bridge C API
Replace every direct FFmpeg call in the editor and the render worker
with the pure C ffmpeg_bridge API, wrapped in thin C++ adapters that
preserve the original interfaces:

- avframeptr.h: olive::AVFrame adapter around FBFrame handles
- ffmpegutils: format conversion helpers on FB_* constants; the int
  overload is renamed GetCompatibleBridgePixelFormat to avoid a silent
  overload-resolution trap with the PixelFormat enum
- ffmpegdecoder/ffmpegencoder: rewritten as handle-based adapters over
  FBDecoder/FBProbe/FBEncoder/FBScaler/FBResampler
- audioprocessor: FBAudioGraph push/pull adapter
- pluginrenderer/OliveClip: sws/pixdesc usage converted to FBScaler and
  fb_pix_fmt_* queries
- AudioParams/channel layouts are plain uint64_t masks everywhere

Build integration: the root project no longer links FFMPEG directly;
only ffmpeg_bridge does. Binaries resolve the bridge library at runtime
via @loader_path inside the macOS app bundle (copied there post-build)
and via $ORIGIN/../ffmpeg_bridge/bin on Linux; on Windows the DLL is
installed next to the executables, so packages on all three platforms
ship the bridge library.

ffmpeg_bridge gains the extra API the adapters need:
fb_frame_make_writable, fb_decoder_get_format_duration,
fb_resampler_convert_frame, FB_PIX_FMT_YUV440P, SRT validation in
fb_probe_read_subtitle_stream, packed/planar fixes in
fb_encoder_write_audio, and a component-size fix in
fb_pix_fmt_component_size.
2026-07-15 23:00:06 +08:00
Mike-Solar e5eeaddf2f format: reformatting files 2026-07-13 15:30:43 +08:00
Mike-Solar 51ea3ca24e Use 10-bit packed preview format and add OCIO LUT regression tests
Renderer / preview:
- Switch the preview/display readback format from F16 to packed
  10-bit RGBA (PixelFormat::U10) to halve GPU->CPU/IPC bandwidth
  while keeping 10-bit panel precision.
- Add U10 support to VideoParams, FFmpeg/OIIO/OCIO utility mappings,
  OpenGL (GL_RGB10_A2), Vulkan (VK_FORMAT_A2B10G10R10_UNORM_PACK32),
  and plugin bit-depth lookups.
- Update preview autocacher comment to reflect the new behavior.

OCIO LUT tests:
- Add four E2E-style ColorLutNode gtests that drive a SolidGenerator
  -> OCIOLutNode graph through NodeTraverser and compare resulting
  pixels on the CPU. They cover forward/inverse transforms and verify
  that switching LUT direction and LUT file updates both the processor
  and the output pixels.

Cleanup:
- Remove a leftover SolidGenerator::Value debug fprintf.
- Capture render worker stderr in RenderWorkerFootageTest for better
  diagnostics.
2026-07-13 10:19:30 +08:00
Mike-Solar 225f8505c2 feat(render): dynamic OpenGL/Vulkan backend split and backend-neutral viewer
- Extract libolive-rendercore static library to minimize backend link boundary.
- Add DynamicRenderer adapter with C ABI (oakgl/oakvulkan shared libs).
- Make OAK_ENABLE_DYNAMIC_RENDER_BACKEND default ON with OpenGL fallback.
- Implement VulkanRenderer prototype (textures, shaders, UBO blit, readback).
- Add backend-neutral viewer readback path (offscreen -> QImage -> QPainter).
- Refactor PluginRenderer to be renderer-agnostic; OFX plugins fall back to CPU
  path on non-OpenGL backends while preserving OpenGL render path.
- Add Renderer::AttachOutputTexture/DetachOutputTexture and C ABI forwards.
- Update docs/zh/render-backend-dynamic-plan.md for Phase 3/4/5.
2026-07-13 10:19:29 +08:00
Mike-Solar a2af4b5bf6 fix ci 2026-06-03 14:52:32 +08:00
Mike-Solar 599c876d03 全链路强制F32 2026-05-14 01:51:14 +08:00
Mike-Solar bfb1b2fce4 update copyright back 2026-01-16 21:22:05 +08:00
Mike-Solar e37972b227 Try to fix plugin issue 2026-01-05 21:31:35 +08:00
Mike-Solar b8669f6a11 Change project name; 2026-01-05 16:22:26 +08:00
Mike Solar 27ee6067cc Merge remote-tracking branch 'origin/plugin' into plugin
# Conflicts:
#	ext/KDDockWidgets
2025-12-13 21:46:12 +08:00
Mike Solar 22fd521951 Merge branch 'refs/heads/dev' into plugin
# Conflicts:
#	.gitmodules
#	CMakeLists.txt
#	ext/core
2025-12-13 21:45:46 +08:00
Mike-Solar 1e33a31b73 Update FFmpeg handling and focus management
Refactor FFmpeg frame processing and improve focus management in panels. Add memory sanitization for debug builds and update KDDockWidgets integration.
2025-11-23 16:35:09 +08:00
Mike-Solar 8a7b6cf869 Add OFX plugin support and related infrastructure
This commit extends the OFX plugin support in Olive by:

- Initializing and scanning for OFX plugins
- Updating PluginNode to handle OFX plugin parameters and inputs
- Adding necessary methods and properties for OFX plugin integration
- Enhancing NodeFactory to include OFX plugin nodes
- Refactoring and renaming OliveInstance to OlivePluginInstance
- Introducing new classes for parameter handling (ParamInstance)
- Adding PluginJob for rendering OFX plugins
- Adjusting CMakeLists.txt files to include new source files
2025-11-09 17:03:56 +08:00
Mike-Solar 26e6924cdf feat: Implement OFX plugin support infrastructure
This commit adds comprehensive support for OFX plugins in Olive, including:

- Add plugin node infrastructure with getPlugin() method
- Implement OliveHost for managing OFX plugin instances
- Create OliveInstance to handle plugin parameter and timeline interactions
- Add OliveClip implementation for plugin clip handling
- Implement region of definition (RoD) and region of interest (RoI) functionality
- Add interactive mode support in Current class
- Integrate plugin rendering into RenderProcessor
- Fix include dependencies and remove unused OlivePlugin.cpp reference
2025-10-25 17:59:50 +08:00
Mike-Solar c71b20bb95 add: add 3 functions. Provide the way to get current audio and video params. 2025-09-14 20:43:56 +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
Simran Spiller a850d5e113 Remove trailing semicolon from Q_DECLARE_METATYPE(...);
Fixes -Wpedantic errors
2023-09-11 12:00:17 +02:00
itsmattkc b88b738071 project: moved color manager outside of node graph 2023-02-28 15:20:05 -08:00
itsmattkc 46d15396a6 Merge branch 'track-redux' into move-serialization 2023-02-23 11:09:45 -08:00
itsmattkc 52021a8694 curveview/decibel: return -200 rather than infinity
While technically less correct, it's mathematically essentially the same and saves a lot of programming headaches.

Fixes #2133
2023-02-21 23:04:31 -08:00
itsmattkc 028651f9fb moved serialization 2023-02-21 14:26:34 -08:00
itsmattkc 11e4e051c3 move undo files around for better organization 2023-02-20 16:09:22 -08:00
itsmattkc c1c6893713 various: moved more to core lib 2023-01-19 16:01:31 -08:00
itsmattkc dd9c52ab59 start moving core frameworks to external libraries 2023-01-19 09:51:47 -08:00
itsmattkc b99d1e5797 debug: remove function and line
Generally we know where our own debug lines are coming from and it ends up causing a really long debug string.
2022-12-08 11:25:31 -08:00
itsmattkc 6b6f164c44 ffmpeg: refactor so swscale is an optional step before glsl 2022-11-16 17:00:45 -08:00
itsmattkc 87d9afb7e1 ffmpeg: use array rather than vector
Should be faster
2022-11-16 14:08:45 -08:00
itsmattkc 49ad3a1e34 timecode: fix issue converting seconds to timecode and vice versa
Fixes #2091
2022-11-05 13:45:21 -07:00
itsmattkc ce650085a3 text: use fontFamilies() instead of fontFamily() 2022-10-29 09:46:22 -07:00
itsmattkc 4d80044d6d upgrade to qt 6 compliance 2022-10-28 19:42:14 -07:00
itsmattkc 149b1b3690 audiowaveformcache: improve passthrough system 2022-09-27 21:17:37 -07:00
itsmattkc 7fea14768a timerange: use internal snapping function for size function 2022-09-17 21:19:15 -07:00
itsmattkc 571be3d28d timeline: added thumbnail modes that affect how much is rendered 2022-09-06 16:06:26 -07:00
itsmattkc bc9f8c2e3b Merge branch 'master' into cache-update 2022-08-27 10:54:20 -07:00
itsmattkc 3dfaf807af viewertexteditor: rearranged toolbar, added valign buttons 2022-08-24 14:14:50 -07:00
itsmattkc 083a32eb2e html: write block format 2022-08-24 12:20:50 -07:00
itsmattkc 54d0a94a20 Merge branch 'master' into cache-update 2022-08-18 08:12:46 -07:00
itsmattkc 409f24be39 exportdialog: allow restoring parameters 2022-08-10 11:49:21 -07:00
itsmattkc 1ac205413c footage: allow overriding YCbCr range
Fixes #1354
2022-08-08 12:49:50 -07:00
itsmattkc ad1b8a5a35 ffmpegdecoder: use real colorspace coefficients in shader 2022-08-07 23:40:21 -07:00
itsmattkc 73fa930f02 ffmpegencoder: use avfilter instead of swscale for pixel format conversions 2022-08-07 14:00:12 -07:00
itsmattkc 21d6aef0ca qtutils: rename QMessageBox wrapper to avoid conflicts on win32 2022-07-23 09:40:03 -07:00
itsmattkc a3cde5bd44 qtutils: implement parent finder 2022-07-22 17:33:31 -07:00
itsmattkc d262b5c802 qtutils: fixed issues with word wrap
Fixes issue that triggers infinite loop in some circumstances.

Fixes #1947 probably
2022-07-16 20:17:49 -07:00
itsmattkc a8d46c4c5f render: fix issue responding to cancelled tasks 2022-07-10 12:54:55 -07:00