diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-09-07 11:12:12 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-09-07 11:12:12 +0300 |
commit | b351607996e467f89ce841630a84244fab6fe3f5 (patch) | |
tree | bdb69a32057c812a78b2a0a9a615c8474b09ff85 /source/blender/imbuf/intern/imageprocess.c | |
parent | d122911d109305dc4768538fdd6e9b9ce5bc130e (diff) |
Cleanup: update comment after Clang-Tidy bugprone-incorrect-roundings fixes
Remove the comment about adding `0.5`, as this is no longer done (since
fb5e2f56109e).
No functional changes.
Diffstat (limited to 'source/blender/imbuf/intern/imageprocess.c')
-rw-r--r-- | source/blender/imbuf/intern/imageprocess.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c index 79382e3be76..bcac140f036 100644 --- a/source/blender/imbuf/intern/imageprocess.c +++ b/source/blender/imbuf/intern/imageprocess.c @@ -201,8 +201,7 @@ void bilinear_interpolation_color_wrap( row3I = (unsigned char *)in->rect + ((size_t)in->x) * y1 * 4 + 4 * x2; row4I = (unsigned char *)in->rect + ((size_t)in->x) * y2 * 4 + 4 * x2; - /* need to add 0.5 to avoid rounding down (causes darken with the smear brush) - * tested with white images and this should not wrap back to zero */ + /* Tested with white images and this should not wrap back to zero. */ outI[0] = roundf(ma_mb * row1I[0] + a_mb * row3I[0] + ma_b * row2I[0] + a_b * row4I[0]); outI[1] = roundf(ma_mb * row1I[1] + a_mb * row3I[1] + ma_b * row2I[1] + a_b * row4I[1]); outI[2] = roundf(ma_mb * row1I[2] + a_mb * row3I[2] + ma_b * row2I[2] + a_b * row4I[2]); |