repexc.m

来自「ITU-T G.723.1 Speech Coder: Matlab imple」· M 代码 · 共 40 行

M
40
字号
function eL = RepExc (e, N, L, POffs)% Return a pitch-repeated excitation signal.% eL:   Pitch-repeated signal (Nc samples), where Nc is the number%       of filter coefficients. The first sample in eL corresponds%       to lag L+POffs(end). The last sample corresponds to lag%       L+POffs(1)-(N-1).% e:    Excitation signal, up to time -1% N:    Frame size% L:    Pitch lag (NaN indicates no repetition)% POffs: Pitch filter coefficients lag offsets%   eL[n] = e[n],          n < 0,%           e[mod(n,L)-L], n >= 0.% The mapping from e[n] (negative-valued indices) to the input% signal e(n) is e[n] = e(Ne+n+1), where Ne is the length of e(.).% The pitch coefficients are at relative offsets POffs.%              -L-2 -L              0%                 | |   past data   | current data %     oooooooooooooo|ooooooooooooooo|ooooooooooooo e[n]%                 43210% $Id: RepExc.m 1.5 2004/08/26 G.723.1-v2r1a $if (nargin < 4)  POffs = 0;end% Index arrayI = (-(L+POffs(end))):(-(L+POffs(1)) + N - 1);% Form a wrapped index arrayip = (I >= 0);I(ip) = mod (I(ip), L) - L;Ne = length (e);eL = e(I + Ne + 1);return

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?