3315 Commits
Author SHA1 Message Date
Jonathan Thomas 118fc2dc15 Merge pull request #1065 from OpenShot/benchmark-fps-metric
Improved Benchmarking + new optimizations
2026-05-02 23:33:23 -05:00
Jonathan Thomas fc897ec522 Add Beat Sync audio-reactive flash effect
-Generates a full-frame color layer from low/high colors, shaped by audio energy and a response curve, for beat-synced compositing.
- Really useful effect for generating, shaping, and outputting a flashing white or black image (to be composited into another clip)
2026-05-02 23:20:08 -05:00
Jonathan Thomas d986d6e99b Improving performance on blur and sharpen effect by reducing unnecessary computations. 2026-05-02 16:32:24 -05:00
Jonathan Thomas ab93363747 Improved performance on FrameScope class, basically doubling performance
- Inline fast-path bin indices for alpha=255 pixels: raw byte value == rounded bin, no float needed
- Replaced byte_bin() (std::round + clamp) with (int)(val * 255.0f + 0.5f)
- Pre-computed waveform_offset_map[] to eliminate a multiply per pixel in inner loop
- Pointer increment instead of row + x * 4 per pixel
- int64_t pixel_count instead of double pixel_total
- Result: 49 → 89 FPS (~1.8x), all unit tests pass
2026-05-02 14:43:51 -05:00
Jonathan Thomas 561a233327 Adding more classes/effects to openshot-benchmark, and still using our new FPS metric, processing 120 frames at 720p/24fps source.
- Effect_Blur (Gaussian: radius=4, sigma=3.0, 3 iterations)
- Effect_Sharpen (amount=1.0, radius=3.0, threshold=0.1)
- Effect_Hue (shift=0.25)
- Effect_Negate
- Effect_Pixelate (5% pixelization, full frame)
- Effect_Wave (wavelength=0.5, amplitude=3.0, multiplier=0.5, speed_y=2.0)
- Effect_Caption (WEBVTT captions, skipped when QT_QPA_PLATFORM=offscreen)
- Effect_Displace (front3.png map, strength=0.5, H/V=10%)
- FrameScope (waveform_columns=256, vectorscope_size=128, individual getters matching openshot-qt playback path)
2026-05-02 14:13:47 -05:00
Jonathan Thomas 0be564dbdb Improved the performance of the "Color Grade" effect by around 8 FPS (small but meaningful optimization)
- Replaced std::round() with +0.5f cast in clampByte — equivalent for non-negative values, significantly cheaper
- Removed redundant clamp01() inside sample_curve_lut — inputs are already clamped at all call sites
- Added early exit when all parameters are at default values — skips the pixel loop entirely for no-op frames
- Marked clamp01, clampByte, and smooth_midtones as inline — makes inlining intent explicit for the hot-path helpers
2026-05-02 13:21:59 -05:00
Jonathan Thomas cb7c8c1f93 Merge branch 'develop' into benchmark-fps-metric
# Conflicts:
#	tests/Benchmark.cpp
2026-05-01 23:39:32 -05:00
Jonathan Thomas f872efc0fa Merge pull request #1064 from OpenShot/audio-visualizations
New, Modern Audio Visualizations Effect
2026-05-01 23:33:52 -05:00
Jonathan Thomas 515fe7b196 Fixing 5 Codacy nitpicks in the audio-visualization branch 2026-05-01 23:27:31 -05:00
Jonathan Thomas cfd9b76cdc Merge branch 'develop' into audio-visualizations 2026-05-01 23:15:43 -05:00
Jonathan Thomas 055ae4579a Merge pull request #1063 from OpenShot/film-grain
Film Grain effect
2026-05-01 23:14:14 -05:00
Jonathan Thomas bec9f4b080 Merge branch 'develop' into film-grain 2026-05-01 22:59:52 -05:00
Jonathan Thomas c2dee773bb Merge pull request #1062 from OpenShot/color-grade
Color Grade effect (Color Correction, Scopes, Grading)
2026-05-01 22:56:00 -05:00
Jonathan Thomas f7c77d4b11 Merge branch 'audio-visualizations' into benchmark-fps-metric 2026-05-01 19:45:10 -05:00
Jonathan Thomas 91f4684a1e Merge branch 'film-grain' into benchmark-fps-metric 2026-05-01 19:44:59 -05:00
Jonathan Thomas 3b765ae5c1 Optimize FilmGrain hot path — ~6× fewer hash calls per pixel
- Cache y-pre-lerped bilinear columns for soft and clump noise, refreshing only when the x-cell index changes (~every 7 px for soft, ~every 9 px for clump at defaults). Fine grain hash is similarly cached per cell. This cuts amortized hash_coords + mix32 calls from ~56 to ~9 per pixel in the fully-featured case.
- hoist all y-dependent values out of the x-loop; replace std::round in clampByte; extract salt magic numbers to named constants; move alpha_percent to the write-back branch where it's actually needed; collapse the color-apply branch to use_color_variation directly.
2026-05-01 19:44:40 -05:00
Jonathan Thomas 3bb5f9f07e Improving performance on filled waveforms, to use a different image format: Format_ARGB32_Premultiplied, and a simplified glow rendering. Much faster on both Qt5 and Qt6. 2026-05-01 19:03:22 -05:00
Jonathan Thomas 3ebd6aab12 Merge branch 'audio-visualizations' into benchmark-fps-metric 2026-05-01 17:53:51 -05:00
Jonathan Thomas 2dd3de9919 Improve phase scope rainbow rendering and performance
- Render phase scope rainbow colors against the trace bounds instead of the full canvas so centered scopes show a full color range at normal intensity.
- Replace the expensive antialiased QPainterPath rendering path with a reserved polyline, lower the max trace detail, and use cheaper pen joins for faster painting.
2026-05-01 17:53:40 -05:00
Jonathan ThomasandClaude Sonnet 4.6 b12379ce8a Redesign benchmark: FPS metric, stable median-of-3, mid-video seek, new effects
- Replace raw milliseconds output with FPS (frames / elapsed_seconds) as the
  primary metric, reported in a markdown table with a sqrt-scaled bar chart
- Run each trial 3 times and report the median, discarding the cold-cache first
  run as a natural outlier for stable, repeatable results across invocations
- Seek to frame 241 (10s into the 24fps source) before timing begins, including
  seek cost in the measurement — mirrors real OpenShot scrubbing behavior
- Use 120 frames per trial (up from mixed 30/60) for more stable FPS readings
- Timeline tests now render at 1280x720 @ 29.97fps (was 1920x1080 @ 24fps),
  matching source resolution so all tests are roughly comparable
- FrameMapper reduced to a single 30000/1001 rate (was 5 rates sharing a cache)
- Add Effect_ColorGrade, Effect_FilmGrain, Effect_Shadow, Effect_Glow trials
- Remove combined AudioVisualization aggregate trials (redundant with per-mode rows)
- Remove Effect_AudioVisualization_VUMeter and _Bars (too fast to be informative)
- Guard all effect includes and trials with __has_include so the benchmark
  compiles and runs against older libopenshot builds, silently skipping effects
  that did not exist yet
- Suppress FFmpeg/codec log output via av_log_set_level(AV_LOG_QUIET)
- Add TTY-only spinner with per-trial run counter (e.g. [2/3]) during execution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 16:31:54 -05:00
Jonathan Thomas fec6e901ed Preserve audio-only reader dimensions on pasted clips
-Set the parent timeline before hydrating clips inserted through JSON diffs, matching full project JSON load behavior. This lets copied/pasted clips expose timeline context while their nested readers are rebuilt.
-Avoid clobbering valid stored dimensions for audio-only FFmpeg readers with the 720x480 fallback. The fallback is now only used when width or height are missing, while parent timeline preview dimensions can still override when available.
-Add regression coverage for audio-only FFmpegReader JSON hydration and timeline JSON-diff insertion preserving 1280x720 dimensions.
2026-04-30 23:45:14 -05:00
Jonathan Thomas aea12d2d32 Improve audio visualization styles, opacity, waveform, and rainbow color
- Fix Neon/Soft/Clean fill alphas — were far too low, colors appeared nearly invisible on dark backgrounds
- Fix Neon glow on waveform — double-reduced alpha and too-narrow spread made it invisible
- Fix Rainbow mode on waveform/filled waveform — now sweeps hue horizontally via QLinearGradient, no per-segment loop
- Line waveform now follows true ±signal instead of magnitude envelope; remove unused bottom_edge
- Remove Retro style — too visually similar to Clean to justify
- Minimal style is now fully opaque (fill alpha 1.0)
- Clip waveform shortcut defaults to Minimal style + Filled Waveform
2026-04-30 23:37:16 -05:00
Jonathan Thomas 9ef70177f2 Improving performance of audio visualization modes. Redesigning waveform and filled waveform to be more CPU efficient. Adding audio visualizations to our benchmark tool. 2026-04-30 16:05:28 -05:00
Jonathan Thomas dd18401242 Merge branch 'film-grain' into audio-visualizations
# Conflicts:
#	tests/CMakeLists.txt
2026-04-29 21:51:08 -05:00
Jonathan Thomas 337e0d3c43 Merge branch 'develop' into film-grain
# Conflicts:
#	src/CMakeLists.txt
#	src/EffectInfo.cpp
#	src/Effects.h
#	tests/CMakeLists.txt
2026-04-29 13:14:30 -05:00