Houston, we have a trunk.
[debian/gnuradio] / gr-error-correcting-codes / src / lib / libecc / decoder_viterbi_full_block_i1_ic1.h
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2006 Free Software Foundation, Inc.
4  * 
5  * This file is part of GNU Radio
6  * 
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)
10  * any later version.
11  * 
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.
16  * 
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., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 #ifndef INCLUDED_DECODER_VITERBI_FULL_BLOCK_IC1_H
24 #define INCLUDED_DECODER_VITERBI_FULL_BLOCK_IC1_H
25
26 #include "decoder_viterbi_full_block.h"
27
28 class decoder_viterbi_full_block_i1_ic1 : public decoder_viterbi_full_block
29 {
30 /*!
31  * class decoder_viterbi_full_block_i1_ic1 :
32  *     public decoder_viterbi_full_block
33  *
34  * Decode the incoming metrics using a Viterbi-style decoder, doing
35  *     full trellis block decoding before putting out any bits
36  *
37  * input is "i1": one stream per input (as defined by the
38  *     code-output), with one metric per input item.
39  *
40  * output is "ic1": streams of char, one stream per output (as defined
41  *     by the code-input), using only the right-most justified (LSB?)
42  *     bit as the single output bit per output item.
43  *
44  * The rest of the options are outlined in the inherited classes'
45  *     header files.
46  */
47
48 public:
49   inline decoder_viterbi_full_block_i1_ic1
50   (int sample_precision,
51    encoder_convolutional* l_encoder)
52     : decoder_viterbi_full_block (sample_precision, l_encoder) {};
53
54   virtual ~decoder_viterbi_full_block_i1_ic1 () {};
55
56   virtual size_t compute_n_input_metrics (size_t n_output_bits);
57   virtual size_t compute_n_output_bits (size_t n_input_metrics);
58
59 protected:
60   virtual void increment_input_indices (bool while_decoding);
61   virtual void output_bit (char t_out_bit, char** out_buf,
62                            size_t t_output_stream);
63   virtual void increment_output_indices (bool while_decoding);
64 };
65
66 #endif /* INCLUDED_DECODER_VITERBI_FULL_BLOCK_I1_IC1_H */