GNU Radio's DVBS2RX Package
bch_decoder_bb_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2018 Ahmet Inan, Ron Economos.
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_DVBS2RX_BCH_DECODER_BB_IMPL_H
22 #define INCLUDED_DVBS2RX_BCH_DECODER_BB_IMPL_H
23 
24 #include <dvbs2rx/bch_decoder_bb.h>
25 #include "bitman.hh"
26 #include "galois_field.hh"
27 #include "bose_chaudhuri_hocquenghem_decoder.hh"
28 
29 namespace gr {
30  namespace dvbs2rx {
31 
33  {
34  private:
35  unsigned int kbch;
36  unsigned int nbch;
37  unsigned int bch_code;
38  unsigned int output_mode;
39  unsigned int frame;
40  typedef CODE::GaloisField<16, 0b10000000000101101, uint16_t> GF_NORMAL;
41  typedef CODE::GaloisField<15, 0b1000000000101101, uint16_t> GF_MEDIUM;
42  typedef CODE::GaloisField<14, 0b100000000101011, uint16_t> GF_SHORT;
43  typedef CODE::BoseChaudhuriHocquenghemDecoder<24, 1, 65343, GF_NORMAL> BCH_NORMAL_12;
44  typedef CODE::BoseChaudhuriHocquenghemDecoder<20, 1, 65375, GF_NORMAL> BCH_NORMAL_10;
45  typedef CODE::BoseChaudhuriHocquenghemDecoder<16, 1, 65407, GF_NORMAL> BCH_NORMAL_8;
46  typedef CODE::BoseChaudhuriHocquenghemDecoder<24, 1, 32587, GF_MEDIUM> BCH_MEDIUM_12;
47  typedef CODE::BoseChaudhuriHocquenghemDecoder<24, 1, 16215, GF_SHORT> BCH_SHORT_12;
48  GF_NORMAL *instance_n;
49  GF_MEDIUM *instance_m;
50  GF_SHORT *instance_s;
51  BCH_NORMAL_12 *decode_n_12;
52  BCH_NORMAL_10 *decode_n_10;
53  BCH_NORMAL_8 *decode_n_8;
54  BCH_MEDIUM_12 *decode_m_12;
55  BCH_SHORT_12 *decode_s_12;
56  uint8_t *code;
57  uint8_t *parity;
58 
59  public:
62 
63  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
64 
65  int general_work(int noutput_items,
66  gr_vector_int &ninput_items,
67  gr_vector_const_void_star &input_items,
68  gr_vector_void_star &output_items);
69  };
70 
71  } // namespace dvbs2rx
72 } // namespace gr
73 
74 #endif /* INCLUDED_DVBS2RX_BCH_DECODER_BB_IMPL_H */
75 
dvb_framesize_t
Definition: dvb_config.h:85
<+description of block+>
Definition: bch_decoder_bb.h:37
dvb_outputmode_t
Definition: dvb_config.h:124
Definition: bbdeheader_bb.h:30
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
Definition: bch_decoder_bb_impl.h:32
dvb_code_rate_t
Definition: dvb_config.h:31
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
bch_decoder_bb_impl(dvb_standard_t standard, dvb_framesize_t framesize, dvb_code_rate_t rate, dvb_outputmode_t outputmode)
dvb_standard_t
Definition: dvb_config.h:26