From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 360D84D2DD for ; Sun, 16 Nov 2025 12:03:55 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'HvCntam9H8lhjnFEdzlY16XOk/wC+j29FX3rBE/h2/Y=', expected b'wZU9eR3W74EHTrFHKVcKGgOKcTok7T/b7pmZjjFQbVc=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1763294585; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=HvCntam9H8lhjnFEdzlY16XOk/wC+j29FX3rBE/h2/Y=; b=L3kxMCVWrAvr4WjLmYLKyUW7jOOI8VNw5ulnpuTeY1++Y1w60AOGgNCPokccFf5ybVZAZ WIcH9em7Cz7+gnkjHWx+fsqajojWFaaxPOGtFTOvU/05M3V+Oqva+k7vU1k6inVbVf8tsnp RYqJmqivQoeffE7CxK2d00+zBzJ9psS7skXVFXyzivRyrM9lw7Mbv9esIZL3ObjCRSJPbtH j5BtGAFENrowMiDI64KZTvNrOuOcv6lw//As7RyjIEEpEsaZvpH80PbBiAhDABkcny+Ai/B xk7j6EoHOjtP4KIGvlSN++HZHN8M3n4ii+CyAel3vOtORVCOY4pnViwFQuLQ== Received: from [172.19.0.2] (unknown [172.19.0.2]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 02A1268FE3E; Sun, 16 Nov 2025 14:03:05 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1763294540; b=V2K1BqQAS3irETGfNhN7i/aqMWAVsjrrHyeJDAHaUs/RblMLfBxZjbrKfOnSVdPPSaRW5 FiUjtMV3sKofkQAKCUgxEoH4CSJsrXs3dQgCx5ajyyarKuUqerzwm+ZsiR6CCjAOsiUTiS8 yKH+DfzYF9mkczA8dTQUFAw9ElHZ/Q7sB1DicUvij+2bhDPi9tWRiKjLk5DI4NQOHBeZV1j bXXYuuUfTSSlDOj28OuOq/2fBSaqTtnR4+9T083r+HkcZl0zsDxX9/6IEFMNes+/0pY5gMV TCF8h75asLQrslLwxlKJdhrzuCfAtxWSTQClZI1Q3fm+zs8/HBa0DypbpzdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1763294540; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=wJ/sYJjC6/iOCXJsFu/9CrExp4YlGr/f93MHmt3YQ3o=; b=Qq4uFCzSla07HvK6I66gv/hmKbvbYJthggTdvajRofdAn3ytKOu8zmSoOiJZwQp8f97aP CrvBfDrg/22+Ehc9jFGzHlF1CSRvcae+qlT68aMxODYRjb/5Nr2KPEX6i1FtfF2aZwl8GQO 1jqQ24K7QybBsAnJvJnqQn8PGRm6pGNh8EtJckufj3IZyB8Mxwa2nu2+eRKXeVTkH7XcbIa 41WpunEaVetqWYCHWuEpn8QcyfSHuEenzwBI31Qy5jQ16U41EA1CZsYfIz/b9G4njv9LMtb Ng1r8AXt4QrQT/lrM0aureQ4ZL46ZVOg4F8sd8ZLCtsWaGGHuqaAyu7F796Q== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1763294525; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=wZU9eR3W74EHTrFHKVcKGgOKcTok7T/b7pmZjjFQbVc=; b=Ay2MfCU+2YeOhQPZXnCG4SworGNttKmawzEH36C5UY3QURtYoeFTLTwlnMKWSdZG/9S/h O3WqBSXdSPOn+SEG0n3M5KO/pacELdityfMYYhNHxjlxqUDQq8mdurK+QsYCJPcPL8zFarn 0Ih5rFuzj3cRR4GX1tHuJ7z+93FWmPQgx1sDXX60j8H4iuUN9dhBmXdjzsbL2IaOfC7W3oV BSVUG6i+HNODtK1IWS1e6d8Qs8L7IL9s53OMiylt7dmK6Pnfqlxx1ZjmCSDB2+60avMww7j Vn0eHprV96pGJQiPEaN12rrtnK2FKerO7GeQ/4NyJIP41+Or+ZmPPNieP+Sw== Received: from 188d6d40ca7a (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id EB2A768FB11 for ; Sun, 16 Nov 2025 14:02:04 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Sun, 16 Nov 2025 12:02:04 -0000 Message-ID: <176329452523.25.4066344906298958382@2cb04c0e5124> Message-ID-Hash: EO2WVURWDUJEWALR5F2JGBG7LZ5U7HED X-Message-ID-Hash: EO2WVURWDUJEWALR5F2JGBG7LZ5U7HED X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] avfilter/af_afftfilt: fix the overlap buffer size (PR #20933) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: nots1dd via ffmpeg-devel Cc: nots1dd Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #20933 opened by nots1dd URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20933 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20933.patch >>From what I understand, we only need to be moving N bytes as window_size - s->hop_size after inverse fft to the buffer for overlap. Currently the compiler throws a warning regarding possible overflow and this patch fixs it. I ran FATE and tests are passing >>From 93b8c7d3acdb09c8c9514c513bfb734cac8cbe48 Mon Sep 17 00:00:00 2001 From: nots1dd Date: Sun, 16 Nov 2025 16:12:24 +0530 Subject: [PATCH] avfilter/af_afftfilt: fix the overlap buffer size >>From what I understand, we only need to be moving N bytes as window_size - s->hop_size after inverse fft to the buffer for overlap. Currently the compiler throws a warning regarding possible overflow and this patch fixs it. --- libavfilter/af_afftfilt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c index 08cdcae2f7..4fc28c6143 100644 --- a/libavfilter/af_afftfilt.c +++ b/libavfilter/af_afftfilt.c @@ -250,6 +250,7 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_job { AFFTFiltContext *s = ctx->priv; const int window_size = s->window_size; + const int hop_size = s->hop_size; const float *window_lut = s->window_func_lut; const float f = sqrtf(1.f - s->overlap); const int channels = s->channels; @@ -294,7 +295,7 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_job s->itx_fn(s->ifft[ch], fft_out, fft_temp, sizeof(*fft_temp)); - memmove(buf, buf + s->hop_size, window_size * sizeof(float)); + memmove(buf, buf + hop_size, (window_size - hop_size) * sizeof(float)); for (int i = 0; i < window_size; i++) buf[i] += fft_out[i].re * window_lut[i] * f; } -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org