Commit Graph

697 Commits

Author SHA1 Message Date
eisneinechse
9cde60059c Merge branch 'develop' into hardware-support 2019-03-07 10:46:54 -08:00
Jonathan Thomas
8f385c112a Improved Keyframe Performance (#197)
* Refactor of Coorindate and Keyframe optimized for performance (much faster than previously). Also refactored FrameMapper to not use a Keyframe, and to only process frame mapping when needed... speeding up Json loading of project files.

* Fixing FrameMapper linear calculation to match existing Keyframe calculation

* Fixing Keyframe to pass original unit tests, and correctly calculate the Keyframe repeat fractions and deltas.

* Small refactor of time mapped logic in Clip.cpp
2019-03-06 15:35:03 -06:00
eisneinechse
48a2656080 AVoid crashes with mp3 that are tagged by
removing AV_ALLOCATE_IMAGE(pFrame, AV_GET_CODEC_PIXEL_FORMAT( ...
2019-03-01 16:32:52 -08:00
eisneinechse
ddacd241e3 Merge branch 'develop' into hardware-support 2019-02-28 09:58:28 -08:00
Jonathan Thomas
728e0022a2 MP3 Special Handling & Missing Frame Refactor (#196)
* Handle MP3 files with special logic, since they typically only have 1 frame of video

* Better support for missing frames (handling of missing audio and missing video data separated), and fixed a missing audio regression.
2019-02-27 23:25:54 -06:00
eisneinechse
a2b8eaff37 Allow to use nvenc and nvdec in Windows for nVidia cards.
nVidia card don't use the DX API like intel or AMD cards.
If ffmpeg and the libraries are compiled with nvenc and
nvdec support on WIndows this should(!) now work.
2019-02-15 10:11:45 -08:00
eisneinechse
334a46cc5d Fix check if GPU can be used for encoding and decoding 2019-02-01 03:38:44 -08:00
eisneinechse
2e635e3d87 Formating and Cleanup
Fix forgotten break in switch
2019-01-31 09:42:26 -08:00
eisneinechse
596ae0efac More changes to move to Settings, still needs work 2019-01-30 20:44:36 -08:00
eisneinechse
2ca84217bc First changes to use Settings instead of GetEnv 2019-01-30 09:58:54 -08:00
eisneinechse
7e3669b620 Formating 2019-01-29 12:38:52 -08:00
eisneinechse
05fb797776 Move the check if hw accell ecoding is used with crf to the right place 2019-01-29 10:26:10 -08:00
eisneinechse
3ea28d692d Merge branch 'develop' into hardware-support 2019-01-28 20:22:24 -08:00
Jonathan Thomas
1bf3e37567 Refactor FFmpegWriter Open() and PrepareStreams() methods, so that SetOption() is can be called between them, and allowed to adjust the codecs bit_rate and options before we call open_video(). This was primarily to allow CRF options to work. (#193) 2019-01-28 12:28:35 -06:00
eisneinechse
39bf06b3d3 Now VP8, VP9, h.264, h.265 have working crf 2019-01-27 10:50:23 -08:00
eisneinechse
1a44bd789c Make sure that crf is not set in SetOptions 2019-01-27 10:26:20 -08:00
eisneinechse
46051fbba1 Form follows function
Moved crf back to SetVideoOptions and adjusted parameters
Now h.264 and VP9 have working crf
Some small changes in preparation for Settings
2019-01-27 10:07:40 -08:00
Jonathan Thomas
f66ccb11c4 Set video bit rate to 0 if an invalid bit rate detected (which happens when using crf) (#191) 2019-01-26 17:56:15 -06:00
eisneinechse
9aeec7d90f Set the bitrate to 0 if no valid value was given. It is needed for
the crf lossless setting
2019-01-26 12:22:09 -08:00
eisneinechse
29b5fcac60 Merge branch 'develop' into hardware-support 2019-01-25 13:07:26 -08:00
Jonathan Thomas
0587ada6dc Integrate Constant Rate Factor (CRF) for FFmpegWriter (#186)
* First implementation of CRF (Constant Rate Factor)

* Include AV1 in the codecs that can use crf

* First version that uses SetOption to set crf quality

* Clarify comments

* Delete setting the bitrate for crf in SetVideoOption because it
is not needed, it is set later with SetOptions.
2019-01-25 00:15:07 -06:00
Frank Dana
c4321f3f8e Some polishing for the cmake ReSVG discovery (#187)
* Search for libresvg.so in RESVGDIR also

This means that RESVGDIR can be pointed to the `target/release` dir 
where resvg was built, and both `libresvg.so` and `include/resvg.h` will 
be found.

* ReSVG: Fix up discovery module

`find_package_handle_standard_args` is supposed to set the `_FOUND` 
variable automatically (as the comment right above it says), as well as 
handling things like REQUIRED, QUIETLY, etc. It should always be run at 
the end of a module, for this reason.

This change removes the conditionals around the call, lets it handle 
what it's meant to handle, and defines a custom failure message for 
discovery that replaces the one in `src/CMakeList.txt`. 

In addition, the `REQRUIRED` is removed from `tests/CMakeLists.txt`, 
since it's _supposed_ to mark the module as required (which ReSVG is 
not), and was only working due to the aforementioned improper 
conditional wrapping of the module's cleanup.

* FindRESVG.cmake does not set RESVG_DEFINITIONS

Remove the comment that claims it does.
2019-01-24 13:43:40 -06:00
Jonathan Thomas
f009b0f46c Fix default sizes on readers without MAX_WIDTH and MAX_HEIGHT settings (#188) 2019-01-22 22:14:30 -06: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