FFmpeg  4.3
Macros | Functions
libm.h File Reference
#include <math.h>
#include "config.h"
#include "attributes.h"
#include "intfloat.h"
#include "mathematics.h"

Go to the source code of this file.

Macros

#define atanf(x)   ((float)atan(x))
 
#define atan2f(y, x)   ((float)atan2(y, x))
 
#define powf(x, y)   ((float)pow(x, y))
 
#define cosf(x)   ((float)cos(x))
 
#define FF_ARRAY_ELEMS(a)   (sizeof(a) / sizeof((a)[0]))
 
#define expf(x)   ((float)exp(x))
 
#define exp2(x)   exp((x) * M_LN2)
 
#define exp2f(x)   ((float)exp2(x))
 
#define isinf(x)
 
#define isnan(x)
 
#define isfinite(x)
 
#define ldexpf(x, exp)   ((float)ldexp(x, exp))
 
#define llrint(x)   ((long long)rint(x))
 
#define llrintf(x)   ((long long)rint(x))
 
#define log2(x)   (log(x) * 1.44269504088896340736)
 
#define log2f(x)   ((float)log2(x))
 
#define log10f(x)   ((float)log10(x))
 
#define sinf(x)   ((float)sin(x))
 

Functions

static av_always_inline double cbrt (double x)
 
static av_always_inline float cbrtf (float x)
 
static av_always_inline double copysign (double x, double y)
 
static double ff_eval_poly (const double *coeff, int size, double x)
 
static double erf (double z)
 erf function Algorithm taken from the Boost project, source: http://www.boost.org/doc/libs/1_46_1/boost/math/special_functions/erf.hpp Use, modification and distribution are subject to the Boost Software License, Version 1.0 (see notice below). More...
 
static av_always_inline av_const int avpriv_isinff (float x)
 
static av_always_inline av_const int avpriv_isinf (double x)
 
static av_always_inline av_const int avpriv_isnanf (float x)
 
static av_always_inline av_const int avpriv_isnan (double x)
 
static av_always_inline av_const int avpriv_isfinitef (float x)
 
static av_always_inline av_const int avpriv_isfinite (double x)
 
static av_const double hypot (double x, double y)
 
static double rint (double x)
 
static av_always_inline av_const long int lrint (double x)
 
static av_always_inline av_const long int lrintf (float x)
 
static av_always_inline av_const double round (double x)
 
static av_always_inline av_const float roundf (float x)
 
static av_always_inline av_const double trunc (double x)
 
static av_always_inline av_const float truncf (float x)
 

Detailed Description

Replacements for frequently missing libm functions

Definition in file libm.h.

Macro Definition Documentation

◆ atanf

#define atanf (   x)    ((float)atan(x))

Definition at line 40 of file libm.h.

◆ atan2f

#define atan2f (   y,
  x 
)    ((float)atan2(y, x))

Definition at line 45 of file libm.h.

◆ powf

#define powf (   x,
 
)    ((float)pow(x, y))

Definition at line 50 of file libm.h.

◆ cosf

#define cosf (   x)    ((float)cos(x))

Definition at line 78 of file libm.h.

◆ FF_ARRAY_ELEMS

#define FF_ARRAY_ELEMS (   a)    (sizeof(a) / sizeof((a)[0]))

◆ expf

#define expf (   x)    ((float)exp(x))

Definition at line 283 of file libm.h.

◆ exp2

#define exp2 (   x)    exp((x) * M_LN2)

Definition at line 288 of file libm.h.

◆ exp2f

#define exp2f (   x)    ((float)exp2(x))

Definition at line 293 of file libm.h.

◆ isinf

#define isinf (   x)
Value:
(sizeof(x) == sizeof(float) \

Definition at line 317 of file libm.h.

◆ isnan

#define isnan (   x)
Value:
(sizeof(x) == sizeof(float) \

Definition at line 340 of file libm.h.

◆ isfinite

#define isfinite (   x)
Value:
(sizeof(x) == sizeof(float) \

Definition at line 359 of file libm.h.

◆ ldexpf

#define ldexpf (   x,
  exp 
)    ((float)ldexp(x, exp))

Definition at line 389 of file libm.h.

◆ llrint

#define llrint (   x)    ((long long)rint(x))

Definition at line 394 of file libm.h.

◆ llrintf

#define llrintf (   x)    ((long long)rint(x))

Definition at line 399 of file libm.h.

◆ log2

#define log2 (   x)    (log(x) * 1.44269504088896340736)

Definition at line 404 of file libm.h.

◆ log2f

#define log2f (   x)    ((float)log2(x))

Definition at line 409 of file libm.h.

◆ log10f

#define log10f (   x)    ((float)log10(x))

Definition at line 414 of file libm.h.

◆ sinf

#define sinf (   x)    ((float)sin(x))

Definition at line 419 of file libm.h.

Function Documentation

◆ cbrt()

static av_always_inline double cbrt ( double  x)
static

Definition at line 54 of file libm.h.

◆ cbrtf()

static av_always_inline float cbrtf ( float  x)
static

◆ copysign()

static av_always_inline double copysign ( double  x,
double  y 
)
static

Definition at line 68 of file libm.h.

Referenced by copysignl(), decfloat(), hexfloat(), and perform_compression().

◆ ff_eval_poly()

static double ff_eval_poly ( const double *  coeff,
int  size,
double  x 
)
inlinestatic

Definition at line 82 of file libm.h.

Referenced by erf().

◆ erf()

static double erf ( double  z)
inlinestatic

erf function Algorithm taken from the Boost project, source: http://www.boost.org/doc/libs/1_46_1/boost/math/special_functions/erf.hpp Use, modification and distribution are subject to the Boost Software License, Version 1.0 (see notice below).

Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following:

The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition at line 121 of file libm.h.

Referenced by bound(), and ff_aac_adjust_common_pred().

◆ avpriv_isinff()

static av_always_inline av_const int avpriv_isinff ( float  x)
static

Definition at line 301 of file libm.h.

◆ avpriv_isinf()

static av_always_inline av_const int avpriv_isinf ( double  x)
static

Definition at line 309 of file libm.h.

◆ avpriv_isnanf()

static av_always_inline av_const int avpriv_isnanf ( float  x)
static

Definition at line 324 of file libm.h.

◆ avpriv_isnan()

static av_always_inline av_const int avpriv_isnan ( double  x)
static

Definition at line 332 of file libm.h.

◆ avpriv_isfinitef()

static av_always_inline av_const int avpriv_isfinitef ( float  x)
static

Definition at line 347 of file libm.h.

◆ avpriv_isfinite()

static av_always_inline av_const int avpriv_isfinite ( double  x)
static

Definition at line 353 of file libm.h.

◆ hypot()

static av_const double hypot ( double  x,
double  y 
)
inlinestatic

◆ rint()

static double rint ( double  x)
inlinestatic

Definition at line 423 of file libm.h.

Referenced by lrint(), and lrintf().

◆ lrint()

static av_always_inline av_const long int lrint ( double  x)
static

Definition at line 430 of file libm.h.

◆ lrintf()

static av_always_inline av_const long int lrintf ( float  x)
static

Definition at line 437 of file libm.h.

◆ round()

static av_always_inline av_const double round ( double  x)
static

◆ roundf()

static av_always_inline av_const float roundf ( float  x)
static

◆ trunc()

static av_always_inline av_const double trunc ( double  x)
static

Definition at line 458 of file libm.h.

Referenced by eval_expr(), and fwht_1d().

◆ truncf()

static av_always_inline av_const float truncf ( float  x)
static

Definition at line 465 of file libm.h.

Referenced by amrnb_decode_frame(), and amrwb_decode_frame().

x
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo x
Definition: fate.txt:150
avpriv_isinff
static av_always_inline av_const int avpriv_isinff(float x)
Definition: libm.h:301
avpriv_isnan
static av_always_inline av_const int avpriv_isnan(double x)
Definition: libm.h:332
avpriv_isinf
static av_always_inline av_const int avpriv_isinf(double x)
Definition: libm.h:309
avpriv_isfinite
static av_always_inline av_const int avpriv_isfinite(double x)
Definition: libm.h:353
avpriv_isfinitef
static av_always_inline av_const int avpriv_isfinitef(float x)
Definition: libm.h:347
avpriv_isnanf
static av_always_inline av_const int avpriv_isnanf(float x)
Definition: libm.h:324