16 Commits

Author SHA1 Message Date
Jonathan Thomas
59d46e59be Large refactor of Clip::GetFrame and time-remapping of audio samples.
- Refactor AudioLocation into own header
- AudioResampler now supports variable channels
- Adding cache back to Clips - to prevent the cost of multiple calls for the same GetFrame() frame, used in time-remapping
- Large refactor of Clip::GetFrame, to prevent multiple code paths, and much improved time-remapping
- Clip's time keyframe now supports Bezier and sub-frame precision - to you can curve audio speed using any curve shape
- Fixing # of audio samples on Clip frame's, based on timeline position (to predictably divide samples per frame)
- New Clip unit tests for time remapping and resampling audio, and reversing audio
- New Frame::GetAudioSamples arg, to allow for reversing the direction of audio samples
- Fix bug in Frame::AddAudioSilence() to correctly cache the # of audio samples
- FrameMapper clean up resample context (when changing frame rate)
- FrameMapper refactor to optimize # of calls to Reader()::GetFrame(), since calls to Clip::GetFrame are quite expensive
- Removing RepeatingFraction functionality from Keyframe object (since it was a bad implementation detail from our previous time remapping)
- Making Keyframe GetDelta method a float, and no longer an int - to allow for more precision on time remapping
- Large amount of white space fixing (to make things consistent)
2023-02-27 22:11:13 -06:00
Jonathan Thomas
fdcf9b9118 Renaming variable in FFmpegReader to make more sense 2022-11-16 15:17:03 -06:00
Jonathan Thomas
e9aa87c3f3 Experimental refactor around sending/receiving packets with the decoder in FFmpegReader. 2022-11-15 10:57:33 -06:00
Jonathan Thomas
ec79c92f12 Refactor of packet counting and EOF detection. Instead of tracking overall packets read & decoded, we now track per stream (video and audio), so we can more accurately know when a packet is still pending for one of those streams (i.e. async decoding) 2022-09-26 19:06:03 -05:00
Jonathan Thomas
9202d94ee6 Fixing whitespace issues (converting spaces back to tabs... for now) 2022-07-21 15:00:08 -05:00
Jonathan Thomas
f4966b2567 Large refactor of timestamps on FFmpegReader (PTS / presentation time stamps):
- Improved PTS offset logic (to offset our streams so that at least one of them starts at position 0.0)
- Removed missing frame detection (no needed anymore)
- Use timestamps to reason about missing frames
- Fixed many async decoding issues (jumbled frames, missing beginning or ending frames)
- Much improved support for video/audio files with missing chunks/gaps (i.e. missing timestamps)
- Improved CheckWorkingFrames() method, to determine when working frames are ready to be finalized
- Improved FPS detection for invalid or missing FPS
2022-07-21 13:56:29 -05:00
Frank Dana
59138ea3e4 Adopt license management via Reuse project/tool (#711)
* reuse-managed license/copyright headers

reuse is a tool for compliance with the REUSE recommendations. See
<https://reuse.software/> for more information, and
<https://reuse.readthedocs.io/> for the online documentation.

* Set jsoncpp license
* Add MIT license for Decklink sources
* Explicitly license examples/
  - Add headers to source files
  - Change blanket licensing in .reuse/dep5 to only cover binary media
  - Import CC-BY-3.0 license and assign to sintel_trailer
2021-10-16 01:26:26 -04:00
Frank Dana
8a81452bdf Move FFmpeg hwaccel checks to CMake, eliminate #pragma messages (#645)
* Rename HAVE_HW_ACCEL to USE_HW_ACCEL
* CMake: Add USE_HW_ACCEL option, default on
* CMake: #define USE_HW_ACCEL, display as build feature
2021-06-04 21:32:29 -04:00
FeRD (Frank Dana)
8278496042 Headers: Fix doc comments
KalmanTracker: Convert comment to doc comment
2021-03-07 12:43:15 -05:00
Jonathan Thomas
0c4e1bcce4 Improving performance after working with google-prof, to profile CPU. Calling OMP_MP_NUM_PROCESSORS less often, since it's quite expensive according to profiling. Adjusting Timeline final_cache to match the video caching thread max_frames, so one doesn't clobber the other. Also, fixing an issue with openshot-player, where a video file with no audio skips horribly. 2021-02-04 17:28:07 -06:00
Jonathan Thomas
47afa205c7 Merge pull request #585 from OpenShot/opencv
3 New OpenCV Effects (Tracker, Stabilization, and Object Detection)
2021-01-28 17:28:15 -06:00
Frank Dana
b5c3d0b598 Merge pull request #618 from ferdnyc/deprecate-TooManySeeks
Deprecate TooManySeeks, instead of removing
2021-01-26 22:59:06 -05:00
FeRD (Frank Dana)
2f3615f706 Move Exceptions.h includes to .cpp files 2021-01-26 10:52:04 -05:00
Brenno
1626e1eeba Merge branch 'clip-refactor-keyframes' into opencv 2020-10-19 22:29:48 -03:00
FeRD (Frank Dana)
04bcab42da Merge branch 'develop' into albumartfixes 2020-10-19 16:40:47 -04:00
FeRD (Frank Dana)
a6441d822d Reorganize source tree (headers in src/)
- src/bindings/ moves to /bindings/
- src/examples/ moves to /examples/
- Contents of include/ merged into src/ with same hierarchy
- src/Qt/demo/ moves to examples/qt-demo/
2020-10-18 05:05:29 -04:00