- 1、本文档共20页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
ImageView按照屏幕宽度填充
Ecshop的单表代码写法和ecshop的多表代码写法是不一样的。但是ecshop的多表代码的写法要根据单表的写法扩展延伸的,不一样的单表不一样多表这样都是想对应的,也是很好学习和掌握的,下面我们就一起分析一下ecshop单表和多表的写法区别与不同。void NoiseReductionDestroy(NoiseReduction *inHandle){ assert(0 != inHandle); if(!inHandle) return; assert(0 != inHandle-frame); free(inHandle-frame); assert(0 != inHandle-window); free(inHandle-window); assert(0 != inHandle-ft); free(inHandle-ft); assert(0 != inHandle-ps); free(inHandle-ps); assert(0 != inHandle-Sold); free(inHandle-Sold); assert(0 != inHandle-Smin); free(inHandle-Smin); assert(0 != inHandle-noise); free(inHandle-noise); assert(0 != inHandle-prior); free(inHandle-prior); assert(0 != inHandle-inbuf); free(inHandle-inbuf); assert(0 != inHandle-outbuf); free(inHandle-outbuf); assert(0 != inHandle-fft_table); spx_fft_destroy(inHandle-fft_table); free(inHandle);}void FrequencyAnalysis(NoiseReduction *inHandle,OsInt16 *x){ OsInt32 i; OsInt32 N = inHandle-ps_size; OsFlt32 *ps = inHandle-ps; OsFlt32 *ft = inHandle-ft; RemoveDC(x,N); for(i = 0; i N; i++) inHandle-frame[i] = inHandle-inbuf[i]; for(i = 0; i N; i++) inHandle-frame[i+N] = x[i]; for(i = 0; i N; i++) inHandle-inbuf[i] = x[i]; for(i = 0; i 2*N; i++) inHandle-frame[i] *= inHandle-window[i]; spx_fft(inHandle-fft_table,inHandle-frame,ft); ps[0] = ft[0]*ft[0]; for(i = 1; i N; i++) ps[i] = ft[2*i-1]*ft[2*i-1] + ft[2*i]*ft[2*i];} void NoiseEstimation(NoiseReduction *inHandle){ OsFlt32 *Sold = inHandle-Sold; OsFlt32 *Smin = inHandle-Smin; OsFlt32 *noise = inHandle-noise; OsInt32 N = inHandle-ps_size; OsFlt32 beta = 0.96f; // look-ahead factor,control adaptive time OsFlt32 gamma = 0.998f; OsInt32 i; if(1 == inHandle-adapt_count) { // assume the first frame is noise for(i = 0; i N; i++) { Sold[i] = inHandle-ps[i]; Smin[i] = inHandle-ps[i]; noise[i] = inHandle-ps[i]; } } for(i = 0; i N; i++) { OsFlt32 Sp; // smooth power spectrum Sp = 0.8f*Sold[i] + 0.2*inHandle-ps[i]; // update noise if(Sold[i] = Sp) noise[i] = gamma*noise[i] + (1.0f-gamma)/(1.0f-bet
文档评论(0)