GNU Radio Manual and C++ API Reference  3.7.4.1
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
viterbi_decoder_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2002 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 3, 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., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef _ATSC_VITERBI_DECODER_H_
24 #define _ATSC_VITERBI_DECODER_H_
25 
26 #define USE_SIMPLE_SLICER 0
27 
28 #include <gnuradio/atsc/api.h>
29 #include <gnuradio/atsc/types.h>
31 
32 #if (USE_SIMPLE_SLICER)
35 #else
38 #endif
39 
40 /*!
41  * \brief fancy, schmancy 12-way interleaved viterbi decoder for ATSC
42  */
43 
45 public:
46  static const int NCODERS = 12;
47 
50 
51  //! reset all decoder states
52  void reset ();
53 
54  /*!
55  * Take 12 data segments of soft decisions (floats) and
56  * produce 12 RS encoded data segments. We work in groups of 12
57  * because that's the smallest number of segments that composes a
58  * single full cycle of the decoder mux.
59  */
60  void decode (atsc_mpeg_packet_rs_encoded out[NCODERS],
61  const atsc_soft_data_segment in[NCODERS]);
62 
63 
64 
65  protected:
67 
68  static const int SEGMENT_SIZE = ATSC_MPEG_RS_ENCODED_LENGTH; // 207
69  static const int OUTPUT_SIZE = (SEGMENT_SIZE * 12);
70  static const int INPUT_SIZE = (ATSC_DATA_SEGMENT_LENGTH * 12);
71 
72  void decode_helper (unsigned char out[OUTPUT_SIZE],
73  const float in[INPUT_SIZE]);
74 
75 
76  single_viterbi_t viterbi[NCODERS];
77  fifo_t *fifo[NCODERS];
78  bool debug;
79 
80 };
81 
82 
83 
84 #endif /* _ATSC_VITERBI_DECODER_H_ */
static const int ATSC_DATA_SEGMENT_LENGTH
Definition: consts.h:33
atsci_single_viterbi single_viterbi_t
Definition: viterbi_decoder_impl.h:37
interleaver_fifo< unsigned char > fifo_t
Definition: viterbi_decoder_impl.h:66
#define ATSC_API
Definition: gr-atsc/include/gnuradio/atsc/api.h:30
Definition: gr-atsc/include/gnuradio/atsc/types.h:220
single channel viterbi decoder
Definition: single_viterbi_impl.h:31
single channel viterbi decoder
Definition: fake_single_viterbi_impl.h:31
Definition: gr-atsc/include/gnuradio/atsc/types.h:177
static const int ATSC_MPEG_RS_ENCODED_LENGTH
Definition: consts.h:32
bool debug
Definition: viterbi_decoder_impl.h:78
fancy, schmancy 12-way interleaved viterbi decoder for ATSC
Definition: viterbi_decoder_impl.h:44