GNU Radio 3.7.3 C++ API
data_interleaver_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_DATA_INTERLEAVER_H_
24 #define _ATSC_DATA_INTERLEAVER_H_
25 
26 #include <gnuradio/atsc/api.h>
27 #include <gnuradio/atsc/types.h>
29 
30 /*!
31  * \brief atsc convolutional data interleaver
32  */
34  public:
35  atsci_data_interleaver () : convolutional_interleaver<unsigned char>(true, 52, 4) {}
36 
37  void interleave (atsc_mpeg_packet_rs_encoded &out,
38  const atsc_mpeg_packet_rs_encoded &in);
39 };
40 
41 /*!
42  * \brief atsc convolutional data deinterleaver
43  */
45  public:
47  convolutional_interleaver<unsigned char>(false, 52, 4), alignment_fifo (156) {}
48 
49  void deinterleave (atsc_mpeg_packet_rs_encoded &out,
50  const atsc_mpeg_packet_rs_encoded &in);
51 
52 private:
53  /*!
54  * Note: The use of the alignment_fifo keeps the encoder and decoder
55  * aligned if both are synced to a field boundary. There may be other
56  * ways to implement this function. This is a best guess as to how
57  * this should behave, as we have no test vectors for either the
58  * interleaver or deinterleaver.
59  */
60  interleaver_fifo<unsigned char> alignment_fifo;
61 
62  static void remap_pli (plinfo &out, const plinfo &in);
63 };
64 
65 #endif /* _ATSC_DATA_INTERLEAVER_H_ */
atsci_data_deinterleaver()
Definition: data_interleaver_impl.h:46
template class for generic convolutional interleaver
Definition: convolutional_interleaver.h:35
#define ATSC_API
Definition: gr-atsc/include/gnuradio/atsc/api.h:30
atsci_data_interleaver()
Definition: data_interleaver_impl.h:35
atsc convolutional data deinterleaver
Definition: data_interleaver_impl.h:44
Definition: gr-atsc/include/gnuradio/atsc/types.h:177
#define false
Definition: stdbool.h:33
pipeline info that flows with data
Definition: gr-atsc/include/gnuradio/atsc/types.h:36
atsc convolutional data interleaver
Definition: data_interleaver_impl.h:33
#define true
Definition: stdbool.h:32