]> git.sesse.net Git - ffmpeg/commitdiff
opus_pvq: remove unneeded assert
authorRostislav Pehlivanov <atomnuker@gmail.com>
Fri, 24 Feb 2017 07:06:59 +0000 (07:06 +0000)
committerRostislav Pehlivanov <atomnuker@gmail.com>
Fri, 24 Feb 2017 07:06:59 +0000 (07:06 +0000)
Since the PVQ search has been well fuzzed and is guaranteed to never
break SUM(abs(y[])) == K, the assert is no longer needed.
Also the assert only prevented coding the wrong vector index but didn't
prevent crashes during searching for it, which made the assert rather
informational than practical.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
libavcodec/opus_pvq.c

index 0d3536718de175a41ed9baaa2865359e5c3a5a4b..706e2394229cda561ebe658b978d21ea509e0315 100644 (file)
@@ -285,7 +285,6 @@ static inline uint32_t celt_icwrsi(uint32_t N, uint32_t K, const int *y)
         idx += CELT_PVQ_U(N - i, sum) + (y[i] < 0)*i_s;
         sum += FFABS(y[i]);
     }
-    av_assert0(sum == K);
     return idx;
 }