Merge pull request #4 from slanoe/master

meyer coefficients added
This commit is contained in:
Rafat Hussain 2016-12-21 17:37:20 +05:30 committed by GitHub
commit 0297e002d5

View File

@ -3028,6 +3028,110 @@ static const double hm6_68[18] = {
-0.016990639867602342, -0.0019142861290887667,
0.0019088317364812906, 0.0 };
static const double meyer[102] = {
-0.000001509740857,
0.000001278766757,
0.000000449585560,
-0.000002096568870,
0.000001723223554,
0.000000698082276,
-0.000002879408033,
0.000002383148395,
0.000000982515602,
-0.000004217789186,
0.000003353501538,
0.000001674721859,
-0.000006034501342,
0.000004837555802,
0.000002402288023,
-0.000009556309846,
0.000007216527695,
0.000004849078300,
-0.000014206928581,
0.000010503914271,
0.000006187580298,
-0.000024438005846,
0.000020106387691,
0.000014993523600,
-0.000046428764284,
0.000032341311914,
0.000037409665760,
-0.000102779005085,
0.000024461956845,
0.000149713515389,
-0.000075592870255,
-0.000139913148217,
-0.000093512893880,
0.000161189819725,
0.000859500213762,
-0.000578185795273,
-0.002702168733939,
0.002194775336459,
0.006045510596456,
-0.006386728618548,
-0.011044641900539,
0.015250913158586,
0.017403888210177,
-0.032094063354505,
-0.024321783959519,
0.063667300884468,
0.030621243943425,
-0.132696615358862,
-0.035048287390595,
0.444095030766529,
0.743751004903787,
0.444095030766529,
-0.035048287390595,
-0.132696615358862,
0.030621243943425,
0.063667300884468,
-0.024321783959519,
-0.032094063354505,
0.017403888210177,
0.015250913158586,
-0.011044641900539,
-0.006386728618548,
0.006045510596456,
0.002194775336459,
-0.002702168733939,
-0.000578185795273,
0.000859500213762,
0.000161189819725,
-0.000093512893880,
-0.000139913148217,
-0.000075592870255,
0.000149713515389,
0.000024461956845,
-0.000102779005085,
0.000037409665760,
0.000032341311914,
-0.000046428764284,
0.000014993523600,
0.000020106387691,
-0.000024438005846,
0.000006187580298,
0.000010503914271,
-0.000014206928581,
0.000004849078300,
0.000007216527695,
-0.000009556309846,
0.000002402288023,
0.000004837555802,
-0.000006034501342,
0.000001674721859,
0.000003353501538,
-0.000004217789186,
0.000000982515602,
0.000002383148395,
-0.000002879408033,
0.000000698082276,
0.000001723223554,
-0.000002096568870,
0.000000449585560,
0.000001278766757,
-0.000001509740857,
0.0};
int filtlength(const char* name) {
int len = strlen(name);
int i = 0;
@ -3187,6 +3291,9 @@ int filtlength(const char* name) {
}
return N * 2;
}
else if (!strcmp(name, "meyer")){
return 102;
}
else {
printf("\n Filter Not in Database \n");
@ -4192,6 +4299,13 @@ int filtcoef(const char* name, double *lp1, double *hp1, double *lp2, double *hp
qmf_even(sym20, N, hp2);
return N;
}
else if (!strcmp(name, "meyer")){
copy_reverse(meyer, N, lp1);
qmf_wrev(meyer, N, hp1);
copy(meyer, N, lp2);
qmf_even(meyer, N, hp2);
return N;
}
else {
printf("\n Filter Not in Database \n");