FreeCalypso > hg > gsm-codec-lib
view libtwamr/dhf_subst.c @ 561:cf62fe9fac3a
gsmhr-cod2hex: read native endian by default
Let's change gsmhr-* utilities to read *.cod and *.dec files
in the local machine's native byte order by default, and support
both -b and -l override options. This approach is the only sane
one when we write *.cod and *.dec files in the local endian.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 12 Feb 2025 00:04:33 +0000 (3 months ago) |
parents | f0496507d409 |
children |
line wrap: on
line source
/* * The function implemented in this module is an aid for AMR-EFR interworking: * it is meant to be invoked directly after amr_encode_frame(), it checks * the encoder output for MR122 DHF, and if the generated frame exactly * matches MR122 DHF, it is changed to GSM-EFR DHF. */ #include <stdint.h> #include <string.h> #include "tw_amr.h" void amr_dhf_subst_efr(struct amr_param_frame *frame) { if (frame->type != TX_SPEECH_GOOD) return; if (frame->mode != MR122) return; if (memcmp(frame->param, amr_dhf_mr122, AMR_MAX_PRM * sizeof(int16_t))) return; memcpy(frame->param, amr_dhf_gsmefr, AMR_MAX_PRM * sizeof(int16_t)); }