// First pass: get pivots and taking average
for( uint i=0; i<STEPS ; i++ ){
pivot[i] = bits[2 * i];
+#if QT_VERSION >= 0x040700
avg+=pivot.at(i);
+#else
+ avg+=pivot[i];
+#endif
}
avg=avg/STEPS;
// Second Step: calculate delta (average?)
for (uint i=0; i<STEPS; i++)
{
+#if QT_VERSION >= 0x040700
int curdelta=abs(int(avg - pivot.at(i)));
+#else
+ int curdelta=abs(int(avg - pivot[i]));
+#endif
delta+=curdelta;
}
return delta / STEPS;