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 B184346DAA for ; Tue, 11 Jul 2023 21:20:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 50A7868C62B; Wed, 12 Jul 2023 00:19:27 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DCE4D68C61F for ; Wed, 12 Jul 2023 00:19:19 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 52BA6C0008 for ; Tue, 11 Jul 2023 21:19:19 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 11 Jul 2023 23:19:05 +0200 Message-Id: <20230711211910.1257355-7-michael@niedermayer.cc> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230711211910.1257355-1-michael@niedermayer.cc> References: <20230711211910.1257355-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 07/12] avradio/rds: warnings cleanup 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: Signed-off-by: Michael Niedermayer --- libavradio/rds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavradio/rds.c b/libavradio/rds.c index 1392bb0874..99e5360b72 100644 --- a/libavradio/rds.c +++ b/libavradio/rds.c @@ -171,8 +171,10 @@ int ff_sdr_decode_rds(SDRContext *sdr, Station *station, AVComplexFloat *signal) station->rds_ring_pos += sdr->fm_block_size_p2; while (station->rds_ring_pos > IDX(2) + IDX(4*104-1)) { - int best_phase; + int best_phase, step; float best_amplitude = -1; + float last_bpsk = 0; + int best_errors = INT_MAX; for (phase = 0; phase < 2*IDX(2); phase++) { double a = 0; for (i = 0; i<2*104; i++) { @@ -185,7 +187,6 @@ int ff_sdr_decode_rds(SDRContext *sdr, Station *station, AVComplexFloat *signal) } phase = best_phase; - float last_bpsk = 0; for (i = 0; i<2*104; i++) { float bpsk = ring[IDX(2*i+1)][phase] - ring[IDX(2*i)][phase]; if (i) @@ -193,7 +194,6 @@ int ff_sdr_decode_rds(SDRContext *sdr, Station *station, AVComplexFloat *signal) last_bpsk = bpsk; } - int best_errors = INT_MAX; for (phase = 0; phase < 104; phase++) { int error = 0; for (int block = 0; block < 4; block++) { @@ -217,7 +217,7 @@ int ff_sdr_decode_rds(SDRContext *sdr, Station *station, AVComplexFloat *signal) decode_rds_group(sdr, station, group); } } - int step = IDX(2*(best_phase + 103)); + step = IDX(2*(best_phase + 103)); av_assert0(station->rds_ring_pos >= step); memmove(ring, ring + step, (station->rds_ring_pos + sdr->fm_block_size_p2 - step) * sizeof(*station->rds_ring)); -- 2.31.1 _______________________________________________ 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".