Commit d2b4742a authored by Ghislain MARY's avatar Ghislain MARY

Fix build on Android x86 (use lrand48() instead of rand()).

parent 586ad5da
......@@ -877,6 +877,11 @@ process_common_toolchain() {
if enabled runtime_cpu_detect; then
add_cflags "-I${SDK_PATH}/sources/android/cpufeatures"
fi
if [ ${tgt_isa} = "x86" ]; then
add_asflags "-D__ANDROID__"
add_cflags "-D__ANDROID__"
fi
;;
esac
......
......@@ -23,6 +23,10 @@
#include <stdlib.h>
#include <stdio.h>
#ifdef __ANDROID__
#define rand() lrand48()
#endif
#define RGB_TO_YUV(t) \
( (0.257*(float)(t>>16)) + (0.504*(float)(t>>8&0xff)) + (0.098*(float)(t&0xff)) + 16), \
(-(0.148*(float)(t>>16)) - (0.291*(float)(t>>8&0xff)) + (0.439*(float)(t&0xff)) + 128), \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment