[Bf-blender-cvs] [f669932c932] compositor-full-frame: Compositor: Fix plane distort operations incorrect areas of interest

Manuel Castilla noreply at git.blender.org
Fri Aug 20 17:34:36 CEST 2021


Commit: f669932c93226c2bdbf45d6fb6827ff349643772
Author: Manuel Castilla
Date:   Fri Aug 20 13:56:26 2021 +0200
Branches: compositor-full-frame
https://developer.blender.org/rBf669932c93226c2bdbf45d6fb6827ff349643772

Compositor: Fix plane distort operations incorrect areas of interest

The original implementation doesn't work for all cases.

===================================================================

M	source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cc

===================================================================

diff --git a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cc b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cc
index 91af4f0e5aa..a80cbbe942a 100644
--- a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cc
+++ b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cc
@@ -195,6 +195,15 @@ void PlaneDistortWarpImageOperation::get_area_of_interest(const int input_idx,
     return;
   }
 
+  /* TODO: figure out the area needed for warping and EWA filtering. */
+  r_input_area.xmin = 0;
+  r_input_area.ymin = 0;
+  r_input_area.xmax = get_input_operation(0)->getWidth();
+  r_input_area.ymax = get_input_operation(0)->getHeight();
+
+/* Old implemention but resulting coordinates are way out of input operation bounds and in some
+ * cases the area result may incorrectly cause cropping. */
+#if 0
   float min[2], max[2];
   INIT_MINMAX2(min, max);
   for (int sample = 0; sample < this->m_motion_blur_samples; sample++) {
@@ -219,6 +228,7 @@ void PlaneDistortWarpImageOperation::get_area_of_interest(const int input_idx,
   r_input_area.ymin = min[1] - 1;
   r_input_area.xmax = max[0] + 1;
   r_input_area.ymax = max[1] + 1;
+#endif
 }
 
 /* ******** PlaneDistort Mask ******** */



More information about the Bf-blender-cvs mailing list