static int32_t
-fxt1_variance (double variance[MAX_COMP],
- uint8_t input[N_TEXELS][MAX_COMP], int32_t nc, int32_t n)
+fxt1_variance (uint8_t input[N_TEXELS / 2][MAX_COMP], int32_t nc)
{
+ const int n = N_TEXELS / 2;
int32_t i, k, best = 0;
int32_t sx, sx2;
double var, maxvar = -1; /* small enough */
maxvar = var;
best = i;
}
- if (variance) {
- variance[i] = var;
- }
}
return best;
#else
int32_t minVal;
int32_t maxVal;
- int32_t maxVarL = fxt1_variance(NULL, input, n_comp, N_TEXELS / 2);
- int32_t maxVarR = fxt1_variance(NULL, &input[N_TEXELS / 2], n_comp, N_TEXELS / 2);
+ int32_t maxVarL = fxt1_variance(input, n_comp);
+ int32_t maxVarR = fxt1_variance(&input[N_TEXELS / 2], n_comp);
/* Scan the channel with max variance for lo & hi
* and use those as the two representative colors.