From 25ec76e42888b1d8cdae77b31d9209efdbe3a410 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 8 Feb 2015 01:18:43 +0100 Subject: [PATCH] Fix a misunderstanding in the RS API. --- rs_parm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rs_parm.h b/rs_parm.h index d9d3e40..446f164 100644 --- a/rs_parm.h +++ b/rs_parm.h @@ -4,12 +4,13 @@ // (255,171); pretty much 50% overhead, can protect against loss bursts of // 84 packets (more if they straddle blocks). Sounds overkill, but sometimes // conditions can be really really crappy... -#define RS_SYM_SIZE 255 +#define RS_SYM_SIZE 8 +#define RS_NUM_SYM ((1 << RS_SYM_SIZE) - 1) #define RS_PARITY_SIZE 84 #define RS_PAD 0 #define RS_GF_POLY 0x11d // Taken from rstest.c. -#define RS_GROUP_SIZE (RS_SYM_SIZE - RS_PAD) +#define RS_GROUP_SIZE (RS_NUM_SYM - RS_PAD) #define RS_PAYLOAD_SIZE (RS_GROUP_SIZE - RS_PARITY_SIZE) #endif /* !defined_(RS_PARM_H) */ -- 2.39.2