GNU Radio Manual and C++ API Reference 3.7.14.0
The Free & Open Software Radio Ecosystem
trellis_encoder_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_TRELLIS_ENCODER_H_
24#define _ATSC_TRELLIS_ENCODER_H_
25
26#include <gnuradio/atsc/api.h>
28#include <gnuradio/atsc/types.h>
29
30/*!
31 * \brief fancy, schmancy 12-way interleaved trellis encoder for ATSC
32 */
33
35{
36public:
37 static const int NCODERS = 12;
38
41
42 //! reset all encoder states
43 void reset();
44
45 /*!
46 * Take 12 RS encoded, convolutionally interleaved segments and
47 * produce 12 trellis coded data segments. We work in groups of 12
48 * because that's the smallest number of segments that composes a
49 * single full cycle of the encoder mux.
50 */
51 void encode(atsc_data_segment out[NCODERS],
52 const atsc_mpeg_packet_rs_encoded in[NCODERS]);
53
54
55protected:
56 static const int SEGMENT_SIZE = ATSC_MPEG_RS_ENCODED_LENGTH; // 207
57 static const int INPUT_SIZE = (SEGMENT_SIZE * 12);
58 static const int OUTPUT_SIZE = (ATSC_DATA_SEGMENT_LENGTH * 12);
59
60 void encode_helper(unsigned char out[OUTPUT_SIZE],
61 const unsigned char in[INPUT_SIZE]);
62
64 bool debug;
65};
66
67
68#endif /* _ATSC_TRELLIS_ENCODER_H_ */
contains 832 3 bit symbols. The low 3 bits in the byte hold the symbol.
Definition: gr-atsc/include/gnuradio/atsc/types.h:209
Definition: gr-atsc/include/gnuradio/atsc/types.h:186
ATSC trellis encoder building block.
Definition: basic_trellis_encoder_impl.h:42
fancy, schmancy 12-way interleaved trellis encoder for ATSC
Definition: trellis_encoder_impl.h:35
void encode(atsc_data_segment out[NCODERS], const atsc_mpeg_packet_rs_encoded in[NCODERS])
void reset()
reset all encoder states
bool debug
Definition: trellis_encoder_impl.h:64
void encode_helper(unsigned char out[OUTPUT_SIZE], const unsigned char in[INPUT_SIZE])
static const int ATSC_DATA_SEGMENT_LENGTH
Definition: consts.h:33
static const int ATSC_MPEG_RS_ENCODED_LENGTH
Definition: consts.h:32
#define ATSC_API
Definition: gr-atsc/include/gnuradio/atsc/api.h:30