資源簡介
3GPP AMR-NB C++算法,分享給需要的朋友

代碼片段和文件信息
/*
?*?===================================================================
?*??TS?26.104
?*??REL-5?V5.4.0?2004-03
?*??REL-6?V6.1.0?2004-03
?*??3GPP?AMR?Floating-point?Speech?Codec
?*?===================================================================
?*
?*/
#include?
#include?
#include?
#include?“interf_dec.h“
#include?“sp_dec.h“
#include?“typedef.h“
#ifndef?ETSI
#ifndef?IF2
#include?
#define?AMR_MAGIC_NUMBER?“#!AMR\n“
#endif
#endif
void?Copyright(void){
fprintf?(stderr
“===================================================================\n“
“?TS?26.104?????????????????????????????????????????????????????????\n“
“?REL-5?V5.4.0?2004-03??????????????????????????????????????????????\n“
“?REL-6?V6.1.0?2004-03??????????????????????????????????????????????\n“
“?3GPP?AMR?Floating-point?Speech?Decoder????????????????????????????\n“
“===================================================================\n“
);
}
/*
?*?main
?*
?*
?*?Function:
?*????Speech?decoder?main?program
?*
?*????Usage:?decoder?bitstream_file?synthesis_file
?*
?*????Format?for?ETSI?bitstream?file:
?*???????1?word?(2-byte)?for?the?TX?frame?type
?*???????244?words?(2-byte)?containing?244?bits.
?*??????????Bit?0?=?0x0000?and?Bit?1?=?0x0001
?*???????1?word?(2-byte)?for?the?mode?indication
?*???????4?words?for?future?use?currently?written?as?zero
?*
?*????Format?for?3GPP?bitstream?file:
?*???????Holds?mode?information?and?bits?packed?to?octets.
?*???????Size?is?from?1?byte?to?31?bytes.
?*
?*????Format?for?synthesis_file:
?*???????Speech?is?written?to?a?16?bit?8kHz?file.
?*
?*????ETSI?bitstream?file?format?is?defined?using?ETSI?as?preprocessor
?*????definition
?*?Returns:
?*????0
?*/
int?main?(int?argc?char?*?argv[]){
???FILE?*?file_speech?*file_analysis;
???short?synth[160];
???int?frames?=?0;
???int?*?destate;
???int?read_size;
#ifndef?ETSI
???unsigned?char?analysis[32];
???enum?Mode?dec_mode;
#ifdef?IF2
???short?block_size[16]={?12?13?15?17?18?20?25?30?5?0?0?0?0?0?0?0?};
#else
???char?magic[8];
???short?block_size[16]={?12?13?15?17?19?20?26?31?5?0?0?0?0?0?0?0?};
#endif
#else
???short?analysis[250];
#endif
???/*?Process?command?line?options?*/
???if?(argc?==?3){
??????file_speech?=?fopen(argv[2]?“wb“);
??????if?(file_speech?==?NULL){
?????????fprintf?(?stderr?“%s%s%s\n““Use:?“argv[0]?“?input.file?output.file?“?);
?????????return?1;
??????}
??????file_analysis?=?fopen(argv[1]?“rb“);
??????if?(file_analysis?==?NULL){
?????????fprintf?(?stderr?“%s%s%s\n““Use:?“argv[0]?“?input.file?output.file?“?);
?????????fclose(file_speech);
?????????return?1;
??????}
???}
???else?{
??????fprintf?(?stderr?“%s%s%s\n““Use:?“argv[0]?“?input.file?output.file?“?);
??????return?1;
???}
???Copyright();
???/*?init?decoder?*/
???destate?=?Decoder_Interface_init();
#ifndef?ETSI
#ifndef?IF2
???/*?read?and?verify?magic?n
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????3708??2012-09-12?22:37??readme.txt
?????文件????????4176??2004-03-05?00:00??c-code\decoder.c
?????文件????????6415??2004-03-05?00:00??c-code\encoder.c
?????文件?????????925??2004-03-05?00:00??c-code\interf_dec.h
?????文件????????1036??2004-03-05?00:00??c-code\interf_enc.h
?????文件???????25343??2004-03-05?00:00??c-code\interf_rom.h
?????文件????????3665??2004-03-05?00:00??c-code\makefile.gcc
?????文件????????2508??2004-03-05?00:00??c-code\makefile.win32
?????文件??????143214??2004-03-05?00:00??c-code\rom_dec.h
?????文件??????223317??2004-03-05?00:00??c-code\rom_enc.h
?????文件??????160965??2004-03-05?00:00??c-code\sp_dec.c
?????文件????????1657??2004-03-05?00:00??c-code\sp_dec.h
?????文件??????322718??2004-03-05?00:00??c-code\sp_enc.c
?????文件????????1497??2004-03-05?00:00??c-code\sp_enc.h
?????文件?????????494??2004-03-05?00:00??c-code\typedef.h
?????目錄???????????0??2004-03-22?07:00??c-code\
?????文件???????19797??2007-04-25?23:34??c-code\interf_dec.c
?????文件???????18109??2007-04-25?23:34??c-code\interf_enc.c
- 上一篇:GTK+2.0實現學生成績管理系統
- 下一篇:c語言實現國密SM2
評論
共有 條評論