summaryrefslogtreecommitdiff
path: root/libavcodec/mdct.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mdct.c')
-rw-r--r--libavcodec/mdct.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/mdct.c b/libavcodec/mdct.c
index c51f809714..07eef2b3d4 100644
--- a/libavcodec/mdct.c
+++ b/libavcodec/mdct.c
@@ -48,6 +48,13 @@ void ff_kbd_window_init(float *window, float alpha, int n)
window[i] = sqrt(local_window[i] / sum);
}
+// Generate a sine window.
+void ff_sine_window_init(float *window, int n) {
+ int i;
+ for(i = 0; i < n; i++)
+ window[i] = sin((i + 0.5) / (2 * n) * M_PI);
+}
+
/**
* init MDCT or IMDCT computation.
*/