FreeCalypso > hg > gsm-codec-lib
comparison libgsmefr/sid_insert.c @ 37:b4db5366b595
libgsmefr: implement SID code word insertion
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Thu, 24 Nov 2022 02:55:24 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 36:b5726d659915 | 37:b4db5366b595 |
|---|---|
| 1 /* | |
| 2 * EFR_insert_sid_codeword() inserts the 95 bit wide SID codeword into | |
| 3 * an EFR frame in RTP encoding, normally as part of EFR_encode_frame() | |
| 4 * processing right after EFR_params2frame(). | |
| 5 */ | |
| 6 | |
| 7 #include "gsm_efr.h" | |
| 8 | |
| 9 void EFR_insert_sid_codeword(uint8_t *frame) | |
| 10 { | |
| 11 frame[6] |= 0x6F; | |
| 12 frame[7] = 0xFF; | |
| 13 frame[8] = 0xFF; | |
| 14 frame[9] |= 0x80; | |
| 15 frame[12] |= 0x3B; | |
| 16 frame[13] = 0xFF; | |
| 17 frame[14] = 0xFF; | |
| 18 frame[15] |= 0xE0; | |
| 19 frame[19] = 0xFF; | |
| 20 frame[20] = 0xFF; | |
| 21 frame[21] = 0xFF; | |
| 22 frame[25] = 0xFF; | |
| 23 frame[26] |= 0xFC; | |
| 24 frame[27] = 0xFF; | |
| 25 frame[28] |= 0xC0; | |
| 26 } |
