annotate libtwamr/dhf_subst2.c @ 602:72cdae602d6e

libgsmhr1/dec_func.c: rm unused static functions In the original code, sp_dec.c held two kinds of functions: those needed only as part of the decoder, and those used by both decoder and encoder engines. In this library, we have moved the latter class of functions to dec_func.c module. Almost all static functions from the original sp_dec.c, with the exception of aToRc(), are needed only on sp_dec.c side of the new divide - remove them from dec_func.c, where they became dead code.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 04 Dec 2025 18:58:22 +0000
parents fa0652115168
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
464
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * The function implemented in this module is an aid for AMR-EFR interworking;
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * it is meant to be invoked directly after amr_encode_frame(). It checks
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * the encoder output for MR122 DHF and turns it into EFR DHF just like
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * amr_dhf_subst_efr(), but only if the input PCM frame was an EHF. This
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * slightly more complicated logic is needed in order to replicate the observed
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 * behavior of AMR-EFR speech encoder in the extant GSM network of T-Mobile USA.
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 */
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 #include "tw_amr.h"
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 #include "namespace.h"
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 #include "e_homing.h"
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 void amr_dhf_subst_efr2(struct amr_param_frame *frame, const int16_t *pcm)
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 {
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 if (encoder_homing_frame_test(pcm))
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 amr_dhf_subst_efr(frame);
fa0652115168 libtwamr: add amr_dhf_subst_efr2()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 }