GNU Radio Manual and C++ API Reference 3.7.14.0
The Free & Open Software Radio Ecosystem
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>
30#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{
46public:
47 static const int NCODERS = 12;
48
51
52 //! reset all decoder states
53 void reset();
54
55 /*!
56 * Take 12 data segments of soft decisions (floats) and
57 * produce 12 RS encoded data segments. We work in groups of 12
58 * because that's the smallest number of segments that composes a
59 * single full cycle of the decoder mux.
60 */
62 const atsc_soft_data_segment in[NCODERS]);
63
64
65protected:
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], const float in[INPUT_SIZE]);
73
74
75 single_viterbi_t viterbi[NCODERS];
76 fifo_t* fifo[NCODERS];
77 bool debug;
78};
79
80
81#endif /* _ATSC_VITERBI_DECODER_H_ */
Definition: gr-atsc/include/gnuradio/atsc/types.h:186
Definition: gr-atsc/include/gnuradio/atsc/types.h:235
single channel viterbi decoder
Definition: fake_single_viterbi_impl.h:32
single channel viterbi decoder
Definition: single_viterbi_impl.h:32
fancy, schmancy 12-way interleaved viterbi decoder for ATSC
Definition: viterbi_decoder_impl.h:45
bool debug
Definition: viterbi_decoder_impl.h:77
interleaver_fifo< unsigned char > fifo_t
Definition: viterbi_decoder_impl.h:66
void reset()
reset all decoder states
void decode(atsc_mpeg_packet_rs_encoded out[NCODERS], const atsc_soft_data_segment in[NCODERS])
void decode_helper(unsigned char out[OUTPUT_SIZE], const float in[INPUT_SIZE])
static const int ATSC_DATA_SEGMENT_LENGTH
Definition: consts.h:33
static const int ATSC_MPEG_RS_ENCODED_LENGTH
Definition: consts.h:32
#define ATSC_API
Definition: gr-atsc/include/gnuradio/atsc/api.h:30
atsci_single_viterbi single_viterbi_t
Definition: viterbi_decoder_impl.h:37