g.726 源代码 matlab


g.726标准的adpcm的matlab实现,包含编码性能的测评
资源截图
代码片段和文件信息
function [Isrdoutdqoutyoutaioutbiouttdouttroutalout] = ...
 adpcm(sl N format);
%ADPCM Adaptive differential pulse code modulation.
% [I SR] = ADPCM( SL N) encodes the PCM coded input signal SL
% with N kbit/s adaptive differential pulse code modulation (ADPCM) 
% where N is selected from 40 32 24 or 16 kbit/s. 
% If N is not specified the bit rate is set to N = 32 kbit/s.
%
% By default the input signal SL is assumed to be represented with
% 14-bit signed-magnitude uniform PCM i.e. its amplitude range is
% -8191 <= sl <= 8191. This input format is also selected by
% ADPCM(SL N ‘lin‘). If the input signal is 8-bit logarithmic PCM
% (mu-law in accordance with LIN2MU) ADPCM( SL N ‘mu‘) has to
% be used.
%
%  The first output is I the encoder output signal which represents 
% the bit stream over the channel. The samples of I are from the 
% discrete alphabet -2^(N/8-1) ... +2^(N/8-1). The second (optional) 
%  output is the reconstructed speech signal SR (scaled approximately 
% between -8191 and +8191) which would be the output of the corres-
% ponding ADPCM decoder in the case of error-free transmission of I.
%
% If more than two outputs are specified a whole list of
% diagnostic outputs (internal variables of the algorithm) becomes 
% available:
%
% [ISRDDQYAIBITDTRAL] = ADPCM( SL N);
%
% with the following interpretation:
%
% D prediction difference signal
% DQ quatized prediction difference signal
% Y scale factor for adaptive quantizer 
% AI recursive predictor coefficients (2-column matrix)
% BI non-recursive predictor coefficients (6-column matrix)
% TD tone detector signal
% TR transient detector signal
% AL speed control for scale factor adaptation
%
% Note that this latter option is VERY memory intensive as all
% variables are vectors/matrices of the size of the input signal.
%
% This function uses also APUPDATE AIUPDATE BIUPDATE.
%  The decoder is provided by I_ADPCM.
%
%   References:
% The algorithm follows closely the ITU-T (former CCITT)
% recommendation G.726 “40 32 24 16 kbit/s Adaptive Differential
%  Pulse Code Modulation (ADPCM)“. The recommendation specifies
% various fixed-point formats for the internal variables which are
% not simulated in this MATLAB implementation. However most of the 
% variable names etc. are consistent with the recommendation.
 
% 1995-05-16 Martin Kummernecker
% 1995-08-30 Gernot Kubin (g.kubin@ieee.org)



% input argument checks default bit-rate and format setting
if (nargin < 1) | (nargin > 3)
disp(‘ADPCM: 1 to 3 input variables required!‘)
help adpcm return
end
if nargin == 1
N = 32;
    disp(‘***** N = 32 kbit/s *****‘);
end
a = N==[40 32 24 16];
if (sum(a) ~= 1)
   N = 32;
   disp(‘***** N = 32 kbit/s *****‘);
end;
if nargin <= 2
format = ‘lin‘;
end;
if isstr(format) ~= 1
error(‘ADPCM: Input format must be string variable!‘)
elseif strcmp(format‘mu‘) 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     113192  2010-03-11 20:13  speech_codingspeech_coding.pdf

     文件         37  2010-03-11 20:17  speech_coding
eadme.txt

     文件       1071  2003-05-21 00:25  speech_codingqualitymnru.m

     文件       1194  2003-05-21 00:25  speech_codingqualitysegsnr.m

     文件     149453  2002-05-27 17:21  speech_codingqualitymosamr_decoder.exe

     文件     175747  2002-05-27 17:21  speech_codingqualitymosamr_encoder.exe

     文件      10210  2002-05-27 13:25  speech_codingqualitymosamr_readme.txt

     文件     769352  2002-05-27 17:21  speech_codingqualitymoscygwin1.dll

     文件       4054  2003-05-27 09:29  speech_codingqualitymosencode_decode.asv

     文件       4136  2003-05-27 09:43  speech_codingqualitymosencode_decode.m

     文件     175601  2002-05-27 17:21  speech_codingqualitymosg722_decoder.exe

     文件     176792  2002-05-27 17:21  speech_codingqualitymosg722_encoder.exe

     文件       7121  2002-05-27 13:25  speech_codingqualitymosg722_readme.txt

     文件      70144  2002-05-27 17:21  speech_codingqualitymosg729_decoder.exe

     文件     110592  2002-05-27 17:21  speech_codingqualitymosg729_encoder.exe

     文件       5632  2002-05-27 13:25  speech_codingqualitymosg729_readme.txt

     文件        461  2001-08-20 16:30  speech_codingqualitymosspeechin.m

     文件      95744  2003-05-21 18:02  speech_codingqualitymossamplesf18.raw

     文件      95744  2003-05-27 09:49  speech_codingqualitymossamplesf28.raw

     文件     133118  2001-08-20 16:30  speech_codingqualitymossamplesf48.raw

     文件     130208  2001-08-20 16:30  speech_codingqualitymossamplesf58.raw

     文件     280692  2001-08-20 16:30  speech_codingqualitymossamplesf68.raw

     文件     122880  2001-08-20 16:30  speech_codingqualitymossamplesf98.raw

     文件      95744  2003-05-21 18:03  speech_codingqualitymossamplesm18.raw

     文件      95744  2003-05-21 18:03  speech_codingqualitymossamplesm28.raw

     文件     296564  2001-08-20 16:30  speech_codingqualitymossamplesm38.raw

     文件     115440  2001-08-20 16:30  speech_codingqualitymossamplesm48.raw

     文件      95744  2003-05-27 09:52  speech_codingdataf18.raw

     文件      95744  2003-05-27 09:52  speech_codingdataf28.raw

     文件     133118  2003-05-27 09:52  speech_codingdataf48.raw

............此处省略50个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)