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-08-23 16:30:31 +0300
committerManuel Castilla <manzanillawork@gmail.com>2021-08-23 18:08:45 +0300
commitdaa7c59e38c8fe464004b3becd6956b880c38c92 (patch)
treec579e1eb7908bc24429fad527b9ae58fda4c67d7 /source/blender/compositor/operations/COM_GaussianXBlurOperation.cc
parent344aca3b1bf2718904455ea6cef1ffd8bedf51a6 (diff)
Compositor: Full frame Bokeh Blur and Blur nodes
Adds full frame implementation to these nodes operations. When enabling "extend bounds" node option, tiled implementation result is slightly different because it's using `TranslateOperation` with bilinear sampling for centering. Full frame always uses nearest to don't lose image quality. It has the disadvantage of causing image jiggling on backdrop when switching size values as it's not pixel perfect. This is fixed by rounding to even. No functional changes. Part of T88150. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D12167
Diffstat (limited to 'source/blender/compositor/operations/COM_GaussianXBlurOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_GaussianXBlurOperation.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cc b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cc
index 4b46cfc8776..8d686265231 100644
--- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cc
+++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cc
@@ -25,13 +25,8 @@
namespace blender::compositor {
-GaussianXBlurOperation::GaussianXBlurOperation() : BlurBaseOperation(DataType::Color)
+GaussianXBlurOperation::GaussianXBlurOperation() : GaussianBlurBaseOperation(eDimension::X)
{
- this->m_gausstab = nullptr;
-#ifdef BLI_HAVE_SSE2
- this->m_gausstab_sse = nullptr;
-#endif
- this->m_filtersize = 0;
}
void *GaussianXBlurOperation::initializeTileData(rcti * /*rect*/)
@@ -45,13 +40,14 @@ void *GaussianXBlurOperation::initializeTileData(rcti * /*rect*/)
return buffer;
}
+/* TODO(manzanilla): to be removed with tiled implementation. */
void GaussianXBlurOperation::initExecution()
{
- BlurBaseOperation::initExecution();
+ GaussianBlurBaseOperation::initExecution();
initMutex();
- if (this->m_sizeavailable) {
+ if (this->m_sizeavailable && execution_model_ == eExecutionModel::Tiled) {
float rad = max_ff(m_size * m_data.sizex, 0.0f);
m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS);
@@ -63,6 +59,7 @@ void GaussianXBlurOperation::initExecution()
}
}
+/* TODO(manzanilla): to be removed with tiled implementation. */
void GaussianXBlurOperation::updateGauss()
{
if (this->m_gausstab == nullptr) {
@@ -158,7 +155,7 @@ void GaussianXBlurOperation::executeOpenCL(OpenCLDevice *device,
void GaussianXBlurOperation::deinitExecution()
{
- BlurBaseOperation::deinitExecution();
+ GaussianBlurBaseOperation::deinitExecution();
if (this->m_gausstab) {
MEM_freeN(this->m_gausstab);