[FFmpeg-devel] [PATCH 9/9] avcodec/sonic: use lrint instead of floor hack
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Wed Dec 2 01:27:58 CET 2015
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
libavcodec/sonic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index 4ec7d89..0a848d1 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -537,7 +537,7 @@ static int modified_levinson_durbin(int *window, int window_entries,
if (xx == 0.0)
k = 0;
else
- k = (int)(floor(-xy/xx * (double)LATTICE_FACTOR / (double)(tap_quant[i]) + 0.5));
+ k = lrint(-xy/xx * LATTICE_FACTOR / tap_quant[i]);
if (k > (LATTICE_FACTOR/tap_quant[i]))
k = LATTICE_FACTOR/tap_quant[i];
--
2.6.2
More information about the ffmpeg-devel
mailing list