数字语音编码是现代数字语音通信以及数字语音存储回放的前提和基础,对数字语音通信系统和数字语音存储回放系统的性能具有决定性的作用。目前,主要从编码速率、时延、语音回放质量等指标上研究高效的数字语音编码算法。基于正交滤波器组的语音子带编码,是一种高效的语音编码技术,已被数字语音编码标准广泛的采纳。本课题要求有语音信号数字采集、子带编码和语音信号波形编码的理论基础。对采集的数字语音信号,借助正交滤波器组进行子带划分,然后选择合适的波形编码方案,对每个子带进行编码,最后完成子带的复用,实现数字语音的SBC编码,并对编码性能进行测试。
function [IK,QK]=DPCM_code(a,b)
sym=[0 0; 0 1; 1 0 ;1 1]
I0=a;
Q0=b;
I=[];
Q=[];
[m,n]=size(sym);
for add=1:m
A=sym(add,1);B=sym(add,2);
if add==1
IK(add)=((~(xor(A,B))))&(xor(A,I0))|(xor(A,B))&(xor(A,Q0));
QK(add)=((~(xor(A,B))))&(xor(B,Q0))|(xor(A,B))&(xor(B,I0));
sym(add,1)=IK(add) ;
sym(add,2)=QK(add);
else
IK(add)=((~(xor(A,B))))&(xor(A,IK(add-1)))|(xor(A,B))&(xor(A,QK(add-1)));
QK(add)=((~(xor(A,B))))&(xor(B,QK(add-1)))|(xor(A,B))&(xor(B,IK(add-1)));
sym(add,1)=IK(add) ;
sym(add,2)=QK(add);
end
end
function [IK_dec,QK_dec]=DPCM_decode(a,b)
sym=[0 0; 0 1; 1 0 ;1 1]
I0=a;
Q0=b;
I=[];
Q=[];
[m,n]=size(sym);
for add=1:m %差分解码%
I(add)=sym(add,1);Q(add)=sym(add,2);
if add==1
A1=(~Q(add)&~I0&Q0)|(I0&Q0&~I(add))|(I0&~Q0&Q(add))|(~I0&~Q0&I(add));
B1=(I(add)&~I0&Q0)|(I0&Q0&~Q(add))|(I0&~Q0&~I(add))|(~I0&~Q0&Q(add));
sym(add,1)=A1;sym(add,2)=B1;
else
AK=(~Q(add)&~I(add-1)&Q(add-1))|(I(add-1)&Q(add-1)&~I(add))|(I(add-1)&~Q(add-1)&Q(add))|(~I(add-1)&~Q(add-1)&I(add));
BK=(I(add)&~I(add-1)&Q(add-1))|(I(add-1)&Q(add-1)&~Q(add))|(I(add-1)&~Q(add-1)&~I(add))|(~I(add-1)&~Q(add-1)&Q(add));
sym(add,1)=AK;sym(add,2)=BK;
end
end