annotate libtwamr/q_plsf.h @ 422:1ceda5586d01

implement twamr-tseq-enc test program
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 07 May 2024 06:27:20 +0000
parents 4a8cabac281e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
371
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 ********************************************************************************
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 *
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * R99 Version 3.3.0
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * REL-4 Version 4.1.0
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 *
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 ********************************************************************************
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 *
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 * File : q_plsf.h
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 * Purpose : common include file for LSF vector/matrix quanti-
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 * sation modules (q_plsf_3.c/q_plsf_5.c)
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 *
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 ********************************************************************************
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 #ifndef q_plsf_h
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 #define q_plsf_h "$Id $"
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 /*
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 ********************************************************************************
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 * INCLUDE FILES
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 ********************************************************************************
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #include "tw_amr.h"
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #include "typedef.h"
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 #include "cnst.h"
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 /*
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 ********************************************************************************
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 * DEFINITION OF DATA TYPES
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 ********************************************************************************
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 typedef struct {
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 Word16 past_rq[M]; /* Past quantized prediction error, Q15 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 } Q_plsfState;
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 /*
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 ********************************************************************************
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 * DECLARATION OF PROTOTYPES
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 ********************************************************************************
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 void Q_plsf_reset (Q_plsfState *st);
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 /* reset of state (i.e. set state memory to zero)
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 returns 0 on success
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 void Q_plsf_3(
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 Q_plsfState *st, /* i/o: state struct */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 enum Mode mode, /* i : coder mode */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 Word16 *lsp1, /* i : 1st LSP vector Q15 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 Word16 *lsp1_q, /* o : quantized 1st LSP vector Q15 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 Word16 *indice, /* o : quantization indices of 3 vectors Q0 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 Word16 *pred_init_i /* o : init index for MA prediction in DTX mode */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 );
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 void Q_plsf_5 (
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 Q_plsfState *st,
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 Word16 *lsp1, /* i : 1st LSP vector, Q15 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 Word16 *lsp2, /* i : 2nd LSP vector, Q15 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 Word16 *lsp1_q, /* o : quantized 1st LSP vector, Q15 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 Word16 *lsp2_q, /* o : quantized 2nd LSP vector, Q15 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 Word16 *indice /* o : quantization indices of 5 matrices, Q0 */
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 );
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64
4a8cabac281e libtwamr: integrate q_plsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 #endif