1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

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.
This commit is contained in:
Lynne
2022-09-23 01:41:02 +02:00
parent 9cbfffa0d4
commit 6ad39f01df

View File

@@ -22,12 +22,12 @@
#include "checkasm.h" #include "checkasm.h"
#define randomize_int32(buf, len) \ #define randomize_int32(buf, len) \
do { \ do { \
for (int i = 0; i < len; i++) { \ for (int i = 0; i < len; i++) { \
int32_t f = rnd() >> 8; \ int32_t f = (UINT32_MAX >> 8) - (rnd() >> 16); \
buf[i] = f; \ buf[i] = f; \
} \ } \
} while (0) } while (0)
#define EPS 0.005 #define EPS 0.005