Giter Site home page Giter Site logo

cmusatyalab / diamond-android Goto Github PK

View Code? Open in Web Editor NEW
57.0 57.0 8.0 19.48 MB

Android library for running Diamond filters

Home Page: http://diamond.cs.cmu.edu/

License: Eclipse Public License 1.0

Java 20.55% Shell 2.65% Makefile 1.69% C 74.79% HTML 0.33%

diamond-android's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

diamond-android's Issues

Small Project Idea: ARM package manager

Hi @bgilbert @theonewolf and @wenluhu - just brainstorming here.
I've been compiling a lot of utility libraries for ARM in addition
to the ones in here, such as tune2fs, mknod, and gammaray.
Mostly, I can build them fine with the snippet below,
but other times a small diff of the original source is required,
or I need to link other static ARM libraries.
I've been thinking that a simple ARM package manager to
build executables and static libraries from the original source
would be helpful to run non-standard C programs on Android.
The benefit of centralizing this is that people wouldn't have to
manually build or chain together dependencies as I've done in https://github.com/cmusatyalab/diamond-android/blob/master/diamond-android-library/jni/build.sh.

Is this a sane idea?
Do you all have any thoughts on this?

if [[ ! -d toolchain ]]; then
  # Using NDK r10b.
  $ANDROID_NDK/build/tools/make-standalone-toolchain.sh \
    --platform=android-18 \
    --toolchain=arm-linux-androideabi-4.8 \
    --install-dir=$PWD/toolchain
fi

# Add the standalone toolchain to the path.
pathadd() { PATH="${PATH:+"$PATH:"}$1"; }
pathadd "$PWD/toolchain/bin"
command -v arm-linux-androideabi-gcc &> /dev/null || exit -1
export SYSROOT=$PWD/toolchain/sysroot
export CC="arm-linux-androideabi-gcc --sysroot=$SYSROOT"
export CXX=arm-linux-androideabi-g++
export LD=arm-linux-androideabi-ld
export RANLIB=arm-linux-androideabi-ranlib
export AR=arm-linux-androideabi-ar
export CROSS_PREFIX=arm-linux-androideabi-
export CFLAGS='-march=armv7-a -mfloat-abi=softfp -mfpu=neon'
export LDFLAGS='-Wl,--fix-cortex-a8'

./configure --enable-static --host=arm-linux || die "Configure failed."
make -j8 bin/gray-crawler || die "Make failed."

Replace in-situ library modifications

Options:

  • git submodules + diff's
  • shell script to clone/download repos + diff's

I'm currently leaning towards the 2nd since not every
dependency might not be versioned with git.

JNI dependency handling appears incorrect

build.sh should be doing a depth-first traversal of the dependency tree, but instead it seems to build the JNI libraries in a random order. Libraries are built before their dependencies are even unpacked; how does this even work? Are you sure you're not building with headers from the host?

OpenCV/C++ perceptual hashing filter.

Since OpenCV is integrated into the diamond-android build,
a perceptual hash OpenCV implementation can easily
be created by using ls64/cvhash as
a reference for OpenCV API calls.

This might also be useful upstream?

Add license blocks to memstream code

The memstream library website says the library is under the MIT license, but this is not apparent in the code itself. Add a header block

  • indicating that the upstream website states that the code is under the MIT license,
  • linking to the site, and
  • quoting the text of the MIT license.

Implement `createTempDirectory`

From 5b6b978#commitcomment-7951862:

That's mostly harmless in this case, since the cache dir is per-application, but racy in general. Sadly, Android doesn't yet seem to have added createTempDirectory from JDK 7. If it were me, I'd probably implement createTempDirectory myself by looping over random suffixes and trying mkdir, rather than leaving a race lurking in the code, but I could see it either way.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.