package amrnb // Encoder analysis-by-synthesis filter kernels, ported from opencore-amrnb // convolve.cpp. convolve computes the (truncated) lower-triangular convolution // y[n] = sum_{i=0..n} x[i]·h[n-i] >> 12, used throughout the closed-loop pitch // and algebraic codebook searches to filter an excitation by the weighted // synthesis impulse response. The reference accumulates in non-saturating int32, // so a straightforward double loop is bit-exact. func convolve(x, h, y []int16, L int) { xf := x[:L] // hoist bounds: i<=n> 12) } }