FreeCalypso > hg > gsm-codec-lib
comparison libtwamr/dhf_subst2.c @ 464:fa0652115168
libtwamr: add amr_dhf_subst_efr2()
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 12 May 2024 21:36:26 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
463:9208db14b4b9 | 464:fa0652115168 |
---|---|
1 /* | |
2 * The function implemented in this module is an aid for AMR-EFR interworking; | |
3 * it is meant to be invoked directly after amr_encode_frame(). It checks | |
4 * the encoder output for MR122 DHF and turns it into EFR DHF just like | |
5 * amr_dhf_subst_efr(), but only if the input PCM frame was an EHF. This | |
6 * slightly more complicated logic is needed in order to replicate the observed | |
7 * behavior of AMR-EFR speech encoder in the extant GSM network of T-Mobile USA. | |
8 */ | |
9 | |
10 #include "tw_amr.h" | |
11 #include "namespace.h" | |
12 #include "e_homing.h" | |
13 | |
14 void amr_dhf_subst_efr2(struct amr_param_frame *frame, const int16_t *pcm) | |
15 { | |
16 if (encoder_homing_frame_test(pcm)) | |
17 amr_dhf_subst_efr(frame); | |
18 } |