Two things:

1) take a few thousand samples and use an average or trimmed mean

2) do a comparison more like "if ((new_ad + 32 < old_ad) || (new_ad > old_ad + 32)) ..."

Code:

// take mean of samples on each side of the median - adjustable, no dither
double trimmed_mean(const uint16_t array[], const unsigned count, const unsigned n)
{
qsort(array, count, sizeof(array[0]), compare_u16);
unsigned sum = 0;
unsigned n2 = 0;
#if 0
// classic method is to trim n of the most extreme samples from each end - try n = 20% of count
for (unsigned i = n; i < (count - n); ++i) {
sum += array[i];
++n2;
}
#else
// weight each side method - try n = 1 for a tight histogram
const int median = array[count / 2];
for (unsigned i = 0; i < count; ++i) {
if (((int)array[i] >= median - (int)n) && ((int)array[i] <= median + (int)n)) {
sum += array[i];
++n2;
}
} // for
#endif
//Serial.printf("med %d,n2 %d %g\n", median, n2,(double)sum / n2);
return (double)sum / n2;
}