[FFmpeg-cvslog] ops_pvq_search: remove dead macro

Rostislav Pehlivanov git at videolan.org
Fri Aug 18 19:30:48 EEST 2017


ffmpeg | branch: master | Rostislav Pehlivanov <atomnuker at gmail.com> | Fri Aug 18 17:27:41 2017 +0100| [8e53cd1fab86b8774f0b5b0f186d8e0cd9c1895b] | committer: Rostislav Pehlivanov

ops_pvq_search: remove dead macro

There's no point in toggling it, even for debugging. Its just worse.

Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8e53cd1fab86b8774f0b5b0f186d8e0cd9c1895b
---

 libavcodec/x86/opus_pvq_search.asm | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/libavcodec/x86/opus_pvq_search.asm b/libavcodec/x86/opus_pvq_search.asm
index f0d9950e34..beb6cbcc9b 100644
--- a/libavcodec/x86/opus_pvq_search.asm
+++ b/libavcodec/x86/opus_pvq_search.asm
@@ -34,13 +34,6 @@ ALIGNMODE p6
 ; Opus also does use rsqrt approximation in their intrinsics code.
 %define USE_APPROXIMATION   1
 
-; Presearch tries to quantize by using the property Sum( abs(x[i]*K)/Sx ) = K.
-; If we use truncation for the division result then the integer Sum would be <= K.
-; By using nearest rounding we get closer approximation, but
-; we could also get more than K pulses and we have to remove the extra ones.
-; This method is the main improvement of the ffmpeg C function over the Opus original.
-%define PRESEARCH_ROUNDING  1
-
 SECTION_RODATA 64
 
 const_float_abs_mask:   times 8 dd 0x7fffffff
@@ -286,11 +279,7 @@ align 16
 %%loop_guess:
     movaps     m1, [tmpX + r4]    ; m1   = X[i]
     mulps      m2, m0, m1         ; m2   = res*X[i]
-  %if PRESEARCH_ROUNDING == 0
-    cvttps2dq  m2, m2             ; yt   = (int)truncf( res*X[i] )
-  %else
     cvtps2dq   m2, m2             ; yt   = (int)lrintf( res*X[i] )
-  %endif
     paddd      m5, m2             ; Sy  += yt
     cvtdq2ps   m2, m2             ; yt   = (float)yt
     mulps      m1, m2             ; m1   = X[i]*yt



More information about the ffmpeg-cvslog mailing list