From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 13866406F1 for ; Sat, 29 Jan 2022 01:13:09 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5A5E168B1B3; Sat, 29 Jan 2022 03:13:07 +0200 (EET) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E21ED68AA89 for ; Sat, 29 Jan 2022 03:13:00 +0200 (EET) Received: by mail-pj1-f49.google.com with SMTP id g11-20020a17090a7d0b00b001b2c12c7273so8270233pjl.0 for ; Fri, 28 Jan 2022 17:13:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jyibVgbRYSUlwLaSfB3Co7EZJ4fvwzxJFeYCcpdMk38=; b=RUFjRORkbqlQi9bBJsifcYmC3EmqjKMSIaT/+JywMuMo3JRFjGaILDrv/9OU13BlQO hs2Flp7NYzTjuCvw4bDIJe5GERtPX/d/GWtgtsP7pSxe0mgi813aTfc6jne/27sCUy8S BRsPyddVpFBRgyMEUrTJVSDmtqhg7xD4Rv+pL99rJjx8We3+CaAetAihCOh4Fuo6OIXV cp551sTumBDNpy9ZtqB3VpX5wqIPZKq2JSArt8ac/XW7kp1xwm1XcvYBt3BxY30JQCfP f/xvQoY8w5wdq1MRj2e7FPgP3AfMrgKTQnwHQPiDuTeO7iXCf8mUxYqc6PsRmkxyN9uX 4rTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jyibVgbRYSUlwLaSfB3Co7EZJ4fvwzxJFeYCcpdMk38=; b=V1VNMc6xT4IjAadBwIn/+YgBkg4gamoEQTiG3LdXSrjzmIZ2WKTY1wkSQ6mK4d34vl ZpFTlrw8Tycfip4bDxIKL2i0N37lQx5goiWi+tCTXQ3UXvzB94Y9WSQGm6nNjSjWnYJ4 2btaqcaZwH+//1rRQeWX1Ibz1qIcS92yu2aH5ISVEXHUrFI5Jr99C7W61EgqiP9bbvIL 7XW/Yc/UeJuXIx4Hft2ZlldWAPksoHIt97I8dU1Z9VbwmwMRPnSuvl8dkZF247RA+ynt TmTM+NfDCxVyWq8Ju4zMWG7+08AuK8fu16fCYDTn2FEsUh1WBWr3eiuwTuvN9RNzYPSK xEBw== X-Gm-Message-State: AOAM531t/NjChPLSB4hGrmuZMb9YsNSELFe2e8RvmAwgrNQwma9aLYEm XcIQQsZpSW6uNAVKnxftRQ+kvORfPzhbHQ== X-Google-Smtp-Source: ABdhPJzEP6nCDUKnAtn3w+nmKPuVejtV/ZoiKVLCsXNFzl+cYPgFIu4g30fdFNEYkFN73bRGaNHAcA== X-Received: by 2002:a17:90a:15c9:: with SMTP id w9mr12632607pjd.225.1643418779103; Fri, 28 Jan 2022 17:12:59 -0800 (PST) Received: from ryzen-archlinux.localdomain (node-1w7jr9quwtshe9pluzzjlv6my.ipv6.telus.net. [2001:569:7da8:e800:e2d5:5eff:fe8e:845a]) by smtp.googlemail.com with ESMTPSA id f16sm10098012pfd.118.2022.01.28.17.12.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 17:12:58 -0800 (PST) From: Jason Jang To: ffmpeg-devel@ffmpeg.org Date: Fri, 28 Jan 2022 17:12:41 -0800 Message-Id: <20220129011241.308079-1-jcj83429@gmail.com> X-Mailer: git-send-email 2.35.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] avfilter/af_apsyclip: fix peak overestimation 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: Jason Jang Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Ignore more samples that are near the edge of the block. The reason is that the filtering tends to cause these samples to go above the window more than the samples near the middle. If these samples are included in the unwindowed peak estimation, the peak can be overestimated. Because the block is windowed again before overlapping, overshoots near the edge of the block are not very important. 0.1 is the value from the version originally contributed to calf. Signed-off-by: Jason Jang --- libavfilter/af_apsyclip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_apsyclip.c b/libavfilter/af_apsyclip.c index 0bc469c..2a79ed3 100644 --- a/libavfilter/af_apsyclip.c +++ b/libavfilter/af_apsyclip.c @@ -87,7 +87,7 @@ static void generate_hann_window(float *window, float *inv_window, int size) window[i] = value; // 1/window to calculate unwindowed peak. - inv_window[i] = value > 0.01f ? 1.f / value : 0.f; + inv_window[i] = value > 0.1f ? 1.f / value : 0.f; } } -- 2.35.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".