summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/cbrt_tablegen.h
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/cbrt_tablegen.h
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/cbrt_tablegen.h')
-rw-r--r--ffmpeg/libavcodec/cbrt_tablegen.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffmpeg/libavcodec/cbrt_tablegen.h b/ffmpeg/libavcodec/cbrt_tablegen.h
index a9d34dc..0db64fc 100644
--- a/ffmpeg/libavcodec/cbrt_tablegen.h
+++ b/ffmpeg/libavcodec/cbrt_tablegen.h
@@ -36,12 +36,13 @@ static void cbrt_tableinit(void)
{
if (!cbrt_tab[(1<<13) - 1]) {
int i;
+ /* cbrtf() isn't available on all systems, so we use powf(). */
for (i = 0; i < 1<<13; i++) {
union {
float f;
uint32_t i;
} f;
- f.f = cbrtf(i) * i;
+ f.f = pow(i, 1.0 / 3.0) * i;
cbrt_tab[i] = f.i;
}
}