summaryrefslogtreecommitdiff
path: root/gst/audioconvert/gstaudioquantize.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/audioconvert/gstaudioquantize.c')
-rw-r--r--gst/audioconvert/gstaudioquantize.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gst/audioconvert/gstaudioquantize.c b/gst/audioconvert/gstaudioquantize.c
index 91a8c12e0..d3df42cba 100644
--- a/gst/audioconvert/gstaudioquantize.c
+++ b/gst/audioconvert/gstaudioquantize.c
@@ -296,15 +296,14 @@ static const gdouble ns_high_coeffs[] = {
#define ADD_NS_HIGH() \
cur_error = 0.0; \
for (j = 0; j < 8; j++) \
- cur_error += errors[chan_pos + j] * ns_high_coeffs[j]; \
+ cur_error += errors[chan_pos*8 + j] * ns_high_coeffs[j]; \
tmp -= cur_error; \
orig = tmp;
#define UPDATE_ERROR_HIGH() \
for (j = 7; j > 0; j--) \
- errors[chan_pos + j] = errors[chan_pos + j-1]; \
- errors[chan_pos] = (*dst)/factor - orig;
-
+ errors[chan_pos*8 + j] = errors[chan_pos*8 + j-1]; \
+ errors[chan_pos*8] = (*dst)/factor - orig;
MAKE_QUANTIZE_FUNC_I (int_none_none, NONE_FUNC, NONE_FUNC, ROUND);
MAKE_QUANTIZE_FUNC_I (int_rpdf_none, INIT_DITHER_RPDF_I, ADD_DITHER_RPDF_I,