这个算法是把32位的乘法拆成两个16的来做么?如果不是求...
时间:10-02
整理:3721RD
点击:
void fir_bv_l(Word32 *PcmIn,Word32 *PcmOut, Word16 *coef)
{
Word16 i, j;
Word16 temp1, temp2;
Word32 sum;
Word32 sum1;
for (i=0; i >15);
}
}
return;
}
注:1、extract_h(Word32);右移16位取高位
2、extract_l(Word32); 取低16位
3、L_msu(Word32,Word16,Word16);含义: L_shr(PcmIn[i-j-1], 1) - temp1x16384
4、L_shr(PcmIn[i-j-1], 1);做右移1位运算
5、sum = L_mac(sum, coef[j+1], temp1);含义:sum=sum+coef[j+1] x temp1
6、sum = L_add(sum, L_mult(coef[j+1], temp2)>>15);同上:sum=sum+(coef[j+1] x temp2)>>15
7、const short int coef[FILETER_SIZE] = { -47, -57, 149, -103, -92, 270, -205, };
{
Word16 i, j;
Word16 temp1, temp2;
Word32 sum;
Word32 sum1;
for (i=0; i >15);
}
}
return;
}
注:1、extract_h(Word32);右移16位取高位
2、extract_l(Word32); 取低16位
3、L_msu(Word32,Word16,Word16);含义: L_shr(PcmIn[i-j-1], 1) - temp1x16384
4、L_shr(PcmIn[i-j-1], 1);做右移1位运算
5、sum = L_mac(sum, coef[j+1], temp1);含义:sum=sum+coef[j+1] x temp1
6、sum = L_add(sum, L_mult(coef[j+1], temp2)>>15);同上:sum=sum+(coef[j+1] x temp2)>>15
7、const short int coef[FILETER_SIZE] = { -47, -57, 149, -103, -92, 270, -205, };