From bd0c3409a8910d5d08ead81425cd6a02b229c8a3 Mon Sep 17 00:00:00 2001 From: Fritz Koenig Date: Tue, 20 Sep 2011 10:51:06 -0700 Subject: Move neon only arm functions under arm/neon. These files don't contain generic arm code, so should only be compiled by neon. Change-Id: Ie712823aa04d4235e7cfe7a3b725e73ee4c3e564 --- vp8/encoder/arm/neon/picklpf_arm.c | 50 +++++++++++++++++++++++++++++++++++++ vp8/encoder/arm/picklpf_arm.c | 50 ------------------------------------- vp8/vp8cx_arm.mk | 2 +- vpx_scale/arm/neon/yv12extend_arm.c | 25 +++++++++++++++++++ vpx_scale/arm/yv12extend_arm.c | 25 ------------------- vpx_scale/vpx_scale.mk | 2 +- 6 files changed, 77 insertions(+), 77 deletions(-) create mode 100644 vp8/encoder/arm/neon/picklpf_arm.c delete mode 100644 vp8/encoder/arm/picklpf_arm.c create mode 100644 vpx_scale/arm/neon/yv12extend_arm.c delete mode 100644 vpx_scale/arm/yv12extend_arm.c diff --git a/vp8/encoder/arm/neon/picklpf_arm.c b/vp8/encoder/arm/neon/picklpf_arm.c new file mode 100644 index 000000000..3fb370c3d --- /dev/null +++ b/vp8/encoder/arm/neon/picklpf_arm.c @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +#include "vp8/common/onyxc_int.h" +#include "vp8/encoder/onyx_int.h" +#include "vp8/encoder/quantize.h" +#include "vpx_mem/vpx_mem.h" +#include "vpx_scale/yv12extend.h" +#include "vpx_scale/vpxscale.h" +#include "vp8/common/alloccommon.h" + +extern void vp8_memcpy_neon(unsigned char *dst_ptr, unsigned char *src_ptr, int sz); + + +void +vpxyv12_copy_partial_frame_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc, int Fraction) +{ + unsigned char *src_y, *dst_y; + int yheight; + int ystride; + int border; + int yoffset; + int linestocopy; + + border = src_ybc->border; + yheight = src_ybc->y_height; + ystride = src_ybc->y_stride; + + linestocopy = (yheight >> (Fraction + 4)); + + if (linestocopy < 1) + linestocopy = 1; + + linestocopy <<= 4; + + yoffset = ystride * ((yheight >> 5) * 16 - 8); + src_y = src_ybc->y_buffer + yoffset; + dst_y = dst_ybc->y_buffer + yoffset; + + //vpx_memcpy (dst_y, src_y, ystride * (linestocopy +16)); + vp8_memcpy_neon((unsigned char *)dst_y, (unsigned char *)src_y, (int)(ystride *(linestocopy + 16))); +} diff --git a/vp8/encoder/arm/picklpf_arm.c b/vp8/encoder/arm/picklpf_arm.c deleted file mode 100644 index 3fb370c3d..000000000 --- a/vp8/encoder/arm/picklpf_arm.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2010 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - -#include "vp8/common/onyxc_int.h" -#include "vp8/encoder/onyx_int.h" -#include "vp8/encoder/quantize.h" -#include "vpx_mem/vpx_mem.h" -#include "vpx_scale/yv12extend.h" -#include "vpx_scale/vpxscale.h" -#include "vp8/common/alloccommon.h" - -extern void vp8_memcpy_neon(unsigned char *dst_ptr, unsigned char *src_ptr, int sz); - - -void -vpxyv12_copy_partial_frame_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc, int Fraction) -{ - unsigned char *src_y, *dst_y; - int yheight; - int ystride; - int border; - int yoffset; - int linestocopy; - - border = src_ybc->border; - yheight = src_ybc->y_height; - ystride = src_ybc->y_stride; - - linestocopy = (yheight >> (Fraction + 4)); - - if (linestocopy < 1) - linestocopy = 1; - - linestocopy <<= 4; - - yoffset = ystride * ((yheight >> 5) * 16 - 8); - src_y = src_ybc->y_buffer + yoffset; - dst_y = dst_ybc->y_buffer + yoffset; - - //vpx_memcpy (dst_y, src_y, ystride * (linestocopy +16)); - vp8_memcpy_neon((unsigned char *)dst_y, (unsigned char *)src_y, (int)(ystride *(linestocopy + 16))); -} diff --git a/vp8/vp8cx_arm.mk b/vp8/vp8cx_arm.mk index 99b2688ff..f8f054a76 100644 --- a/vp8/vp8cx_arm.mk +++ b/vp8/vp8cx_arm.mk @@ -18,7 +18,6 @@ VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/arm_csystemdependent.c VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/dct_arm.c VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/dct_arm.h VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/encodemb_arm.h -VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/picklpf_arm.c VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/quantize_arm.c VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/quantize_arm.h VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/variance_arm.c @@ -50,6 +49,7 @@ VP8_CX_SRCS-$(HAVE_ARMV6) += encoder/arm/armv6/walsh_v6$(ASM) #File list for neon # encoder VP8_CX_SRCS-$(HAVE_ARMV7) += encoder/arm/neon/fastquantizeb_neon$(ASM) +VP8_CX_SRCS-$(HAVE_ARMV7) += encoder/arm/neon/picklpf_arm.c VP8_CX_SRCS-$(HAVE_ARMV7) += encoder/arm/neon/sad8_neon$(ASM) VP8_CX_SRCS-$(HAVE_ARMV7) += encoder/arm/neon/sad16_neon$(ASM) VP8_CX_SRCS-$(HAVE_ARMV7) += encoder/arm/neon/shortfdct_neon$(ASM) diff --git a/vpx_scale/arm/neon/yv12extend_arm.c b/vpx_scale/arm/neon/yv12extend_arm.c new file mode 100644 index 000000000..d7a8289a9 --- /dev/null +++ b/vpx_scale/arm/neon/yv12extend_arm.c @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +#include "vpx_scale/yv12config.h" +#include "vpx_mem/vpx_mem.h" +#include "vpx_scale/vpxscale.h" + +void vp8_yv12_copy_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); + +void +vp8_yv12_copy_frame_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc) +{ + vp8_yv12_copy_frame_func_neon(src_ybc, dst_ybc); + //printf("Border:%d; plane_stride:%d; plane_height:%d; plane_width:%d\n",dst_ybc->border,dst_ybc->y_stride,dst_ybc->y_height,dst_ybc->y_width); + + vp8_yv12_extend_frame_borders_ptr(dst_ybc); +} diff --git a/vpx_scale/arm/yv12extend_arm.c b/vpx_scale/arm/yv12extend_arm.c deleted file mode 100644 index d7a8289a9..000000000 --- a/vpx_scale/arm/yv12extend_arm.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - -#include "vpx_scale/yv12config.h" -#include "vpx_mem/vpx_mem.h" -#include "vpx_scale/vpxscale.h" - -void vp8_yv12_copy_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); - -void -vp8_yv12_copy_frame_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc) -{ - vp8_yv12_copy_frame_func_neon(src_ybc, dst_ybc); - //printf("Border:%d; plane_stride:%d; plane_height:%d; plane_width:%d\n",dst_ybc->border,dst_ybc->y_stride,dst_ybc->y_height,dst_ybc->y_width); - - vp8_yv12_extend_frame_borders_ptr(dst_ybc); -} diff --git a/vpx_scale/vpx_scale.mk b/vpx_scale/vpx_scale.mk index edb5419c3..9680ded3c 100644 --- a/vpx_scale/vpx_scale.mk +++ b/vpx_scale/vpx_scale.mk @@ -11,7 +11,6 @@ SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += generic/gen_scalers.c #arm SCALE_SRCS-$(HAVE_ARMV7) += arm/scalesystemdependent.c -SCALE_SRCS-$(HAVE_ARMV7) += arm/yv12extend_arm.c SCALE_SRCS_REMOVE-$(HAVE_ARMV7) += generic/scalesystemdependent.c #neon @@ -19,5 +18,6 @@ SCALE_SRCS-$(HAVE_ARMV7) += arm/neon/vp8_vpxyv12_copyframe_func_neon$(ASM) SCALE_SRCS-$(HAVE_ARMV7) += arm/neon/vp8_vpxyv12_copyframeyonly_neon$(ASM) SCALE_SRCS-$(HAVE_ARMV7) += arm/neon/vp8_vpxyv12_copysrcframe_func_neon$(ASM) SCALE_SRCS-$(HAVE_ARMV7) += arm/neon/vp8_vpxyv12_extendframeborders_neon$(ASM) +SCALE_SRCS-$(HAVE_ARMV7) += arm/neon/yv12extend_arm.c SCALE_SRCS-no += $(SCALE_SRCS_REMOVE-yes) -- cgit v1.2.3