From patchwork Mon May 7 17:24:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= X-Patchwork-Id: 8842 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:155:0:0:0:0:0 with SMTP id c82-v6csp3103623jad; Mon, 7 May 2018 10:25:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZog/cZdskiVQXnXNeb3k8YGwAYzIo7rZzsyccIA9nHFRr9kolAfd/WFoBZNsUJZjR7L9yCL X-Received: by 2002:adf:984c:: with SMTP id v70-v6mr30967642wrb.100.1525713947965; Mon, 07 May 2018 10:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525713947; cv=none; d=google.com; s=arc-20160816; b=L9ZTQPIE9dCnem3WyY6jMG/UldSs2VenEyxdN3Civ25lnXAkBvRGdUa5SC3WtUIA+l IINU5VoqR+FHQIarpTKrS2qT4MbLHQckFZXKZmLWnYbtbJn6I7bAjd4qy3eba85W8s0S xhjL/loZYJoYOmS8WKJAtdI0iCFnwMzk5xhnMTiUqaytxKgbqTaOcE54g4eU/NYlAVIn 6CtaSeIsooxVr7UhJdcowQpwDK4dTV4drLI+kv2NsAImh3BWQS0nIzhN9hmWtzs4OqsJ sD+gxozAgv2u4UXWNlEsq5Ws/mqp7pZmvqtW9FNeVLh+l+2EmUkKClVna8C9H+4UseAv mCfQ== 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:domainkey-signature:dkim-signature:delivered-to :arc-authentication-results; bh=O0NpEseA3v4fUlOZsBZ+r0V8ZiyN71/Svf/6IxPmwnI=; b=C4vcnxpSaS/gNHv4lQB+X1Rjmqhmu8HlEHY5s45zzViap7ds9mm5ZPBw6XF2gEPIrF R3nTDRpXVH4tVWEAh7LqA0ttCwgyVF+hp7Zg/DbSvsyZKwN0hDGRhx7rufm2TVdE2E3b u1QGfrppf+rkt6GMB0m7kG5ExCoVYRPOKLYlIhLR5I1qaB8lwn7Iv504HWvyUGsSom7t /vNvwbRIXVdurBaxbSFNcVOzHR/cu5eYtR4gjyRL4dtA0yBav3Tqka4/uXDwg0UvK/zq N8INFLv8FDdBr9YSR4mbCd6wpmrcLxmgcoFo+qEN+N4cGsZ37fHILYaKAheETdxSt6ae RrhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=Pv4j6uyj; 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 m129si5296032wma.95.2018.05.07.10.25.47; Mon, 07 May 2018 10:25:47 -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; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=Pv4j6uyj; 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 7582668A685; Mon, 7 May 2018 20:24:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from golem.pkh.me (LStLambert-657-1-117-164.w92-154.abo.wanadoo.fr [92.154.28.164]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4A6C468A65F for ; Mon, 7 May 2018 20:24:06 +0300 (EEST) Received: from golem.pkh.me (localhost.localdomain [127.0.0.1]) by golem.pkh.me (OpenSMTPD) with ESMTP id d624c4b7 for ; Mon, 7 May 2018 17:24:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pkh.me; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=selector1; bh=T7GmnFnOfwp0jpj7RwuFfS7NOw0=; b=Pv4j6uyjdW2T7rxyhbZBu9jDDx5o Wa6EYtdS4ckrVvMZk+1UTzH1o2LrveBLiBFra1i1f5B1bjGOzBYg1i+amKNUwbYP qffdLlGavO+kIRuajnwJhTYM3johFk4yw/pBlx6x3K+BHBscJxOI86wgjobBWdO1 mzYbLTPqFZYnn1eUp2f2xhjaCnDOfOAspKWeJ+FVHowHpVX1guCt3I6zPtyJly4z DUS62Z6rzRKLyq+q1MqrWYlpqCAWhJVeKLUbk4kTsR7zg2DfJH9dS8zUWZQdSajA BBHK1CMY/Vqowg7sMRe82jY0tqCyXTaC/PdQnyNfFDKhkp5jp1Y4ZZaatQ== DomainKey-Signature: a=rsa-sha1; c=nofws; d=pkh.me; h=from:to:cc:subject :date:message-id:in-reply-to:references; q=dns; s=selector1; b=m C4y2pIGFC7/pojjs0gd/HKGBqk2NAeNVR414j9ayhfB9txR7BWjQuzusiJAr9y/w DL+hShPnatj4r7OhYHIVk3TrVjAqgN+/Qs7ismQS7tIVeWKWoW00G/k3A4SOVVDo 4n4nme04BQBM7L0j7uPjO3kH5k5lxoa8Yh1yUw2tM7aKCrgv5HrG1JZ+xdBcq923 rAo73H4/ambC6LLfFpyrJLnY85F8pIZXpyww9iqyFAk/1ohElqF+HkqcaiPNxItl ryCr5/s+c3MZva331J/jJnWZ081ZfwwujTAMO7f3nUHFQrFyCj8xyv8FB7Yn5/Ev iTt/8kZ1pCjP0QjYPIubw== Received: from localhost (golem.pkh.me [local]) by golem.pkh.me (OpenSMTPD) with ESMTPA id a1f1570a; Mon, 7 May 2018 17:24:24 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 7 May 2018 19:24:21 +0200 Message-Id: <20180507172422.11003-10-u@pkh.me> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180507172422.11003-1-u@pkh.me> References: <20180507172422.11003-1-u@pkh.me> Subject: [FFmpeg-devel] [PATCH v2 09/10] lavfi/nlmeans: reorder memory accesses in get_integral_patch_value 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 Cc: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This doesn't seem to make much of a difference but it can't hurt. --- libavfilter/vf_nlmeans.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_nlmeans.c b/libavfilter/vf_nlmeans.c index 72a75a6e7a..22d26a12e3 100644 --- a/libavfilter/vf_nlmeans.c +++ b/libavfilter/vf_nlmeans.c @@ -131,10 +131,10 @@ static int query_formats(AVFilterContext *ctx) */ static inline int get_integral_patch_value(const uint32_t *ii, int ii_lz_32, int x, int y, int p) { - const int e = ii[(y + p ) * ii_lz_32 + (x + p )]; - const int d = ii[(y + p ) * ii_lz_32 + (x - p - 1)]; - const int b = ii[(y - p - 1) * ii_lz_32 + (x + p )]; const int a = ii[(y - p - 1) * ii_lz_32 + (x - p - 1)]; + const int b = ii[(y - p - 1) * ii_lz_32 + (x + p )]; + const int d = ii[(y + p ) * ii_lz_32 + (x - p - 1)]; + const int e = ii[(y + p ) * ii_lz_32 + (x + p )]; return e - d - b + a; }