From patchwork Wed Aug 4 02:06:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 29230 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6c0f:0:0:0:0:0 with SMTP id a15csp2976109ioh; Tue, 3 Aug 2021 19:06:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvbbUseUqgzV2wEaLl3fu+qKPgvMTjqO3N6yOZVksDW0bO8R/gQQUGoHnIelaQzyiyNdYH X-Received: by 2002:a17:907:988d:: with SMTP id ja13mr24305103ejc.548.1628042815816; Tue, 03 Aug 2021 19:06:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628042815; cv=none; d=google.com; s=arc-20160816; b=rjLMZesCktx/FxwRwt1XeUsJALq4sVrZBkaT0GbNyNQOnuTYCPfhL/rgPYJL0StYvr FQm5km7OBGF2QIoXBruOuzbTtM4oWPtRSKaCmxkuEeQIaVN9CUBvaK4uWAuENvLPuU7w Lr1gpH1YSVKQLYPQ2Q7AQ9lSIDYV1xGlwAZptq6b3QLSaAehALld00yB9RbZmf1+mWFU dxu7BXlwzcTM6LxYNhyFIB4Ov3QJspyMhuJQCZcwWEjliXdx96g+cvt0I97TyoJUwyai sHW+8pboO/sGkwLwnWtUP1gQPoeYs9zbR1aath1NeRdSVBbLwuChtM+dghE//B4W5nZM GDxQ== 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=1lr716rpiGKbPH/ely7DXFHTYzD5uqqbX2mMcfuCJ/E=; b=ESwxg0p+egor0JdSWGkHd0wWQcNcYlT95m4wcwpPs+DI+h8/1IGTrmbejNFSP7KIGu uwiiinXMvdwArfRfbtqs/S4o1TMtWvijhIgPjzHZGRTT7mwrUEuZOPU6tYt10mSgqSHy e/t5cyyyhiUc1jmwryy/ZDkNY8ICOzWb5y++3xaiGCLlgAur4Ne/CXpPl8VZs2Aro7SM E9qOEfM2v0tohzEV4ndWY8gf2tQ4BeWabma2Bim80r2Iw4jGFTuvpB6YA/qmBburDjBm KO9C/LkzYTlCTeQMgAbAdqvOxe3ww0Q8pCq7UmHmKR+hQVMm+u6pZB2D2oV9eDMtAWho 9M1Q== 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 d17si759225edx.45.2021.08.03.19.06.55; Tue, 03 Aug 2021 19:06:55 -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 02B366880FA; Wed, 4 Aug 2021 05:06:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 49A416891CF for ; Wed, 4 Aug 2021 05:06:28 +0300 (EEST) X-IronPort-AV: E=McAfee;i="6200,9189,10065"; a="210717024" X-IronPort-AV: E=Sophos;i="5.84,293,1620716400"; d="scan'208";a="210717024" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2021 19:06:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,293,1620716400"; d="scan'208";a="667632141" Received: from skl-e5.sh.intel.com ([10.239.43.106]) by fmsmga006.fm.intel.com with ESMTP; 03 Aug 2021 19:06:24 -0700 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Wed, 4 Aug 2021 10:06:14 +0800 Message-Id: <20210804020616.82866-3-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210804020616.82866-1-jianhua.wu@intel.com> References: <20210804020616.82866-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH v2 3/5] tests/checkasm/vf_gblur.c: add check_verti_slice() for unit test 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ujr2YXqymr0G Co-authored-by: Cheng Yanfei Co-authored-by: Jin Jun Signed-off-by: Wu Jianhua --- tests/checkasm/vf_gblur.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/checkasm/vf_gblur.c b/tests/checkasm/vf_gblur.c index b9fe2f9a36..0fac37b6be 100644 --- a/tests/checkasm/vf_gblur.c +++ b/tests/checkasm/vf_gblur.c @@ -49,6 +49,22 @@ static void check_horiz_slice(float *dst_ref, float *dst_new) bench_new(dst_new, WIDTH, HEIGHT, 1, nu, bscale); } +static void check_verti_slice(float *dst_ref, float *dst_new) +{ + int steps = 2; + float nu = 0.101f; + float bscale = 1.112f; + + declare_func(void, float *buffer, int width, int height, int column_begin, + int column_end, int steps, float nu, float bscale); + call_ref(dst_ref, WIDTH, HEIGHT, 0, WIDTH, steps, nu, bscale); + call_new(dst_new, WIDTH, HEIGHT, 0, WIDTH, steps, nu, bscale); + if (!float_near_abs_eps_array(dst_ref, dst_new, 0.01f, PIXELS)) { + fail(); + } + bench_new(dst_new, WIDTH, HEIGHT, 0, WIDTH, 1, nu, bscale); +} + static void check_postscale_slice(float *dst_ref, float *dst_new) { float postscale = 0.0603f; @@ -85,6 +101,13 @@ void checkasm_check_vf_gblur(void) } report("postscale_slice"); + randomize_buffers(dst_ref, PIXELS); + memcpy(dst_new, dst_ref, BUF_SIZE); + if (check_func(s.verti_slice, "verti_slice")) { + check_verti_slice(dst_ref, dst_new); + } + report("verti_slice"); + av_freep(&dst_ref); av_freep(&dst_new); }