diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-06-20 22:14:25 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-06-20 22:14:25 -0400 |
commit | 9a415e251258a461e642a7ba76cb66f278305cfd (patch) | |
tree | 3984a74641d6dc5b90fd46d3199e5872a316abd7 | |
parent | abe4e847bdd6a574c3414690d7895bfeab1fbb6b (diff) | |
download | opus-exp_hybrid_tune.tar.gz |
Fixes foldingexp_hybrid_tune
-rw-r--r-- | celt/bands.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/celt/bands.c b/celt/bands.c index a283b43d..f0cc19b6 100644 --- a/celt/bands.c +++ b/celt/bands.c @@ -1460,6 +1460,8 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end, /* Duplicate enough of the first band folding data to be able to fold the second band. Copies no data for CELT-only mode. */ OPUS_COPY(&norm[n1], &norm[2*n1 - n2], n2-n1); + if (C==2) + OPUS_COPY(&norm2[n1], &norm2[2*n1 - n2], n2-n1); } tf_change = tf_res[i]; ctx.tf_change = tf_change; @@ -1485,7 +1487,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end, fold_start = lowband_offset; while(M*eBands[--fold_start] > effective_lowband+norm_offset); fold_end = lowband_offset-1; - while(M*eBands[++fold_end] < effective_lowband+norm_offset+N); + while(++fold_end < i && M*eBands[fold_end] < effective_lowband+norm_offset+N); x_cm = y_cm = 0; fold_i = fold_start; do { x_cm |= collapse_masks[fold_i*C+0]; |