GNU Radio Manual and C++ API Reference  3.7.7
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
atsc_field_sync_mux_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2015 Free Software Foundation, Inc.
4  *
5  * This is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3, or (at your option)
8  * any later version.
9  *
10  * This software is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this software; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef INCLUDED_DTV_ATSC_FIELD_SYNC_MUX_IMPL_H
22 #define INCLUDED_DTV_ATSC_FIELD_SYNC_MUX_IMPL_H
23 
25 #include "atsc_pnXXX_impl.h"
26 #include "atsc_types.h"
27 
28 namespace gr {
29  namespace dtv {
30 
32  {
33  private:
34  static const int N_SAVED_SYMBOLS = 12;
35  bool d_already_output_field_sync;
36  unsigned char d_saved_symbols[N_SAVED_SYMBOLS];
37 
38  void init_field_sync_common(unsigned char *p, int mask, const unsigned char saved_symbols[N_SAVED_SYMBOLS]);
39  inline void init_field_sync_1(atsc_data_segment *s, const unsigned char saved_symbols[N_SAVED_SYMBOLS]);
40  inline void init_field_sync_2(atsc_data_segment *s, const unsigned char saved_symbols[N_SAVED_SYMBOLS]);
41  void save_last_symbols(unsigned char saved_symbols[N_SAVED_SYMBOLS], const atsc_data_segment &seg);
42  inline bool last_regular_seg_p(const plinfo &pli);
43 
44  public:
47 
48  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
49 
50  int general_work(int noutput_items,
51  gr_vector_int &ninput_items,
52  gr_vector_const_void_star &input_items,
53  gr_vector_void_star &output_items);
54  };
55 
56  } // namespace dtv
57 } // namespace gr
58 
59 #endif /* INCLUDED_DTV_ATSC_FIELD_SYNC_MUX_IMPL_H */
<+description of block+>
Definition: atsc_field_sync_mux.h:35
Definition: atsc_field_sync_mux_impl.h:31
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
Estimate input requirements given output request.
pipeline info that flows with data
Definition: atsc_types.h:38
std::vector< const void * > gr_vector_const_void_star
Definition: gnuradio-runtime/include/gnuradio/types.h:38
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
Include this header to use the message passing features.
Definition: logger.h:129
contains 832 3 bit symbols. The low 3 bits in the byte hold the symbol.
Definition: atsc_types.h:226
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