OLD | NEW |
1 /* Copyright (c) 2008-2011 Xiph.Org Foundation, Mozilla Corporation, | 1 /* Copyright (c) 2008-2011 Xiph.Org Foundation, Mozilla Corporation, |
2 Gregory Maxwell | 2 Gregory Maxwell |
3 Written by Jean-Marc Valin, Gregory Maxwell, and Timothy B. Terriberry */ | 3 Written by Jean-Marc Valin, Gregory Maxwell, and Timothy B. Terriberry */ |
4 /* | 4 /* |
5 Redistribution and use in source and binary forms, with or without | 5 Redistribution and use in source and binary forms, with or without |
6 modification, are permitted provided that the following conditions | 6 modification, are permitted provided that the following conditions |
7 are met: | 7 are met: |
8 | 8 |
9 - Redistributions of source code must retain the above copyright | 9 - Redistributions of source code must retain the above copyright |
10 notice, this list of conditions and the following disclaimer. | 10 notice, this list of conditions and the following disclaimer. |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 opus_uint32 v; | 120 opus_uint32 v; |
121 opus_uint32 ii; | 121 opus_uint32 ii; |
122 int j; | 122 int j; |
123 #if defined(SMALL_FOOTPRINT) | 123 #if defined(SMALL_FOOTPRINT) |
124 memcpy(u,uu,(k+2U)*sizeof(*u)); | 124 memcpy(u,uu,(k+2U)*sizeof(*u)); |
125 cwrsi(n,k,i,y,u); | 125 cwrsi(n,k,i,y,u); |
126 #else | 126 #else |
127 cwrsi(n,k,i,y); | 127 cwrsi(n,k,i,y); |
128 #endif | 128 #endif |
129 sy=0; | 129 sy=0; |
130 for(j=0;j<n;j++)sy+=ABS(y[j]); | 130 for(j=0;j<n;j++)sy+=abs(y[j]); |
131 if(sy!=k){ | 131 if(sy!=k){ |
132 fprintf(stderr,"N=%d Pulse count mismatch in cwrsi (%d!=%d).\n", | 132 fprintf(stderr,"N=%d Pulse count mismatch in cwrsi (%d!=%d).\n", |
133 n,sy,k); | 133 n,sy,k); |
134 return 99; | 134 return 99; |
135 } | 135 } |
136 /*printf("%6u of %u:",i,nc); | 136 /*printf("%6u of %u:",i,nc); |
137 for(j=0;j<n;j++)printf(" %+3i",y[j]); | 137 for(j=0;j<n;j++)printf(" %+3i",y[j]); |
138 printf(" ->");*/ | 138 printf(" ->");*/ |
139 #if defined(SMALL_FOOTPRINT) | 139 #if defined(SMALL_FOOTPRINT) |
140 ii=icwrs(n,k,&v,y,u); | 140 ii=icwrs(n,k,&v,y,u); |
(...skipping 11 matching lines...) Expand all Loading... |
152 (long)v,(long)nc); | 152 (long)v,(long)nc); |
153 return 2; | 153 return 2; |
154 } | 154 } |
155 /*printf(" %6u\n",i);*/ | 155 /*printf(" %6u\n",i);*/ |
156 } | 156 } |
157 /*printf("\n");*/ | 157 /*printf("\n");*/ |
158 } | 158 } |
159 } | 159 } |
160 return 0; | 160 return 0; |
161 } | 161 } |
OLD | NEW |