GNU Radio Manual and C++ API Reference 3.7.14.0
The Free & Open Software Radio Ecosystem
viterbi.h
Go to the documentation of this file.
1/*
2 * Copyright 2008 Free Software Foundation, Inc.
3 *
4 * This file is part of GNU Radio
5 *
6 * GNU Radio is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3, or (at your option)
9 * any later version.
10 *
11 * GNU Radio is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GNU Radio; see the file COPYING. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street,
19 * Boston, MA 02110-1301, USA.
20 */
21
22/* The path memory for each state is 32 bits. This is slightly shorter
23 * than we'd like for K=7, especially since we chain back every 8 bits.
24 * But it fits so nicely into a 32-bit machine word...
25 */
26
27#include <gnuradio/fec/api.h>
28
30 unsigned long path; /* Decoded path to this state */
31 long metric; /* Cumulative metric to this state */
32};
33
35int gen_met(int mettab[2][256], /* Metric table */
36 int amp, /* Signal amplitude */
37 double esn0, /* Es/N0 ratio in dB */
38 double bias, /* Metric bias */
39 int scale); /* Scale factor */
40
41FEC_API unsigned char encode(unsigned char* symbols,
42 unsigned char* data,
43 unsigned int nbytes,
44 unsigned char encstate);
45
47
48FEC_API void viterbi_butterfly2(unsigned char* symbols,
49 int mettab[2][256],
50 struct viterbi_state* state0,
51 struct viterbi_state* state1);
52
53FEC_API unsigned char viterbi_get_output(struct viterbi_state* state,
54 unsigned char* outbuf);
#define FEC_API
Definition: gr-fec/include/gnuradio/fec/api.h:30
Definition: viterbi.h:29
long metric
Definition: viterbi.h:31
unsigned long path
Definition: viterbi.h:30
FEC_API unsigned char encode(unsigned char *symbols, unsigned char *data, unsigned int nbytes, unsigned char encstate)
FEC_API void viterbi_chunks_init(struct viterbi_state *state)
FEC_API unsigned char viterbi_get_output(struct viterbi_state *state, unsigned char *outbuf)
FEC_API void viterbi_butterfly2(unsigned char *symbols, int mettab[2][256], struct viterbi_state *state0, struct viterbi_state *state1)
FEC_API int gen_met(int mettab[2][256], int amp, double esn0, double bias, int scale)