example 6-19.c
来自「基于DSP开发平台《TI DSP在音频处理中的应用》程序代码」· C语言 代码 · 共 17 行
C
17 行
// Example 6 - 19. LMS Implementation C Listing Using Intrinsics for the TMS320C64x DSP
for (i = 0; i < L/2; i++)
yout += _dotp2(x[i],w[i]); // 乘累加,采用了内部函数_dotp2,
// 循环次数减少了一半
err = d-(int)(yout>>16); // 计算误差信号err
mu_err = _mpy(mu, err); // 计算ue(n-1)
for (i = L-1; i >= 0; i--){
temp = ((_smpy2(mu_err_v,x[i]))) ; //ue(n-1)x[i], ue(n-1)x[i-1]
temp_hi = _hi(temp); // 数据解包
temp_lo = _lo(temp);
temp_com = _spack2(temp_hi, temp_lo);
w[i] = _add2(temp_com, w[i]); // 更新系数
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?