This website works better with JavaScript.
Home
Help
Sign In
falkTX
/
FFmpeg
mirror of
https://github.com/falkTX/FFmpeg.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
338
Wiki
Activity
Browse Source
optimize apply_welch_window()
Originally committed as revision 11881 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer
18 years ago
parent
ead6ebdd44
commit
fa4ed8c10a
1 changed files
with
6 additions
and
3 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-3
libavcodec/flacenc.c
+ 6
- 3
libavcodec/flacenc.c
View File
@@ -595,11 +595,14 @@ static void apply_welch_window(const int32_t *data, int len, double *w_data)
n2 = (len >> 1);
c = 2.0 / (len - 1.0);
w_data+=n2;
data+=n2;
for(i=0; i<n2; i++) {
w = c - i - 1.0;
w = c -
n2 + i
;
w = 1.0 - (w * w);
w_data[i] = data[i] * w;
w_data[
len-1-i] = data[len-1-i
] * w;
w_data[
-
i
-1
] = data[
-
i
-1
] * w;
w_data[
+i ] = data[+i
] * w;
}
}
Write
Preview
Loading…
Cancel
Save