Skip to content

Commit f1e5c9c

Browse files
authored
Merge pull request #454 from OpenShot/merge-master-to-develop1
Merge master into develop (and bump version to -dev2)
2 parents 7fbd44a + efe0728 commit f1e5c9c

File tree

5 files changed

+13
-15
lines changed

5 files changed

+13
-15
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ For more information, please visit <http://www.openshot.org/>.
4040
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
4141

4242
################ PROJECT VERSION ####################
43-
set(PROJECT_VERSION_FULL "0.2.5-dev1")
43+
set(PROJECT_VERSION_FULL "0.2.5-dev2")
4444
set(PROJECT_SO_VERSION 19)
4545

4646
# Remove the dash and anything following, to get the #.#.# version for project()

src/Frame.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ void Frame::Save(std::string path, float scale, std::string format, int quality)
581581
std::shared_ptr<QImage> previewImage = GetImage();
582582

583583
// scale image if needed
584-
if (abs(scale) > 1.001 || abs(scale) < 0.999)
584+
if (fabs(scale) > 1.001 || fabs(scale) < 0.999)
585585
{
586586
int new_width = width;
587587
int new_height = height;

src/effects/ColorShift.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,25 +75,24 @@ std::shared_ptr<Frame> ColorShift::GetFrame(std::shared_ptr<Frame> frame, int64_
7575
// Get the current shift amount, and clamp to range (-1 to 1 range)
7676
// Red Keyframes
7777
float red_x_shift = red_x.GetValue(frame_number);
78-
int red_x_shift_limit = round(frame_image_width * fmod(abs(red_x_shift), 1.0));
78+
int red_x_shift_limit = round(frame_image_width * fmod(fabs(red_x_shift), 1.0));
7979
float red_y_shift = red_y.GetValue(frame_number);
80-
int red_y_shift_limit = round(frame_image_height * fmod(abs(red_y_shift), 1.0));
80+
int red_y_shift_limit = round(frame_image_height * fmod(fabs(red_y_shift), 1.0));
8181
// Green Keyframes
8282
float green_x_shift = green_x.GetValue(frame_number);
83-
int green_x_shift_limit = round(frame_image_width * fmod(abs(green_x_shift), 1.0));
83+
int green_x_shift_limit = round(frame_image_width * fmod(fabs(green_x_shift), 1.0));
8484
float green_y_shift = green_y.GetValue(frame_number);
85-
int green_y_shift_limit = round(frame_image_height * fmod(abs(green_y_shift), 1.0));
85+
int green_y_shift_limit = round(frame_image_height * fmod(fabs(green_y_shift), 1.0));
8686
// Blue Keyframes
8787
float blue_x_shift = blue_x.GetValue(frame_number);
88-
int blue_x_shift_limit = round(frame_image_width * fmod(abs(blue_x_shift), 1.0));
88+
int blue_x_shift_limit = round(frame_image_width * fmod(fabs(blue_x_shift), 1.0));
8989
float blue_y_shift = blue_y.GetValue(frame_number);
90-
int blue_y_shift_limit = round(frame_image_height * fmod(abs(blue_y_shift), 1.0));
90+
int blue_y_shift_limit = round(frame_image_height * fmod(fabs(blue_y_shift), 1.0));
9191
// Alpha Keyframes
9292
float alpha_x_shift = alpha_x.GetValue(frame_number);
93-
int alpha_x_shift_limit = round(frame_image_width * fmod(abs(alpha_x_shift), 1.0));
93+
int alpha_x_shift_limit = round(frame_image_width * fmod(fabs(alpha_x_shift), 1.0));
9494
float alpha_y_shift = alpha_y.GetValue(frame_number);
95-
int alpha_y_shift_limit = round(frame_image_height * fmod(abs(alpha_y_shift), 1.0));
96-
95+
int alpha_y_shift_limit = round(frame_image_height * fmod(fabs(alpha_y_shift), 1.0));
9796

9897
// Make temp copy of pixels
9998
unsigned char *temp_image = new unsigned char[frame_image_width * frame_image_height * 4]();
@@ -130,7 +129,6 @@ std::shared_ptr<Frame> ColorShift::GetFrame(std::shared_ptr<Frame> frame, int64_
130129
blue_starting_row_index = starting_row_index;
131130
alpha_starting_row_index = starting_row_index;
132131

133-
134132
red_pixel_offset = 0;
135133
green_pixel_offset = 0;
136134
blue_pixel_offset = 0;

src/effects/Shift.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ std::shared_ptr<Frame> Shift::GetFrame(std::shared_ptr<Frame> frame, int64_t fra
6969

7070
// Get the current shift amount, and clamp to range (-1 to 1 range)
7171
double x_shift = x.GetValue(frame_number);
72-
double x_shift_limit = fmod(abs(x_shift), 1.0);
72+
double x_shift_limit = fmod(fabs(x_shift), 1.0);
7373
double y_shift = y.GetValue(frame_number);
74-
double y_shift_limit = fmod(abs(y_shift), 1.0);
74+
double y_shift_limit = fmod(fabs(y_shift), 1.0);
7575

7676
// Declare temp arrays to hold pixels while we move things around
7777
unsigned char *temp_row = new unsigned char[frame_image->width() * 4]();

src/effects/Wave.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ std::shared_ptr<Frame> Wave::GetFrame(std::shared_ptr<Frame> frame, int64_t fram
7474
int pixel_count = frame_image->width() * frame_image->height();
7575

7676
// Get current keyframe values
77-
double time = frame_number;//abs(((frame_number + 255) % 510) - 255);
77+
double time = frame_number;
7878
double wavelength_value = wavelength.GetValue(frame_number);
7979
double amplitude_value = amplitude.GetValue(frame_number);
8080
double multiplier_value = multiplier.GetValue(frame_number);

0 commit comments

Comments
 (0)