diff options
author | Zhao Yakui <yakui.zhao@intel.com> | 2013-01-09 12:30:04 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2013-01-17 13:08:40 +0800 |
commit | 32a4a9c6138bfed0a07701cd792917245007f409 (patch) | |
tree | 66fa31a10d52cf0638c932e03a23c64380c6686e /src/intel_media_common.c | |
parent | b22f42cab19ab629d5b7d0387b782745607dd7be (diff) |
Fix one compiling warning of floor implicit definition
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Diffstat (limited to 'src/intel_media_common.c')
-rw-r--r-- | src/intel_media_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel_media_common.c b/src/intel_media_common.c index d63115a..504f9d9 100644 --- a/src/intel_media_common.c +++ b/src/intel_media_common.c @@ -25,6 +25,7 @@ #include <stdlib.h> #include <string.h> #include <assert.h> +#include <math.h> #include "intel_driver.h" #include "intel_media.h" @@ -67,7 +68,7 @@ int intel_format_convert(float src, int out_int_bits, int out_frac_bits,int out_ unsigned int factor = 1 << out_frac_bits; int output_value = 0; - unsigned int integer_part = floor(src_1); + unsigned int integer_part = floorf(src_1); unsigned int fraction_part = ((int)((src_1 - integer_part) * factor)) & (factor - 1) ; output_value = (integer_part << out_frac_bits) | fraction_part; |