From patchwork Mon Aug 2 05:34:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 29180 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6c0f:0:0:0:0:0 with SMTP id a15csp1282850ioh; Sun, 1 Aug 2021 22:35:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyotdO14XbkKLXvzRL7guehG2hrGtE8UAwfyqKDrfyjIAzLOL0hw7AmIXWF5+dF6SZUk3P6 X-Received: by 2002:a05:6402:48f:: with SMTP id k15mr16908637edv.262.1627882549658; Sun, 01 Aug 2021 22:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627882549; cv=none; d=google.com; s=arc-20160816; b=Tq5Smlhi1kv1lgFI2KcCf0UfcMrb3PvKOGth31Pqy5FT2AIurENIjrirP8t2bVf/lG CePAG+1Gv9ni694/Ggbt1DNkObUOvG1ZO1VmEh3DPuD3/cVrbbNPzvLERPbgn8dgo6Ba 0I2xevkF986GP9RGsJg3YutGFm5sRokIlwlci40vH0w4TWJC/5PmmRuiIpKdPLqZqklK Q6aXEM6uDZYlrKzUa+6/ETAVUP7XczMZ1w38GDUideKo8/+GpEAKi82MQ8lXwS0AAXPN NZAdLA6jHBnJXyNGS3WprXLAjIIFihiCH0MCqf85Vh/+MewlRIuXNV5RwCzWnMHzV9hf MZ8w== 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=ZszCvbi/0ALL/qX1/znSrk2vnwRre68YhAM5Nur9y74YblngR4UIxm8chQ+VPxjrnD uAylH45PwM7/O6bY9H3mteBpToTafi3OgXzxGWKvshmMNCj0O92KqTfvznxoxbKFjj6e Mn7sR2yLAo4Kc7cAxG3hHqmvIKTgEDbHJvme5C2uRyKb0N/haycIXD65MZXUNSzUNAnk oqgQ9oRdtVRP8efOfviAzCYcS/MDnV8u5S18E0B9aMHJcmKRiy69Pl5AW0U9Q6M20DFh sKG3XmMKrs+jsDBGhEaXo/5qSfBuH/jvk9d+1WKF2pyJpT3nd0dRkYKnaPV4j01Qmkce k9Iw== 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 f23si3388263eds.64.2021.08.01.22.35.49; Sun, 01 Aug 2021 22:35:49 -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 84B9668A2DE; Mon, 2 Aug 2021 08:35:28 +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 2CEED68A46C for ; Mon, 2 Aug 2021 08:35:19 +0300 (EEST) X-IronPort-AV: E=McAfee;i="6200,9189,10063"; a="213420923" X-IronPort-AV: E=Sophos;i="5.84,288,1620716400"; d="scan'208";a="213420923" 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:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,287,1620716400"; d="scan'208";a="457815404" Received: from skl-e5.sh.intel.com ([10.239.43.106]) by orsmga007.jf.intel.com with ESMTP; 01 Aug 2021 22:35:15 -0700 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Mon, 2 Aug 2021 13:34:37 +0800 Message-Id: <20210802053439.42828-3-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 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 , yanfei.cheng@intel.com MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Ca1vGE9Ygkkp 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); }