Commit Graph

311 Commits

Author SHA1 Message Date
FeRD (Frank Dana)
2f3615f706 Move Exceptions.h includes to .cpp files 2021-01-26 10:52:04 -05:00
Jonathan Thomas
75c4dbbaaa Fixing alpha videos, by handling the conversion to premultiplied RGBA separately 2020-12-31 17:35:49 -06:00
FeRD (Frank Dana)
a1e44edad4 Merge branch 'develop' into clip-refactor-keyframes 2020-10-19 16:28:49 -04:00
FeRD (Frank Dana)
aa40ea29e0 Update include paths in all source/header files 2020-10-18 07:43:37 -04:00
Jonathan Thomas
1dfbb0e771 Merge branch 'develop' into clip-refactor-keyframes
# Conflicts:
#	src/CacheDisk.cpp
#	src/Clip.cpp
#	src/Frame.cpp
#	src/QtHtmlReader.cpp
#	src/QtImageReader.cpp
#	src/QtTextReader.cpp
#	src/effects/Bars.cpp
#	src/effects/Crop.cpp
2020-10-16 15:32:43 -05:00
Jonathan Thomas
8f6c64215e Merge pull request #556 from ferdnyc/use-make-shared
Use std::make_shared to allocate shared ptrs, instead of std::shared_ptr constructors
2020-10-16 14:48:14 -05:00
Jonathan Thomas
ef80439b62 Merge pull request #530 from ferdnyc/omp-and-ffmpeg-classes
Move off deprecated OpenMP API, fix FFmpeg code paths
2020-10-16 14:45:20 -05:00
Jonathan Thomas
6bd7fb7235 Replacing ARGB32_Premultiplied with Format_RGBA8888_Premultiplied, which still seems to benefit from performance, but keeps the byte order the same as before. win win 2020-10-14 03:06:30 -05:00
Jonathan Thomas
94059828d5 Converting RGB8888 to ARGB32_Premultiplied (for performance reasons) 2020-10-13 18:18:10 -05:00
Jonathan Thomas
fb879a4e46 Merge branch 'develop' into clip-refactor-keyframes
# Conflicts:
#	include/Clip.h
#	include/ReaderBase.h
#	include/Timeline.h
#	src/Clip.cpp
#	src/FFmpegReader.cpp
#	src/QtImageReader.cpp
#	src/ReaderBase.cpp
2020-10-05 23:14:44 -05:00
Jonathan Thomas
f9a717ef4b Large refactor of Timeline, TimelineBase, ClipBase, and Clip, to allow a Clip access to the parent timeline instance (if available), and thus, certain properties (preview size, timeline FPS, etc...). This allows for a simpler rendering of Clip keyframes (during the Clip::GetFrame method), and a simpler Timeline class, that can change the preview window size dynamically and no longer requires a Singleton Settings class.
- Also removed "crop" from Clip class, as it was never implmeneted correctly, and we have a fully functional "crop" effect when needed
 - Added caching to Clip class, to optimize previewing of cached frames (much faster than previous)
2020-10-04 16:59:21 -05:00
Jonathan Thomas
9c35e554a9 Merge pull request #565 from OpenShot/fix-pts-offset-logic
Fix the PTS offset logic error when first reading a file with FFmpegReader
2020-09-12 17:18:52 -05:00
Jonathan Thomas
7dc9eb6927 Adding TODO for future improvements 2020-09-12 17:05:33 -05:00
Jonathan Thomas
650adf639d Fix the PTS offset logic error when first reading a file on FFmpegReader. Use the calculated 0 - PTS, unless it is too large (more than 1 second off from zero) 2020-09-11 00:55:50 -05:00
Frank Dana
131e441d98 Merge pull request #563 from ferdnyc/timeline-lookup-api
Timeline: Add clip/effect lookup api, GetMaxFrame/GetMaxTime method (w/ unit tests)
2020-09-10 19:06:44 -04:00
Frank Dana
e500cae9f5 Replace sleep()/usleep() with std::chrono calls (#473) 2020-09-02 02:07:54 -04:00
FeRD (Frank Dana)
bd90b8d6c9 ReaderBase: Deprecate SetClip/GetClip names
- Replacement method names are SetParentClip/GetParentClip
- Old names are retained as deprecated alternates, for now
- libopenshot internal calls (very few) are updated

ReaderBase.cpp: Remove (Set,Get)Clip
2020-09-01 23:05:04 -04:00
FeRD (Frank Dana)
3c2532b4de Use std::make_shared to allocate shared ptrs
std::make_shared does in a single allocation what the constructors
for std::shared_ptr usually take at least 2 allocations to do.
May give us an infinitesimal performance/memory improvement.

https://www.modernescpp.com/index.php/memory-and-performance-overhead-of-smart-pointer
2020-08-20 16:50:12 -04:00
FeRD (Frank Dana)
96d84311c6 OpenMP: Move off deprecated allow_nested boolean
- Replacement openmp_set_max_active_levels() takes an int argument
  - In OpenMP 5.0 it can be set to openmp_get_supported_active_levels()
  - Below 5.0, we just set it to our processor count
- Move configuration of OpenMP from ad-hoc locations to constructors
  for FFmpegWriter/Reader and Timeline
2020-06-08 16:07:04 -04:00
FeRD (Frank Dana)
c57f8ede3b FFmpeg: Combine 2 constructors via a default arg, fix docs, const refs 2020-06-08 16:03:04 -04:00
Frank Dana
6336f30ee3 Various: Remove unused variables (#467)
Several data members and local variables were flagged by static
analysis tools as never being used anywhere in the code.
2020-04-22 02:02:55 -04:00
Frank Dana
12dd4d150a Merge pull request #448 from SuslikV/ffmpeg-like-fps
Change frame rate detection
2020-03-27 10:29:04 -04:00
SuslikV
dff42011ff Restore default gain when adding audio
Incorrect conversion of float to int16_t caused distortion that was
mistakenly perceived as clipping. Now because the convertion was fixed,
there is no more sense to reduce input gain of the source.
2020-03-16 14:49:41 +02:00
Jonathan Thomas
4f591c7b94 Merge pull request #396 from ferdnyc/json-parsing
Behind-the-scenes code tidying for Json data handling
2020-02-27 15:32:05 -06:00
SuslikV
e7bd91814a Change frame rate detection
Make FPS detection of the input file similar to the FFmpeg's own
re-encoding algorithm.
2020-02-27 12:53:56 +02:00