GNU Radio 3.7.1 C++ API
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
>
27
#include <
gnuradio/atsc/basic_trellis_encoder_impl.h
>
28
#include <
gnuradio/atsc/types.h
>
29
30
/*!
31
* \brief fancy, schmancy 12-way interleaved trellis encoder for ATSC
32
*/
33
34
class
ATSC_API
atsci_trellis_encoder
{
35
public
:
36
static
const
int
NCODERS = 12;
37
38
atsci_trellis_encoder
();
39
~
atsci_trellis_encoder
();
40
41
//! reset all encoder states
42
void
reset ();
43
44
/*!
45
* Take 12 RS encoded, convolutionally interleaved segments and
46
* produce 12 trellis coded data segments. We work in groups of 12
47
* because that's the smallest number of segments that composes a
48
* single full cycle of the encoder mux.
49
*/
50
void
encode
(
atsc_data_segment
out[NCODERS],
51
const
atsc_mpeg_packet_rs_encoded
in[NCODERS]);
52
53
54
protected
:
55
static
const
int
SEGMENT_SIZE =
ATSC_MPEG_RS_ENCODED_LENGTH
;
// 207
56
static
const
int
INPUT_SIZE = (SEGMENT_SIZE * 12);
57
static
const
int
OUTPUT_SIZE = (
ATSC_DATA_SEGMENT_LENGTH
* 12);
58
59
void
encode_helper (
unsigned
char
out[OUTPUT_SIZE],
60
const
unsigned
char
in[INPUT_SIZE]);
61
62
atsci_basic_trellis_encoder
enc[NCODERS];
63
bool
debug
;
64
};
65
66
67
#endif
/* _ATSC_TRELLIS_ENCODER_H_ */
gr-atsc
include
gnuradio
atsc
trellis_encoder_impl.h
Generated on Wed Oct 2 2013 01:55:47 for GNU Radio 3.7.1 C++ API by
1.8.4