No BSD License
-
[dlti,bli]=upzero(dlt,dlti,bl...
-
[il,ih,tqmf,rlt1,rlt2,al1,al2...
-
[xout1,xout2,accumc,accumd,de...
-
filtep(rlt1,al1,rlt2,al2)
-
pcmcode=pcm(filename,count)
function pcmcode=pcm(filename,count)
-
quantl(el,detl)
-
scalel( nbl,shift_constant)
-
y=filtez(bpl,dlt)
-
y=logsch(ih,nbh)
-
y=logscl(il,nbl)
-
y=uppol1(al1,apl2,plt,plt1)
-
y=uppol2( al1,al2,plt,plt1,pl...
-
MAIN.m
-
Table_set.m
-
readme.m
-
View all files
from
Subband adpcm
by Jinbo Li
These algorithm are based on the G722 standard..
|
| pcmcode=pcm(filename,count)
|
%
function pcmcode=pcm(filename,count)
% Opening the file in the read access mode.
fid = fopen (filename,'r');
% Generating the input signal 'm(t)' by reading the binary data in 16 bit
% integer format from the specified file and writing it into a matrix
% 'm(t)'.
m = fread (fid,'int16');
% if the points are more than what read form the file,it would be set to be
% the length of the file.
count=min(max(size(m)),count);
m=m(1:count);
% Calculating maximum value of the input signal 'm(t)'.
Mp = max (m);
% Setting number of bits in a symbol.
bits = 16;
% Defining the number of levels of uniform quantization.
levels = 2^bits;
% Calculating the step size of the quantization.
step_size = (2*Mp)/levels;
% Quantizing the input signal 'm(t)'.
quant_in = m/step_size;
% Indicating the sign of the input signal 'm(t)' and calculating the
% quantized signal 'quant_out'.
signS = sign (m);
S = abs(quant_in)+0.5;
quant_out = signS.*round(S)*step_size;
pcmcode=quant_out;
|
|
Contact us at files@mathworks.com