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 4DBA144A78 for ; Mon, 31 Oct 2022 21:25:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EEEA368BE3E; Mon, 31 Oct 2022 23:25:25 +0200 (EET) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 072D468BE18 for ; Mon, 31 Oct 2022 23:25:18 +0200 (EET) Received: by mail-wr1-f44.google.com with SMTP id y16so17739326wrt.12 for ; Mon, 31 Oct 2022 14:25:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=9F720GUaleasAxqrFc4KRndTmmiuCLlCP0S+3w45Bdo=; b=dYrA192OKum2/DfzQWe29X2fb27OFP9VF6A/dNdjFaSwEVPxKzk0wrnvRPqbBwzOoz +WmxL/EOEdcs1jEnCeKMLnkhhfUXKCs8JdzmlwBQsCISGBsskSs3sMgmPUJI1irIqJl1 z3dOn3kTBj/wLDnVd1MAq6n5tp4WasZPYKXB924J5IYJ6NGKEPinooT+mWmf0hLXoBzY Qx/491dChS4vLv6Op7mtZVUPS7jWZyhq+QkxBfSPqk2RJxDmoakznVqzMZHBYC3ZF6pA foi7kh5I2dh7fxZOlOMByidDXMSW4u8wE7n0Grr+WxbT59wlz4TWksVVcqTIufiR3dJG iaCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=9F720GUaleasAxqrFc4KRndTmmiuCLlCP0S+3w45Bdo=; b=4VkTGMNtug8YjM8jlKpWLnK4UAoVOikQk8Mr/Q/LWq8OjdotmZMbaAbnxCr5Iooa33 5iTtEDSlz05jZliRP8QoKRlaBAbA3DNnsXpHAbS9Cs2t19U7sURaNWBi5AHy0P731pEi XxUNapCUtQIwilqQ1irRsaZghB+Rvvltquw+BQzW9N5MvFmw3tmQtyAHmeb9TjxzqtHN 18kSUQ+8nEDdVxAom7UCIlwP9W6+2h+JI2BcnJ7pTSiUJVaol4QHcqh2yIF78dwcFAqB 6GlNdrc9SHV8LwmIDAxsESLZTdktPCo7OOnplsp6pUCzS4TsH7wygle61tR0moELRYeL z5aA== X-Gm-Message-State: ACrzQf2m1ePwOaS201XzmW/jRozQEW2aLOD/HKibUQF+HfWXRMmLaNzK nOazxfygDxkju53ns/3vrBJPk0FdFZM= X-Google-Smtp-Source: AMsMyM7vvGSXeQUDRKNt6LxAfYLEQ+4dtQ/FpELaWVBRe6OFIlMp/cZLp1oAFql2asKJmr3z4rHZrA== X-Received: by 2002:a5d:5004:0:b0:236:c92e:5b41 with SMTP id e4-20020a5d5004000000b00236c92e5b41mr5546867wrt.655.1667251518122; Mon, 31 Oct 2022 14:25:18 -0700 (PDT) Received: from [192.168.1.106] ([149.12.15.18]) by smtp.googlemail.com with ESMTPSA id co26-20020a0560000a1a00b0022dc6e76bbdsm8273612wrb.46.2022.10.31.14.25.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Oct 2022 14:25:17 -0700 (PDT) Message-ID: <0290f355-1460-99cc-96e9-1e5d30f2cb52@gmail.com> Date: Mon, 31 Oct 2022 21:25:16 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 To: ffmpeg-devel@ffmpeg.org References: <20221031160915.673782-1-mvanb1@gmail.com> From: Derek Buitenhuis 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: 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 10/31/2022 6:33 PM, Martijn van Beurden wrote: > The Xiph spec also says the IETF spec is better, and it remains as > historical reference and overview :) So it does. > 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. Well that's pretty confusing, indeed. > 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. It all makes sense, thanks for the explanation. - Derek _______________________________________________ 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".