aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-04-06 11:52:06 -0700
committerAndreas Huber <andih@google.com>2011-04-06 13:09:16 -0700
commitf8070e5af95989e60087d53322960db55374c95a (patch)
tree90bb8f0b3c4af6fbd59b95a4b4e2aa4946330c55
parent79f15823c34ae1e423108295e416213200bb280f (diff)
downloadlibvpx-f8070e5af95989e60087d53322960db55374c95a.tar.gz
Enable ARMV6 specific optimization in the vp8 decoder.
Change-Id: I5ad91e040125a342659cac0760572e91954dac40 related-to-bug: 4238198
-rw-r--r--Android.mk40
-rw-r--r--vp8/common/subpixel.h2
-rw-r--r--vpx_config.h20
3 files changed, 44 insertions, 18 deletions
diff --git a/Android.mk b/Android.mk
index 4bc418f2d..e6aba14b8 100644
--- a/Android.mk
+++ b/Android.mk
@@ -61,20 +61,20 @@ LOCAL_CFLAGS := \
LOCAL_MODULE := libvpx
-ifeq ($(ARCH_ARM_HAVE_NEON),true)
+ifeq ($(TARGET_ARCH),arm)
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+intermediates := $(call local-intermediates-dir)
LOCAL_SRC_FILES += \
vp8/common/arm/loopfilter_arm.c \
vp8/decoder/arm/dequantize_arm.c \
-LOCAL_CFLAGS += -D__ARM_HAVE_NEON
+ifeq ($(ARCH_ARM_HAVE_NEON),true)
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-intermediates := $(call local-intermediates-dir)
+LOCAL_CFLAGS += -D__ARM_HAVE_NEON
ASM_FILES = \
- vp8/common/arm/armv6/loopfilter_v6.s \
- vp8/common/arm/armv6/simpleloopfilter_v6.s \
vp8/common/arm/neon/bilinearpredict16x16_neon.s \
vp8/common/arm/neon/bilinearpredict4x4_neon.s \
vp8/common/arm/neon/bilinearpredict8x4_neon.s \
@@ -98,7 +98,6 @@ ASM_FILES = \
vp8/common/arm/neon/sixtappredict8x4_neon.s \
vp8/common/arm/neon/sixtappredict8x8_neon.s \
vp8/common/arm/neon/dc_only_idct_add_neon.s \
- vp8/decoder/arm/armv6/dequantize_v6.s \
vp8/decoder/arm/neon/dequantizeb_neon.s \
vp8/decoder/arm/neon/dequant_idct_neon.s \
vp8/decoder/arm/neon/idct_dequant_0_2x_neon.s \
@@ -108,6 +107,31 @@ ASM_FILES = \
vp8/common/arm/neon/loopfilter_neon.s \
vp8/common/arm/neon/mbloopfilter_neon.s \
+else # other ARMs are assumed to support V6
+
+ASM_FILES = \
+ vp8/common/arm/armv6/bilinearfilter_v6.s \
+ vp8/common/arm/armv6/copymem8x4_v6.s \
+ vp8/common/arm/armv6/copymem8x8_v6.s \
+ vp8/common/arm/armv6/copymem16x16_v6.s \
+ vp8/common/arm/armv6/dc_only_idct_add_v6.s \
+ vp8/common/arm/armv6/filter_v6.s \
+ vp8/common/arm/armv6/iwalsh_v6.s \
+ vp8/common/arm/armv6/loopfilter_v6.s \
+ vp8/common/arm/armv6/recon_v6.s \
+ vp8/common/arm/armv6/simpleloopfilter_v6.s \
+ vp8/common/arm/armv6/sixtappredict8x4_v6.s \
+ vp8/decoder/arm/armv6/dequant_dc_idct_v6.s \
+ vp8/decoder/arm/armv6/dequant_idct_v6.s \
+ vp8/decoder/arm/armv6/dequantize_v6.s \
+
+LOCAL_SRC_FILES += \
+ vp8/common/arm/bilinearfilter_arm.c \
+ vp8/common/arm/filter_arm.c \
+ vp8/decoder/arm/armv6/idct_blk_v6.c \
+
+endif
+
# All the assembly sources must be converted from ADS to GAS compatible format
VPX_GEN := $(addprefix $(intermediates)/, $(ASM_FILES))
$(VPX_GEN) : PRIVATE_PATH := $(LOCAL_PATH)
@@ -117,7 +141,7 @@ $(VPX_GEN) : $(intermediates)/%.s : $(LOCAL_PATH)/%.asm
LOCAL_GENERATED_SOURCES += $(VPX_GEN)
-else
+else # non-ARM
LOCAL_SRC_FILES += vp8/decoder/idct_blk.c
diff --git a/vp8/common/subpixel.h b/vp8/common/subpixel.h
index acdeec3bc..c573d48d1 100644
--- a/vp8/common/subpixel.h
+++ b/vp8/common/subpixel.h
@@ -12,6 +12,8 @@
#ifndef SUBPIXEL_H
#define SUBPIXEL_H
+#include "vpx_config.h"
+
#define prototype_subpixel_predict(sym) \
void sym(unsigned char *src, int src_pitch, int xofst, int yofst, \
unsigned char *dst, int dst_pitch)
diff --git a/vpx_config.h b/vpx_config.h
index f43fc51ae..3ce23362b 100644
--- a/vpx_config.h
+++ b/vpx_config.h
@@ -4,27 +4,27 @@
#define RESTRICT
#if defined(__arm__)
+
#define ARCH_ARM 1
+#define HAVE_ARMV5TE 0
#else
#define ARCH_ARM 0
#endif
-#define ARCH_MIPS 0
-#define ARCH_X86 0
-#define ARCH_X86_64 0
-#define ARCH_PPC32 0
-#define ARCH_PPC64 0
-
#if defined(__ARM_HAVE_NEON)
+#define HAVE_ARMV6 0
#define HAVE_ARMV7 1
-#define HAVE_ARMV5TE 1
-#define HAVE_ARMV6 1
#else
+#define HAVE_ARMV6 1
#define HAVE_ARMV7 0
-#define HAVE_ARMV5TE 0
-#define HAVE_ARMV6 0
#endif
+#define ARCH_MIPS 0
+#define ARCH_X86 0
+#define ARCH_X86_64 0
+#define ARCH_PPC32 0
+#define ARCH_PPC64 0
+
#define HAVE_IWMMXT 0
#define HAVE_IWMMXT2 0
#define HAVE_MIPS32 0