mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
Fix VP8 for armv7s
This commit is contained in:
parent
5fef8b5df2
commit
32c633628f
2 changed files with 69 additions and 25 deletions
|
|
@ -30,20 +30,20 @@ all_p+=armv7s-darwin-gcc #neon Cortex-A8
|
|||
|
||||
ifeq ($(force_non_binary_libvpx),1)
|
||||
take_binary=
|
||||
libvpx_configure_options+= --extra-cflags="-fno-strict-aliasing"
|
||||
endif
|
||||
|
||||
# $(BUILDER_SRC_DIR)/$(libvpx_dir)/patched.stamp:
|
||||
# cd $(BUILDER_SRC_DIR)/$(libvpx_dir) \
|
||||
# && git apply $(BUILDER_SRC_DIR)/build/builders.d/libvpx.patch \
|
||||
# && touch $@
|
||||
$(BUILDER_SRC_DIR)/$(libvpx_dir)/patched.stamp:
|
||||
cd $(BUILDER_SRC_DIR)/$(libvpx_dir) \
|
||||
&& git apply $(BUILDER_SRC_DIR)/build/builders.d/libvpx.patch \
|
||||
&& touch $@
|
||||
|
||||
|
||||
#$(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk: $(BUILDER_SRC_DIR)/$(libvpx_dir)/patched.stamp
|
||||
$(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk:
|
||||
$(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk: $(BUILDER_SRC_DIR)/$(libvpx_dir)/patched.stamp
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(libvpx_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(libvpx_dir)/ \
|
||||
&& host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& export all_platforms="${all_p}" && $(BUILDER_SRC_DIR)/$(libvpx_dir)/configure --prefix=$(prefix) --sdk-path=$$SDK_BIN_PATH/../../ --libc=$$SYSROOT_PATH $(libvpx_configure_options) --extra-cflags="-fno-strict-aliasing"
|
||||
&& export all_platforms="${all_p}" && $(BUILDER_SRC_DIR)/$(libvpx_dir)/configure --prefix=$(prefix) --sdk-path=$$SDK_BIN_PATH/../../ --libc=$$SYSROOT_PATH $(libvpx_configure_options)
|
||||
|
||||
build-libvpx: $(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk
|
||||
cd $(BUILDER_BUILD_DIR)/$(libvpx_dir) \
|
||||
|
|
@ -53,7 +53,7 @@ ifeq ($(force_non_binary_libvpx),1)
|
|||
@echo "\033[01;32m DON'T get BINARY version of libvpx for $(take_binary), because 'force_non_binary_libvpx' is 1 \033[0m"
|
||||
endif
|
||||
ifneq (,$(take_binary))
|
||||
# we have to take binary version of libvpx for ARM because Clang introduces bugs in optimized assembly
|
||||
# sometimes when clang gets updated we have to take binary version of libvpx for ARM because the compiler introduces bugs in optimized assembly
|
||||
@echo "\033[01;32m Getting BINARY version of libvpx for $(take_binary) \033[0m"
|
||||
cp $(BUILDER_SRC_DIR)/binaries/libvpx-$(take_binary).a $(prefix)/lib/libvpx.a
|
||||
endif
|
||||
|
|
@ -64,7 +64,7 @@ clean-libvpx:
|
|||
veryclean-libvpx:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(libvpx_dir) && make distclean
|
||||
cd $(BUILDER_SRC_DIR)/$(libvpx_dir) \
|
||||
&& git clean -f && git reset --hard
|
||||
&& git clean -f && git reset --hard && rm patched.stamp
|
||||
rm -rf $(BUILDER_BUILD_DIR)/$(libvpx_dir)
|
||||
|
||||
clean-makefile-libvpx:
|
||||
|
|
|
|||
|
|
@ -1,17 +1,61 @@
|
|||
diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
|
||||
index 16da78a..fd9ca61 100644
|
||||
--- a/vp8/decoder/decodframe.c
|
||||
+++ b/vp8/decoder/decodframe.c
|
||||
@@ -248,7 +248,11 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
||||
diff --git a/build/make/configure.sh b/build/make/configure.sh
|
||||
index a65d395..579e0d6 100755
|
||||
--- a/build/make/configure.sh
|
||||
+++ b/build/make/configure.sh
|
||||
@@ -172,6 +172,7 @@ add_cflags() {
|
||||
|
||||
vp8_short_inv_walsh4x4(&b->dqcoeff[0],
|
||||
xd->qcoeff);
|
||||
- vpx_memset(b->qcoeff, 0, 16 * sizeof(b->qcoeff[0]));
|
||||
+ // TODO(johannkoenig): figure out why bzero below
|
||||
+ // works great on iOS Release but memset or
|
||||
+ // vpx_memset create terrible corruption on decode
|
||||
+ // (https://code.google.com/p/webm/issues/detail?id=603).
|
||||
+ bzero(b->qcoeff, 16 * sizeof(b->qcoeff[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
add_cflags_only() {
|
||||
+ log_echo "Adding $@ to CFLAGS"
|
||||
CFLAGS="${CFLAGS} $@"
|
||||
}
|
||||
|
||||
@@ -792,7 +793,7 @@ process_common_toolchain() {
|
||||
arm*)
|
||||
# on arm, isa versions are supersets
|
||||
case ${tgt_isa} in
|
||||
- armv7)
|
||||
+ armv7*)
|
||||
soft_enable neon
|
||||
soft_enable media
|
||||
soft_enable edsp
|
||||
@@ -820,7 +821,9 @@ process_common_toolchain() {
|
||||
arch_int=${arch_int%%te}
|
||||
check_add_asflags --defsym ARCHITECTURE=${arch_int}
|
||||
tune_cflags="-mtune="
|
||||
- if [ ${tgt_isa} = "armv7" ]; then
|
||||
+
|
||||
+ case ${tgt_isa} in
|
||||
+ armv7*)
|
||||
if [ -z "${float_abi}" ]; then
|
||||
check_cpp <<EOF && float_abi=hard || float_abi=softfp
|
||||
#ifndef __ARM_PCS_VFP
|
||||
@@ -840,10 +843,12 @@ EOF
|
||||
if [ -z "${tune_cpu}" ]; then
|
||||
tune_cpu=cortex-a8
|
||||
fi
|
||||
- else
|
||||
+ ;;
|
||||
+ *)
|
||||
check_add_cflags -march=${tgt_isa}
|
||||
check_add_asflags -march=${tgt_isa}
|
||||
- fi
|
||||
+ ;;
|
||||
+ esac
|
||||
|
||||
enabled debug && add_asflags -g
|
||||
asm_conversion_cmd="${source_path}/build/make/ads2gas.pl"
|
||||
diff --git a/build/make/rtcd.pl b/build/make/rtcd.pl
|
||||
index 18ee80d..a3dc890 100755
|
||||
--- a/build/make/rtcd.pl
|
||||
+++ b/build/make/rtcd.pl
|
||||
@@ -383,6 +383,9 @@ if ($opts{arch} eq 'x86') {
|
||||
} elsif ($opts{arch} eq 'armv7') {
|
||||
@ALL_ARCHS = filter(qw/edsp media neon/);
|
||||
arm;
|
||||
+} elsif ($opts{arch} eq 'armv7s') {
|
||||
+ @ALL_ARCHS = filter(qw/edsp media neon/);
|
||||
+ arm;
|
||||
} else {
|
||||
unoptimized;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue