493 Commits

Author SHA1 Message Date
Jonathan Thomas
2a82bed607 Adding upscaling for crop effect + resize property - so cropping into higher resolution content does not become blurry. 2025-12-15 23:34:48 -06:00
Jonathan Thomas
bd59e6bb37 Fix mixing licensing headers 2025-12-15 21:13:34 -06:00
Jonathan Thomas
1f06f03e9c Adding unit tests for image magic durations 2025-12-10 18:38:07 -06:00
Jonathan Thomas
94fab00048 Updating video_length and duration calculations to be consistent on image readers also (QtImageReader, ImageReader) 2025-12-08 18:33:23 -06:00
Jonathan Thomas
eea55982fd FFmpegReader: add duration strategy modes and unify duration/frame calculations. This is a potentially breaking change, where we ensure all durations and video_length calculations coming from FFmpegReader are now fully consistent - even if we must slightly adjust a duration from the video or audio stream. This keeps the 2 attributes identical in meaning (video_length X FPS == duration, no exceptions). Unknown durations are no longer -1 video_length but 0, and 0 duration. 2025-12-08 17:07:21 -06:00
Jonathan Thomas
af9a4893ed Fixing regression inside AudioWaveformer so it uses a proper detached reader, and no longer mutates the Clip's reader (preventing a bug which caused our video to disappear when waveforms were used on the clip) 2025-11-24 18:33:25 -06:00
Jonathan Thomas
d4647b5525 Refactoring the AudioWaveformer again, this time to de-couple it from the actual clip object passed to it, and to no longer iterate over the potential longer time keyframes using GetFrame alone. Now, we only decode audio-streams, and only get the original samples (reduced sample rate drastically), and finally we apply keyframes (volume and time) to modify our original samples. This is a HUGE speed-up boost for waveform generation. 2025-11-23 14:11:53 -06:00
Jonathan Thomas
0dfc8a8a37 Updating 1D and 3D unit tests for Color Map to use a more obvious cube color map, with 1D = green and blue, and 3D = red and blue. 2025-11-18 18:11:37 -06:00
Jonathan Thomas
e25763d089 Adding awareness of DOMAIN_MIN and DOMAIN_MAX properties of LUT Color Map files and new unit tests to validate them 2025-11-18 17:36:30 -06:00
Jonathan Thomas
1c912d8fd6 Fixing clip unit tests due to regression in the initial rotation keyframe 2025-11-18 14:34:23 -06:00
Jonathan Thomas
2f82e7d27b Adding support for 1D and 3D LUT Color Map files. Also added new unit tests to verify 1D and 3D LUT files. 2025-11-18 14:26:59 -06:00
Jonathan Thomas
a7dfc596ca Fixing regression in Clip::init_reader_rotation() function, which could sometimes override scale_x and scale_y, when a rotation keyframe contained more than 1 point. 2025-11-13 16:18:18 -06:00
Jonathan Thomas
5596344575 Fixing AudioWaveformer::ExtractSamples to pause temporarily when a clip's reader is closed, and resume extracting when it's open again. This prevents a very common crash / bug when generating waveforms for longer audio clips and continuing to make chagnes on the timeline (which closes all clips temporarily - interrupting the waveform extracting). 2025-11-06 14:51:57 -06:00
Jonathan Thomas
0932af2c1e Fixing race condition on unit test for AnalogTape (when comparing frame's getting modified) 2025-10-11 16:45:43 -05:00
Jonathan Thomas
7e29fc0935 Improving audio directionality, with new function: SetAudioDirection(), so we can safely flip audio buffer direction when needed (i.e. time curves, reversed time). Also adding a new SetDirectionHint function to FrameMapper class - so our Clip class can inform the FrameMapper of its direction at any given moment. Also, clear resampler when changing directions inside a Time curve (since the audio buffer will be flipped - the resampler internal cache must be cleared). 2025-10-11 16:29:11 -05:00
Jonathan Thomas
9a262882de A few small refactors of clip unit tests 2025-09-30 23:09:32 -05:00
Jonathan Thomas
0c15c1692e Adding new reversed time curve unit test, to verify 230,000 samples are actually reversed over the length of the clip without skipping or missing a single one. 2025-09-26 18:34:33 -05:00
Jonathan Thomas
c165eca5d8 Improving AudioWaveformer to be able to correctly generate waveforms for time-curved clips that have a modified duration/video_length (i.e. repeated clips, slowled down clips, etc...). Adding a new ReaderBase.h VideoLength() that can be overridden in Clip.cpp when time curves are involved. 2025-09-22 12:28:12 -05:00
Jonathan Thomas
3723fbd99f Fixing regression on Mac and Windows builds for Clip blend modes (color tolerances) 2025-09-12 23:00:22 -05:00
Jonathan Thomas
021c6ecc07 Adding unit tests to validate FFmpegReader, Clip, and Timeline frame accuracy of GIF files, plus GIF with time curves. 2025-09-12 22:57:26 -05:00
Jonathan Thomas
fa4f44d108 Fixing small build error on benchmark includes 2025-09-12 21:19:16 -05:00
Jonathan Thomas
a66727a687 Expanding Clip unit tests to include all composite blend modes available to libopenshot. 2025-09-12 18:06:26 -05:00
Jonathan Thomas
523ef17aa4 Adding composite/blend modes to libopenshot:
-Normal
-Darken
-Multiply
-Color Burn
-Lighten
-Screen
-Color Dodge
-Add
-Overlay
-Soft Light
-Hard Light
-Difference
-Exclusion
2025-09-12 17:47:41 -05:00
Jonathan Thomas
b94dcac3b4 Adding Benchmark executable to assist with performance testing and comparisons with different versions of OpenShot.
Initial results:
FFmpegWriter,7800
FrameMapper,3508
Clip,4958
Timeline,30817
Timeline (with transforms),53951
Effect_Mask,9283
Effect_Brightness,12486
Effect_Crop,5153
Effect_Saturation,15545
Overall,147136
2025-09-12 17:27:43 -05:00
Jonathan Thomas
a326f541a1 Fix bug with Wave effect that can cause colored bands to appear in certain cases, and added new wave effect unit test 2025-09-12 15:07:51 -05:00