X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavutil%2Flibm.h;h=d36420bc9be0b11c1e2ed49b546f398872775ded;hb=85044358f63f0158fb83712f659f6db5b454a7aa;hp=b5821e82679d397ea133b3a66b4aed5b73c1df11;hpb=46df708b45b34191973ef5181b052ce8e583bb4e;p=ffmpeg diff --git a/libavutil/libm.h b/libavutil/libm.h index b5821e82679..d36420bc9be 100644 --- a/libavutil/libm.h +++ b/libavutil/libm.h @@ -1,18 +1,18 @@ /* - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -29,6 +29,10 @@ #include "attributes.h" #include "intfloat.h" +#if HAVE_MIPSFPU && HAVE_INLINE_ASM +#include "libavutil/mips/libm_mips.h" +#endif /* HAVE_MIPSFPU && HAVE_INLINE_ASM*/ + #if !HAVE_CBRTF static av_always_inline float cbrtf(float x) { @@ -86,6 +90,13 @@ static av_always_inline av_const int isnan(float x) #define log2f(x) ((float)log2(x)) #endif /* HAVE_LOG2F */ +#if !HAVE_RINT +static inline double rint(double x) +{ + return x >= 0 ? floor(x + 0.5) : ceil(x - 0.5); +} +#endif /* HAVE_RINT */ + #if !HAVE_LRINT static av_always_inline av_const long int lrint(double x) {