From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH 07/12] avradio/rds: warnings cleanup
Date: Tue, 11 Jul 2023 23:19:05 +0200
Message-ID: <20230711211910.1257355-7-michael@niedermayer.cc> (raw)
In-Reply-To: <20230711211910.1257355-1-michael@niedermayer.cc>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
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".
next prev parent reply other threads:[~2023-07-11 21:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 21:18 [FFmpeg-devel] [PATCH 01/12] avradio/sdrdemux: Fix use of uninitialized memory Michael Niedermayer
2023-07-11 21:19 ` [FFmpeg-devel] [PATCH 02/12] avradio/rds: Implement burst error decoder Michael Niedermayer
2023-07-11 21:19 ` [FFmpeg-devel] [PATCH 03/12] avradio/rds: Keep track of program_id Michael Niedermayer
2023-07-11 21:19 ` [FFmpeg-devel] [PATCH 04/12] avradio/sdr: Move rds_ring to Station Michael Niedermayer
2023-07-11 21:19 ` [FFmpeg-devel] [PATCH 05/12] avradio/rds: move phase 2 window to main context Michael Niedermayer
2023-07-11 21:19 ` [FFmpeg-devel] [PATCH 06/12] avradio/sdr: Warnings cleanup Michael Niedermayer
2023-07-11 21:19 ` Michael Niedermayer [this message]
2023-07-11 21:19 ` [FFmpeg-devel] [PATCH 08/12] avradio/sdr: Move IFFT and block size to main context Michael Niedermayer
2023-07-11 21:19 ` [FFmpeg-devel] [PATCH 09/12] avradio/sdr: Move per stream arraies " Michael Niedermayer
2023-07-11 21:19 ` [FFmpeg-devel] [PATCH 10/12] avradio/sdr: Move tx contexts out of stream so its not duplicated Michael Niedermayer
2023-07-11 21:19 ` [FFmpeg-devel] [PATCH 11/12] avradio/sdr: Pass AVStream instead of int to demodulate Michael Niedermayer
2023-07-11 21:19 ` [FFmpeg-devel] [PATCH 12/12] avradio/sdr: Process RDS of all stations not just the current one Michael Niedermayer
2023-07-12 23:26 ` [FFmpeg-devel] [PATCH 01/12] avradio/sdrdemux: Fix use of uninitialized memory Michael Niedermayer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230711211910.1257355-7-michael@niedermayer.cc \
--to=michael@niedermayer.cc \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git