diff options
| author | Author Name <[email protected]> | 2023-07-07 12:20:59 +0930 |
|---|---|---|
| committer | David Rowe <[email protected]> | 2023-07-07 12:29:06 +0930 |
| commit | ac7c48b4dee99d4c772f133d70d8d1b38262fcd2 (patch) | |
| tree | a2d0ace57a9c0e2e5b611c4987f6fed1b38b81e7 /src/tollr.c | |
shallow zip-file copy from codec2 e9d726bf20
Diffstat (limited to 'src/tollr.c')
| -rw-r--r-- | src/tollr.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tollr.c b/src/tollr.c new file mode 100644 index 0000000..3edce9b --- /dev/null +++ b/src/tollr.c @@ -0,0 +1,19 @@ +/* + FILE...: tollr.c + AUTHOR.: David Rowe + CREATED: July 2020 + + Converts oneBitPerByte hard decisions to LLRs for LDPC testing. +*/ + +#include <stdio.h> +#include <stdint.h> + +int main(void) { + uint8_t bit; + while(fread(&bit,sizeof(uint8_t), 1, stdin)) { + float llr = 10.0*(1-2*bit); + fwrite(&llr,sizeof(float),1,stdout); + } + return 0; +} |
