Fix comment about BILINEAR_INTERPOLATION_BITS to say < 8 rather than <= 8
authorSøren Sandmann Pedersen <soren.sandmann@gmail.com>
Sat, 20 Sep 2014 04:51:56 +0000 (21:51 -0700)
committerSøren Sandmann Pedersen <soren.sandmann@gmail.com>
Sun, 5 Oct 2014 19:42:47 +0000 (12:42 -0700)
Since a4c79d695d52c94647b1aff7 the constant
BILINEAR_INTERPOLATION_BITS must be strictly less than 8, so fix the
comment to say this, and also add a COMPILE_TIME_ASSERT in the
bilinear fetcher in pixman-fast-path.c

pixman/pixman-fast-path.c
pixman/pixman-private.h

index c6e43de10acc8112f6e26c78df761fb270ee4cd8..53d4a1f9047a2803ce31326a9b8a8e6a30d1e85e 100644 (file)
@@ -2343,6 +2343,8 @@ fast_fetch_bilinear_cover (pixman_iter_t *iter, const uint32_t *mask)
     int32_t dist_y;
     int i;
 
+    COMPILE_TIME_ASSERT (BILINEAR_INTERPOLATION_BITS < 8);
+
     fx = info->x;
     ux = iter->image->common.transform->matrix[0][0];
 
index fdc966ae9ab0416a05654450ad0f70b1d4d68b29..73108a01d32dbbf49021138176e433667e84ae6c 100644 (file)
@@ -7,7 +7,7 @@
  * The defines which are shared between C and assembly code
  */
 
-/* bilinear interpolation precision (must be <= 8) */
+/* bilinear interpolation precision (must be < 8) */
 #define BILINEAR_INTERPOLATION_BITS 7
 #define BILINEAR_INTERPOLATION_RANGE (1 << BILINEAR_INTERPOLATION_BITS)