rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | /*============================================================================*/ |
| 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 | |
| 21 | void FecEncode(Ord1*); |
| 22 | |
| 23 | void AttachCrc(const Ord1*, Ord1*); |
| 24 | void Scramble(const Ord1*, Ord1*); |
| 25 | void EncodeTwo(Ord1*); |
| 26 | void EncodeOne(Ord1*, Int16); |
| 27 | |
| 28 | /*============================================================================*/ |
| 29 | /* Decoder functions */ |
| 30 | /*----------------------------------------------------------------------------*/ |
| 31 | |
| 32 | Bool FecDecode(const IntLLR*, Int16, Ord1*); |
| 33 | |
| 34 | void UpdateBuffer(IntLLR*, const IntLLR*, Int16); |
| 35 | void DecodeBuffer(const IntLLR*, const IntLLR*, |
| 36 | const IntLLR*, const IntLLR*, Ord1*); |
| 37 | |
| 38 | Bool DecodeCrc(const Ord1*); |
| 39 | void Interleave(const IntLLR*, IntLLR*); |
| 40 | void Deinterleave(IntLLR*); |
| 41 | void Descramble(Ord1*); |
| 42 | void Bcjr(const IntLLR*, IntLLR*); |
| 43 | |
| 44 | IntLLR GammaQ(Int16, Int16, const IntLLR*, const IntLLR*); |
| 45 | IntLLR JacLog(Int32, Int32); |
| 46 | |
| 47 | void FecInit(void *addr); |
| 48 | void FecDeinit(void); |
| 49 | |
| 50 | #endif |