FreeCalypso > hg > gsm-codec-lib
comparison doc/AMR-library-API @ 480:332397bc80aa
doc/AMR-library-API: document public const data items
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 19 May 2024 23:18:17 +0000 |
parents | 616b7ba1135b |
children |
comparison
equal
deleted
inserted
replaced
479:616b7ba1135b | 480:332397bc80aa |
---|---|
408 reference source and only minimally extended to support EFR DHF, does not | 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 | 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 | 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 | 411 ensured to be SID-free, and is not suitable for production use. See |
412 AMR-EFR-philosophy article for more information. | 412 AMR-EFR-philosophy article for more information. |
413 | |
414 Public const data items | |
415 ======================= | |
416 | |
417 In addition to all of the functions described above, libtwamr exports some | |
418 public const data items, declared in <tw_amr.h> header file. | |
419 | |
420 AMR storage format file header | |
421 ------------------------------ | |
422 | |
423 Every .amr file begins with the magic signature "#!AMR\n" (6 bytes); programs | |
424 that read this file format have to check and skip this signature, whereas | |
425 programs that write this file format have to emit it at the beginning. Libtwamr | |
426 provides both the const datum and its length: | |
427 | |
428 #define AMR_IETF_HDR_LEN 6 /* .amr file header bytes */ | |
429 | |
430 extern const uint8_t amr_file_header_magic[AMR_IETF_HDR_LEN]; | |
431 | |
432 DHF bit patterns | |
433 ---------------- | |
434 | |
435 There are 8 special decoder homing frames (DHFs) defined in 3GPP TS 26.073, one | |
436 for each codec mode; libtwamr implements all 8 AMR DHFs plus the different DHF | |
437 defined for EFR. The bit patterns of all 9 DHFs implemented in libtwamr are | |
438 exported as public const data items: | |
439 | |
440 extern const int16_t amr_dhf_mr475[AMR_MAX_PRM]; | |
441 extern const int16_t amr_dhf_mr515[AMR_MAX_PRM]; | |
442 extern const int16_t amr_dhf_mr59[AMR_MAX_PRM]; | |
443 extern const int16_t amr_dhf_mr67[AMR_MAX_PRM]; | |
444 extern const int16_t amr_dhf_mr74[AMR_MAX_PRM]; | |
445 extern const int16_t amr_dhf_mr795[AMR_MAX_PRM]; | |
446 extern const int16_t amr_dhf_mr102[AMR_MAX_PRM]; | |
447 extern const int16_t amr_dhf_mr122[AMR_MAX_PRM]; | |
448 extern const int16_t amr_dhf_gsmefr[AMR_MAX_PRM]; | |
449 | |
450 Each DHF bit pattern is implemented and exported in the form of an array of | |
451 broken-down codec parameters for its respective mode. For extra robustness, | |
452 each of these const int16_t arrays is storage-allocated in the full size of | |
453 AMR_MAX_PRM (57), even for lower codec modes that have fewer parameters. |