From patchwork Sat Nov 25 23:47:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 6361 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.94 with SMTP id m30csp3965810jah; Sat, 25 Nov 2017 15:47:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ//+LqALUbnaahpcYmfdNskn76GO6mQo8sUP+oCFtFl3iscSNEoanm4uy/rPrrKiqUTd9z X-Received: by 10.223.133.68 with SMTP id 62mr20175809wrh.243.1511653655121; Sat, 25 Nov 2017 15:47:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511653655; cv=none; d=google.com; s=arc-20160816; b=Fkri3GpQ9iODFe92++Ym1Qh0jCLrtaUoAw5JmwODLgJVH9RE6fLKcY8JOHYl1oAlUD wKjq4Ar1vbpZIUX31QStX1OuC8P01wnB40NNmvW7EH0TLJXOJ5l4pTuGApFvI18SKloH ZK6XrqLNW/AxGnsCDINZW3q8QqfGKfu7zwdfo+KObvBHOZJM1LPP3uUbC1noCmBxEyBM 7Ktq3K6EMn36a+JRGSNhTuiFzQkKcwwUBufLkLu72MXgCj4W5XJutwe39dcDwd4K0EdK Br+UsneG0ykvcdFub862tE1sYQOhOVuqJRnlQYiw4gsA0bjFiH8fPzvzGGcaow5uIj4L +Qmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :in-reply-to:mime-version:references:message-id:to:from:date :delivered-to:arc-authentication-results; bh=ZXpXfbhLGUNKmckO1AwUYBiUt2PbEaHnSaErVoiagtI=; b=lYdV0jq7VoYe/Kw15Og8EKPcuhBUUGKbXlwryj+Dg/0qBpkEpu5noQPrK1U3hDFgfc ZcilYOV1VChZioDpaoT12562+hZ+67k7Xu8zmS5Ko8ThGnWIDRJzdVAjsc9U4gzsXUlY X11SeFoszg0eS54jsbCyfkNEJGQ67MVWHVKGqRsowRSTdXz2Lf3C0GjftgJNyTGrt+Ih Ur7vI7w1oUdrjcaiGSSNQMv/ITDJWqfpXQNowedF6SMutcffKHK8yXpQapGSCuedCWiA qdM6wEN+tYrGzXJbnttXqCL41aK00EBuEQhTnX9/g+uWm4pmTpkhNPy4WpICGGInvP4c 8Cdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v6si3657488wmc.130.2017.11.25.15.47.33; Sat, 25 Nov 2017 15:47:35 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CE56868A34E; Sun, 26 Nov 2017 01:47:30 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5912D68A2B3 for ; Sun, 26 Nov 2017 01:47:24 +0200 (EET) X-Originating-IP: 213.47.41.20 Received: from localhost (213-47-41-20.cable.dynamic.surfer.at [213.47.41.20]) (Authenticated sender: michael@niedermayer.cc) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 7762241C080 for ; Sun, 26 Nov 2017 00:47:25 +0100 (CET) Date: Sun, 26 Nov 2017 00:47:22 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20171125234722.GU4636@nb4> References: <20171029145710.17675-1-michael@niedermayer.cc> <20171125231038.GT4636@nb4> MIME-Version: 1.0 In-Reply-To: <20171125231038.GT4636@nb4> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [FFmpeg-devel] [PATCH] tests/checkasm/float_dsp: Increase allowed difference for float_dsp.vector_dmul X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" On Sun, Nov 26, 2017 at 12:10:38AM +0100, Michael Niedermayer wrote: > On Fri, Nov 24, 2017 at 11:37:36PM -0300, James Almer wrote: > > On 10/29/2017 11:57 AM, Michael Niedermayer wrote: > > > The choosen value is the lowest power of 2 that allows 1000 iterations of fate-checkasm-float_dsp > > > to pass on x86-32 > > > > Ticket #6848 reports this value is still not enough. Maybe something > > like 1.0e-12 or 1.0e-13 instead? > > ok, ill push it with 1e-12 Or do people prefer this: (this should be more correct) commit 67ba87a320faba623c0b35a0692adb916860ac40 (HEAD -> master) Author: Michael Niedermayer Date: Sun Oct 29 15:26:50 2017 +0100 tests/checkasm/float_dsp: Increase allowed difference for float_dsp.vector_dmul Tested for 10000 iterations on x86-32 Fixes: Ticket6848 Signed-off-by: Michael Niedermayer [...] diff --git a/tests/checkasm/float_dsp.c b/tests/checkasm/float_dsp.c index 9b0a221c25..32cac45a17 100644 --- a/tests/checkasm/float_dsp.c +++ b/tests/checkasm/float_dsp.c @@ -165,7 +165,8 @@ static void test_vector_dmul_scalar(const double *src0, const double *src1) call_ref(cdst, src0, src1[0], LEN); call_new(odst, src0, src1[0], LEN); for (i = 0; i < LEN; i++) { - if (!double_near_abs_eps(cdst[i], odst[i], DBL_EPSILON)) { + double t = FFMAX3(fabs(src1[0]), fabs(src0[i]), fabs(src1[0] * src0[i])); + if (!double_near_abs_eps(cdst[i], odst[i], FFMAX(t, 1.0) * 2 * DBL_EPSILON)) { fprintf(stderr, "%d: %- .12f - %- .12f = % .12g\n", i, cdst[i], odst[i], cdst[i] - odst[i]); fail();