From patchwork Mon Jan 9 16:45:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Bouron X-Patchwork-Id: 2141 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp7131961vsb; Mon, 9 Jan 2017 08:45:58 -0800 (PST) X-Received: by 10.223.145.198 with SMTP id 64mr342474wri.101.1483980358002; Mon, 09 Jan 2017 08:45:58 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i133si2191923wme.31.2017.01.09.08.45.57; Mon, 09 Jan 2017 08:45:57 -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=@gmail.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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 410A368A6C0; Mon, 9 Jan 2017 18:45:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 492EF689EFC for ; Mon, 9 Jan 2017 18:45:36 +0200 (EET) Received: by mail-wm0-f65.google.com with SMTP id c85so23331577wmi.1 for ; Mon, 09 Jan 2017 08:45:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LPQZlVdu4vr9b40YZfpBa5Aiyqx/2AkMBCrp7pRbYWQ=; b=KvBwsFh2A7VJSx8czPJT5YldDgaKRxlgmNySuPXeRo0Y3y+qyZ4n/m1orn7tZbLmih WqGQhTzkNKa3RuQFZPQsaYSVaYd8QoKJwPBj+Kr+DOX7AWDeejQsuKf9MZ6rh/Lh/r3i I1wH8d0e4y4fmcy+xolCl2ODJrK9rPnD+twyTuEWEnl/sZiejmPyIaXNUtZEMtMZgIu4 cUSHbgeQugA1vj47I5/VGKgkjXH4dMXZb+eSnc2TIsY8f0ZTV6L6L6C1b4gBbxNaIvJ/ GyWmmtvXEsw4rJKc4DAMWAdPbz+lJXzs4PIsRPpjGPypATF19LbbwShxgEZnIVAdwS7P eixA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LPQZlVdu4vr9b40YZfpBa5Aiyqx/2AkMBCrp7pRbYWQ=; b=g1YoF8vxy8+1WFvV92f1VI0ay3ekQXr7iR10X/6mG9ejxda1BGFDZ9cx7kSotU2YD2 IMHi91tzvyLDvmAvvSM6yPxnGRfNtwmt10ur0/+3c26PqclJogBBVaj9in+9cwYUNUz+ KwOFkh670xGJ2pCPuGh3nEbWRtZEYcp9aoCzw+dIj3j0/uDcw//38kEJHM7zhKS5P9BI 8G38j1B74nR1Dl4LXv0r9GtXjK603PYUjavkkF+OAurnu485JiN5JuCKsWgL3VkFOwqb 9yNuDGGXrKRiHrkuJwZP5QJnYhrbMYN58T8cEmRuEZ9zqk31k9n4QSfcgviJC+LywCgR E75g== X-Gm-Message-State: AIkVDXJjWhTptGo6WhGMa5C/dxeI7OhZCo2Ca0ZjsE7Y73hTeKc/VZJxl3XTD7QcOMMQ7w== X-Received: by 10.223.172.136 with SMTP id o8mr399733wrc.27.1483980342980; Mon, 09 Jan 2017 08:45:42 -0800 (PST) Received: from localhost.localdomain (AMontsouris-653-1-175-40.w92-128.abo.wanadoo.fr. [92.128.46.40]) by smtp.gmail.com with ESMTPSA id d85sm19805650wmd.17.2017.01.09.08.45.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2017 08:45:42 -0800 (PST) From: Matthieu Bouron To: ffmpeg-devel@ffmpeg.org Date: Mon, 9 Jan 2017 17:45:31 +0100 Message-Id: <20170109164531.12603-3-matthieu.bouron@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170109164531.12603-1-matthieu.bouron@gmail.com> References: <20170109164531.12603-1-matthieu.bouron@gmail.com> Subject: [FFmpeg-devel] [PATCH 2/2] swresample/arm: cosmetic fixes 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: Matthieu Bouron MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libswresample/arm/resample.S | 32 ++++++++++++++++---------------- libswresample/arm/resample_init.c | 10 +++++----- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/libswresample/arm/resample.S b/libswresample/arm/resample.S index c231301b2b..3ce7623246 100644 --- a/libswresample/arm/resample.S +++ b/libswresample/arm/resample.S @@ -22,9 +22,9 @@ function ff_resample_common_apply_filter_x4_float_neon, export=1 vmov.f32 q0, #0.0 @ accumulator -1: vld1.32 {q1}, [r1]! @ src - vld1.32 {q2}, [r2]! @ filter - vmla.f32 q0, q1, q2 @ accumulator += src + {0..3} * filter + {0..3} +1: vld1.32 {q1}, [r1]! @ src[0..3] + vld1.32 {q2}, [r2]! @ filter[0..3] + vmla.f32 q0, q1, q2 @ accumulator += src[0..3] * filter[0..3] subs r3, #4 @ filter_length -= 4 bgt 1b @ loop until filter_length vpadd.f32 d0, d0, d1 @ pair adding of the 4x32-bit accumulated values @@ -35,12 +35,12 @@ endfunc function ff_resample_common_apply_filter_x8_float_neon, export=1 vmov.f32 q0, #0.0 @ accumulator -1: vld1.32 {q1}, [r1]! @ src - vld1.32 {q2}, [r2]! @ filter - vld1.32 {q8}, [r1]! @ src - vld1.32 {q9}, [r2]! @ filter - vmla.f32 q0, q1, q2 @ accumulator += src + {0..3} * filter + {0..3} - vmla.f32 q0, q8, q9 @ accumulator += src + {4..7} * filter + {4..7} +1: vld1.32 {q1}, [r1]! @ src[0..3] + vld1.32 {q2}, [r2]! @ filter[0..3] + vld1.32 {q8}, [r1]! @ src[4..7] + vld1.32 {q9}, [r2]! @ filter[4..7] + vmla.f32 q0, q1, q2 @ accumulator += src[0..3] * filter[0..3] + vmla.f32 q0, q8, q9 @ accumulator += src[4..7] * filter[4..7] subs r3, #8 @ filter_length -= 8 bgt 1b @ loop until filter_length vpadd.f32 d0, d0, d1 @ pair adding of the 4x32-bit accumulated values @@ -51,9 +51,9 @@ endfunc function ff_resample_common_apply_filter_x4_s16_neon, export=1 vmov.s32 q0, #0 @ accumulator -1: vld1.16 {d2}, [r1]! @ src - vld1.16 {d4}, [r2]! @ filter - vmlal.s16 q0, d2, d4 @ accumulator += src + {0..3} * filter + {0..3} +1: vld1.16 {d2}, [r1]! @ src[0..3] + vld1.16 {d4}, [r2]! @ filter[0..3] + vmlal.s16 q0, d2, d4 @ accumulator += src[0..3] * filter[0..3] subs r3, #4 @ filter_length -= 4 bgt 1b @ loop until filter_length vpadd.s32 d0, d0, d1 @ pair adding of the 4x32-bit accumulated values @@ -64,10 +64,10 @@ endfunc function ff_resample_common_apply_filter_x8_s16_neon, export=1 vmov.s32 q0, #0 @ accumulator -1: vld1.16 {q1}, [r1]! @ src - vld1.16 {q2}, [r2]! @ filter - vmlal.s16 q0, d2, d4 @ accumulator += src + {0..3} * filter + {0..3} - vmlal.s16 q0, d3, d5 @ accumulator += src + {4..7} * filter + {4..7} +1: vld1.16 {q1}, [r1]! @ src[0..7] + vld1.16 {q2}, [r2]! @ filter[0..7] + vmlal.s16 q0, d2, d4 @ accumulator += src[0..3] * filter[0..3] + vmlal.s16 q0, d3, d5 @ accumulator += src[4..7] * filter[4..7] subs r3, #8 @ filter_length -= 8 bgt 1b @ loop until filter_length vpadd.s32 d0, d0, d1 @ pair adding of the 4x32-bit accumulated values diff --git a/libswresample/arm/resample_init.c b/libswresample/arm/resample_init.c index e334a27b89..0df0c94743 100644 --- a/libswresample/arm/resample_init.c +++ b/libswresample/arm/resample_init.c @@ -42,8 +42,8 @@ static int ff_resample_common_##TYPE##_neon(ResampleContext *c, void *dest, cons DELEM *dst = dest; \ const DELEM *src = source; \ int dst_index; \ - int index= c->index; \ - int frac= c->frac; \ + int index = c->index; \ + int frac = c->frac; \ int sample_index = 0; \ int x4_aligned_filter_length = c->filter_length & ~3; \ int x8_aligned_filter_length = c->filter_length & ~7; \ @@ -86,9 +86,9 @@ static int ff_resample_common_##TYPE##_neon(ResampleContext *c, void *dest, cons } \ } \ \ - if(update_ctx){ \ - c->frac= frac; \ - c->index= index; \ + if (update_ctx) { \ + c->frac = frac; \ + c->index = index; \ } \ \ return sample_index; \