Commit Graph

218 Commits

Author SHA1 Message Date
eisneinechse
e7f2494040 First changes to make hardware accelerated DECODE work with decoders
other than vaapi. Encode is already working for nvenc; nvidia driver
396 has to be installed for nvenc to work. On nVidia card turn
accelerated decode off in Preferences->Performance for now
2018-11-26 09:36:21 -08:00
eisneinechse
514cb11340 When multiple graphics cards are installed the import with hardware
acceleration has to have the card number set or the opening of the
device will fail.
TODO check multiple formats. Right now only the first is checked
which is vaapi.
2018-11-25 20:28:25 -08:00
eisneinechse
533c59ae97 Merge branch 'develop' into hardware-support 2018-09-26 09:44:59 -07:00
eisneinechse
0227397339 Set the graphics card used to decode or encode by setting the
environment variable HW_EN_DEVICE_SET for enncoding and
HW_DE_DEVICE_SET for decoding. The first card is 0, the second 1
and so on. For now only running on Linux.
2018-09-19 21:37:12 -07:00
eisneinechse
f2323da447 Preparation to choose the graphics card not by name but by number
1, 2, 3.  First implementation just for Linux and decode
2018-09-19 17:51:21 -07:00
eisneinechse
0b260a9087 Code cleanup and move messages regarding hardware acceleration to
Debug Logger
2018-09-18 15:31:34 -07:00
eisneinechse
555eb1f3e2 Use logger for messages about acceleration 2018-09-18 13:08:42 -07:00
eisneinechse
161acb3d7d Include messages in the compile display to make sure the right
ffmpeg version is used (>= 3.2) to get hardware acceleration
2018-09-18 12:38:53 -07:00
eisneinechse
800dc87459 Information is printed to the console where openshot was started
that shows if hardware decode or siftware decode is being used
2018-09-18 11:35:19 -07:00
eisneinechse
38f4bc6a21 Adding aoutput if decode device is not found 2018-09-18 11:10:16 -07:00
Jonathan Thomas
b63a63ceb2 Fix many bugs around FPS and video length calculation (especially for MP3 and streaming WEBM formats). Also protecting samples_per_frame calculation to keep from crashing on undetected FPS. 2018-09-17 00:27:30 -05:00
eisneinechse
08c7f88376 The part of the code that should get the config that is used to get
the constraints of the GPU is now inside a #if . One can enable it
by setting the constant in line 33 of FFmpegReader.cpp to 1.
Do not enable that part unless you want to fid a way that works as
it also needs the package libva-dev (Ubuntu) to be installed.
2018-09-14 14:40:29 -07:00
eisneinechse
d97a1bc850 Commented code that isn't working yet but complicates compilation
by needing extra packages.
2018-09-14 14:03:03 -07:00
eisneinechse
3a2d46826c Included an if for included files not present in ffmpeg 2 2018-09-13 18:04:16 -07:00
eisneinechse
10c8d69595 Maximum width and height for hardware decode can now be set in preferences 2018-09-13 14:45:09 -07:00
eisneinechse
cfcddd13e5 Still not able to retreive the maximum dimensions supported by the
hardware (line 312 FFmegReader.cpp)
Now using defaults of 1950 * 1100 defined in lines 35,36
2018-09-13 12:37:32 -07:00
eisneinechse
a1ffa6b132 Removed one include 2018-09-11 20:30:56 -07:00
eisneinechse
4db2217f0d Fallback for hardware accelerated decode to software decode in case
the GPU can noy handle the dimensions of the frame.
Not yet working, va_config not yet set.
2018-09-11 20:18:11 -07:00
Jonathan Thomas
6b37ad7e1d Limiting threads for both FFmpeg and OpenMP (attempting to find a good balance of parallel performance, while not spawning too many threads). Sometimes more is not always better. 2018-09-11 10:48:30 -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
f8fed171ce More code cleanup (easier to read)
Comment included with start of error handling
2018-09-09 12:57:04 -07:00
eisneinechse
aff1be93b8 Support for multiple input files 2018-09-09 10:54:31 -07:00
eisneinechse
c29bf21c75 Simplifications of FFmpegReader and start of setting parameters
per input file
2018-09-09 09:05:16 -07:00
eisneinechse
2a80ccacaa Let hw_de_on be visible to all versions of ffmpeg 2018-09-08 22:57:46 -07:00
eisneinechse
d6f52ead3b Only use the hw accel variables when ffmpeg >= 3.2 2018-09-08 22:30:16 -07:00