diff options
author | Lynne <dev@lynne.ee> | 2022-09-23 01:41:02 +0200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2022-09-23 01:42:34 +0200 |
commit | 6ad39f01dfb3ed7d7bbebac3924797966ad99dbf (patch) | |
tree | 2457ebbe34588078ebf0955e32c73597cc8e751b /tests/checkasm/lpc.c | |
parent | 9cbfffa0d4c5dabd05e5bbf9923cfaefa16ceb11 (diff) | |
download | ffmpeg-6ad39f01dfb3ed7d7bbebac3924797966ad99dbf.tar.gz |
tests/checkasm/lpc: reduce range and use signed values
This is more similar to its regular use, and prevents inaccuracies
of huge float*float multiplications from failing the tests.
Diffstat (limited to 'tests/checkasm/lpc.c')
-rw-r--r-- | tests/checkasm/lpc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/checkasm/lpc.c b/tests/checkasm/lpc.c index 49e608f8c1..2823953878 100644 --- a/tests/checkasm/lpc.c +++ b/tests/checkasm/lpc.c @@ -22,12 +22,12 @@ #include "checkasm.h" -#define randomize_int32(buf, len) \ - do { \ - for (int i = 0; i < len; i++) { \ - int32_t f = rnd() >> 8; \ - buf[i] = f; \ - } \ +#define randomize_int32(buf, len) \ + do { \ + for (int i = 0; i < len; i++) { \ + int32_t f = (UINT32_MAX >> 8) - (rnd() >> 16); \ + buf[i] = f; \ + } \ } while (0) #define EPS 0.005 |