GNU Radio's IEEE802_11 Package
viterbi_decoder_generic.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Bastian Bloessl <bloessl@ccs-labs.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17#ifndef INCLUDED_IEEE802_11_VITERBI_DECODER_GENERIC_H
18#define INCLUDED_IEEE802_11_VITERBI_DECODER_GENERIC_H
19
20#include "base.h"
21
22namespace gr {
23namespace ieee802_11 {
24
25/* This Viterbi decoder was taken from the gr-dvbt module of
26 * GNU Radio. It is an SSE2 version of the Viterbi Decoder
27 * created by Phil Karn. The SSE2 version was made by Bogdan
28 * Diaconescu. For more info see: gr-dvbt/lib/d_viterbi.h
29 */
30class viterbi_decoder : public base
31{
32public:
33 virtual uint8_t* decode(ofdm_param* ofdm, frame_param* frame, uint8_t* in);
34
35private:
36 union branchtab27 {
37 unsigned char c[32];
38 } d_branchtab27_generic[2];
39
40 alignas(16) unsigned char d_metric0_generic[64];
41 alignas(16) unsigned char d_metric1_generic[64];
42 alignas(16) unsigned char d_path0_generic[64];
43 alignas(16) unsigned char d_path1_generic[64];
44
45 void reset();
46
47 void viterbi_chunks_init_generic();
48 void viterbi_butterfly2_generic(unsigned char* symbols,
49 unsigned char m0[],
50 unsigned char m1[],
51 unsigned char p0[],
52 unsigned char p1[]);
53 unsigned char viterbi_get_output_generic(unsigned char* mm0,
54 unsigned char* pp0,
55 int ntraceback,
56 unsigned char* outbuf);
57};
58
59} // namespace ieee802_11
60} // namespace gr
61
62#endif /* INCLUDED_IEEE802_11_VITERBI_DECODER_GENERIC_H */
Definition utils.h:80
virtual void reset()=0
Definition viterbi_decoder_generic.h:31
virtual uint8_t * decode(ofdm_param *ofdm, frame_param *frame, uint8_t *in)
Definition utils.h:58
Definition chunks_to_symbols.h:24
Definition chunks_to_symbols.h:23