Revision 335ee1aa libavutil/internal.h
libavutil/internal.h  

192  192 
}\ 
193  193 
} 
194  194  
195 
#if !HAVE_EXP2 

196 
#undef exp2 

197 
#define exp2(x) exp((x) * 0.693147180559945) 

198 
#endif /* HAVE_EXP2 */ 

199  
200 
#if !HAVE_EXP2F 

201 
#undef exp2f 

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

203 
#endif /* HAVE_EXP2F */ 

204  
205 
#if !HAVE_LLRINT 

206 
#undef llrint 

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

208 
#endif /* HAVE_LLRINT */ 

209  
210 
#if !HAVE_LOG2 

211 
#undef log2 

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

213 
#endif /* HAVE_LOG2 */ 

214  
215 
#if !HAVE_LOG2F 

216 
#undef log2f 

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

218 
#endif /* HAVE_LOG2F */ 

219  
220 
#if !HAVE_LRINT 

221 
static av_always_inline av_const long int lrint(double x) 

222 
{ 

223 
return rint(x); 

224 
} 

225 
#endif /* HAVE_LRINT */ 

226  
227 
#if !HAVE_LRINTF 

228 
static av_always_inline av_const long int lrintf(float x) 

229 
{ 

230 
return (int)(rint(x)); 

231 
} 

232 
#endif /* HAVE_LRINTF */ 

233  
234 
#if !HAVE_ROUND 

235 
static av_always_inline av_const double round(double x) 

236 
{ 

237 
return (x > 0) ? floor(x + 0.5) : ceil(x  0.5); 

238 
} 

239 
#endif /* HAVE_ROUND */ 

240  
241 
#if !HAVE_ROUNDF 

242 
static av_always_inline av_const float roundf(float x) 

243 
{ 

244 
return (x > 0) ? floor(x + 0.5) : ceil(x  0.5); 

245 
} 

246 
#endif /* HAVE_ROUNDF */ 

247  
248 
#if !HAVE_TRUNCF 

249 
static av_always_inline av_const float truncf(float x) 

250 
{ 

251 
return (x > 0) ? floor(x) : ceil(x); 

252 
} 

253 
#endif /* HAVE_TRUNCF */ 

195 
#include "libm.h" 

254  196  
255  197 
/** 
256  198 
* Returns NULL if CONFIG_SMALL is true, otherwise the argument 
Also available in: Unified diff