int x, y, k = 0;
int c0_point, half_point, c3_point;
uint8_t color[16];
- const int indexMap[8] = {
+ static const int indexMap[8] = {
0 << 30, 2 << 30, 0 << 30, 2 << 30,
3 << 30, 3 << 30, 1 << 30, 1 << 30,
};
* the same inside that subinterval.
*
* Relying on this 1d approximation isn't always optimal in terms of
- * euclidean distance, but it's very close and a lot faster.
+ * Euclidean distance, but it's very close and a lot faster.
*
* http://cbloomrants.blogspot.com/2008/12/12-08-08-dxtc-summary.html */
c0_point = (stops[1] + stops[3]) >> 1;
if (fabs(vfb) > magn)
magn = fabs(vfb);
- /* if magnitudo is too small, default to luminance */
+ /* if magnitude is too small, default to luminance */
if (magn < 4.0f) {
/* JPEG YCbCr luma coefs, scaled by 1000 */
v_r = 299;
/* Additional magic to save a lot of multiplies in the accumulating loop.
* The tables contain precomputed products of weights for least squares
* system, accumulated inside one 32-bit register */
- const int w1tab[4] = { 3, 0, 2, 1 };
- const int prods[4] = { 0x090000, 0x000900, 0x040102, 0x010402 };
+ static const int w1tab[4] = { 3, 0, 2, 1 };
+ static const int prods[4] = { 0x090000, 0x000900, 0x040102, 0x010402 };
/* Check if all pixels have the same index */
if ((mask ^ (mask << 2)) < 4) {