comparison mdct.c @ 7699:4b286498a3bd libavcodec

Add a temp variable to ff_sine_window_init() to match the way wma.c computed window before r14757. This fixes a regression introduced by r14757 on amd64.
author aurel
date Tue, 26 Aug 2008 19:40:53 +0000
parents ed956c3c2cf3
children 67cfe4983e6d
comparison
equal deleted inserted replaced
7698:370c30bfd3a1 7699:4b286498a3bd
57 ff_sine_128, ff_sine_256, ff_sine_512, ff_sine_1024, ff_sine_2048, 57 ff_sine_128, ff_sine_256, ff_sine_512, ff_sine_1024, ff_sine_2048,
58 }; 58 };
59 59
60 // Generate a sine window. 60 // Generate a sine window.
61 void ff_sine_window_init(float *window, int n) { 61 void ff_sine_window_init(float *window, int n) {
62 float alpha = M_PI / (2.0 * n);
62 int i; 63 int i;
63 for(i = 0; i < n; i++) 64 for(i = 0; i < n; i++)
64 window[i] = sin((i + 0.5) / (2 * n) * M_PI); 65 window[i] = sin((i + 0.5) * alpha);
65 } 66 }
66 67
67 /** 68 /**
68 * init MDCT or IMDCT computation. 69 * init MDCT or IMDCT computation.
69 */ 70 */