1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

checkasm/audiodsp: Be strict about MMX

There is no MMX code for audiodsp after commit
3d716d38ab, so use declare_func
instead of declare_func_emms() to also test that we are not
in MMX mode after return.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-10-08 02:07:36 +02:00
parent 18afaa20f1
commit 42921190cb

View File

@ -61,7 +61,7 @@ void checkasm_check_audiodsp(void)
unsigned int len_bits_minus4, v1_bits, v2_bits, len; unsigned int len_bits_minus4, v1_bits, v2_bits, len;
int32_t res0, res1; int32_t res0, res1;
declare_func_emms(AV_CPU_FLAG_MMX, int32_t, const int16_t *v1, const int16_t *v2, int len); declare_func(int32_t, const int16_t *v1, const int16_t *v2, int len);
// generate random 5-12bit vector length // generate random 5-12bit vector length
len_bits_minus4 = rnd() % 8; len_bits_minus4 = rnd() % 8;
@ -90,8 +90,8 @@ void checkasm_check_audiodsp(void)
int32_t val1, val2, min, max; int32_t val1, val2, min, max;
int len; int len;
declare_func_emms(AV_CPU_FLAG_MMX, void, int32_t *dst, const int32_t *src, declare_func(void, int32_t *dst, const int32_t *src,
int32_t min, int32_t max, unsigned int len); int32_t min, int32_t max, unsigned int len);
val1 = ((int32_t)rnd()); val1 = ((int32_t)rnd());
val1 = FFSIGN(val1) * (val1 & ((1 << 24) - 1)); val1 = FFSIGN(val1) * (val1 & ((1 << 24) - 1));
@ -120,8 +120,8 @@ void checkasm_check_audiodsp(void)
float val1, val2, min, max; float val1, val2, min, max;
int i, len; int i, len;
declare_func_emms(AV_CPU_FLAG_MMX, void, float *dst, const float *src, declare_func(void, float *dst, const float *src,
int len, float min, float max); int len, float min, float max);
val1 = (float)rnd() / (UINT_MAX >> 1) - 1.0f; val1 = (float)rnd() / (UINT_MAX >> 1) - 1.0f;
val2 = (float)rnd() / (UINT_MAX >> 1) - 1.0f; val2 = (float)rnd() / (UINT_MAX >> 1) - 1.0f;