-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathdescramble.h
53 lines (44 loc) · 2.22 KB
/
descramble.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2016 Edouard Griffiths, F4EXB. //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef DSDCC_DESCRAMBLE_H_
#define DSDCC_DESCRAMBLE_H_
#include "export.h"
namespace DSDcc
{
class DSDCC_API Descramble
{
public:
static void scramble (unsigned char *in, unsigned char *out);
static void deinterleave (unsigned char *in, unsigned char *out);
static int FECdecoder (unsigned char *in, unsigned char *out);
private:
static int traceBack (unsigned char *out,
unsigned char *m_pathMemory0,
unsigned char *m_pathMemory1,
unsigned char *m_pathMemory2,
unsigned char *m_pathMemory3);
static void viterbiDecode (int n,
unsigned char *data,
unsigned char *m_pathMemory0,
unsigned char *m_pathMemory1,
unsigned char *m_pathMemory2,
unsigned char *m_pathMemory3,
unsigned char *m_pathMetric);
static const int SCRAMBLER_TABLE_BITS_LENGTH=720;
static const unsigned char SCRAMBLER_TABLE_BITS[];
};
} // namespace DSDcc
#endif /* DSDCC_DESCRAMBLE_H_ */