[FFmpeg-devel] [PATCH] tests/checkasm/aacpsdsp: Increase EPS for interpolate so that the test passes on kfreebsd

James Almer jamrial at gmail.com
Mon Apr 16 00:16:52 EEST 2018


On 4/15/2018 5:51 PM, Michael Niedermayer wrote:
> The value is minimal, 0.11 fails
> 
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  tests/checkasm/aacpsdsp.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/checkasm/aacpsdsp.c b/tests/checkasm/aacpsdsp.c
> index ea68b39fa9..9e30eaa497 100644
> --- a/tests/checkasm/aacpsdsp.c
> +++ b/tests/checkasm/aacpsdsp.c
> @@ -33,6 +33,7 @@
>  } while (0)
>  
>  #define EPS 0.005
> +#define EPS2 0.12

That's kind of like a lot, but to be fair 0.005 was already a lot as
well, considering other tests succeed with just FLT_EPSILON or values
like 0.0000007.

Should be ok if that's really the smallest value that succeeds.

>  
>  static void test_add_squares(void)
>  {
> @@ -201,8 +202,8 @@ static void test_stereo_interpolate(PSDSPContext *psdsp)
>  
>              call_ref(l0, r0, h, h_step, BUF_SIZE);
>              call_new(l1, r1, h, h_step, BUF_SIZE);
> -            if (!float_near_abs_eps_array((float *)l0, (float *)l1, EPS, BUF_SIZE * 2) ||
> -                !float_near_abs_eps_array((float *)r0, (float *)r1, EPS, BUF_SIZE * 2))
> +            if (!float_near_abs_eps_array((float *)l0, (float *)l1, EPS2, BUF_SIZE * 2) ||
> +                !float_near_abs_eps_array((float *)r0, (float *)r1, EPS2, BUF_SIZE * 2))
>                  fail();
>  
>              memcpy(l1, l, BUF_SIZE * 2 * sizeof(INTFLOAT));
> 



More information about the ffmpeg-devel mailing list