GNU Radio Manual and C++ API Reference  3.7.5.1
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
atsc_viterbi_decoder_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2014 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 INCLUDED_DTV_ATSC_VITERBI_DECODER_IMPL_H
24 #define INCLUDED_DTV_ATSC_VITERBI_DECODER_IMPL_H
25 
28 #include "atsc_syminfo_impl.h"
29 #include "atsc_interleaver_fifo.h"
30 
31 #define USE_SIMPLE_SLICER 0
32 #define NCODERS 12
33 
34 #if USE_SIMPLE_SLICER
36 #else
37 #include "atsc_single_viterbi.h"
38 #endif
39 
40 namespace gr {
41  namespace dtv {
42 
43 #if USE_SIMPLE_SLICER
44  typedef atsc_fake_single_viterbi single_viterbi_t;
45 #else
47 #endif
48 
50  {
51  private:
52  int last_start;
54 
55  static const int SEGMENT_SIZE = ATSC_MPEG_RS_ENCODED_LENGTH; // 207
56  static const int OUTPUT_SIZE = (SEGMENT_SIZE * 12);
57  static const int INPUT_SIZE = (ATSC_DATA_SEGMENT_LENGTH * 12);
58 
59  single_viterbi_t viterbi[NCODERS];
60  fifo_t *fifo[NCODERS];
61 
62  public:
65 
66  void reset();
67 
68  virtual int work(int noutput_items,
69  gr_vector_const_void_star &input_items,
70  gr_vector_void_star &output_items);
71  };
72 
73  } /* namespace dtv */
74 } /* namespace gr */
75 
76 #endif /* INCLUDED_DTV_ATSC_VITERBI_DECODER_IMPL_H */
std::vector< const void * > gr_vector_const_void_star
Definition: gnuradio-runtime/include/gnuradio/types.h:38
atsc_single_viterbi single_viterbi_t
Definition: atsc_viterbi_decoder_impl.h:46
static const int ATSC_DATA_SEGMENT_LENGTH
Definition: atsc_consts.h:41
std::vector< void * > gr_vector_void_star
Definition: gnuradio-runtime/include/gnuradio/types.h:37
ATSC Viterbi Decoder.
Definition: atsc_viterbi_decoder.h:37
static const int ATSC_MPEG_RS_ENCODED_LENGTH
Definition: atsc_consts.h:34
#define NCODERS
Definition: atsc_viterbi_decoder_impl.h:32
Definition: atsc_single_viterbi.h:29
virtual int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
just like gr::block::general_work, only this arranges to call consume_each for you ...
Definition: atsc_viterbi_decoder_impl.h:49