[Bf-blender-cvs] [d089e9bfaa] soc-2016-cycles_denoising: Cycles Denoising: Remove useless if() in the kernel code

Lukas Stockner noreply at git.blender.org
Wed Feb 1 05:18:59 CET 2017


Commit: d089e9bfaab13a2c18760c25e481c717d118a49f
Author: Lukas Stockner
Date:   Sat Jan 14 18:58:27 2017 +0100
Branches: soc-2016-cycles_denoising
https://developer.blender.org/rBd089e9bfaab13a2c18760c25e481c717d118a49f

Cycles Denoising: Remove useless if() in the kernel code

===================================================================

M	intern/cycles/kernel/filter/filter_nlm_cpu.h

===================================================================

diff --git a/intern/cycles/kernel/filter/filter_nlm_cpu.h b/intern/cycles/kernel/filter/filter_nlm_cpu.h
index 244ec86487..118770dde1 100644
--- a/intern/cycles/kernel/filter/filter_nlm_cpu.h
+++ b/intern/cycles/kernel/filter/filter_nlm_cpu.h
@@ -153,13 +153,8 @@ ccl_device_inline void kernel_filter_nlm_update_output(int dx, int dy, float ccl
 				sum += differenceImage[y*w+x1];
 			}
 			float weight = sum * (1.0f/(high - low));
-			if(outImage) {
-				accumImage[y*w+x] += weight;
-				outImage[y*w+x] += weight*image[(y+dy)*w+(x+dx)];
-			}
-			else {
-				accumImage[y*w+x] = weight;
-			}
+			accumImage[y*w+x] += weight;
+			outImage[y*w+x] += weight*image[(y+dy)*w+(x+dx)];
 		}
 	}
 }




More information about the Bf-blender-cvs mailing list