commit 024dc2980e8acc474b5dbbea8f806b899b6fd11b
parent 3598cf19e80f32bc0c4dbdc2fb9b73c436689696
Author: Sebastian Frysztak <sebfry@gmail.com>
Date: Wed, 15 Feb 2017 11:27:43 +0100
Minor style changes
Diffstat:
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/blur.c b/blur.c
@@ -1,6 +1,6 @@
/*
- * Copyright © 2008 Kristian Høgsberg
- * Copyright © 2009 Chris Wilson
+ * Copyright © 2008 Kristian Høgsberg
+ * Copyright © 2009 Chris Wilson
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/blur_simd.c b/blur_simd.c
@@ -10,7 +10,6 @@
#include "blur.h"
#include <xmmintrin.h>
-#define ALIGN16 __attribute__((aligned(16)))
// number of xmm registers needed to store input pixels for given kernel size
#define REGISTERS_CNT (KERNEL_SIZE + 4/2) / 4
@@ -22,7 +21,7 @@ void blur_impl_horizontal_pass_sse2(uint32_t *src, uint32_t *dst, int width, int
// handle borders
int leftBorder = column < HALF_KERNEL;
int rightBorder = column > width - HALF_KERNEL;
- uint32_t _rgbaIn[KERNEL_SIZE] ALIGN16;
+ uint32_t _rgbaIn[KERNEL_SIZE] __attribute__((aligned(16)));
int i = 0;
if (leftBorder) {
// for kernel size 7x7 and column == 0, we have:
@@ -65,7 +64,7 @@ void blur_impl_horizontal_pass_sse2(uint32_t *src, uint32_t *dst, int width, int
// multiplication is significantly faster than division
acc = _mm_cvtps_epi32(_mm_mul_ps(_mm_cvtepi32_ps(acc),
- _mm_set1_ps(1/((float)KERNEL_SIZE))));
+ _mm_set1_ps(1.0/KERNEL_SIZE)));
*(dst + height * column + row) =
_mm_cvtsi128_si32(_mm_packus_epi16(_mm_packs_epi32(acc, zero), zero));