Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Castilla <manzanillawork@gmail.com>2021-09-28 20:32:49 +0300
committerManuel Castilla <manzanillawork@gmail.com>2021-09-28 23:00:16 +0300
commit76377f0176b9561a7fc8f46b4ed704c631ddd90d (patch)
tree96775442f403dfdb0dc4d91f835495c72c1ca9c1 /source/blender/compositor/operations/COM_MovieDistortionOperation.cc
parent2ecd963d87e4f5215d1d86e7f1c22ab7833697f3 (diff)
Compositor: Replace resolution concept by canvas
This is a code refactor in preparation of supporting canvas compositing. See {D12466}. No functional changes, all canvases are at (0,0) position matching tiled implementation. Differential Revision: https://developer.blender.org/D12465
Diffstat (limited to 'source/blender/compositor/operations/COM_MovieDistortionOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_MovieDistortionOperation.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cc b/source/blender/compositor/operations/COM_MovieDistortionOperation.cc
index d3424959061..72162ffb110 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cc
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cc
@@ -29,7 +29,7 @@ MovieDistortionOperation::MovieDistortionOperation(bool distortion)
{
this->addInputSocket(DataType::Color);
this->addOutputSocket(DataType::Color);
- this->setResolutionInputSocketIndex(0);
+ this->set_canvas_input_index(0);
this->m_inputOperation = nullptr;
this->m_movieClip = nullptr;
this->m_apply = distortion;
@@ -49,10 +49,10 @@ void MovieDistortionOperation::initExecution()
float delta[2];
rcti full_frame;
full_frame.xmin = full_frame.ymin = 0;
- full_frame.xmax = this->m_width;
- full_frame.ymax = this->m_height;
+ full_frame.xmax = this->getWidth();
+ full_frame.ymax = this->getHeight();
BKE_tracking_max_distortion_delta_across_bound(
- tracking, this->m_width, this->m_height, &full_frame, !this->m_apply, delta);
+ tracking, this->getWidth(), this->getHeight(), &full_frame, !this->m_apply, delta);
/* 5 is just in case we didn't hit real max of distortion in
* BKE_tracking_max_undistortion_delta_across_bound
@@ -89,8 +89,8 @@ void MovieDistortionOperation::executePixelSampled(float output[4],
if (this->m_distortion != nullptr) {
/* float overscan = 0.0f; */
const float pixel_aspect = this->m_pixel_aspect;
- const float w = (float)this->m_width /* / (1 + overscan) */;
- const float h = (float)this->m_height /* / (1 + overscan) */;
+ const float w = (float)this->getWidth() /* / (1 + overscan) */;
+ const float h = (float)this->getHeight() /* / (1 + overscan) */;
const float aspx = w / (float)this->m_calibration_width;
const float aspy = h / (float)this->m_calibration_height;
float in[2];
@@ -152,8 +152,8 @@ void MovieDistortionOperation::update_memory_buffer_partial(MemoryBuffer *output
/* `float overscan = 0.0f;` */
const float pixel_aspect = this->m_pixel_aspect;
- const float w = (float)this->m_width /* `/ (1 + overscan)` */;
- const float h = (float)this->m_height /* `/ (1 + overscan)` */;
+ const float w = (float)this->getWidth() /* `/ (1 + overscan)` */;
+ const float h = (float)this->getHeight() /* `/ (1 + overscan)` */;
const float aspx = w / (float)this->m_calibration_width;
const float aspy = h / (float)this->m_calibration_height;
float xy[2];