ref: 11a4a3c065ef4cce3b121ce20884394b207c924c
parent: fd3658b0e4b52b5045b4881900292258ed106f39
parent: 802e1d84cc10a99060a9fa6c770f3ffafa4e0555
author: Johann <[email protected]>
date: Thu May 7 19:32:17 EDT 2015
Merge "Remove only remaining uses of 'fast_unaligned'"
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -789,7 +789,6 @@
case ${toolchain} in
sparc-solaris-*)
add_extralibs -lposix4
- disable_feature fast_unaligned
;;
*-solaris-*)
add_extralibs -lposix4
@@ -813,11 +812,9 @@
die "Disabling neon while keeping neon-asm is not supported"
fi
soft_enable media
- soft_enable fast_unaligned
;;
armv6)
soft_enable media
- soft_enable fast_unaligned
;;
esac
@@ -1033,7 +1030,6 @@
tune_cflags="-mtune="
if enabled dspr2; then
check_add_cflags -mips32r2 -mdspr2
- disable_feature fast_unaligned
fi
if enabled runtime_cpu_detect; then
@@ -1060,8 +1056,6 @@
add_cflags -mmsa
add_asflags -mmsa
add_ldflags -mmsa
-
- disable_feature fast_unaligned
fi
fi
--- a/configure
+++ b/configure
@@ -31,8 +31,6 @@
--size-limit=WxH max size to allow in the decoder
--as={yasm|nasm|auto} use specified assembler [auto, yasm preferred]
--sdk-path=PATH path to root of sdk (android builds only)
- ${toggle_fast_unaligned} don't use unaligned accesses, even when
- supported by hardware [auto]
${toggle_codec_srcs} in/exclude codec library source code
${toggle_debug_libs} in/exclude debug version of libraries
${toggle_static_msvcrt} use static MSVCRT (VS builds only)
@@ -203,7 +201,6 @@
enable_feature static
enable_feature optimizations
enable_feature dependency_tracking
-enable_feature fast_unaligned #allow unaligned accesses, if supported by hw
enable_feature spatial_resampling
enable_feature multithread
enable_feature os_support
@@ -294,7 +291,6 @@
codec_srcs
debug_libs
- fast_unaligned
dequant_tokens
dc_recon
@@ -356,7 +352,6 @@
libc
as
size_limit
- fast_unaligned
codec_srcs
debug_libs
--- a/vp8/common/copy_c.c
+++ b/vp8/common/copy_c.c
@@ -9,6 +9,8 @@
*/
+#include <string.h>
+
#include "vpx_config.h"
#include "vpx/vpx_integer.h"
@@ -21,49 +23,8 @@
for (r = 0; r < height; r++)
{
-#if !(CONFIG_FAST_UNALIGNED)
- dst_ptr[0] = src_ptr[0];
- dst_ptr[1] = src_ptr[1];
- dst_ptr[2] = src_ptr[2];
- dst_ptr[3] = src_ptr[3];
- dst_ptr[4] = src_ptr[4];
- dst_ptr[5] = src_ptr[5];
- dst_ptr[6] = src_ptr[6];
- dst_ptr[7] = src_ptr[7];
- dst_ptr[8] = src_ptr[8];
- dst_ptr[9] = src_ptr[9];
- dst_ptr[10] = src_ptr[10];
- dst_ptr[11] = src_ptr[11];
- dst_ptr[12] = src_ptr[12];
- dst_ptr[13] = src_ptr[13];
- dst_ptr[14] = src_ptr[14];
- dst_ptr[15] = src_ptr[15];
- dst_ptr[16] = src_ptr[16];
- dst_ptr[17] = src_ptr[17];
- dst_ptr[18] = src_ptr[18];
- dst_ptr[19] = src_ptr[19];
- dst_ptr[20] = src_ptr[20];
- dst_ptr[21] = src_ptr[21];
- dst_ptr[22] = src_ptr[22];
- dst_ptr[23] = src_ptr[23];
- dst_ptr[24] = src_ptr[24];
- dst_ptr[25] = src_ptr[25];
- dst_ptr[26] = src_ptr[26];
- dst_ptr[27] = src_ptr[27];
- dst_ptr[28] = src_ptr[28];
- dst_ptr[29] = src_ptr[29];
- dst_ptr[30] = src_ptr[30];
- dst_ptr[31] = src_ptr[31];
-#else
- ((uint32_t *)dst_ptr)[0] = ((uint32_t *)src_ptr)[0] ;
- ((uint32_t *)dst_ptr)[1] = ((uint32_t *)src_ptr)[1] ;
- ((uint32_t *)dst_ptr)[2] = ((uint32_t *)src_ptr)[2] ;
- ((uint32_t *)dst_ptr)[3] = ((uint32_t *)src_ptr)[3] ;
- ((uint32_t *)dst_ptr)[4] = ((uint32_t *)src_ptr)[4] ;
- ((uint32_t *)dst_ptr)[5] = ((uint32_t *)src_ptr)[5] ;
- ((uint32_t *)dst_ptr)[6] = ((uint32_t *)src_ptr)[6] ;
- ((uint32_t *)dst_ptr)[7] = ((uint32_t *)src_ptr)[7] ;
-#endif
+ memcpy(dst_ptr, src_ptr, 32);
+
src_ptr += src_stride;
dst_ptr += dst_stride;
--- a/vp8/common/reconinter.c
+++ b/vp8/common/reconinter.c
@@ -10,6 +10,8 @@
#include <limits.h>
+#include <string.h>
+
#include "vpx_config.h"
#include "vp8_rtcd.h"
#include "vpx/vpx_integer.h"
@@ -30,31 +32,8 @@
for (r = 0; r < 16; r++)
{
-#if !(CONFIG_FAST_UNALIGNED)
- dst[0] = src[0];
- dst[1] = src[1];
- dst[2] = src[2];
- dst[3] = src[3];
- dst[4] = src[4];
- dst[5] = src[5];
- dst[6] = src[6];
- dst[7] = src[7];
- dst[8] = src[8];
- dst[9] = src[9];
- dst[10] = src[10];
- dst[11] = src[11];
- dst[12] = src[12];
- dst[13] = src[13];
- dst[14] = src[14];
- dst[15] = src[15];
+ memcpy(dst, src, 16);
-#else
- ((uint32_t *)dst)[0] = ((uint32_t *)src)[0] ;
- ((uint32_t *)dst)[1] = ((uint32_t *)src)[1] ;
- ((uint32_t *)dst)[2] = ((uint32_t *)src)[2] ;
- ((uint32_t *)dst)[3] = ((uint32_t *)src)[3] ;
-
-#endif
src += src_stride;
dst += dst_stride;
@@ -72,19 +51,8 @@
for (r = 0; r < 8; r++)
{
-#if !(CONFIG_FAST_UNALIGNED)
- dst[0] = src[0];
- dst[1] = src[1];
- dst[2] = src[2];
- dst[3] = src[3];
- dst[4] = src[4];
- dst[5] = src[5];
- dst[6] = src[6];
- dst[7] = src[7];
-#else
- ((uint32_t *)dst)[0] = ((uint32_t *)src)[0] ;
- ((uint32_t *)dst)[1] = ((uint32_t *)src)[1] ;
-#endif
+ memcpy(dst, src, 8);
+
src += src_stride;
dst += dst_stride;
@@ -102,19 +70,8 @@
for (r = 0; r < 4; r++)
{
-#if !(CONFIG_FAST_UNALIGNED)
- dst[0] = src[0];
- dst[1] = src[1];
- dst[2] = src[2];
- dst[3] = src[3];
- dst[4] = src[4];
- dst[5] = src[5];
- dst[6] = src[6];
- dst[7] = src[7];
-#else
- ((uint32_t *)dst)[0] = ((uint32_t *)src)[0] ;
- ((uint32_t *)dst)[1] = ((uint32_t *)src)[1] ;
-#endif
+ memcpy(dst, src, 8);
+
src += src_stride;
dst += dst_stride;