FreeCalypso > hg > gsm-codec-lib
comparison doc/AMR-library-API @ 479:616b7ba1135b
doc/AMR-library-API: document AMR-EFR hybrid decoder
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Sun, 19 May 2024 22:22:40 +0000 |
| parents | 936a08cc73ce |
| children | 332397bc80aa |
comparison
equal
deleted
inserted
replaced
| 478:936a08cc73ce | 479:616b7ba1135b |
|---|---|
| 384 | 384 |
| 385 int amr_txtype_to_rxtype(enum TXFrameType tx_type, enum RXFrameType *rx_type); | 385 int amr_txtype_to_rxtype(enum TXFrameType tx_type, enum RXFrameType *rx_type); |
| 386 | 386 |
| 387 The return value is 0 if tx_type is valid and *rx_type has been filled | 387 The return value is 0 if tx_type is valid and *rx_type has been filled |
| 388 accordingly, or -1 if tx_type is invalid. | 388 accordingly, or -1 if tx_type is invalid. |
| 389 | |
| 390 AMR-EFR hybrid decoder | |
| 391 ====================== | |
| 392 | |
| 393 To use libtwamr as an AMR-EFR hybrid decoder, follow these steps: | |
| 394 | |
| 395 * Turn the input frame from EFR RTP format into array-of-parameters form with | |
| 396 libgsmefr function EFR_frame2params(), writing the output into the param[] | |
| 397 array in struct amr_param_frame. | |
| 398 | |
| 399 * Set 'type' in the struct to RX_SPEECH_GOOD for good frames, RX_SPEECH_BAD for | |
| 400 BFI with payload bits present, or RX_NO_DATA for BFI without payload. | |
| 401 | |
| 402 * Set 'mode' to 0x87 always, indicating a variation of MR122 with EFR DHF | |
| 403 instead of the different native MR122 DHF. | |
| 404 | |
| 405 * Call amr_decode_frame() with this input. | |
| 406 | |
| 407 Fundamental limitation: the AMR decoder in libtwamr, derived from 3GPP AMR | |
| 408 reference source and only minimally extended to support EFR DHF, does not | |
| 409 support EFR SID frames. Therefore, the option of AMR-EFR hybrid emulation via | |
| 410 libtwamr is limited to lab experiments where the input to the decoder can be | |
| 411 ensured to be SID-free, and is not suitable for production use. See | |
| 412 AMR-EFR-philosophy article for more information. |
