Giter Club home page Giter Club logo

silk-arm-ios's Introduction

Warning: This is old code

SILK has been superseded by Opus. Please see Skype's blog post.

SILK codec for ARM/iOS

This is a modified version of the SILK 1.0.8 codec with optimized ARM/NEON assembly. Compiling and running SILK turned out to be quite a hassle, so I decided to distribute the results of my work here. Note that this is really just a quick&dirty thing, I will not be able to provide any kind of support or help about this.

64 bit ARM compatibilty

This code does not compile as 64 bit ARM, at least not the optimized assembly version. I haven't investigated why, but I believe it's simply because there is no 64 bit ARM assembly implementation. There will probably never be one either; SILK has been superseded by Opus. Please see Skype's blog post..

Patent notice

For more information regarding patents, see Skype's SILK website

How to use

The easiest way to use this code is to simply add all source files to the Xcode project. It should compile and run happily. It is also possible to create a static library file using the Makefile, but that's more of a hassle, and will probably not work out of the box.

What I did to get it to compile and run

Here are a couple of the things I found out in the process of trying to compile SILK:

http://gcc.gnu.org/ml/gcc-patches/2005-08/msg00565.html For complaints about a missing __aeabi_idiv, it can be replaced with __divsi3. __aeabi_idiv comes from libgcc, and can't be used when using Clang.

For complaints about that arguments ought to be registries, that's a macro issue. Manually expanding those macros solves those errors.

The Makefile has to be edited rather heavily to work. The main things that have to be done are to replace $CC, $CXX, $AR and $RANLIB to be like this:

CC     = `xcrun -sdk ${IPHONE_SDK} -find clang`
[etc]

where

IPHONE_SDK = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk

I also added this:

CFLAGS += -arch armv7 -mthumb -isysroot ${IPHONE_SDK}
LDFLAGS += -arch armv7 -mthumb -isysroot ${IPHONE_SDK}
USE_NEON=yes

In addition to that, I had to short-circuit the if clause that looks like this:

ifneq (,$(TOOLCHAIN_PREFIX))

Otherwise the assembly files wouldn't get compiled.

There were also 4 byte align warnings from ld about the assembly-defined functions. At first, I ignored them, but then I got illegal instruction errors. These were fixed by adding a ".align 2" line before the ".globl" line.

silk-arm-ios's People

Contributors

per-gron avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

silk-arm-ios's Issues

compiling assembly files with clang ia

You seem to have opted to use the C files instead of the arm-specific assemblies, probably because of clang instruction errors.
To deal with those, try this: remove the "ARG*_in" arguments to macros in the h files, and then change instruction names for clang to understand them:

ldm[lt|gt|..]ia->ldmia[lt|gt|..]
str[lt|gt|..]h -> strh[lt|gt|..]
ldr[lt|gt|ne|..]sh -> ldrsh[lt|gt|ne|..]
ldr[lt|gt|ne|..]h -> ldrh[lt|gt|ne|..]

as you can see, gcc likes the conditionals right after the instruction, while clang likes its conditionals at the end.

With this done (sed easily does all of this), the codec compiles nicely without any problems.
Let know if you succeed, can fork with fixed code if needed.

Compilation for ARM64

Hello,
When I try to compile for ARM64 (iPhone5s), I get the following error :
xcrun -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -find clang -c -g -arch arm64 -mthumb -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -mcpu=arm64 -mtune=arm64 -march=arm64 -mcpu=cortex-a8 -mfloat-abi=softfp -mfpu=neon -Wall -enable-threads -O3 -Iinterface -Isrc -Itest -o src/SKP_Silk_A2NLSF.o src/SKP_Silk_A2NLSF.c
clang: warning: argument unused during compilation: '-mthumb'
clang: warning: argument unused during compilation: '-march=arm64'
clang: warning: argument unused during compilation: '-mfloat-abi=softfp'
clang: warning: argument unused during compilation: '-mfpu=neon'
clang: warning: argument unused during compilation: '-e nable-threads'
error: unknown target CPU 'cortex-a8'

Build File

Hi All,

I can not build armv-6 with current version , how to fix, please ?

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.