From 9b683a9c562a35e87c9f19347a3bd8bd5f4a2f10 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 23 Mar 2025 00:04:40 -0700 Subject: [PATCH] Bug Fix: Reorder LPC scratch memory for alignment The double members should be ordered first so they are aligned to an 8 byte boundary. The rest are fine as-is. Signed-off-by: Christopher Snowhill --- Audio/ThirdParty/lvqcl/lpc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Audio/ThirdParty/lvqcl/lpc.c b/Audio/ThirdParty/lvqcl/lpc.c index 201baf94a..8e5620558 100644 --- a/Audio/ThirdParty/lvqcl/lpc.c +++ b/Audio/ThirdParty/lvqcl/lpc.c @@ -155,12 +155,13 @@ void lpc_extrapolate2(float *const data, const size_t data_len, const int nch, c *extrapolate_buffer_size = new_size; } - float *tdata = (float *)(*extrapolate_buffer); // for 1 channel only + double *aut = (double *)(*extrapolate_buffer); + double *lpc = (double *)(*extrapolate_buffer + aut_size); - double *aut = (double *)(*extrapolate_buffer + tdata_size); - double *lpc = (double *)(*extrapolate_buffer + tdata_size + aut_size); - float *lpci = (float *)(*extrapolate_buffer + tdata_size + aut_size + lpc_size); - float *work = (float *)(*extrapolate_buffer + tdata_size + aut_size + lpc_size + lpci_size); + float *tdata = (float *)(*extrapolate_buffer + aut_size + lpc_size); // for 1 channel only + + float *lpci = (float *)(*extrapolate_buffer + aut_size + lpc_size + tdata_size); + float *work = (float *)(*extrapolate_buffer + aut_size + lpc_size + tdata_size + lpci_size); for(int c = 0; c < nch; c++) { if(extra_bkwd) {