changeset 50:0db059f4632d

efr-sid OS#6538: more sensible 2-bit errors
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 12 Aug 2024 02:49:28 +0000
parents 2daadef1e70d
children 914eeb3ab866
files efr-sid/mk-sid-test2.c
diffstat 1 files changed, 7 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/efr-sid/mk-sid-test2.c	Mon Aug 12 02:37:21 2024 +0000
+++ b/efr-sid/mk-sid-test2.c	Mon Aug 12 02:49:28 2024 +0000
@@ -64,31 +64,14 @@
 emit_2bit_errors()
 {
 	uint8_t frame_bits[TOTAL_BITS];
+	unsigned n;
 
-	bcopy(input_frame, frame_bits, TOTAL_BITS);
-	frame_bits[SID_codeword_bit_idx[3]] = 0;
-	frame_bits[SID_codeword_bit_idx[14]] = 0;
-	emit_out_frame(frame_bits);
-	bcopy(input_frame, frame_bits, TOTAL_BITS);
-	frame_bits[SID_codeword_bit_idx[15]] = 0;
-	frame_bits[SID_codeword_bit_idx[92]] = 0;
-	emit_out_frame(frame_bits);
-	bcopy(input_frame, frame_bits, TOTAL_BITS);
-	frame_bits[SID_codeword_bit_idx[65]] = 0;
-	frame_bits[SID_codeword_bit_idx[35]] = 0;
-	emit_out_frame(frame_bits);
-	bcopy(input_frame, frame_bits, TOTAL_BITS);
-	frame_bits[SID_codeword_bit_idx[89]] = 0;
-	frame_bits[SID_codeword_bit_idx[79]] = 0;
-	emit_out_frame(frame_bits);
-	bcopy(input_frame, frame_bits, TOTAL_BITS);
-	frame_bits[SID_codeword_bit_idx[32]] = 0;
-	frame_bits[SID_codeword_bit_idx[38]] = 0;
-	emit_out_frame(frame_bits);
-	bcopy(input_frame, frame_bits, TOTAL_BITS);
-	frame_bits[SID_codeword_bit_idx[46]] = 0;
-	frame_bits[SID_codeword_bit_idx[26]] = 0;
-	emit_out_frame(frame_bits);
+	for (n = 0; n < 48; n++) {
+		bcopy(input_frame, frame_bits, TOTAL_BITS);
+		frame_bits[SID_codeword_bit_idx[n]] = 0;
+		frame_bits[SID_codeword_bit_idx[n + 47]] = 0;
+		emit_out_frame(frame_bits);
+	}
 }
 
 static void