annotate libtwamr/Makefile @ 581:e2d5cad04cbf

libgsmhr1 RxFE: store CN R0+LPC separately from speech In the original GSM 06.06 code the ECU for speech mode is entirely separate from the CN generator, maintaining separate state. (The main intertie between them is the speech vs CN state variable, distinguishing between speech and CN BFIs, in addition to the CN-specific function of distinguishing between initial and update SIDs.) In the present RxFE implementation I initially thought that we could use the same saved_frame buffer for both ECU and CN, overwriting just the first 4 params (R0 and LPC) when a valid SID comes in. However, I now realize it was a bad idea: the original code has a corner case (long sequence of speech-mode BFIs to put the ECU in state 6, then SID and CN-mode BFIs, then a good speech frame) that would be broken by that buffer reuse approach. We could eliminate this corner case by resetting the ECU state when passing through a CN insertion period, but doing so would needlessly increase the behavioral diffs between GSM 06.06 and our version. Solution: use a separate CN-specific buffer for CN R0+LPC parameters, and match the behavior of GSM 06.06 code in this regard.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 13 Feb 2025 10:02:45 +0000
parents fa0652115168
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
308
8dfb7cbe6b59 libtwamr: integrated up to bgnscd.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 255
diff changeset
1 OBJS= a_refl.o agc.o autocorr.o az_lsp.o b_cn_cod.o basicop2.o bgnscd.o \
322
fc82b113977f libtwamr: integrate c4_17pf.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 321
diff changeset
2 bitno.o bits2prm.o c1035pf.o c2_11pf.o c2_9pf.o c3_14pf.o c4_17pf.o \
418
93d6c6960a46 libtwamr: integrate cod_amr.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 417
diff changeset
3 c8_31pf.o c_g_aver.o calc_cor.o calc_en.o cbsearch.o cl_ltp.o cod_amr.o\
406
85e9768d497f libtwamr: integrate cl_ltp.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 405
diff changeset
4 convolve.o cor_h.o d1035pf.o d2_11pf.o d2_9pf.o d3_14pf.o d4_17pf.o \
85e9768d497f libtwamr: integrate cl_ltp.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 405
diff changeset
5 d8_31pf.o d_gain_c.o d_gain_p.o d_plsf.o d_plsf_3.o d_plsf_5.o \
427
357d1faad55d libtwamr: implement decoder top level
Mychaela Falconia <falcon@freecalypso.org>
parents: 426
diff changeset
6 dec_amr.o dec_gain.o dec_lag3.o dec_lag6.o dec_main.o dhf_check.o \
464
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
7 dhf_subst.o dhf_subst2.o dhf_tables.o dtx_dec.o dtx_enc.o e_homing.o \
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
8 ec_gains.o enc_lag3.o enc_lag6.o enc_main.o ex_ctrl.o fr_type_conv.o \
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
9 g_adapt.o g_code.o g_pitch.o gain_q.o gains_tab.o gc_pred.o gmed_n.o \
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
10 graytab.o hp_max.o ietf_fo.o ietf_hdr.o ietf_in.o ietf_out.o \
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
11 if1_bit_order.o if1_pack.o if1_unpack.o int_lpc.o int_lsf.o inter_36.o \
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
12 inv_sqrt.o lag_wind.o levinson.o lflg_upd.o log2.o lpc.o lsfwt.o lsp.o \
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
13 lsp_avg.o lsp_az.o lsp_lsf.o lsp_tab.o mac_32.o ol_ltp.o oper_32b.o \
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
14 p_ol_wgh.o ph_disp.o pitch_fr.o pitch_ol.o post_pro.o pow2.o pre_big.o \
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
15 pre_proc.o pred_lt.o preemph.o prm2bits.o prmno.o pstfilt.o q_gain_c.o \
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
16 q_gain_p.o q_plsf.o q_plsf3_tab.o q_plsf5_tab.o q_plsf_3.o q_plsf_5.o \
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
17 qgain475.o qgain795.o qua_gain.o qua_gain_tab.o r_fft.o reorder.o \
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
18 residu.o s10_8pf.o set_sign.o sid_sync.o spreproc.o spstproc.o sqrt_l.o\
442
6fa27df6903b libtwamr: add file header public const datum
Mychaela Falconia <falcon@freecalypso.org>
parents: 441
diff changeset
19 syn_filt.o tls_flags.o ton_stab.o tseq_in.o tseq_out.o vad1.o vad2.o \
6fa27df6903b libtwamr: add file header public const datum
Mychaela Falconia <falcon@freecalypso.org>
parents: 441
diff changeset
20 vad_reset.o weight_a.o window.o
413
c1bb166f768e libtwamr/Makefile: depend on all currently existing headers
Mychaela Falconia <falcon@freecalypso.org>
parents: 412
diff changeset
21 HDRS= a_refl.h agc.h autocorr.h az_lsp.h b_cn_cod.h basic_op.h bgnscd.h \
c1bb166f768e libtwamr/Makefile: depend on all currently existing headers
Mychaela Falconia <falcon@freecalypso.org>
parents: 412
diff changeset
22 bitno.h bits2prm.h c1035pf.h c2_11pf.h c2_9pf.h c3_14pf.h c4_17pf.h \
c1bb166f768e libtwamr/Makefile: depend on all currently existing headers
Mychaela Falconia <falcon@freecalypso.org>
parents: 412
diff changeset
23 c8_31pf.h c_g_aver.h calc_cor.h calc_en.h cbsearch.h cl_ltp.h cnst.h \
418
93d6c6960a46 libtwamr: integrate cod_amr.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 417
diff changeset
24 cnst_vad.h cod_amr.h convolve.h cor_h.h d1035pf.h d2_11pf.h d2_9pf.h \
426
7bef001cd8b8 libtwamr: integrate dec_amr.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 420
diff changeset
25 d3_14pf.h d4_17pf.h d8_31pf.h d_gain_c.h d_gain_p.h d_plsf.h dec_amr.h \
7bef001cd8b8 libtwamr: integrate dec_amr.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 420
diff changeset
26 dec_gain.h dec_lag3.h dec_lag6.h dtx_common.h dtx_dec.h dtx_enc.h \
7bef001cd8b8 libtwamr: integrate dec_amr.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 420
diff changeset
27 e_homing.h ec_gains.h enc_lag3.h enc_lag6.h ex_ctrl.h g_adapt.h \
7bef001cd8b8 libtwamr: integrate dec_amr.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 420
diff changeset
28 g_code.h g_pitch.h gain_q.h gains_tab.h gc_pred.h gmed_n.h graytab.h \
441
ebe499058c63 libtwamr: implement API functions for RFC 4867 I/O
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
29 hp_max.h if1_func.h int_defs.h int_lpc.h int_lsf.h inter_36.h \
ebe499058c63 libtwamr: implement API functions for RFC 4867 I/O
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
30 inv_sqrt.h lag_wind.h levinson.h log2.h lpc.h lsfwt.h lsp.h lsp_avg.h \
ebe499058c63 libtwamr: implement API functions for RFC 4867 I/O
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
31 lsp_az.h lsp_lsf.h lsp_tab.h mac_32.h memops.h namespace.h no_count.h \
ebe499058c63 libtwamr: implement API functions for RFC 4867 I/O
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
32 ol_ltp.h oper_32b.h p_ol_wgh.h ph_disp.h pitch_fr.h pitch_ol.h \
ebe499058c63 libtwamr: implement API functions for RFC 4867 I/O
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
33 post_pro.h pow2.h pre_big.h pre_proc.h pred_lt.h preemph.h prm2bits.h \
ebe499058c63 libtwamr: implement API functions for RFC 4867 I/O
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
34 pstfilt.h q_gain_c.h q_gain_p.h q_plsf.h q_plsf3_tab.h q_plsf5_tab.h \
ebe499058c63 libtwamr: implement API functions for RFC 4867 I/O
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
35 qgain475.h qgain795.h qua_gain.h qua_gain_tab.h reorder.h residu.h \
ebe499058c63 libtwamr: implement API functions for RFC 4867 I/O
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
36 s10_8pf.h set_sign.h sid_sync.h spreproc.h spstproc.h sqrt_l.h \
ebe499058c63 libtwamr: implement API functions for RFC 4867 I/O
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
37 syn_filt.h ton_stab.h tw_amr.h typedef.h vad.h vad1.h vad2.h weight_a.h\
ebe499058c63 libtwamr: implement API functions for RFC 4867 I/O
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
38 window.h
252
57b4053559ff libtwamr: beginning of project
Mychaela Falconia <falcon@freecalypso.org>
parents: 204
diff changeset
39 LIB= libtwamr.a
2
2b5770c715ee libgsmfrp: compiling utility functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40
453
19f1aa01ea10 new approach to config & build for ThemWi software
Mychaela Falconia <falcon@freecalypso.org>
parents: 447
diff changeset
41 include ../config.defs
20
93ed41fb4038 libgsmfrp/Makefile: add install
Mychaela Falconia <falcon@freecalypso.org>
parents: 6
diff changeset
42
2
2b5770c715ee libgsmfrp: compiling utility functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 all: ${LIB}
2b5770c715ee libgsmfrp: compiling utility functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
351
97c699f40ab3 libtwamr: generate namespace.h from namespace.list
Mychaela Falconia <falcon@freecalypso.org>
parents: 345
diff changeset
45 namespace.h: namespace.awk namespace.list
97c699f40ab3 libtwamr: generate namespace.h from namespace.list
Mychaela Falconia <falcon@freecalypso.org>
parents: 345
diff changeset
46 awk -f namespace.awk namespace.list > $@
97c699f40ab3 libtwamr: generate namespace.h from namespace.list
Mychaela Falconia <falcon@freecalypso.org>
parents: 345
diff changeset
47
40
0f1fe48bdb46 libgsmefr/Makefile: add header file dependencies
Mychaela Falconia <falcon@freecalypso.org>
parents: 38
diff changeset
48 ${OBJS}: ${HDRS}
0f1fe48bdb46 libgsmefr/Makefile: add header file dependencies
Mychaela Falconia <falcon@freecalypso.org>
parents: 38
diff changeset
49
2
2b5770c715ee libgsmfrp: compiling utility functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 ${LIB}: ${OBJS}
2b5770c715ee libgsmfrp: compiling utility functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 ar rcu $@ ${OBJS}
2b5770c715ee libgsmfrp: compiling utility functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 ranlib $@
2b5770c715ee libgsmfrp: compiling utility functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53
447
426c04621b51 libtwamr/Makefile: enable install
Mychaela Falconia <falcon@freecalypso.org>
parents: 442
diff changeset
54 install:
460
cb1d1ea7f2c5 new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents: 453
diff changeset
55 mkdir -p ${DESTDIR}${includedir}
cb1d1ea7f2c5 new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents: 453
diff changeset
56 install -c -m 444 tw_amr.h ${DESTDIR}${includedir}
cb1d1ea7f2c5 new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents: 453
diff changeset
57 mkdir -p ${DESTDIR}${libdir}
cb1d1ea7f2c5 new build system: accept more directory options
Mychaela Falconia <falcon@freecalypso.org>
parents: 453
diff changeset
58 install -c -m 444 ${LIB} ${DESTDIR}${libdir}
20
93ed41fb4038 libgsmfrp/Makefile: add install
Mychaela Falconia <falcon@freecalypso.org>
parents: 6
diff changeset
59
2
2b5770c715ee libgsmfrp: compiling utility functions
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 clean:
351
97c699f40ab3 libtwamr: generate namespace.h from namespace.list
Mychaela Falconia <falcon@freecalypso.org>
parents: 345
diff changeset
61 rm -f *.[oa] namespace.h errs