3 * Copyright 2006 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
23 #ifndef INCLUDED_DECODER_VITERBI_FULL_BLOCK_H
24 #define INCLUDED_DECODER_VITERBI_FULL_BLOCK_H
26 #include "decoder_viterbi.h"
28 class decoder_viterbi_full_block : public decoder_viterbi
31 * \brief Decode the incoming streams using a Viterbi-style decoder,
32 * doing full trellis block decoding before putting out any
35 * input: streams of metrics, two per code output: one for the 0-bit
36 * metrics and the other for the 1-bit metric.
38 * output: stream(s) of output bits
42 decoder_viterbi_full_block (int sample_precision,
43 encoder_convolutional* l_encoder);
45 virtual ~decoder_viterbi_full_block ();
47 virtual size_t compute_n_input_items (size_t n_output_bits);
48 virtual size_t compute_n_output_bits (size_t n_input_items);
51 virtual void decode_private ();
52 virtual void update_traceback__up (size_t from_state_ndx,
55 virtual void update_traceback__middle ();
56 virtual void update_traceback__term ();
59 * traceback_t: used to store all encode-input bits for
60 * all possible paths, when computing all trellis bits before
61 * determining the ML decode-output sequence.
63 * d_prev: the connection to the previous bit's traceback structure
65 * d_inputs: the inputs (one per bit) for this connection
68 typedef struct traceback_t {
69 struct traceback_t *d_prev;
71 } traceback_t, *traceback_t_ptr, **traceback_t_hdl;
74 * d_n_total_inputs_per_stream: how many bits to store for each
75 * state to determine the best decoder-output (encoder-input) bits
77 size_t d_n_inputs_per_stream;
78 traceback_t_hdl d_out_buf;
81 #endif /* INCLUDED_DECODER_VITERBI_FULL_BLOCK_H */