Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions build-libopus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
###########################################################################
# Choose your libopus version and your currently-installed iOS SDK version:
#
VERSION="1.1.2"
SDKVERSION="9.2"
VERSION="1.1.3"
SDKVERSION="9.3"
MINIOSVERSION="8.0"

###########################################################################
Expand Down Expand Up @@ -86,6 +86,11 @@ echo "Using opus-${VERSION}.tar.gz"
tar zxf opus-${VERSION}.tar.gz -C $SRCDIR
cd "${SRCDIR}/opus-${VERSION}"

if [ -e "${REPOROOT}/decode_core.patch-${VERSION}" ]; then
echo "Patching decode_core.patch-${VERSION}"
patch silk/decode_core.c < ${REPOROOT}/decode_core.patch-${VERSION}
fi

set +e # don't bail out of bash script if ccache doesn't exist
CCACHE=`which ccache`
if [ $? == "0" ]; then
Expand Down
10 changes: 10 additions & 0 deletions decode_core.patch-1.1.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- decode_core copy.c 2016-09-05 16:08:12.000000000 +0800
+++ decode_core.c 2016-09-05 16:06:45.000000000 +0800
@@ -172,6 +172,7 @@
if( signalType == TYPE_VOICED ) {
/* Set up pointer */
pred_lag_ptr = &sLTP_Q15[ sLTP_buf_idx - lag + LTP_ORDER / 2 ];
+ #pragma clang loop vectorize(disable) interleave(disable)
for( i = 0; i < psDec->subfr_length; i++ ) {
/* Unrolled loop */
/* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */
25 changes: 25 additions & 0 deletions pack-framework
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

FWNAME=opus

if [ ! -d dependencies ]; then
echo "Please run build-libopus.sh first!"
exit 1
fi

if [ -d $FWNAME.framework ]; then
echo "Removing previous $FWNAME.framework copy"
rm -rf $FWNAME.framework
fi

if [ "$1" == "dynamic" ]; then
LIBTOOL_FLAGS="-dynamic -undefined dynamic_lookup"
else
LIBTOOL_FLAGS="-static"
fi

echo "Creating $FWNAME.framework"
mkdir -p $FWNAME.framework/Headers
libtool -no_warning_for_no_symbols $LIBTOOL_FLAGS -o $FWNAME.framework/$FWNAME dependencies/lib/libopus.a
cp -r dependencies/include/* $FWNAME.framework/Headers/
echo "Created $FWNAME.framework"