From patchwork Mon Jan 10 14:58:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Kelly X-Patchwork-Id: 33181 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp2798851iog; Mon, 10 Jan 2022 06:59:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqS73IsWfpMKzC1xiihn7xMDaE79CHH55DK3FZaunEzcdQXWQ5h55lijgzmHGUhIf1dZ8/ X-Received: by 2002:a05:6402:5107:: with SMTP id m7mr63891edd.108.1641826767075; Mon, 10 Jan 2022 06:59:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641826767; cv=none; d=google.com; s=arc-20160816; b=lXUvMcLJG4X0T0N4i/0q1U3phYWvEyddMGvyKYOk2sV2hor3MVNsBZ1hOr5y480fof Fi4v55YrBnCSwFGigSs+JC9eoE72GF4q0ErCrmGIf00df1BFetdTs+9j3W+Nb8QJmAg+ Wt7z8OdSFO0yM45bIfINSpc90tfsaOYgQ+cefbcrX146uKbXQg0lxe1o8B/BN0AVZ1tc I1n/Pm7Lqg9OsgQsFRuQ1B+zqE+JKXeApPDNeOsV4oIBSsxT56Ym837X3nesAimFMAH2 YOn3pRn4ulTN+5uwVbfbos8XyC/y2w7rl+0HkhkjaYtV2AVwsxR+6XjimLUD01w5QyEM 2+QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:to:from:references:mime-version :message-id:in-reply-to:date:dkim-signature:delivered-to; bh=YFVX2AJI7NMC82SqFkhTwy3jhUXpM8zYhqr9O8LI3sg=; b=Ggo2ydfgg1r6abfNg9X/1+gPId9oWFfWb7smtPIB4CVPS8xGR0aKaco3pZZFuGfANZ qX2leac0aOYe8HDthZEYjjicW09kCL530B9t5DYMnw2g+hFqTv8H2N42O6AjiLVmB/PS p2wGiJyE3xieTk9MRVw6k3E0aEEPS8nR5m1TUIjNn7K8WrGnsj2rTw0mMHasoZay79u5 /aO3q7jvlosZL4Vp/tQl+zr7Btbk0qMn8dXjqTmptoPkkY6X3gh075yQ3jx8ZOfh2xs+ vcKokvl8gllmlW5y8ALiBbJh5cywy0UzBtrKBWIsrURidwXMw4S3OMSiaGU0IMe03KKc lLzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20210112 header.b=SNTvzphZ; 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 gn8si3967301ejc.807.2022.01.10.06.59.26; Mon, 10 Jan 2022 06:59:27 -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; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20210112 header.b=SNTvzphZ; 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 2D92768AEFF; Mon, 10 Jan 2022 16:59:20 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E92A468AEBD for ; Mon, 10 Jan 2022 16:59:13 +0200 (EET) Received: by mail-yb1-f201.google.com with SMTP id w35-20020a25ac23000000b006106b0711f2so19938579ybi.23 for ; Mon, 10 Jan 2022 06:59:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=C+nJ4kP9XfLtJoVryrGXlyKmgISJGld81H/kTOL7jFk=; b=SNTvzphZgsMUmbJ9UAj/nPhfyljIo13npGzz9xJrFytAnM40sg++RWxujLEYHtyXdq Nq8X34nrvZ2plIwiTVJfQYrqUvjt6GNkqt9ZA3cktIZ29R0HcEDYoshxWITZ0133B75K ZMGUk4btK8lFwHHNpmroOiIv3UXd5OoqRA512yNdE4rM6h3fdLyGgAkMmrfxaUKSMssM 3o1B/qWJ9vLfoWlfYuJ+ume893ZvCPlsgxrSK5iJ9iOwBK/h8wGvK1IE76lRP4evcl3e epGMt9OsUoi3yvX3d34EMimUKfHkojJ8GY970lFhCAUPNd5iXRPIi+ehFtvH43UsPCmK sOOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=C+nJ4kP9XfLtJoVryrGXlyKmgISJGld81H/kTOL7jFk=; b=Wp7AGPDQLV3uo/yPWk730xrQAuWYKJUYUn1y0iFBCOii6mEWzO1BsqtgNmOdrjrCx1 gALvR1YCSKciMyJClVp8ZNYE5hctMillQeohIp/qkbO+CovGYB/+vqksHgzLdvHKyWJR b/4ieZoZAez13iqIu5bZorbTMp4z0KESf1gCel74JxOx/9rAFlmjZ4cEz959Xe5/PAVg EyQrhRorO0EeE6g5c0rJyUPfzY5Kr0w467+nwfA3baU0177vA1k2zqnk6oyLZTIhPDyJ /eJbz4oTo+Olb7enyurFQKCi/mjiefVxpGWX+00Iwr5PPTZvmEgYaesYqhVoYDtbovWK K0gw== X-Gm-Message-State: AOAM530EbHtVEx5zQBB+wc/RYsEJyX4NnsC3MMxBsyPv8nY0rDwV6NFp tsT/Ut+DTU9FGtdmFz83dE4LQv9b/+7HnTq0b6DR+r7Gs1j+ywKLFReSPPbgllBQg/Wu1CRI6QO U9RWg51X56HEuOdcoJq7h1pDf7yJERuOzoPPvLsg+XGFS65DR5fliDBymUvmWayUJN8wWCG8= X-Received: from alankelly0.zrh.corp.google.com ([2a00:79e0:61:301:b61d:d4c4:5dce:c0af]) (user=alankelly job=sendgmr) by 2002:a05:6902:1001:: with SMTP id w1mr86253742ybt.664.1641826752493; Mon, 10 Jan 2022 06:59:12 -0800 (PST) Date: Mon, 10 Jan 2022 15:58:36 +0100 In-Reply-To: <20220110145836.3449558-1-alankelly@google.com> Message-Id: <20220110145836.3449558-4-alankelly@google.com> Mime-Version: 1.0 References: <20220110145836.3449558-1-alankelly@google.com> X-Mailer: git-send-email 2.34.1.575.g55b058a8bb-goog From: Alan Kelly To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 4/4] checkasm/sw_scale: hscale does not requires cpuflag 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: Alan Kelly Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: LROQE4BrsaRh This is done in ff_shuffle_filter_coefficients. --- tests/checkasm/sw_scale.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/checkasm/sw_scale.c b/tests/checkasm/sw_scale.c index 3c0a083b42..e7f916d3a8 100644 --- a/tests/checkasm/sw_scale.c +++ b/tests/checkasm/sw_scale.c @@ -168,8 +168,6 @@ static void check_hscale(void) const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize); - int cpu_flags = av_get_cpu_flags(); - ctx = sws_alloc_context(); if (sws_init_context(ctx, NULL, NULL) < 0) fail(); @@ -215,10 +213,10 @@ static void check_hscale(void) filter[SRC_PIXELS * width + i] = rnd(); } + ff_sws_init_scale(ctx); memcpy(filterAvx2, filter, sizeof(uint16_t) * (SRC_PIXELS * MAX_FILTER_WIDTH + MAX_FILTER_WIDTH)); - if ((cpu_flags & AV_CPU_FLAG_AVX2) && !(cpu_flags & AV_CPU_FLAG_SLOW_GATHER)) - ff_shuffle_filter_coefficients(ctx, filterPosAvx, width, filterAvx2, SRC_PIXELS); + ff_shuffle_filter_coefficients(ctx, filterPosAvx, width, filterAvx2, SRC_PIXELS); if (check_func(ctx->hcScale, "hscale_%d_to_%d_width%d", ctx->srcBpc, ctx->dstBpc + 1, width)) { memset(dst0, 0, SRC_PIXELS * sizeof(dst0[0]));