An optimized window for a G.729 speech coding standard comprising, a first plurality of sample values wa, wherein the first plurality of sample values are approximately within a distance d=0.0001 of a window comprising a second plurality of sample values wb, wherein the second plurality of sample values wb comprises w1, and wherein the distance d between wa and wb is defined according to a number of samples N, a first index n, a second index k, and according to an equation:
- 36 d ( wa , wb ) = ∑ n = 0 N - 1 ( wa [ n ] ∑ k = 0 N - 1 wa 2 [ k ] - wb [ n ] ∑ k = 0 N - 1 wb 2 [ k ] ) 2 .