From: drowe67 Date: Wed, 30 Nov 2016 02:08:47 +0000 (+0000) Subject: Steve's lpdc_enc and dec changes X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=fd76d314e96ddc78edef3424c017f37d7635d3d8;p=freetel-svn-tracking.git Steve's lpdc_enc and dec changes git-svn-id: https://svn.code.sf.net/p/freetel/code@2912 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/src/ldpc_dec.c b/codec2-dev/src/ldpc_dec.c index 6b60ee94..41c5adde 100644 --- a/codec2-dev/src/ldpc_dec.c +++ b/codec2-dev/src/ldpc_dec.c @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) if (argc < 2) { fprintf(stderr, "usage: %s --test\n", argv[0]); fprintf(stderr, " Run internal self test and print code parameters.\n\n"); - fprintf(stderr, "usage: %s InOneSymbolPerDouble OutOneBitPerByte [--sdinput]\n", argv[0]); + fprintf(stderr, "usage: %s InOneSymbolPerDouble OutOneBitPerByte [--sd]\n", argv[0]); fprintf(stderr, " InOneSymbolPerDouble is a file of double LLRs. If the\n"); fprintf(stderr, " --sd flag is used the input file can be Soft Decision\n"); fprintf(stderr, " symbols, and LLRs will be calculated internally. Use -\n"); @@ -143,7 +143,7 @@ int main(int argc, char *argv[]) sdinput = 0; printf("argc: %d\n", argc); if (argc == 4) - if (strcmp(argv[3], "--sdinput") == 0) + if (strcmp(argv[3], "--sd") == 0) sdinput = 1; double *input_double = calloc(CodeLength, sizeof(double)); diff --git a/codec2-dev/src/ldpc_enc.c b/codec2-dev/src/ldpc_enc.c index bb8d7156..ac72f2eb 100644 --- a/codec2-dev/src/ldpc_enc.c +++ b/codec2-dev/src/ldpc_enc.c @@ -16,7 +16,7 @@ /* generated by ldpc_fsk_lib.m:ldpc_decode() */ -#include "ldpc_code.h" +#include "H2064_516_sparse.h" void encode(unsigned char ibits[], unsigned char pbits[]) { unsigned int p, i, tmp, par, prev=0; @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) if (strcmp(argv[1], "-") == 0) fin = stdin; else if ( (fin = fopen(argv[1],"rb")) == NULL ) { fprintf(stderr, "Error opening input bit file: %s: %s.\n", - argv[2], strerror(errno)); + argv[1], strerror(errno)); exit(1); }