blob: d251217b949c3950c14df9eaca5d7cfe3f221b54 [file] [log] [blame]
rjw6c1fd8f2022-11-30 14:33:01 +08001/*============================================================================*/
2/* eCall ANSI C fixed-point reference source code */
3/* */
4/* File: ecall_fec.h */
5/* Version: 8.6.0 (Rel8) / 9.4.0 (Rel9) */
6/* Date: 2011-02-08 */
7/* Description: Turbo encoder and decoder (header file) */
8/*----------------------------------------------------------------------------*/
9
10#ifndef ECALL_FEC_H_
11#define ECALL_FEC_H_
12
13#include "ecall_defines.h"
14#include "ecall_rom.h"
15
16
17/*============================================================================*/
18/* Encoder functions */
19/*----------------------------------------------------------------------------*/
20
21void FecEncode(Ord1*);
22
23void AttachCrc(const Ord1*, Ord1*);
24void Scramble(const Ord1*, Ord1*);
25void EncodeTwo(Ord1*);
26void EncodeOne(Ord1*, Int16);
27
28/*============================================================================*/
29/* Decoder functions */
30/*----------------------------------------------------------------------------*/
31
32Bool FecDecode(const IntLLR*, Int16, Ord1*);
33
34void UpdateBuffer(IntLLR*, const IntLLR*, Int16);
35void DecodeBuffer(const IntLLR*, const IntLLR*,
36 const IntLLR*, const IntLLR*, Ord1*);
37
38Bool DecodeCrc(const Ord1*);
39void Interleave(const IntLLR*, IntLLR*);
40void Deinterleave(IntLLR*);
41void Descramble(Ord1*);
42void Bcjr(const IntLLR*, IntLLR*);
43
44IntLLR GammaQ(Int16, Int16, const IntLLR*, const IntLLR*);
45IntLLR JacLog(Int32, Int32);
46
47void FecInit(void *addr);
48void FecDeinit(void);
49
50#endif