mirror of
https://github.com/drowe67/codec2
synced 2026-08-14 19:31:34 -04:00
automatically compute the number of used data bits in a codeword from other waveform parameters
This commit is contained in:
parent
d321ccf46f
commit
d026cfede7
1 changed files with 5 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue