# HG changeset patch # User diego # Date 1127172407 0 # Node ID 28084132c417beb6216ce7d8fca80495f59a021c # Parent 5576a9349ab6a0b4f84b434d19d868b5f8ebca19 Move lrintf implementation from libavcodec/dsputil.h to libavutil/common.h where it makes more sense. diff -r 5576a9349ab6 -r 28084132c417 dsputil.h --- a/dsputil.h Mon Sep 19 12:03:51 2005 +0000 +++ b/dsputil.h Mon Sep 19 23:26:47 2005 +0000 @@ -594,33 +594,4 @@ return score;\ } -#ifndef HAVE_LRINTF -/* XXX: add ISOC specific test to avoid specific BSD testing. */ -/* better than nothing implementation. */ -/* btw, rintf() is existing on fbsd too -- alex */ -static always_inline long int lrintf(float x) -{ -#ifdef CONFIG_WIN32 -# ifdef ARCH_X86 - int32_t i; - asm volatile( - "fistpl %0\n\t" - : "=m" (i) : "t" (x) : "st" - ); - return i; -# else - /* XXX: incorrect, but make it compile */ - return (int)(x + (x < 0 ? -0.5 : 0.5)); -# endif -#else - return (int)(rint(x)); #endif -} -#else -#ifndef _ISOC9X_SOURCE -#define _ISOC9X_SOURCE -#endif -#include -#endif - -#endif