diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-09-11 17:33:01 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-09-11 17:33:01 +0400 |
commit | ed6942f9ad3c9d79a4d3981da3c902ea9d7cacc0 (patch) | |
tree | e5ba8452a75fc0ee67e1d7be7cee1f78a93838d0 /source/blender/compositor/operations | |
parent | 4bbe0c8cded98d4daafe1707766041ca9b86db36 (diff) |
Fix wrong area of interest for movie undistortion
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r-- | source/blender/compositor/operations/COM_MovieDistortionOperation.cpp | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp index eb8e5a8cc50..50fabb09dbb 100644 --- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp @@ -73,26 +73,20 @@ void MovieDistortionOperation::initExecution() } } - if (this->m_distortion) { - 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; - BKE_tracking_max_undistortion_delta_across_bound(&this->m_movieClip->tracking, &full_frame, delta); - - /* 5 is just in case we didn't hit real max of distortion in - * BKE_tracking_max_undistortion_delta_across_bound - */ - m_margin[0] = delta[0] + 5; - m_margin[1] = delta[1] + 5; - } - else { - /* undistortion with sane distortion coefficients would be mapped inside - * of each tile, should be no need in margin in this case - */ - m_margin[0] = m_margin[1] = 0; - } + 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; + BKE_tracking_max_distortion_delta_across_bound( + &this->m_movieClip->tracking, &full_frame, + !this->m_distortion, delta); + + /* 5 is just in case we didn't hit real max of distortion in + * BKE_tracking_max_undistortion_delta_across_bound + */ + m_margin[0] = delta[0] + 5; + m_margin[1] = delta[1] + 5; DistortionCache *newC = new DistortionCache(this->m_movieClip, this->m_width, this->m_height, |