GNU Radio's SATELLITES Package

viterbi.h
Go to the documentation of this file.
1/*
2 * K=7 r=1/2 Viterbi decoder in portable C
3 * Copyright Feb 2004, Phil Karn, KA9Q
4 * May be used under the terms of the GNU Lesser General Public License (LGPL)
5 */
6
7#ifndef VITERBI_H_
8#define VITERBI_H_
9
10#include <stdint.h>
11
12#define VITERBI_CONSTRAINT 7
13#define VITERBI_TAIL 1
14#define VITERBI_RATE 2
15
16/* r=1/2 k=7 convolutional encoder polynomials
17 * The NASA-DSN convention is to use V27POLYA inverted, then V27POLYB
18 * The CCSDS/NASA-GSFC convention is to use V27POLYB, then V27POLYA inverted
19 */
20#define V27POLYA 0x6d
21#define V27POLYB 0x4f
22
23 void* create_viterbi_packed(int16_t len);
24 int init_viterbi_packed(void* vp, int starting_state);
25 int update_viterbi_packed(void* vp, unsigned char sym[], uint16_t npairs);
26 int chainback_viterbi_packed(void* vp,
27 unsigned char* data,
28 unsigned int nbits,
29 unsigned int endstate);
30 void delete_viterbi_packed(void* vp);
31 void encode_viterbi_packed(unsigned char* channel, unsigned char* data, int framebits);
32 void set_viterbi_polynomial_packed(int16_t polys[2]);
33
34#endif // VITERBI_H_
encode_viterbi_packed
void encode_viterbi_packed(unsigned char *channel, unsigned char *data, int framebits)
update_viterbi_packed
int update_viterbi_packed(void *vp, unsigned char sym[], uint16_t npairs)
set_viterbi_polynomial_packed
void set_viterbi_polynomial_packed(int16_t polys[2])
delete_viterbi_packed
void delete_viterbi_packed(void *vp)
chainback_viterbi_packed
int chainback_viterbi_packed(void *vp, unsigned char *data, unsigned int nbits, unsigned int endstate)
init_viterbi_packed
int init_viterbi_packed(void *vp, int starting_state)
create_viterbi_packed
void * create_viterbi_packed(int16_t len)