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 79A1243DB9 for ; Sun, 8 Jan 2023 15:27:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1B4D568BC6E; Sun, 8 Jan 2023 17:27:55 +0200 (EET) Received: from mail-vk1-f175.google.com (mail-vk1-f175.google.com [209.85.221.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8999768BABF for ; Sun, 8 Jan 2023 17:27:48 +0200 (EET) Received: by mail-vk1-f175.google.com with SMTP id bk19so2810830vkb.11 for ; Sun, 08 Jan 2023 07:27:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=ucIY963AD8ACKv71Oq6Ywx6hVRNfE3+nALCO1G9cxss=; b=I6Sg2reELU3bn/EEBdy4tFaYckOuYeQEOy4vwvC/hyS9STjGqRh0UymWJkbzFlWP96 nXdNVtEEcW10PLoFpVZ0RDLZtghxyv2fu3/0x/9TaZsZf/T5fj0DvVy+DUSw1iu2FoCk 7mEY0AIi+0re+ccDAzEY1QAGXLIcS+ViWrAtkVSevcetLAj4nxaPE1MbJKwVCVPefNH0 jboUGWJ4bfUgix+jqUwkXOB9dmAi7qcRRkbFbJvkPBjpv7ohkQqjFwqCc/hkCf3YfLfb VbMsaJ0huuIR4Iu+oUzHgfm4YiClAAxBrLxbo4tBD2acECh1j/kI80mYlNx2WuwHAN7m dOFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ucIY963AD8ACKv71Oq6Ywx6hVRNfE3+nALCO1G9cxss=; b=KkPpl8KoX9piQR0B/zIXwR7HXJqMd8+mrKLua5KMIJfMB54CPnMNr4deciNTsT4Xis Q4eTnesDHooyhVC3E3PAkLxMVvVwoQOwSJ2YJi1WqmfPVF6cA/Do62izQfoIfFtWwhWG JcdAOmzBTHn1feq7I1zndP7Rm6qZ2nK4sLNtP8qSfSi6zho7m6SH/sQV72URwok1WlgV llCoB/ur1tgLtJXy2iOHWx+767AHGvEIpGrxp7GQ6WYquHWk5KvVbXv2ipCmQw0qjTCN KDoeN+wz6P0LayDTGgEDQbdmUcBxlHHiKF0T4x6bruGUdPkeOPq/UyJSU9G//Flk8qvV lwGQ== X-Gm-Message-State: AFqh2kq0c8pyFOK92rn+eoMCEldOnCm12VMMVhagvFcRp9Q2idETEFZW n+Slk5vsZ4gSrwLi/asebzCJaYbcTlSrQ43rLHBDnA6j X-Google-Smtp-Source: AMrXdXtQa2WlpJClVstG0lQvSwPjc3JjYZMScIjIWUbqAxHgx5diMfbX6TYYmaKj3tenV3zyUw4NRPgoCBPcqsJLvFA= X-Received: by 2002:a1f:b294:0:b0:3d5:d2a3:8c22 with SMTP id b142-20020a1fb294000000b003d5d2a38c22mr3453967vkf.39.1673191666823; Sun, 08 Jan 2023 07:27:46 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:612c:2428:b0:32a:5eaa:92e4 with HTTP; Sun, 8 Jan 2023 07:27:45 -0800 (PST) In-Reply-To: <20230108145210.GD35806@pb2> References: <20230105205342.GE4028235@pb2> <20230106172506.GG4028235@pb2> <20230108145210.GD35806@pb2> From: Paul B Mahol Date: Sun, 8 Jan 2023 16:27:45 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] libswresample: avoid s16p internal processing format 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 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: On 1/8/23, Michael Niedermayer wrote: > On Fri, Jan 06, 2023 at 07:04:59PM +0100, Paul B Mahol wrote: >> On Fri, Jan 6, 2023 at 7:01 PM Paul B Mahol wrote: >> >> > >> > >> > On Fri, Jan 6, 2023 at 6:25 PM Michael Niedermayer >> > >> > wrote: >> > >> >> On Thu, Jan 05, 2023 at 11:08:25PM +0100, Paul B Mahol wrote: >> >> > On Thu, Jan 5, 2023 at 9:53 PM Michael Niedermayer < >> >> michael@niedermayer.cc> >> >> > wrote: >> >> > >> >> > > On Thu, Jan 05, 2023 at 01:44:10PM +0100, Paul B Mahol wrote: >> >> > > > Patch attached. >> >> > > >> >> > > > swresample.c | 3 ++- >> >> > > > 1 file changed, 2 insertions(+), 1 deletion(-) >> >> > > > eee7a0685b44aa867562138a2e2437ecb8844612 >> >> > > 0001-libswresample-swresample-avoid-s16p-internal-transfe.patch >> >> > > > From 9c4cd60e2dd41cf98d693c8251f4cfade0807073 Mon Sep 17 >> >> > > > 00:00:00 >> >> 2001 >> >> > > > From: Paul B Mahol >> >> > > > Date: Thu, 5 Jan 2023 13:40:12 +0100 >> >> > > > Subject: [PATCH] libswresample/swresample: avoid s16p internal >> >> transfer >> >> > > format >> >> > > > >> >> > > > Instead use float one by default for sample rate conversions. >> >> > > > The s16p internal transfer format produces visible and hearable >> >> > > > quantization artifacts. >> >> > > >> >> > > When does this occur and why? >> >> > > >> >> > >> >> > It occurs always. Just compare output with 16bit and >> >> > int32/float/double. >> >> > Look at other people report on internet. >> >> > Look at src.infinitewave.ca >> >> >> >> src.infinitewave.ca uses 32bit none of what it shows should touch the >> >> codepath >> >> you change. >> >> >> >> if we look at src.infinitewave.ca for swr we see 2 types of artifacts >> >> 1. Aliassing which is at maybe -120db with the actual signal at 0db >> >> i would like to see some evidence that a human can hear this >> >> >> > >> > For s16p<->s16p it is much lower, around -78dB thus this patch. >> > >> > Also for others and reports for swr its is lower than exact -120dB >> > >> > >> > 2. Reflection and attenuation at the transition frequency >> >> With linear filters there is a tradeof between attenuation of the >> >> passband, reflection of frequencies beyond, latency and so on >> >> You can have a perfect sharp cutoff with no attenuation and no >> >> refelection >> >> that requires a infinitly long filter. And while this looks best in >> >> this >> >> frequency plot, does it actually sound best ? If you can hear -120db >> >> signals you surely would then also hear the ringing long before a >> >> gunshot >> >> from such long filter. >> >> >> > >> One can always change linear FIR to be min phase FIR kernel. > > I certainly would welcome a wider range of filters in swr, if you want to > add > any low delay sinc approximation or in fact i would welcome any filter > you want to add. I have hack for simple cases when one of decimation/interpolation factor is 1 than there is single only FIR kernel applied and then one do not use naive convolution which is O(N^2) but O(Nlog(N)) when using RDFT/FFT. For bigger filter sizes it makes filtering amazingly faster. (from <80x to >400x). So I'm interested in making it faster if possible for any combination of decimation/interpolation. > > thx > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > The real ebay dictionary, page 1 > "Used only once" - "Some unspecified defect prevented a second use" > "In good condition" - "Can be repaird by experienced expert" > "As is" - "You wouldnt want it even if you were payed for it, if you knew > ..." > _______________________________________________ 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".