FreeCalypso > hg > vband-misc
view pcmu2efr/gen160.c @ 55:f27bc1e17311
fr-sid/goodsp-frame41.gsmx: starting point
This 33-byte binary file contains frame #41 from good_sp.cod
from GSM 06.32 test sequence set, converted from ETSI *.cod format
into our gsmx format. This frame is an example of a real FRv1 SID.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 22 Aug 2024 05:00:08 +0000 |
parents | f4420403219a |
children |
line wrap: on
line source
/* * The code in this module generates 160 versions of linearized seqsyncu, * shifted by one sample each, intended for feeding to EFR and AMR encoders. * * Update: the new version generates a linear array of 480 16-bit PCM samples, * where the first 160 are 0x0008, followed by two copies of linearized * seqsyncu. */ #include <stdint.h> extern const uint8_t seqsyncu_last_frame[160]; extern const uint16_t pcmu_decode_table[256]; uint16_t linear_input_array[480]; void generate_linear_inputs(void) { unsigned n; uint16_t lin; for (n = 0; n < 160; n++) { lin = pcmu_decode_table[seqsyncu_last_frame[n]]; linear_input_array[n] = 0x0008; linear_input_array[160+n] = lin; linear_input_array[320+n] = lin; } }