118 int len,
int start_state);
129 ubit_t *output,
int has_flush,
int end_state);
Osmocom bit level support code.
uint8_t ubit_t
unpacked bit (0 or 1): 1 bit per byte
Definition: bits.h:24
int8_t sbit_t
soft bit with value (-127...127), as commonly used in communications receivers such as [viterbi] deco...
Definition: bits.h:21
static size_t len(const char *str)
write Write running configuration to or terminal n Write configuration to the copy running config startup Copy configuration n Copy running config to n Copy running config to startup write Write running configuration to or terminal n Write to terminal n
void osmo_conv_decode_rewind(struct osmo_conv_decoder *decoder)
Definition: conv.c:291
int osmo_conv_decode_get_output(struct osmo_conv_decoder *decoder, ubit_t *output, int has_flush, int end_state)
Definition: conv.c:578
int osmo_conv_encode_raw(struct osmo_conv_encoder *encoder, const ubit_t *input, ubit_t *output, int n)
Definition: conv.c:133
int osmo_conv_get_output_length(const struct osmo_conv_code *code, int len)
Definition: conv.c:51
void osmo_conv_decode_reset(struct osmo_conv_decoder *decoder, int start_state)
Definition: conv.c:270
void osmo_conv_encode_init(struct osmo_conv_encoder *encoder, const struct osmo_conv_code *code)
Initialize a convolutional encoder.
Definition: conv.c:83
int osmo_conv_decode_scan(struct osmo_conv_decoder *decoder, const sbit_t *input, int n)
Definition: conv.c:321
void osmo_conv_decode_init(struct osmo_conv_decoder *decoder, const struct osmo_conv_code *code, int len, int start_state)
Definition: conv.c:241
int osmo_conv_decode(const struct osmo_conv_code *code, const sbit_t *input, ubit_t *output)
All-in-one convolutional decoding function.
Definition: conv.c:642
int osmo_conv_encode(const struct osmo_conv_code *code, const ubit_t *input, ubit_t *output)
All-in-one convolutional encoding function.
Definition: conv.c:207
int osmo_conv_get_input_length(const struct osmo_conv_code *code, int len)
Definition: conv.c:45
int osmo_conv_encode_flush(struct osmo_conv_encoder *encoder, ubit_t *output)
Definition: conv.c:162
void osmo_conv_decode_deinit(struct osmo_conv_decoder *decoder)
Definition: conv.c:311
void osmo_conv_encode_load_state(struct osmo_conv_encoder *encoder, const ubit_t *input)
Definition: conv.c:92
int osmo_conv_decode_get_best_end_state(struct osmo_conv_decoder *decoder)
Definition: conv.c:519
int osmo_conv_decode_flush(struct osmo_conv_decoder *decoder, const sbit_t *input)
Definition: conv.c:418
osmo_conv_term
possibe termination types
Definition: conv.h:36
@ CONV_TERM_FLUSH
Flush encoder state.
Definition: conv.h:37
@ CONV_TERM_TAIL_BITING
Tail biting.
Definition: conv.h:39
@ CONV_TERM_TRUNCATION
Direct truncation.
Definition: conv.h:38
structure describing a given convolutional code
Definition: conv.h:48
int len
Definition: conv.h:51
const uint8_t(* next_output)[2]
Next output array.
Definition: conv.h:55
const uint8_t * next_term_state
Flush termination state
Definition: conv.h:59
int N
Inverse of code rate.
Definition: conv.h:49
enum osmo_conv_term term
Termination type.
Definition: conv.h:53
const int * puncture
Punctured bits indexes.
Definition: conv.h:61
int K
Constraint length.
Definition: conv.h:50
const uint8_t * next_term_output
Flush termination output.
Definition: conv.h:58
const uint8_t(* next_state)[2]
Next state array
Definition: conv.h:56
convolutional decoder state
Definition: conv.h:101
const struct osmo_conv_code * code
for which code?
Definition: conv.h:102
uint8_t * state_history
state history [len][n_states]
Definition: conv.h:113
unsigned int * ae
accumulated error
Definition: conv.h:111
int len
Max o_idx (excl.
Definition: conv.h:106
unsigned int * ae_next
next accumulated error (tmp in scan)
Definition: conv.h:112
int o_idx
output index
Definition: conv.h:108
int n_states
number of states
Definition: conv.h:104
int p_idx
puncture index
Definition: conv.h:109
convolutional encoder state
Definition: conv.h:76
const struct osmo_conv_code * code
for which code?
Definition: conv.h:77
uint8_t state
Current state.
Definition: conv.h:80
int p_idx
Current puncture index.
Definition: conv.h:79
int i_idx
Next input bit index.
Definition: conv.h:78