Skip to content

Commit

Permalink
automatically compute the number of used data bits in a codeword from…
Browse files Browse the repository at this point in the history
… other waveform parameters
  • Loading branch information
drowe67 committed May 2, 2024
1 parent d321ccf commit d026cfe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/interldpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ void ldpc_mode_specific_setup(struct OFDM *ofdm, struct LDPC *ldpc) {
set_data_bits_per_frame(ldpc, 156);
ldpc->protection_mode = LDPC_PROT_2020B;
}
if (!strcmp(ofdm->mode, "datac4")) set_data_bits_per_frame(ldpc, 448);
if (!strcmp(ofdm->mode, "datac13")) set_data_bits_per_frame(ldpc, 128);
if (!strcmp(ofdm->mode, "datac14")) set_data_bits_per_frame(ldpc, 40);

/* compute the number of data bits used in the codeword */
int data_bits_per_frame = ofdm->bitsperpacket - ofdm->nuwbits -
ofdm->ntxtbits - ldpc->NumberParityBits;
set_data_bits_per_frame(ldpc, data_bits_per_frame);
}

/* LDPC encode frame - generate parity bits and a codeword, applying the
Expand Down

0 comments on commit d026cfe

Please sign in to comment.