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 D393344CEF for ; Tue, 15 Nov 2022 16:14:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DF3F068BCED; Tue, 15 Nov 2022 18:14:47 +0200 (EET) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D293668BBF9 for ; Tue, 15 Nov 2022 18:14:41 +0200 (EET) Received: by mail-lj1-f171.google.com with SMTP id u11so18098146ljk.6 for ; Tue, 15 Nov 2022 08:14:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=yX1BDPZoNYu4QXt8ya9q8Ia8bQvB01JwSq11o8vVeBw=; b=ay5Doz4zM3vhG6ZgusiGkrCxEmmQbwCeTGMXh7nh0M53CR5KRRP6+TC/J/L4WrhCLM DQYHoClspU3vbbSloH1C1LVFm/cPxpveKSrn+1EU8FUeUWYn/XcHbWtY1CN3Lw8QBQig RWXNZjcS12ym6HqeSXeEPGMF/s038/ywqyUZDbxiIm6Ts0Xk2tV8YWAwlrSJEzx2bKya b+iWKQXlH230gGt8+DaKKMjc74QpHDhAgEot7Ol0jfx2JpkHEa81MGtxgarBRZ+6lKbd TAyswrssy8vS4CECf/As3neE8N1reB8GSW6ZnYz82r3tTZ90YzlHiA+023Jj7AjJNDEi XAvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yX1BDPZoNYu4QXt8ya9q8Ia8bQvB01JwSq11o8vVeBw=; b=gnPJwODgz9rI7ko2ybUDW4rbCCMzomQFW62oFlg9+Is5hKr/bdiNW92qvEc9hNph8y vw+0aTiYoWYbdCJrxCQT4lS8jULrov1VQJx5/bgXJq1RLESFUtMZeNxYzEZyeF3ttxAw ljHA+4KNdbd6EJUkO9n1ZtYKjKX3uotCedclfhBuR1soYAmZyO7FWE3IjIaKYx4AjU55 d++a13WLpDr9utr2MZUJ0s/EdhLI6zZRg3Xt8r7MvbapwN3ZicQi1Y5vmpwUjWB21Hvi wfXgUkJcgdTi60qpB5cRAAArsKw3QPchgxzuTixSFClm2clHgxOBkIN2ren73xsXFVgS 0JzA== X-Gm-Message-State: ANoB5pkTaXli5JNu4TRZ7WPrImQ4Do8QSK0HcJyaxsLCY2DDVociIuDq vUFNWXUMmUjaaAaKQ/Ss/NN0qVMCbX39iOFCUbLYYUcfKYU= X-Google-Smtp-Source: AA0mqf7UBFhEC7KMI750gE3FUV4PHKBujYWZLjIckljLnahqD/oS9XlmVgYyC9/LHM7IkxD6VZRcxd5o6Bhtxva80eo= X-Received: by 2002:a05:651c:1790:b0:26d:cfc6:d6f7 with SMTP id bn16-20020a05651c179000b0026dcfc6d6f7mr6584944ljb.34.1668528880603; Tue, 15 Nov 2022 08:14:40 -0800 (PST) MIME-Version: 1.0 References: <20221031160915.673782-1-mvanb1@gmail.com> In-Reply-To: From: Martijn van Beurden Date: Tue, 15 Nov 2022 17:14:26 +0100 Message-ID: To: FFmpeg development discussions and patches 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: 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: 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 whether 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 sample rate is limited by the > > structure of frame headers to 655350Hz. Also, a value of 0 is invalid. > > > > 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/96534bb5f35eb9c2f6f393dc470625e9c74df1a5 > 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 Hi all, With this email, I would like to renew the attention of the mailing list for this patch. Kind regards, Martijn van Beurden _______________________________________________ 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".