# set complile flags for ARM.
if(ANDROID_PLATFORM)
- set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -march=armv7-a -mfloat-abi=softfp -mfpu=vfp3 --sysroot=${NDK_SYSROOT_PATH}")
- set(CMAKE_ASM_FLAGS "-mthumb-interwork -march=armv7-a -mfloat-abi=softfp -mfpu=neon --sysroot=${NDK_SYSROOT_PATH}")
+ set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfp3 --sysroot=${NDK_SYSROOT_PATH}")
+ set(CMAKE_ASM_FLAGS "-mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon --sysroot=${NDK_SYSROOT_PATH}")
message("loaded toolchain:
${ANDROID_TOOLCHAIN_PATH}/arm-linux-androideabi-gcc
${ANDROID_TOOLCHAIN_PATH}/arm-linux-androideabi-g++
add_subdirectory(android/NE10Demo/jni)
endif()
elseif(GNULINUX_PLATFORM)
- set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -march=armv7-a -mfloat-abi=softfp -mfpu=vfp3")
- set(CMAKE_ASM_FLAGS "-mthumb-interwork -march=armv7-a -mfloat-abi=softfp -mfpu=neon")
+ set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfp3")
+ set(CMAKE_ASM_FLAGS "-mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon")
elseif(IOS_PLATFORM)
set(CMAKE_C_FLAGS "-O2 -arch armv7 -arch armv7s -mfpu=vfp3")
set(CMAKE_ASM_FLAGS "-arch armv7 -arch armv7s -mfpu=neon")
cmake -DCMAKE_TOOLCHAIN_FILE=/path/of/ios_config.cmake ..
make
+Note for cmake step: if cmake warns: ignoring CMAKE_OSX_SYSROOT value and that directory does not exist, you should check your SDKs directory. And if necessary, you can specify this path in ios_config.cmake. That is changing the variable CMAKE_IOS_SDK_PATH to your configuration.
+
=Ne10 demo=
-There are 2 demos include Ne10, one for Android and one for iOS. Both demos need Ne10 library and it's native side interface library installed, to do that, after build NE10, you should run "make install" in the same directory. And please also note that your devices should be have access to internet to run the demo.
+There are 2 demos include Ne10, one for Android and one for iOS. Both demos need Ne10 library and it's native side interface library installed, to do that, after build NE10, you should run "make install" in the same directory. And after that, you can import or open the project file in android SDK or Xcode as usually. And please also note that your devices should be have access to internet to run the demo.
---------------------------UNIT TEST------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12E55" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="2">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="2">
<dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
+ <deployment defaultVersion="1280" identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3746"/>
</dependencies>
<scenes>
<!--Demo View Controller-->
<objects>
<viewController id="2" customClass="NE10DemoViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="5">
- <rect key="frame" x="0.0" y="20" width="768" height="1004"/>
+ <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<webView contentMode="scaleToFill" id="KzR-EE-qov">
- <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
+ <rect key="frame" x="0.0" y="0.0" width="768" height="1044"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</webView>
<point key="canvasLocation" x="-106" y="-86"/>
</scene>
</scenes>
- <classes>
- <class className="NE10DemoViewController" superclassName="UIViewController">
- <source key="sourceIdentifier" type="project" relativePath="./Classes/NE10DemoViewController.h"/>
- <relationships>
- <relationship kind="outlet" name="webView" candidateClass="UIWebView"/>
- </relationships>
- </class>
- </classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
- <simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackTranslucent"/>
+ <simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12D78" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="2">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" variant="6xAndEarlier" propertyAccessControl="none" initialViewController="2">
<dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
+ <deployment defaultVersion="1280" identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3746"/>
</dependencies>
<scenes>
<!--Demo View Controller-->
<rect key="frame" x="0.0" y="20" width="320" height="548"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
- <webView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qUs-nb-YAh">
+ <webView contentMode="scaleToFill" id="qUs-nb-YAh">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="548"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</webView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstItem="qUs-nb-YAh" firstAttribute="trailing" secondItem="3" secondAttribute="trailing" type="default" id="iHj-pK-emu"/>
- <constraint firstItem="qUs-nb-YAh" firstAttribute="top" secondItem="3" secondAttribute="top" type="default" id="nMZ-Zf-lXK"/>
- <constraint firstItem="qUs-nb-YAh" firstAttribute="leading" secondItem="3" secondAttribute="leading" type="default" id="nia-lS-JNc"/>
- <constraint firstItem="qUs-nb-YAh" firstAttribute="bottom" secondItem="3" secondAttribute="bottom" type="default" id="w9w-eY-hQ9"/>
- </constraints>
</view>
<connections>
<outlet property="webView" destination="qUs-nb-YAh" id="Xdj-Lj-KvM"/>
</objects>
</scene>
</scenes>
- <classes>
- <class className="NE10DemoViewController" superclassName="UIViewController">
- <source key="sourceIdentifier" type="project" relativePath="./Classes/NE10DemoViewController.h"/>
- <relationships>
- <relationship kind="outlet" name="webView" candidateClass="UIWebView"/>
- </relationships>
- </class>
- <class className="NSLayoutConstraint" superclassName="NSObject">
- <source key="sourceIdentifier" type="project" relativePath="./Classes/NSLayoutConstraint.h"/>
- </class>
- </classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
set(CMAKE_ASM_COMPILER TRUE)
set(CMAKE_IOS_SDK_PATH
- "$ENV{IOS_DEVELOPER_PATH}/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/")
+ "$ENV{IOS_DEVELOPER_PATH}/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/")
set(CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_PATH})
set(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_SDK_PATH})
ne10_int32_t dwidth,
ne10_int32_t cn,
ne10_int32_t xmin,
- ne10_int32_t xmax);
-extern void ne10_img_vresize_linear_neon (const ne10_int32_t** src, ne10_uint8_t* dst, const ne10_int16_t* beta, ne10_int32_t width);
+ ne10_int32_t xmax)
+ asm("ne10_img_hresize_4channels_linear_neon");
+extern void ne10_img_vresize_linear_neon (const ne10_int32_t** src, ne10_uint8_t* dst, const ne10_int16_t* beta, ne10_int32_t width) asm("ne10_img_vresize_linear_neon");
static void ne10_img_resize_generic_linear_neon (ne10_uint8_t* src,
ne10_uint8_t* dst,
}
-extern void ne10_img_rotate_get_quad_rangle_subpix_rgba_neon (ne10_uint8_t *dst,
+extern void ne10_img_rotate_get_quad_rangle_subpix_rgba_neon (ne10_uint8_t *dst,
ne10_uint8_t *src,
ne10_int32_t srcw,
ne10_int32_t srch,
ne10_int32_t dstw,
ne10_int32_t dsth,
- ne10_float32_t *matrix);
+ ne10_float32_t *matrix)
+ asm("ne10_img_rotate_get_quad_rangle_subpix_rgba_neon");
/**
* @brief image rotate of 8-bit data.
return (PSNR);
}
-char ne10_log_buffer[1000];
+char ne10_log_buffer[5000];
char *ne10_log_buffer_ptr;
void ne10_log(const char *func_name,