Skip to content

victorygogogo/HazeRemoval--Halide-in-Android

 
 

Repository files navigation

NOTE

Tested on Android emulator with x86 image. And host is Linux Mint 17.1

This app clone from apps/HelloAndroid in official Halide github repo.

What has been modified is build.sh, jni/Android.mk and jni/Application.mk

Aimed for x86-32-android now. (for quick debugging in emulator)

Build

Check build.sh

What has to be considered is path to halide library. In line 5,

... -L /path/to/halide/bin -lHalide -I /path/to/halide/include -ldl -lpthread -lz

And in line 21,

... DYLD_LIBRARY_PATH=/path/to/halide/bin LD_LIBRARY_PATH=/path/to/halide/bin ...

Also, in line 13, archs is set as x86-32-android. It may be other value for other target. Refer to line 11 of build.sh for more other possible values.

Check jni/Android.mk and jni/Application.mk

Android.mk

In line 13, check path/to/halide/include and /path/to/aot.h, where aot.h is generated by a.out(in line 21 of build.sh) It should located at /path/to/current_project_folder/jni/halide_generated_/

Application.mk

Match APP_ABI value with archs in build.sh

Followings are original README messages, including dependency

HelloHalide is a simple application which applies a tone curve and sharpening to a video preview from the camera on a phone or tablet.

This application builds for multiple native ABIs. (At present armeabi, armeabi-v7a, arm64-v8a, mips, x86_64, and x86 are supported. mips64 is not presently working.) Halide code is generated for each architecture.

This build is meant to use Android command line tools. (And IDE is not required.) In order to build, the following will be required:

*Android NDK -- This can be download here: https://developer.android.com/tools/sdk/ndk/index.html After installing, make sure the top-level directory of the install is in the PATH. (It should contain an executable ndk-build file.)

*Android SDK -- This can be downloaded here: http://developer.android.com/sdk/index.html The standalone SDK is desired. Once downloaded, the "android" program in the tools directory of the install will need to be run. It should bring up a UI allowing one to choose components to install. HelloAndroid currently depends on the android-17 release. (It can easily be made to run on others, but that is what the scripts are setup to build against.) Make sure the tools directory is on one's PATH.

*Apache Ant -- which can be downloaded here: http://ant.apache.org/bindownload.cgi make sure the bin directory is on one's PATH.

If everything is setup correctly, running the build.sh script in this directory, with the current directory set to here, whould build the HelloAndroid apk and install it on a connected Android device.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 65.7%
  • Java 20.0%
  • Makefile 6.0%
  • Shell 5.5%
  • C 2.8%