Commit Graph

542 Commits

Author SHA1 Message Date
Jonathan Thomas
4ddf775cdf Merge pull request #421 from ferdnyc/ffmpegwriter-opts
FFmpegWriter: Overload Set___Options() methods
2020-02-27 15:27:31 -06:00
Jonathan Thomas
6666702e80 Merge pull request #423 from ferdnyc/optimized-blur
Optimized, parallelized Blur effect
2020-02-27 15:19:25 -06:00
Frank Dana
fe8ea216f4 Merge pull request #437 from ferdnyc/hw-accel-ffmpeg34
Limit HW accel support to FFmpeg 3.4+
2020-02-14 12:11:09 -05:00
FeRD (Frank Dana)
895c2f0e24 FFmpegReader/Writer: Reformat example code
- Reduced crazy-long line lengths by moving trailing comments to
  previous line
- Added more openshot:: prefixing, which causes Doxygen to link to
  the referenced object's documentation. (It doesn't always pick
  up cross-class links, without the prefix.)
2020-02-14 12:07:02 -05:00
FeRD (Frank Dana)
7867cf01b8 Reorder arguments in setVideoOptions overload
- The new ordering (with the frame rate AFTER width and height) doesn't
  match the other signature, but it *is* consistent with the Timeline
  constructor, and it just feels more natural
- Added overloaded-function notes to doxygen strings in FFmpegWriter.h
- Also added a warning about the argument order mismatch above
2020-02-14 11:53:28 -05:00
albert-github
ba1155e44f Documentation error
Correcting small documentation error.
2020-02-10 15:35:58 +01:00
FeRD (Frank Dana)
e74d71f545 FFmpegReader/Writer: limit hwaccel to FFmpeg 3.4+
Add a new #define HAVE_HW_ACCEL, which is only set on FFmpeg 3.4+,
and use that to restrict the use of hw-accel features, leaving
IS_FFMPEG_3_2 to determine only whether code is compatible with
FFmpeg 3.2+.
2020-02-10 01:50:31 -05:00
FeRD (Frank Dana)
7868157be5 Streamline blur effect code 2020-02-03 02:24:08 -05:00
FeRD (Frank Dana)
0a063b84b7 FFmpegWriter: Overload Set___Options() methods
Add overloaded forms of SetVideoOptions() and SetAudioOptions()
that apply some sensible defaults to rarely-changed parameters.
2020-01-31 03:53:53 -05:00
Jonathan Thomas
9bf25f40a9 Merge pull request #392 from ferdnyc/juce-guard-remove
Remove JUCE defines
2020-01-02 14:41:43 -06:00
FeRD (Frank Dana)
c11b4ac266 EffectBase: Remove unused short_name 2019-12-19 07:59:30 -05:00
FeRD (Frank Dana)
fd78be6b95 Remove JUCE defines
A few headers contained #defines that were intended to work around
issues with the JUCE library headers, but those things are best
handled in other ways.
2019-12-18 23:55:16 -05:00
Daniel Jour
6f71736c6a Keyframe: mark all non-modifying member functions const
Member functions that do not (need to) modify any members or internal
state of the Keyframe class should be declared as const.
2019-11-25 10:29:58 +01:00
Daniel Jour
edf85dda78 Keyframe: use = default to specify default constructor 2019-11-25 10:23:45 +01:00
Daniel Jour
3b2e262821 Keyframe: New implementation calculating values ondemand
- GetValue() calculates the value at the given position now ondemand,
  without caching values as previously.  First, it uses binary search
  to find the segment (start and end point) containing the given
  position.  Constant and linear interpolation are straightforward,
  bezier curves are calculating by binary search between the end
  points until a point on the curve is found with a X coordinate close
  enough to the given position. That points Y coordinate is returned.

- IsIncreasing(), GetRepeatFraction(), GetDelta() use GetValue()
  instead of accessing the (removed) Values vector.

- Removed now unused private functions, and the unused public
  Process().

First test results show good performance improvements for the
"rendering case" (setting up the keyframe points at once, then getting
all values) and drastic performance improvements for the "preview
case" (changing keyframe points, mixed with getting values).
2019-11-22 22:37:06 +01:00
Daniel Jour
6d81033bff Keyframe::GetPoint() returns a constant reference now
Returning a non constant reference is not possible; this allows
outside code to invalidate internal invariants (sorted order of
points) by modifying the returned point.  To make updates the current
best approach is to remove the point by index, and then add it again.
2019-11-22 00:36:52 +01:00
Daniel Jour
504ea0c1ff Make Keyframe::Values and Keyframe::Points vectors private
The Values vector should only be accessed from the outside through the
GetValue() function.  The Points vector should only be accessed using
the AddPoint(), RemovePoint(), .. functions.

This helps maintain internal invariants (e.g. keeping Points sorted)
and allows for future removal / lazy evaluation of Values.

The size() of the vectors had been accessed from various parts of the
code; the GetLength() (for Values) and GetCount() (for Points) member
functions provide access to this information and are already part of
the public API.
2019-11-19 23:43:28 +01:00
Daniel Jour
cb5574180e Keyframe::AddPoint() add at correct index, keeping Points ordered
AddPoint() now searches (binary search) for the best place to insert a
new point, thus always maintaining the order of Points.  Therefore,
ReorderPoints() is no longer needed.

CAVEAT: This breaks if some outside code changes (the public member)
Points!
2019-11-19 22:43:34 +01:00
Jonathan Thomas
272f004c0e Merge pull request #296 from OpenShot/std-prefixes
Remove all 'using namespace' directives from headers
2019-11-17 16:18:14 -06:00
FeRD (Frank Dana)
7bbec4c51c Fix documentation for Qt(Text/Html)Reader
- Some parameters were changed from documented list
- Hash signs need to be escaped if they're not references (links)
2019-11-17 01:49:49 -05:00
SuslikV
87c06feda1 Clarify some comments 2019-11-02 20:04:58 +02:00
FeRD (Frank Dana)
2535588ad8 Prefixing fixes for QtHtml/QtText Readers 2019-10-30 03:43:11 -04:00
Frank Dana
cbdd02fe7a Merge branch 'develop' into std-prefixes 2019-10-29 20:45:08 -04:00
Frank Dana
76725d9d2e Merge pull request #305 from jeffski/qt-text-html-readers
QtTextReader and QtHtmlReader
2019-10-29 20:40:51 -04:00
Frank Dana
969e8320e6 Merge branch 'develop' into std-prefixes 2019-10-29 16:06:55 -04:00