Use a precalculated array of pseudorandom numbers to do dither, reducing runtime load on low-powered processors.

This commit is contained in:
Mike Brady
2017-01-30 21:05:52 +00:00
parent d9811e37f6
commit 49239c3842
+2 -2
View File
@@ -676,8 +676,8 @@ static inline void process_sample(int32_t sample, char **outp, enum sps_format_t
break;
}
dither_mask -= 1;
int64_t r = r64i();
// int64_t r = ranarray64i();
// int64_t r = r64i();
int64_t r = ranarray64i(); // use an array of precalculated pseudorandom numbers rather than calculating them on the fly. Should be easier on low-powered processors
int64_t tpdf = (r & dither_mask) - (previous_random_number & dither_mask);
previous_random_number = r;