From patchwork Tue Sep 8 21:18:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 22199 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 6F9C244BE02 for ; Wed, 9 Sep 2020 00:20:46 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8609C68B7C9; Wed, 9 Sep 2020 00:19:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 80D0D68B782 for ; Wed, 9 Sep 2020 00:19:44 +0300 (EEST) Received: by mail-wr1-f67.google.com with SMTP id z4so695802wrr.4 for ; Tue, 08 Sep 2020 14:19:44 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=Kt1xDL97JnG0ru2ELD0IJpfI9NPRrLQapY+kwzuJKt4=; b=Jqq/N4egri4ArqeP/7TF70rBhJXQGVf5j/METi6hEJDFK7HqvmaBXkJ6X2Vkx1RPv2 ZpJV44Xb9no1t7of715MIhc1H5htOIiUAjmMw6tohElBm3ztsdSGYYrNwEA7o193Nbfm cplxF1INxzUU64AKHzAkskBWdFQp5vwegbgf3CPfgZp6Pl8DSDocdteQXdxSLkCXsQXJ qwD9NKijfmRdCu9IbPEAULR+Lc9bTLXx2/axx2flgez3hdBaP8TUxaFbkCqOSFbKqgup 2XKI+lGdqpik4YVhnR5kBPZV6zZnbbTGp5hUV3nbNMIq8rocBzh4sv3pxpjdcF6LheMU g5BA== 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:mime-version:content-transfer-encoding; bh=Kt1xDL97JnG0ru2ELD0IJpfI9NPRrLQapY+kwzuJKt4=; b=fMHSmOpJV2knOj76m07/WHoau5Mp5BTtOZKKVO5pZBgAGq342FXGFFOJGGHb40/PGj W7pbuCAHUCvvmsU/QIU4P4OPVczbIO1rKkH5I37E5yDkFpX8w8ioJLUhe+y7VpsgpIF9 hJ0VsWhbJyTTflhp+nmFdWaS6uwQ3/MAI7Ri5boTnGmk3JFMePrbmzdM1BmwjBx9YSHl nymriBpX44htQJeOz7z99uVKaPIPlo+5THeclnKwKgHST2XKCltmc5rrptHNgDiJ1YxA PVjXl98IjW/khRSsBfre4BUi5Cz+S582nlBj31GHCAYrOvbpjvdq9aAQbn9iyZUdzC1s AW4Q== X-Gm-Message-State: AOAM530dYR+Y0qotkuelGVKFk/5lINCaIvPoAxPSwqvh735G3ZF4JOnS 32Y3l3VB6zYRcZgyQ6+f31qrdYY4xY0= X-Google-Smtp-Source: ABdhPJxtEIPyxdZQNSZX/z+1u/JtmApuoGTk7OygAK5j7/V5khlhqQH96Falgvtaj2UssPCGpGLE+Q== X-Received: by 2002:a5d:4682:: with SMTP id u2mr601422wrq.254.1599599983713; Tue, 08 Sep 2020 14:19:43 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1fb0f.dynamic.kabel-deutschland.de. [188.193.251.15]) by smtp.gmail.com with ESMTPSA id a15sm1074304wrn.3.2020.09.08.14.19.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 14:19:43 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 8 Sep 2020 23:18:54 +0200 Message-Id: <20200908211856.16290-23-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200908211856.16290-1-andreas.rheinhardt@gmail.com> References: <20200908211856.16290-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 23/25] avfilter/af_headphone: Use more appropriate variable name 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Also unify incrementing the variable containing the pointer to the currently used HRIR data. Signed-off-by: Andreas Rheinhardt --- libavfilter/af_headphone.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c index 8b0a431c45..8db546adbf 100644 --- a/libavfilter/af_headphone.c +++ b/libavfilter/af_headphone.c @@ -163,19 +163,18 @@ static int headphone_convolute(AVFilterContext *ctx, void *arg, int jobnr, int n } for (i = 0; i < in->nb_samples; i++) { - const float *temp_ir = ir; + const float *cur_ir = ir; *dst = 0; for (l = 0; l < in_channels; l++) { *(buffer[l] + wr) = src[l]; } - for (l = 0; l < in_channels; l++) { + for (l = 0; l < in_channels; cur_ir += air_len, l++) { const float *const bptr = buffer[l]; if (l == s->lfe_channel) { *dst += *(buffer[s->lfe_channel] + wr) * s->gain_lfe; - temp_ir += air_len; continue; } @@ -190,8 +189,7 @@ static int headphone_convolute(AVFilterContext *ctx, void *arg, int jobnr, int n memcpy(temp_src + len, bptr, (air_len - len) * sizeof(*temp_src)); } - dst[0] += s->scalarproduct_float(temp_ir, temp_src, FFALIGN(ir_len, 32)); - temp_ir += air_len; + dst[0] += s->scalarproduct_float(cur_ir, temp_src, FFALIGN(ir_len, 32)); } if (fabsf(dst[0]) > 1)