Code covered by the BSD License
 celp16k(x,N,L,M,c,cb,Pidx)celp > 16000 bps CELP analyzer and synthesizer.
 celp9600(x,N,L,M,c,cb,Pidx)celp > 9600 bps CELP analyzer and synthesizer.
 celpana(x,L,M,c,cb,Pidx,b...
 celpexcit(x,cb,Pidx,ar,ac...celpexcit > CELP excitation sequence.
 celpsyn(cb,kappa,k,theta0...
 durbin(r,M)durbin > LevinsonDurbin Recursion.
 lpcana(x,M)lpcana > Linear prediction analysis.
 lpcrespitch(ehat,th,minla...lpcrespitch > Pitch estimation from prediction error sequence.
 lpcweight(ar,c)lpcweight > LPC based perceptual weighting filter.
 rf2lpc(kappa)rf2lpc > Convert reflection coefficients to prediction polynomial.
 CELP_RUN.m

View all files
CELP codec
by
Sourav Mondal
13 Nov 2012
This is a code to demonstrate CELP codecs of bitrate 9.6kbps and 16kbps.

durbin(r,M) 
function [a,xi,kappa] = durbin(r,M)
% durbin > LevinsonDurbin Recursion.
%
% [a,xi,kappa] = durbin(r,M)
%
% The function solves the Toeplitz system of equations
%
% [ r(1) r(2) ... r(M) ] [ a(1) ] = [ r(2) ]
% [ r(2) r(1) ... r(M1) ] [ a(2) ] = [ r(3) ]
% [ . . . ] [ . ] = [ . ]
% [ r(M1) r(M2) ... r(2) ] [ a(M1) ] = [ r(M) ]
% [ r(M) r(M1) ... r(1) ] [ a(M) ] = [ r(M+1) ]
%
% (also known as the YuleWalker AR equations) using the Levinson
% Durbin recursion. Input r is a vector of autocorrelation
% coefficients with lag 0 as the first element. M is the order of
% the recursion.
%
% The output arguments are the M estimated LP parameters in the
% column vector a, i.e., the AR coefficients are given by [1; a].
% The prediction error energies for the 0thorder to the Mthorder
% solution are returned in the vector xi, and the M estimated
% reflection coefficients in the vector kappa.
%
% Since kappa is computed internally while computing the AR coefficients,
% then returning kappa simultaneously is more efficient than converting
% vector a to kappa afterwards.
% Initialization.
kappa = zeros(M,1);
a = zeros(M,1);
xi = [r(1); zeros(M,1)];
% Recursion.
for (j=1:M)
kappa(j) = (r(j+1)  a(1:j1)'*r(j:1:2))/(xi(j)+eps);
a(j) = kappa(j);
a(1:j1) = a(1:j1)  kappa(j)*a(j1:1:1);
xi(j+1) = xi(j)*(1  kappa(j)^2);
end


Contact us