From b7c7653941f7add1dbf58360640b0da7ee6e6cf4 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Mon, 15 Aug 2016 17:30:00 -0400 Subject: Speeding up PVQ search by allocating even more pulses in the projection. --- celt/vq.c | 5 +++-- celt/x86/vq_sse2.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/celt/vq.c b/celt/vq.c index 5a4a8afd..2f864c2a 100644 --- a/celt/vq.c +++ b/celt/vq.c @@ -210,7 +210,8 @@ opus_val16 op_pvq_search_c(celt_norm *X, int *iy, int K, int N, int arch) while (++j=1, "Allocated too many pulses in the quick pass"); + celt_assert2(pulsesLeft>=0, "Allocated too many pulses in the quick pass"); /* This should never happen, but just in case it does (e.g. on silence) we fill the first bin with pulses. */ diff --git a/celt/x86/vq_sse2.c b/celt/x86/vq_sse2.c index 0891a5ba..c82d7e24 100644 --- a/celt/x86/vq_sse2.c +++ b/celt/x86/vq_sse2.c @@ -104,7 +104,8 @@ opus_val16 op_pvq_search_sse2(celt_norm *_X, int *iy, int K, int N, int arch) while (++j=1, "Allocated too many pulses in the quick pass"); + celt_assert2(pulsesLeft>=0, "Allocated too many pulses in the quick pass"); /* This should never happen, but just in case it does (e.g. on silence) we fill the first bin with pulses. */ -- cgit v1.2.1