Commit Graph

141 Commits

Author SHA1 Message Date
Jonathan Thomas
6f00062b7b Fixing small regression with SetMaxSize and missing display_ratio and pixel_ratio 2019-05-02 11:43:34 -05:00
Jonathan Thomas
2b42574ffd Adding SetJson support for display_ratio and pixel_ratio updates, and improving SetMaxSize to maintain aspect ratio correctly, regardless of what is passed in. This helps support things like square aspect ratios. 2019-05-01 18:02:25 -05:00
eisneinechse
ef28aa2eee Merge branch 'develop' into hardware-support 2019-03-19 12:50:24 -07:00
Jonathan Thomas
3f17601db6 Invalid SetMaxSize Logic and Invalid CRF q settings in FFmpegWriter (#198)
* Limit max size of preview to the timeline size (this renders very small profiles correctly)

* Fixing CRF quality setting to allow "low" quality without breaking
2019-03-09 13:19:07 -06:00
eisneinechse
29b5fcac60 Merge branch 'develop' into hardware-support 2019-01-25 13:07:26 -08:00
Jonathan Thomas
7b6eb9c21b Integration of resvg SVG library (optional during build) (#185)
* Integration of libresvg SVG library (optional during build)

* Major refactor of max_width and max_height for preview optimization

* Fixed many bugs related to preview resizing, with regards to cached frames

* Updating gitlab CI to find RESVGDIR correctly for windows, and adding svgz support

* Updating cmake findresvg module to search for windows locations first, to prevent an issue on our windows builders and updating some CMake output.

* Removing folder path from resvg header, since it could be installed in different named folders. This is an attempt to fix Windows include issues.

* Making call to AV_FREE_FRAME conditional for non windows systems (because it crashes on Windows for seemingly no reason). Needs more investigation.
2019-01-19 02:18:52 -06:00
eisneinechse
662ed77263 Merge branch 'develop' into hardware-support 2019-01-18 16:42:46 -08:00
Jonathan Thomas
e0ec603965 Fixing Scale Mode (None) in previews (#182)
* Handle SCALE_NONE mode when optimized for previews (previews are often smaller than the project size)

* Fixing 2 memory leaks (thanks PeterM)
2019-01-09 00:56:49 -06:00
eisneinechse
533c59ae97 Merge branch 'develop' into hardware-support 2018-09-26 09:44:59 -07:00
eisneinechse
1cd8401a58 Put brackets in the if statement to show that the pragma critical
and the followwing command are one block.
2018-09-23 10:09:20 -07:00
eisneinechse
b925a9ba25 protect add_effect with critical 2018-09-23 09:51:56 -07:00
Jonathan Thomas
031c415c5f Protect effects with critical (prevents crashing and freezing around transitions). Thanks Peter! 2018-09-21 17:11:56 -05:00
Jonathan Thomas
e879188a7d FFmpeg 3 & 4 support, Travis CI support, OpenMP schedule change (#160)
* FFmpeg4 support. Compile warnings fixes. Credit goes to many people, including ferdnyc, peterM, and other awesome folks!

* Adding environment checking to enable/disable omp taskwait after each video/audio frame is processed. This is experimental for some users with crashes.

* Moving `omp taskwait` to after the ProcessVideoPacket() method, since that is the only place it is useful.

* Fixing crashes on missing Clip source file, and changing FFmpeg scaling algorthm from SWS_BILINEAR to  SWS_LANCZOS (for higher quality scaling)

* Update FindFFmpeg.cmake module, and updating build script. Also enabling debug builds.

* Updating experimental travis build script

* Fixed unit test for newer version of FFmpeg (audio resampling)

* Experimental travis multiple jobs

* Adding OMP schedule hint (thanks PeterM), which prevents crashes in some circumstances.
2018-09-11 00:40:31 -05:00
eisneinechse
6925f6f7c2 Use the static scheduler in ordered clause. Otherwise OpenMP uses
a scheduler it thinks is best which can be dynamic or guided. Both
sometimes let other threads continue before the block is finished.
That will crash the program with high thread counts and a cache
that is not large enough to hold old enough frames, which leads
to a crash when in some cases like transitions two different
frames are used although one is no longer in the cache.
The static scheduler always waits until the block is finished
before enabling other threads.
2018-09-07 10:44:18 -07:00
Jonathan Thomas
95abdcf66b FFmpeg4 support. Compile warnings fixes. Credit goes to many people, including ferdnyc, peterM, and other awesome folks! 2018-08-11 18:22:18 -05:00
Jonathan Thomas
2f45a4eb38 Adding new audio mixing enum, to allow for no automatic audio mixing, average mixing (where all overlapping clips average to 100% audio), or reduce mixing (where clips overlapping clips are all reduced by a constant value to reduce popping). (#131) 2018-06-27 01:35:38 -05:00
Jonathan Thomas
694ee7c24e New experimental protections for FFmpegReader::GetFrame, and better frame ordering. Thanks @PeterM! (#125) 2018-06-21 02:44:08 -05:00
Jonathan Thomas
422f98a35b Float max function 2018-06-11 22:45:31 -07:00
Jonathan Thomas
11a53e3292 Always use 1.0 as max_volume, unless greater than 1.0 2018-06-11 22:32:52 -07:00
Jonathan Thomas
04e4f63ea8 Calculate max volume of all overlapping clips, and scale clip volume to fit within the 100%, to prevent popping 2018-06-11 12:02:21 -07:00
Jonathan Thomas
bc5607910d Fixing audio pops due to resampling (this fixes a bunch of audio popping-related bugs). Now Frame objects track their own max_audio_sample_count, as we add audio data... so we have an accurate bounds on each frame. 2018-05-30 03:20:31 -05:00
Jonathan Thomas
371dd73fe5 Update and apply frame mapper on any clip changes, to keep timeline offsets in sync (i.e. avoid audio popping due to slight misalignments of clips on the timeline). Also, avoid mixing audio for clips with no volume or disabled audio. 2018-01-06 01:55:42 -06:00
Jonathan Thomas
2b41ad9938 More experimental critial sections trying to prevent race conditions on high CPU core systems 2017-11-11 17:16:56 -06:00
Jonathan Thomas
30c0d48f56 Fixing regression (I think) with rotation origin. Things should always rotate around the center of an object (until I add in keyframable origin points) 2017-11-08 03:36:01 -06:00
Jonathan Thomas
2fcb35ddcc Removing throw statements from header files (thanks Peter) 2017-10-26 18:44:35 -05:00