From 8d78242571665604b777088e62a8ff58afc39e57 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Sat, 29 Feb 2020 17:30:36 -0600 Subject: [PATCH 1/5] Release branch for 0.2.5 (SO 19) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23e7dcb8..a3d7ab8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ For more information, please visit . set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules") ################ PROJECT VERSION #################### -set(PROJECT_VERSION_FULL "0.2.5-dev1") +set(PROJECT_VERSION_FULL "0.2.5") set(PROJECT_SO_VERSION 19) # Remove the dash and anything following, to get the #.#.# version for project() From c7fe363f2bd7667dd52825c07f47535c6b04a32b Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Sat, 29 Feb 2020 19:21:43 -0600 Subject: [PATCH 2/5] Fix ColorShift classname in EffectInfo::CreateEffect --- src/EffectInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EffectInfo.cpp b/src/EffectInfo.cpp index 5d786fe7..6829f4eb 100644 --- a/src/EffectInfo.cpp +++ b/src/EffectInfo.cpp @@ -56,7 +56,7 @@ EffectBase* EffectInfo::CreateEffect(std::string effect_type) { else if (effect_type == "ChromaKey") return new ChromaKey(); - else if (effect_type == "Color Shift") + else if (effect_type == "ColorShift") return new ColorShift(); else if (effect_type == "Crop") From 325c73abd7675f54a87da25a8e66f44958ba51a3 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Mon, 2 Mar 2020 22:47:05 -0500 Subject: [PATCH 3/5] ColorShift: Use one-word name in EffectInfo --- src/EffectInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EffectInfo.cpp b/src/EffectInfo.cpp index 5d786fe7..6829f4eb 100644 --- a/src/EffectInfo.cpp +++ b/src/EffectInfo.cpp @@ -56,7 +56,7 @@ EffectBase* EffectInfo::CreateEffect(std::string effect_type) { else if (effect_type == "ChromaKey") return new ChromaKey(); - else if (effect_type == "Color Shift") + else if (effect_type == "ColorShift") return new ColorShift(); else if (effect_type == "Crop") From 4d7b4072c3bb5e38285d764155582f831631948c Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Mon, 2 Mar 2020 23:50:10 -0600 Subject: [PATCH 4/5] Fixing abs -> fabs regression. Not sure how this worked before. --- src/Frame.cpp | 2 +- src/effects/ColorShift.cpp | 18 ++++++++---------- src/effects/Shift.cpp | 4 ++-- src/effects/Wave.cpp | 2 +- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/Frame.cpp b/src/Frame.cpp index 7d4dc42e..9577a7f9 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -581,7 +581,7 @@ void Frame::Save(std::string path, float scale, std::string format, int quality) std::shared_ptr previewImage = GetImage(); // scale image if needed - if (abs(scale) > 1.001 || abs(scale) < 0.999) + if (fabs(scale) > 1.001 || fabs(scale) < 0.999) { int new_width = width; int new_height = height; diff --git a/src/effects/ColorShift.cpp b/src/effects/ColorShift.cpp index 2a7a26d7..7ec62e14 100644 --- a/src/effects/ColorShift.cpp +++ b/src/effects/ColorShift.cpp @@ -75,25 +75,24 @@ std::shared_ptr ColorShift::GetFrame(std::shared_ptr frame, int64_ // Get the current shift amount, and clamp to range (-1 to 1 range) // Red Keyframes float red_x_shift = red_x.GetValue(frame_number); - int red_x_shift_limit = round(frame_image_width * fmod(abs(red_x_shift), 1.0)); + int red_x_shift_limit = round(frame_image_width * fmod(fabs(red_x_shift), 1.0)); float red_y_shift = red_y.GetValue(frame_number); - int red_y_shift_limit = round(frame_image_height * fmod(abs(red_y_shift), 1.0)); + int red_y_shift_limit = round(frame_image_height * fmod(fabs(red_y_shift), 1.0)); // Green Keyframes float green_x_shift = green_x.GetValue(frame_number); - int green_x_shift_limit = round(frame_image_width * fmod(abs(green_x_shift), 1.0)); + int green_x_shift_limit = round(frame_image_width * fmod(fabs(green_x_shift), 1.0)); float green_y_shift = green_y.GetValue(frame_number); - int green_y_shift_limit = round(frame_image_height * fmod(abs(green_y_shift), 1.0)); + int green_y_shift_limit = round(frame_image_height * fmod(fabs(green_y_shift), 1.0)); // Blue Keyframes float blue_x_shift = blue_x.GetValue(frame_number); - int blue_x_shift_limit = round(frame_image_width * fmod(abs(blue_x_shift), 1.0)); + int blue_x_shift_limit = round(frame_image_width * fmod(fabs(blue_x_shift), 1.0)); float blue_y_shift = blue_y.GetValue(frame_number); - int blue_y_shift_limit = round(frame_image_height * fmod(abs(blue_y_shift), 1.0)); + int blue_y_shift_limit = round(frame_image_height * fmod(fabs(blue_y_shift), 1.0)); // Alpha Keyframes float alpha_x_shift = alpha_x.GetValue(frame_number); - int alpha_x_shift_limit = round(frame_image_width * fmod(abs(alpha_x_shift), 1.0)); + int alpha_x_shift_limit = round(frame_image_width * fmod(fabs(alpha_x_shift), 1.0)); float alpha_y_shift = alpha_y.GetValue(frame_number); - int alpha_y_shift_limit = round(frame_image_height * fmod(abs(alpha_y_shift), 1.0)); - + int alpha_y_shift_limit = round(frame_image_height * fmod(fabs(alpha_y_shift), 1.0)); // Make temp copy of pixels unsigned char *temp_image = new unsigned char[frame_image_width * frame_image_height * 4](); @@ -130,7 +129,6 @@ std::shared_ptr ColorShift::GetFrame(std::shared_ptr frame, int64_ blue_starting_row_index = starting_row_index; alpha_starting_row_index = starting_row_index; - red_pixel_offset = 0; green_pixel_offset = 0; blue_pixel_offset = 0; diff --git a/src/effects/Shift.cpp b/src/effects/Shift.cpp index 0a58d152..ee581591 100644 --- a/src/effects/Shift.cpp +++ b/src/effects/Shift.cpp @@ -69,9 +69,9 @@ std::shared_ptr Shift::GetFrame(std::shared_ptr frame, int64_t fra // Get the current shift amount, and clamp to range (-1 to 1 range) double x_shift = x.GetValue(frame_number); - double x_shift_limit = fmod(abs(x_shift), 1.0); + double x_shift_limit = fmod(fabs(x_shift), 1.0); double y_shift = y.GetValue(frame_number); - double y_shift_limit = fmod(abs(y_shift), 1.0); + double y_shift_limit = fmod(fabs(y_shift), 1.0); // Declare temp arrays to hold pixels while we move things around unsigned char *temp_row = new unsigned char[frame_image->width() * 4](); diff --git a/src/effects/Wave.cpp b/src/effects/Wave.cpp index 0647dc7c..499fc958 100644 --- a/src/effects/Wave.cpp +++ b/src/effects/Wave.cpp @@ -74,7 +74,7 @@ std::shared_ptr Wave::GetFrame(std::shared_ptr frame, int64_t fram int pixel_count = frame_image->width() * frame_image->height(); // Get current keyframe values - double time = frame_number;//abs(((frame_number + 255) % 510) - 255); + double time = frame_number; double wavelength_value = wavelength.GetValue(frame_number); double amplitude_value = amplitude.GetValue(frame_number); double multiplier_value = multiplier.GetValue(frame_number); From efe0728f2f5fe6d0ae484828c9552e12ec1a789d Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Tue, 3 Mar 2020 02:34:57 -0600 Subject: [PATCH 5/5] Bump version to -dev2 (merge master back to develop) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 470db459..a0e8a5fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ For more information, please visit . set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules") ################ PROJECT VERSION #################### -set(PROJECT_VERSION_FULL "0.2.5") +set(PROJECT_VERSION_FULL "0.2.5-dev2") set(PROJECT_SO_VERSION 19) # Remove the dash and anything following, to get the #.#.# version for project()