From patchwork Sat Jul 8 21:25:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 42537 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6d25:b0:130:f365:34ad with SMTP id fv37csp663158pzb; Sat, 8 Jul 2023 14:26:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlE5ESRriYUXM5kXbxSZaZVkvGoytLPkNRFod5uyCSYCoIin12Ns17f2jO3p4LvSgDxDU5GD X-Received: by 2002:a5d:408b:0:b0:314:1ddc:ecbd with SMTP id o11-20020a5d408b000000b003141ddcecbdmr6746250wrp.18.1688851574209; Sat, 08 Jul 2023 14:26:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688851574; cv=none; d=google.com; s=arc-20160816; b=I16KrcCDr8h95bioCN+EOolOhLJk6qUIu8PNRK1NSM9nUFMWd5r1tzYlEkraRXsS9Y XHvdycUauc4a9CR6UhEfMN2u9ozwsTpVrxxfKNT3ZEarlykXxQG4aZtB1Z46avNTqQji b/isJSO8JvAivedpk9o2GJY8EIDz0EAEbAXROhxjXq7R+rVeH+9V0bMQIcbMZA2SI5cb yEoLBFCLlaKNner/SpRnxzOFjpm9XSmOquWsAp81W5oHZBgbVaq81ItsjDFb1KdcTOGK pX+/j3G1F1fJMojOhfM5bJ0C2Uo8ZGTmY7HPqDLNoZAfefu1LaC61B95BnbkLX4ZFAkm E6EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=onaeoDTCteXy1/fuFXV0B8dbEf0eyYqh4qzSQMyqygg=; fh=YYwLYmpaV0Fpw/rxmSKNRLS2XzDkAlGbHATiKOPtZrY=; b=Y5iNXOidIFJYQ3Kjq1/IcTe2lymI0Po1+kiFZi40aktiNSkZEr3UizUbn+WYpRobEL O/JvmUtFSRocLSWc0EKJcyyw/y8JJyFU/Ii720OMLz/UO1KOLQHo3y0D1CEP91KLdcvG Cv5CGlq58n/HZ2GZn9qya7t4KQEf20fW/ZFY2OW6ynRPyisu8LmF1tfpg6LwBryRhdMo xwUzjTVqlUfQGbH8oBddQcbvwMMhXhRq3ALcAaNbfEaIbwcS4toHu+XAyH5O6/MBaapv oC8xp5Gvhsj5Wm81gX4v6NckcbLQcLq/cEV19eCU6RrMRQax0G/jByVsNBU2RHxkx/my Qs7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id s3-20020a056402164300b0051e252568besi4476178edx.662.2023.07.08.14.26.13; Sat, 08 Jul 2023 14:26:14 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CD98068C554; Sun, 9 Jul 2023 00:25:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AE28068A31B for ; Sun, 9 Jul 2023 00:25:35 +0300 (EEST) X-GND-Sasl: michael@niedermayer.cc Received: by mail.gandi.net (Postfix) with ESMTPSA id 1289220002 for ; Sat, 8 Jul 2023 21:25:34 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 8 Jul 2023 23:25:16 +0200 Message-Id: <20230708212530.109692-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230708212530.109692-1-michael@niedermayer.cc> References: <20230708212530.109692-1-michael@niedermayer.cc> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 04/18] avradio/sdrinradio: Dont automatically select 2.56Mhz on the rtlsdr 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: +sEimoje/gcY 2.56Mhz produces more artifacts than lower sample rates at least in the FM broadcast band Signed-off-by: Michael Niedermayer --- libavradio/sdrinradio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavradio/sdrinradio.c b/libavradio/sdrinradio.c index c6f5742436..052e2298da 100644 --- a/libavradio/sdrinradio.c +++ b/libavradio/sdrinradio.c @@ -235,8 +235,8 @@ static int sdrindev_initial_hw_setup(AVFormatContext *s) (sdr->sdr_sample_rate < ranges[i].minimum || sdr->sdr_sample_rate > ranges[i].maximum)) continue; if (sdr->rtlsdr_fixes) - // 2.88 and 3.2 Mhz do not work reliable here so lets not automatically choose them, the user can override this - if (ranges[i].maximum > (2560000 + 2880000)/2) + // 2.56, 2.88 and 3.2 Mhz do not work reliable here so lets not automatically choose them, the user can override this + if (ranges[i].maximum > (2560000 + 2160000)/2) continue; max_sample_rate = FFMAX(max_sample_rate, ranges[i].maximum); }