From patchwork Mon Aug 2 05:34:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 29183 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6c0f:0:0:0:0:0 with SMTP id a15csp1283042ioh; Sun, 1 Aug 2021 22:36:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIKQA1CHIqLJg4e2Sfn74Nhg/NsKR3dIDfuF7U8PXG6+WEmrZROF1oBxzxoIGJe4LqALn/ X-Received: by 2002:a17:906:8152:: with SMTP id z18mr14234339ejw.419.1627882569638; Sun, 01 Aug 2021 22:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627882569; cv=none; d=google.com; s=arc-20160816; b=mSWXlLrdIpS/ITGEQ+GYNhVDowI4/JE4MTQd2+uRyOpkk3TjCKifl4iXxmk5YP6Njk mz6oqOsoqyCFbxu7orHaB4yQh2LsIEb8+u63fIAtkKo/QkoUeJOwOsBGh9SJkYiOF85k J5aGX7TDPedQLqJze+J1PlFa69NB6ywkqy06Ux049UzPhqN31jCbowpwbwcUrz3I+24l w9FuQYSGrnC+ioGC1Gs9+8ntw/meMMYw6dHvEAv1XEsFcbLS0WcOdGPCrw0d6ig6tRcx 3F4xLZ9JcqTgFy9sAZ5Q9d14RfU0pFPCQ61QHtvufl3W435TPAfaeQU8PVzLfoo2nxN7 JMFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=wMj40hyrtUsNF2uh+b8oWs9m+qlko+nWzIBL9QEkYKg=; b=f02P/C/TzcD5GZeyyngQLwwCkxfGIoH6KvNXrVXBukUrdx1EmziGRekPdw8OTfyQsk 9NRRY0xLnJqib4zvW1mMMXt59dy/iTWBa5pYAXffqxJojXQX0MIoF0D/ENnLhB28eDkT e8B7MYQ3VRb0StJqhpmmV+j/+8833jEsMkkM5wHhnFFHyAF8x6qBGvmt3FEkD4RLA6+y bc47D1TIaYlyrsWr8Y1CB4oUPUSC/3fjdLcCeUnRMT6sL2WPVOiaD8uF73hZuniRTthT De05/jecUJyZ7pGeBoPM3d3CfJbrO2pnp+A1RAIcVbqQ6TS7jEd1VrrADA0RqAMR6xaX lGdg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u4si11432406ejy.271.2021.08.01.22.36.09; Sun, 01 Aug 2021 22:36:09 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A864F68A4E5; Mon, 2 Aug 2021 08:35:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B601D689CB4 for ; Mon, 2 Aug 2021 08:35:24 +0300 (EEST) X-IronPort-AV: E=McAfee;i="6200,9189,10063"; a="213420929" X-IronPort-AV: E=Sophos;i="5.84,288,1620716400"; d="scan'208";a="213420929" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2021 22:35:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,287,1620716400"; d="scan'208";a="457815416" Received: from skl-e5.sh.intel.com ([10.239.43.106]) by orsmga007.jf.intel.com with ESMTP; 01 Aug 2021 22:35:18 -0700 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Mon, 2 Aug 2021 13:34:39 +0800 Message-Id: <20210802053439.42828-5-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210802053439.42828-1-jianhua.wu@intel.com> References: <20210802053439.42828-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 5/5] tests/checkasm/vf_gblur.c: update check_horiz_slice for the new ff_horiz_slice_avx2/512 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Cc: Wu Jianhua , yanfei.cheng@intel.com MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: blse9zE45SvF Co-authored-by: Cheng Yanfei Co-authored-by: Jin Jun Signed-off-by: Wu Jianhua --- tests/checkasm/vf_gblur.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/checkasm/vf_gblur.c b/tests/checkasm/vf_gblur.c index 0fac37b6be..a7a1c1a24e 100644 --- a/tests/checkasm/vf_gblur.c +++ b/tests/checkasm/vf_gblur.c @@ -34,19 +34,19 @@ tmp_buf[j] = (float)(rnd() & 0xFF); \ } while (0) -static void check_horiz_slice(float *dst_ref, float *dst_new) +static void check_horiz_slice(float *dst_ref, float *dst_new, float *localbuf) { int steps = 2; float nu = 0.101f; float bscale = 1.112f; - declare_func(void, float *dst, int w, int h, int steps, float nu, float bscale); - call_ref(dst_ref, WIDTH, HEIGHT, steps, nu, bscale); - call_new(dst_new, WIDTH, HEIGHT, steps, nu, bscale); + declare_func(void, float *dst, int w, int h, int steps, float nu, float bscale, float *localbuf); + call_ref(dst_ref, WIDTH, HEIGHT, steps, nu, bscale, localbuf); + call_new(dst_new, WIDTH, HEIGHT, steps, nu, bscale, localbuf); if (!float_near_abs_eps_array(dst_ref, dst_new, 0.01f, PIXELS)) { fail(); } - bench_new(dst_new, WIDTH, HEIGHT, 1, nu, bscale); + bench_new(dst_new, WIDTH, HEIGHT, 1, nu, bscale, localbuf); } static void check_verti_slice(float *dst_ref, float *dst_new) @@ -87,10 +87,12 @@ void checkasm_check_vf_gblur(void) randomize_buffers(dst_ref, PIXELS); memcpy(dst_new, dst_ref, BUF_SIZE); + s.planewidth[0] = WIDTH; + s.planeheight[0] = HEIGHT; ff_gblur_init(&s); if (check_func(s.horiz_slice, "horiz_slice")) { - check_horiz_slice(dst_ref, dst_new); + check_horiz_slice(dst_ref, dst_new, s.localbuf); } report("horiz_slice"); @@ -108,6 +110,9 @@ void checkasm_check_vf_gblur(void) } report("verti_slice"); + if (s.localbuf) + av_free(s.localbuf); + av_freep(&dst_ref); av_freep(&dst_new); }