From daa7c59e38c8fe464004b3becd6956b880c38c92 Mon Sep 17 00:00:00 2001 From: Manuel Castilla Date: Mon, 23 Aug 2021 15:30:31 +0200 Subject: 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 --- source/blender/blenlib/BLI_math_base.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenlib/BLI_math_base.h') diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h index e877503e835..dbdd28766a5 100644 --- a/source/blender/blenlib/BLI_math_base.h +++ b/source/blender/blenlib/BLI_math_base.h @@ -196,6 +196,8 @@ MINLINE unsigned int log2_ceil_u(unsigned int x); MINLINE int divide_round_i(int a, int b); MINLINE int mod_i(int i, int n); +MINLINE float round_to_even(float f); + MINLINE signed char round_fl_to_char(float a); MINLINE unsigned char round_fl_to_uchar(float a); MINLINE short round_fl_to_short(float a); -- cgit v1.2.3