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_equalizer_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_EQUALIZER_IMPL_H
24 #define INCLUDED_DTV_ATSC_EQUALIZER_IMPL_H
25 
28 #include "atsc_syminfo_impl.h"
29 
30 namespace gr {
31  namespace dtv {
32 
34  {
35  private:
36  static const int NTAPS = 64;
37  static const int NPRETAPS = (int) (NTAPS * 0.8); // probably should be either .2 or .8
38 
39  // the length of the field sync pattern that we know unequivocally
40  static const int KNOWN_FIELD_SYNC_LENGTH = 4 + 511 + 3 * 63;
41 
42  float training_sequence1[KNOWN_FIELD_SYNC_LENGTH];
43  float training_sequence2[KNOWN_FIELD_SYNC_LENGTH];
44 
45  void filterN(const float *input_samples, float *output_samples, int nsamples);
46  void adaptN(const float *input_samples, const float *training_pattern,
47  float *output_samples, int nsamples);
48 
49  float d_taps[NTAPS];
50 
51  float data_mem[ATSC_DATA_SEGMENT_LENGTH + NTAPS]; // Buffer for previous data packet
52  float data_mem2[ATSC_DATA_SEGMENT_LENGTH];
53  unsigned short d_flags;
54  short d_segno;
55 
56  int d_buff_not_filled;
57 
58  public:
61 
62  virtual int general_work(int noutput_items,
63  gr_vector_int &ninput_items,
64  gr_vector_const_void_star &input_items,
65  gr_vector_void_star &output_items);
66  };
67 
68  } /* namespace dtv */
69 } /* namespace gr */
70 
71 #endif /* INCLUDED_DTV_ATSC_EQUALIZER_IMPL_H */
ATSC Receiver Equalizer.
Definition: atsc_equalizer.h:37
virtual int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
compute output items from input items
std::vector< const void * > gr_vector_const_void_star
Definition: gnuradio-runtime/include/gnuradio/types.h:38
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
std::vector< int > gr_vector_int
Definition: gnuradio-runtime/include/gnuradio/types.h:33
Definition: atsc_equalizer_impl.h:33