Commit Graph

95 Commits

Author SHA1 Message Date
Daniel Jour
5ba0ecfb2b Keyframe::GetInt() and Keyframe::GetLong() use GetValue
GetInt(), GetLong() are exactly the same as GetValue() except that
their result is rounded and converted to the repsective data type.
Thus avoid code duplication and use GetValue().
2019-11-19 22:43:34 +01:00
Daniel Jour
280504f007 Keyframe::IsIncreasing() remove loop to previous values and counter
The previous values do not influence the return value of the function
nor does looping over them have any side effect.

The next_repeats value is not used in any way, thus it doesn't need to
be calculated.
2019-11-19 22:43:34 +01:00
Daniel Jour
d47c40dc14 Keyframe::GetDelta() removed unused loop and variables 2019-11-19 22:43:34 +01:00
Daniel Jour
5f7766e49e Keyframe::RemovePoint() only set needs_update if a point was removed 2019-11-19 22:43:34 +01:00
Daniel Jour
6226e9d8e9 Keyframe::UpdatePoint() removed redundant code
needs_update = true is set both by RemovePoint() and AddPoint(),
ReorderPoints() is called by AddPoint().
2019-11-19 22:43:34 +01:00
Daniel Jour
2b18ad099b Keyframe::ScalePoints() skip first point without branch in loop 2019-11-19 22:43:34 +01:00
Daniel Jour
5ddc6a3b3a Keyframe::FlipPoints() without temporary vector
The Y coordinate of each point is adjusted inplace; reduces memory
overhead and iteration count for the loop.
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
SuslikV
87c06feda1 Clarify some comments 2019-11-02 20:04:58 +02:00
Frank Dana
8bde07682c Merge branch 'develop' into std-prefixes 2019-10-22 21:00:27 -04:00
FeRD (Frank Dana)
366ff2c5e6 src: Don't pass "" file_path args to exceptions 2019-08-27 15:47:39 -04:00
FeRD (Frank Dana)
3879b09047 FrameMapper/KeyFrame/Point: std:: prefixes 2019-08-04 22:54:06 -04:00
Jonathan Thomas
5f331e24df Merge pull request #265 from ferdnyc/catch-by-reference
Exceptions: catch-by-reference and other cleanup
2019-07-29 16:27:40 -05:00
FeRD (Frank Dana)
35eb6adc55 Clean up allocated memory in JSON code 2019-07-11 05:00:47 -04:00
FeRD (Frank Dana)
25b522589d Always catch-by-reference in C++11 2019-07-03 12:58:02 -04:00
Jonathan Thomas
ffb5439a2e Merge pull request #224 from sparfenyuk/develop
Add virtual destructor for abstract classes
2019-06-21 15:47:08 -05:00
Jonathan Thomas
967f23b8a4 Merge pull request #245 from ferdnyc/license-block
Upgrade Doxygen documentation formatting/content
2019-06-21 00:24:54 -05:00
FeRD (Frank Dana)
744a4f3ec1 Remove Json:Reader
`Json::Reader` has been deprecated for some time, so we replace it with
`Json::CharReader` generated by a `Json::CharReaderBuilder`, or (in the
one instance where we have a stream as input) `Json::parseFromStream();`
2019-06-19 21:20:04 -04:00
FeRD (Frank Dana)
f170fdd009 Update copyright range to current year 2019-06-11 06:48:32 -04:00
FeRD (Frank Dana)
0327c2ab5c Remove license block from documentation comment 2019-06-09 08:31:04 -04:00
Siarhei Parfianiuk
cbc276e489 Merge branch 'develop' into develop 2019-05-11 12:30:19 +02:00
eisneinechse
c55d8551c1 Simplification
Further simplify the else branches.
Thanks to SuslikV for pointing this out.
2019-05-05 18:18:14 -07:00
eisneinechse
bfa8a83864 The default return value is present
Remove else so that the default return value is used if no other return was used."else if" in line 334 had no else and therefore in some cases no return value was present.
2019-05-03 13:13:45 -07:00
Sergey Parfenyuk
665a03f9e2 Fix logical statements 2019-04-27 12:50:31 +02: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