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 AB42644CF6 for ; Tue, 15 Nov 2022 21:56:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B55FE68BD51; Tue, 15 Nov 2022 23:56:25 +0200 (EET) Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B584268BBC6 for ; Tue, 15 Nov 2022 23:56:19 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id A3AE1100007 for ; Tue, 15 Nov 2022 21:56:17 +0000 (UTC) Date: Tue, 15 Nov 2022 22:56:16 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20221115215616.GC1783292@pb2> References: <20221031160915.673782-1-mvanb1@gmail.com> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] libavcodec/flacenc: Enable sample rates > 655350 Hz 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: multipart/mixed; boundary="===============7756821938328398958==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7756821938328398958== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Izn7cH1Com+I3R9J" Content-Disposition: inline --Izn7cH1Com+I3R9J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 15, 2022 at 05:14:26PM +0100, Martijn van Beurden wrote: > Op ma 31 okt. 2022 om 19:33 schreef Martijn van Beurden : > > > > Op ma 31 okt. 2022 om 17:58 schreef Derek Buitenhuis > > : > > > > > > It is interesting that the IETF RFC and the Xiph spec disagree on whe= ther this is allowed. > > > > > > > The Xiph spec also says the IETF spec is better, and it remains as > > historical reference and overview :) > > > > > The Xiph spec says: > > > > > > Sample rate in Hz. Though 20 bits are available, the maximum samp= le rate is limited by the > > > structure of frame headers to 655350Hz. Also, a value of 0 is inv= alid. > > > > > > The RFC just says: > > > > > > Sample rate in Hz. > > > > > > > The spec as it is on the FLAC website (which is being "preserved") is > > wrong. I don't know how this came to be, I think it was at first > > poorly worded and later incorrectly fixed. See this commit: > > https://github.com/xiph/flac/commit/96534bb5f35eb9c2f6f393dc470625e9c74= df1a5 > > The text as it was before that commit doesn't make any sense, the text > > as it is after the commit is not correct either. > > > > The issue here is that FLAC has a sample rate in the streaminfo > > metadata block, at the very start of the file. That one can > > accommodate sample rates up to 2^20-1. The frame headers repeat the > > sample rate every frame and can only accommodate up to 655350Hz, but > > they can also reference the streaminfo metadata block. Because of the > > possibility to reference that 20 bit number, it is possible to store > > sample rates up to 1048575Hz. You can see this patch only touches the > > encoder: the FFmpeg decoder has already been equipped to deal with > > this since its inception in 2004. > > > > There is some kind of limitation to sample rates above 655350Hz, or > > samplerates between 65535Hz and 655350Hz that are not a multiple of 10 > > though: a FLAC file with such a sample rate cannot be multicast, > > because a decoder receiving a multicast stream does not receive the > > streaminfo metadata block, and thus cannot use it to figure out the > > correct sample rate. > > > > Please let me know when this explanation falls short. > > > > Kind regards, Martijn van Beurden >=20 > Hi all, >=20 > With this email, I would like to renew the attention of the mailing > list for this patch. will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In fact, the RIAA has been known to suggest that students drop out of college or go to community college in order to be able to afford settlements. -- The RIAA --Izn7cH1Com+I3R9J Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY3QK8wAKCRBhHseHBAsP q1dhAJ9JOUxmBoMSKTpFs4e6FRVLIWbfCgCdFUK9InGMY3L4polOYCCz2/2lSD8= =2ZTw -----END PGP SIGNATURE----- --Izn7cH1Com+I3R9J-- --===============7756821938328398958== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============7756821938328398958==--