<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Please ignore this patch. need little modifications.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 9, 2016 at 12:12 PM, <span dir="ltr"><<a href="mailto:dnyaneshwar@multicorewareinc.com" target="_blank">dnyaneshwar@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Dnyaneshwar G <<a href="mailto:dnyaneshwar@multicorewareinc.com">dnyaneshwar@multicorewareinc.com</a>><br>
# Date 1452321658 -19800<br>
# Sat Jan 09 12:10:58 2016 +0530<br>
# Node ID cd9318b1671bb24212321fcd005381e50642af4c<br>
# Parent d94f6c2b45f87f5b4b10b4fa70f8a9bd03d3d1c2<br>
testbench: setup testbench for ARM assembly<br>
<br>
X86 intrinsics has been commented from the ARM testbench.<br>
This ARM testbench is for Linux and ARMv6 arch and above<br>
<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/CMakeLists.txt<br>
--- a/source/CMakeLists.txt Sat Jan 09 11:32:33 2016 +0530<br>
+++ b/source/CMakeLists.txt Sat Jan 09 12:10:58 2016 +0530<br>
@@ -275,7 +275,9 @@<br>
endif(GCC)<br>
<br>
find_package(Yasm)<br>
-if(YASM_FOUND AND X86)<br>
+if(ARM OR CROSS_COMPILE_ARM)<br>
+ option(ENABLE_ASSEMBLY "Enable use of assembly coded primitives" OFF)<br>
+elseif(YASM_FOUND AND X86)<br>
if (YASM_VERSION_STRING VERSION_LESS "1.2.0")<br>
message(STATUS "Yasm version ${YASM_VERSION_STRING} is too old. 1.2.0 or later required")<br>
option(ENABLE_ASSEMBLY "Enable use of assembly coded primitives" OFF)<br>
@@ -423,15 +425,22 @@<br>
else()<br>
set(SUFFIX o)<br>
endif()<br>
- foreach(ASM ${MSVC_ASMS})<br>
- set(YASM_SRC ${CMAKE_CURRENT_SOURCE_DIR}/common/x86/${ASM})<br>
- list(APPEND YASM_SRCS ${YASM_SRC})<br>
- list(APPEND YASM_OBJS ${ASM}.${SUFFIX})<br>
- add_custom_command(<br>
- OUTPUT ${ASM}.${SUFFIX}<br>
- COMMAND ${YASM_EXECUTABLE} ARGS ${YASM_FLAGS} ${YASM_SRC} -o ${ASM}.${SUFFIX}<br>
- DEPENDS ${YASM_SRC})<br>
- endforeach()<br>
+<br>
+ if(ARM OR CROSS_COMPILE_ARM)<br>
+ # compile ARM arch asm files here<br>
+<br>
+ elseif(X86)<br>
+ # compile X86 arch asm files here<br>
+ foreach(ASM ${MSVC_ASMS})<br>
+ set(YASM_SRC ${CMAKE_CURRENT_SOURCE_DIR}/common/x86/${ASM})<br>
+ list(APPEND YASM_SRCS ${YASM_SRC})<br>
+ list(APPEND YASM_OBJS ${ASM}.${SUFFIX})<br>
+ add_custom_command(<br>
+ OUTPUT ${ASM}.${SUFFIX}<br>
+ COMMAND ${YASM_EXECUTABLE} ARGS ${YASM_FLAGS} ${YASM_SRC} -o ${ASM}.${SUFFIX}<br>
+ DEPENDS ${YASM_SRC})<br>
+ endforeach()<br>
+ endif()<br>
endif()<br>
<br>
source_group(ASM FILES ${YASM_SRCS})<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/common/CMakeLists.txt<br>
--- a/source/common/CMakeLists.txt Sat Jan 09 11:32:33 2016 +0530<br>
+++ b/source/common/CMakeLists.txt Sat Jan 09 12:10:58 2016 +0530<br>
@@ -16,12 +16,14 @@<br>
if(ENABLE_ASSEMBLY)<br>
set_source_files_properties(threading.cpp primitives.cpp PROPERTIES COMPILE_FLAGS -DENABLE_ASSEMBLY=1)<br>
list(APPEND VFLAGS "-DENABLE_ASSEMBLY=1")<br>
+endif(ENABLE_ASSEMBLY)<br>
<br>
+if(ENABLE_ASSEMBLY AND X86)<br>
set(SSE3 vec/dct-sse3.cpp)<br>
set(SSSE3 vec/dct-ssse3.cpp)<br>
set(SSE41 vec/dct-sse41.cpp)<br>
<br>
- if(MSVC AND X86)<br>
+ if(MSVC)<br>
set(PRIMITIVES ${SSE3} ${SSSE3} ${SSE41})<br>
set(WARNDISABLE "/wd4100") # unreferenced formal parameter<br>
if(INTEL_CXX)<br>
@@ -38,7 +40,7 @@<br>
set_source_files_properties(${SSE3} ${SSSE3} ${SSE41} PROPERTIES COMPILE_FLAGS "${WARNDISABLE} /arch:SSE2")<br>
endif()<br>
endif()<br>
- if(GCC AND X86)<br>
+ if(GCC)<br>
if(CLANG)<br>
# llvm intrinsic headers cause shadow warnings<br>
set(WARNDISABLE "-Wno-shadow -Wno-unused-parameter")<br>
@@ -81,7 +83,20 @@<br>
set(ASM_PRIMITIVES ${ASM_PRIMITIVES} x86/${SRC})<br>
endforeach()<br>
source_group(Assembly FILES ${ASM_PRIMITIVES})<br>
-endif(ENABLE_ASSEMBLY)<br>
+endif(ENABLE_ASSEMBLY AND X86)<br>
+<br>
+if(ENABLE_ASSEMBLY AND (ARM OR CROSS_COMPILE_ARM))<br>
+ set(C_SRCS asm-primitives.cpp pixel.h mc.h ipfilter8.h blockcopy8.h dct8.h loopfilter.h)<br>
+<br>
+ # add ARM assembly/intrinsic files here<br>
+ set(A_SRCS)<br>
+ set(VEC_PRIMITIVES)<br>
+<br>
+ foreach(SRC ${C_SRCS})<br>
+ set(ASM_PRIMITIVES ${ASM_PRIMITIVES} arm/${SRC})<br>
+ endforeach()<br>
+ source_group(Assembly FILES ${ASM_PRIMITIVES})<br>
+endif(ENABLE_ASSEMBLY AND (ARM OR CROSS_COMPILE_ARM))<br>
<br>
# set_target_properties can't do list expansion<br>
string(REPLACE ";" " " VERSION_FLAGS "${VFLAGS}")<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/common/arm/asm-primitives.cpp<br>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000<br>
+++ b/source/common/arm/asm-primitives.cpp Sat Jan 09 12:10:58 2016 +0530<br>
@@ -0,0 +1,40 @@<br>
+/*****************************************************************************<br>
+ * Copyright (C) 2016 x265 project<br>
+ *<br>
+ * Authors: Steve Borho <<a href="mailto:steve@borho.org">steve@borho.org</a>><br>
+ * Praveen Kumar Tiwari <<a href="mailto:praveen@multicorewareinc.com">praveen@multicorewareinc.com</a>><br>
+ * Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>> <<a href="mailto:min.chen@multicorewareinc.com">min.chen@multicorewareinc.com</a>><br>
+ * Dnyaneshwar Gorade <<a href="mailto:dnyaneshwar@multicorewareinc.com">dnyaneshwar@multicorewareinc.com</a>><br>
+ *<br>
+ * This program is free software; you can redistribute it and/or modify<br>
+ * it under the terms of the GNU General Public License as published by<br>
+ * the Free Software Foundation; either version 2 of the License, or<br>
+ * (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.<br>
+ *<br>
+ * This program is also available under a commercial proprietary license.<br>
+ * For more information, contact us at license @ <a href="http://x265.com" rel="noreferrer" target="_blank">x265.com</a>.<br>
+ *****************************************************************************/<br>
+<br>
+#include "common.h"<br>
+#include "primitives.h"<br>
+#include "x265.h"<br>
+#include "cpu.h"<br>
+<br>
+<br>
+namespace X265_NS {<br>
+// private x265 namespace<br>
+<br>
+void setupAssemblyPrimitives(EncoderPrimitives &p, int cpuMask)<br>
+{<br>
+<br>
+}<br>
+} // namespace X265_NS<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/common/arm/blockcopy8.h<br>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000<br>
+++ b/source/common/arm/blockcopy8.h Sat Jan 09 12:10:58 2016 +0530<br>
@@ -0,0 +1,29 @@<br>
+/*****************************************************************************<br>
+ * Copyright (C) 2016 x265 project<br>
+ *<br>
+ * Authors: Steve Borho <<a href="mailto:steve@borho.org">steve@borho.org</a>><br>
+ * Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>><br>
+ * Dnyaneshwar Gorade <<a href="mailto:dnyaneshwar@multicorewareinc.com">dnyaneshwar@multicorewareinc.com</a>><br>
+ *<br>
+ * This program is free software; you can redistribute it and/or modify<br>
+ * it under the terms of the GNU General Public License as published by<br>
+ * the Free Software Foundation; either version 2 of the License, or<br>
+ * (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.<br>
+ *<br>
+ * This program is also available under a commercial proprietary license.<br>
+ * For more information, contact us at license @ <a href="http://x265.com" rel="noreferrer" target="_blank">x265.com</a>.<br>
+ *****************************************************************************/<br>
+<br>
+#ifndef X265_BLOCKCOPY8_H<br>
+#define X265_BLOCKCOPY8_H<br>
+<br>
+#endif // ifndef X265_I386_PIXEL_H<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/common/arm/dct8.h<br>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000<br>
+++ b/source/common/arm/dct8.h Sat Jan 09 12:10:58 2016 +0530<br>
@@ -0,0 +1,28 @@<br>
+/*****************************************************************************<br>
+ * Copyright (C) 2016 x265 project<br>
+ *<br>
+ * Authors: Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>><br>
+ * Dnyaneshwar Gorade <<a href="mailto:dnyaneshwar@multicorewareinc.com">dnyaneshwar@multicorewareinc.com</a>><br>
+ *<br>
+ * This program is free software; you can redistribute it and/or modify<br>
+ * it under the terms of the GNU General Public License as published by<br>
+ * the Free Software Foundation; either version 2 of the License, or<br>
+ * (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.<br>
+ *<br>
+ * This program is also available under a commercial proprietary license.<br>
+ * For more information, contact us at license @ <a href="http://x265.com" rel="noreferrer" target="_blank">x265.com</a>.<br>
+ *****************************************************************************/<br>
+<br>
+#ifndef X265_DCT8_H<br>
+#define X265_DCT8_H<br>
+<br>
+#endif // ifndef X265_DCT8_H<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/common/arm/intrapred.h<br>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000<br>
+++ b/source/common/arm/intrapred.h Sat Jan 09 12:10:58 2016 +0530<br>
@@ -0,0 +1,31 @@<br>
+/*****************************************************************************<br>
+ * intrapred.h: Intra Prediction metrics<br>
+ *****************************************************************************<br>
+ * Copyright (C) 2003-2013 x264 project<br>
+ *<br>
+ * Authors: Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>> <<a href="mailto:min.chen@multicorewareinc.com">min.chen@multicorewareinc.com</a>><br>
+ * Praveen Kumar Tiwari <<a href="mailto:praveen@multicorewareinc.com">praveen@multicorewareinc.com</a>><br>
+ * Dnyaneshwar Gorade <<a href="mailto:dnyaneshwar@multicorewareinc.com">dnyaneshwar@multicorewareinc.com</a>><br>
+ *<br>
+ * This program is free software; you can redistribute it and/or modify<br>
+ * it under the terms of the GNU General Public License as published by<br>
+ * the Free Software Foundation; either version 2 of the License, or<br>
+ * (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.<br>
+ *<br>
+ * This program is also available under a commercial proprietary license.<br>
+ * For more information, contact us at license @ <a href="http://x265.com" rel="noreferrer" target="_blank">x265.com</a>.<br>
+ *****************************************************************************/<br>
+<br>
+#ifndef X265_INTRAPRED_H<br>
+#define X265_INTRAPRED_H<br>
+<br>
+#endif // ifndef X265_INTRAPRED_H<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/common/arm/ipfilter8.h<br>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000<br>
+++ b/source/common/arm/ipfilter8.h Sat Jan 09 12:10:58 2016 +0530<br>
@@ -0,0 +1,28 @@<br>
+/*****************************************************************************<br>
+ * Copyright (C) 2016 x265 project<br>
+ *<br>
+ * Authors: Steve Borho <<a href="mailto:steve@borho.org">steve@borho.org</a>><br>
+ * Dnyaneshwar Gorade <<a href="mailto:dnyaneshwar@multicorewareinc.com">dnyaneshwar@multicorewareinc.com</a>><br>
+ *<br>
+ * This program is free software; you can redistribute it and/or modify<br>
+ * it under the terms of the GNU General Public License as published by<br>
+ * the Free Software Foundation; either version 2 of the License, or<br>
+ * (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.<br>
+ *<br>
+ * This program is also available under a commercial proprietary license.<br>
+ * For more information, contact us at license @ <a href="http://x265.com" rel="noreferrer" target="_blank">x265.com</a>.<br>
+ *****************************************************************************/<br>
+<br>
+#ifndef X265_IPFILTER8_H<br>
+#define X265_IPFILTER8_H<br>
+<br>
+#endif // ifndef X265_IPFILTER8_H<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/common/arm/loopfilter.h<br>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000<br>
+++ b/source/common/arm/loopfilter.h Sat Jan 09 12:10:58 2016 +0530<br>
@@ -0,0 +1,29 @@<br>
+/*****************************************************************************<br>
+ * Copyright (C) 2016 x265 project<br>
+ *<br>
+ * Authors: Dnyaneshwar Gorade <<a href="mailto:dnyaneshwar@multicorewareinc.com">dnyaneshwar@multicorewareinc.com</a>><br>
+ * Praveen Kumar Tiwari <<a href="mailto:praveen@multicorewareinc.com">praveen@multicorewareinc.com</a>><br>
+;* Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>><br>
+ *<br>
+ * This program is free software; you can redistribute it and/or modify<br>
+ * it under the terms of the GNU General Public License as published by<br>
+ * the Free Software Foundation; either version 2 of the License, or<br>
+ * (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.<br>
+ *<br>
+ * This program is also available under a commercial proprietary license.<br>
+ * For more information, contact us at license @ <a href="http://x265.com" rel="noreferrer" target="_blank">x265.com</a>.<br>
+ *****************************************************************************/<br>
+<br>
+#ifndef X265_LOOPFILTER_H<br>
+#define X265_LOOPFILTER_H<br>
+<br>
+#endif // ifndef X265_LOOPFILTER_H<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/common/arm/mc.h<br>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000<br>
+++ b/source/common/arm/mc.h Sat Jan 09 12:10:58 2016 +0530<br>
@@ -0,0 +1,27 @@<br>
+/*****************************************************************************<br>
+ * Copyright (C) 2016 x265 project<br>
+ *<br>
+ * Authors: Steve Borho <<a href="mailto:steve@borho.org">steve@borho.org</a>><br>
+ *<br>
+ * This program is free software; you can redistribute it and/or modify<br>
+ * it under the terms of the GNU General Public License as published by<br>
+ * the Free Software Foundation; either version 2 of the License, or<br>
+ * (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.<br>
+ *<br>
+ * This program is also available under a commercial proprietary license.<br>
+ * For more information, contact us at license @ <a href="http://x265.com" rel="noreferrer" target="_blank">x265.com</a>.<br>
+ *****************************************************************************/<br>
+<br>
+#ifndef X265_MC_H<br>
+#define X265_MC_H<br>
+<br>
+#endif // ifndef X265_MC_H<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/common/arm/pixel-util.h<br>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000<br>
+++ b/source/common/arm/pixel-util.h Sat Jan 09 12:10:58 2016 +0530<br>
@@ -0,0 +1,28 @@<br>
+/*****************************************************************************<br>
+ * Copyright (C) 2016 x265 project<br>
+ *<br>
+ * Authors: Steve Borho <<a href="mailto:steve@borho.org">steve@borho.org</a>><br>
+;* Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>><br>
+ *<br>
+ * This program is free software; you can redistribute it and/or modify<br>
+ * it under the terms of the GNU General Public License as published by<br>
+ * the Free Software Foundation; either version 2 of the License, or<br>
+ * (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.<br>
+ *<br>
+ * This program is also available under a commercial proprietary license.<br>
+ * For more information, contact us at license @ <a href="http://x265.com" rel="noreferrer" target="_blank">x265.com</a>.<br>
+ *****************************************************************************/<br>
+<br>
+#ifndef X265_PIXEL_UTIL_H<br>
+#define X265_PIXEL_UTIL_H<br>
+<br>
+#endif // ifndef X265_PIXEL_UTIL_H<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/common/arm/pixel.h<br>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000<br>
+++ b/source/common/arm/pixel.h Sat Jan 09 12:10:58 2016 +0530<br>
@@ -0,0 +1,33 @@<br>
+/*****************************************************************************<br>
+ * pixel.h: x86 pixel metrics<br>
+ *****************************************************************************<br>
+ * Copyright (C) 2003-2013 x264 project<br>
+ * Copyright (C) 2013-2016 x265 project<br>
+ *<br>
+ * Authors: Laurent Aimar <<a href="mailto:fenrir@via.ecp.fr">fenrir@via.ecp.fr</a>><br>
+ * Loren Merritt <<a href="mailto:lorenm@u.washington.edu">lorenm@u.washington.edu</a>><br>
+ * Fiona Glaser <<a href="mailto:fiona@x264.com">fiona@x264.com</a>><br>
+;* Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>><br>
+ *<br>
+ * This program is free software; you can redistribute it and/or modify<br>
+ * it under the terms of the GNU General Public License as published by<br>
+ * the Free Software Foundation; either version 2 of the License, or<br>
+ * (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.<br>
+ *<br>
+ * This program is also available under a commercial proprietary license.<br>
+ * For more information, contact us at license @ <a href="http://x265.com" rel="noreferrer" target="_blank">x265.com</a>.<br>
+ *****************************************************************************/<br>
+<br>
+#ifndef X265_I386_PIXEL_H<br>
+#define X265_I386_PIXEL_H<br>
+<br>
+#endif // ifndef X265_I386_PIXEL_H<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/common/primitives.cpp<br>
--- a/source/common/primitives.cpp Sat Jan 09 11:32:33 2016 +0530<br>
+++ b/source/common/primitives.cpp Sat Jan 09 12:10:58 2016 +0530<br>
@@ -238,7 +238,9 @@<br>
<a href="http://primitives.cu" rel="noreferrer" target="_blank">primitives.cu</a>[i].intra_pred_allangs = NULL;<br>
<br>
#if ENABLE_ASSEMBLY<br>
+#if X265_ARCH_X86<br>
setupInstrinsicPrimitives(primitives, param->cpuid);<br>
+#endif<br>
setupAssemblyPrimitives(primitives, param->cpuid);<br>
#endif<br>
<br>
@@ -249,7 +251,7 @@<br>
}<br>
}<br>
<br>
-#if ENABLE_ASSEMBLY<br>
+#if ENABLE_ASSEMBLY && X265_ARCH_X86<br>
/* these functions are implemented in assembly. When assembly is not being<br>
* compiled, they are unnecessary and can be NOPs */<br>
#else<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/test/CMakeLists.txt<br>
--- a/source/test/CMakeLists.txt Sat Jan 09 11:32:33 2016 +0530<br>
+++ b/source/test/CMakeLists.txt Sat Jan 09 12:10:58 2016 +0530<br>
@@ -1,4 +1,12 @@<br>
# vim: syntax=cmake<br>
+<br>
+check_symbol_exists(__rdtsc "intrin.h" HAVE_RDTSC)<br>
+if(HAVE_RDTSC)<br>
+ add_definitions(-DHAVE_RDTSC=1)<br>
+endif()<br>
+<br>
+# add X86 assembly files<br>
+if(X86)<br>
enable_language(ASM_YASM)<br>
<br>
if(MSVC_IDE)<br>
@@ -11,11 +19,17 @@<br>
else()<br>
set(YASM_SRC checkasm-a.asm)<br>
endif()<br>
+endif(X86)<br>
<br>
-check_symbol_exists(__rdtsc "intrin.h" HAVE_RDTSC)<br>
-if(HAVE_RDTSC)<br>
- add_definitions(-DHAVE_RDTSC=1)<br>
-endif()<br>
+# add ARM assembly files<br>
+if(ARM OR CROSS_COMPILE_ARM)<br>
+ set(YASM_SRC)<br>
+endif(ARM OR CROSS_COMPILE_ARM)<br>
+<br>
+# add PowerPC assembly files<br>
+if(POWER)<br>
+ set(YASM_SRC)<br>
+endif(POWER)<br>
<br>
add_executable(TestBench ${YASM_SRC}<br>
testbench.cpp testharness.h<br>
@@ -23,6 +37,7 @@<br>
mbdstharness.cpp mbdstharness.h<br>
ipfilterharness.cpp ipfilterharness.h<br>
intrapredharness.cpp intrapredharness.h)<br>
+<br>
target_link_libraries(TestBench x265-static ${PLATFORM_LIBS})<br>
if(LINKER_OPTIONS)<br>
if(EXTRA_LIB)<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/test/testbench.cpp<br>
--- a/source/test/testbench.cpp Sat Jan 09 11:32:33 2016 +0530<br>
+++ b/source/test/testbench.cpp Sat Jan 09 12:10:58 2016 +0530<br>
@@ -169,6 +169,9 @@<br>
{ "XOP", X265_CPU_XOP },<br>
{ "AVX2", X265_CPU_AVX2 },<br>
{ "BMI2", X265_CPU_AVX2 | X265_CPU_BMI1 | X265_CPU_BMI2 },<br>
+ { "ARMv6", X265_CPU_ARMV6 },<br>
+ { "NEON", X265_CPU_NEON },<br>
+ { "FastNeonMRC", X265_CPU_FAST_NEON_MRC },<br>
{ "", 0 },<br>
};<br>
<br>
@@ -182,6 +185,7 @@<br>
else<br>
continue;<br>
<br>
+#if X265_ARCH_X86<br>
EncoderPrimitives vecprim;<br>
memset(&vecprim, 0, sizeof(vecprim));<br>
setupInstrinsicPrimitives(vecprim, test_arch[i].flag);<br>
@@ -197,6 +201,7 @@<br>
return -1;<br>
}<br>
}<br>
+#endif<br>
<br>
EncoderPrimitives asmprim;<br>
memset(&asmprim, 0, sizeof(asmprim));<br>
@@ -220,7 +225,9 @@<br>
<br>
EncoderPrimitives optprim;<br>
memset(&optprim, 0, sizeof(optprim));<br>
+#if X265_ARCH_X86<br>
setupInstrinsicPrimitives(optprim, cpuid);<br>
+#endif<br>
setupAssemblyPrimitives(optprim, cpuid);<br>
<br>
/* Note that we do not setup aliases for performance tests, that would be<br>
diff -r d94f6c2b45f8 -r cd9318b1671b source/test/testharness.h<br>
--- a/source/test/testharness.h Sat Jan 09 11:32:33 2016 +0530<br>
+++ b/source/test/testharness.h Sat Jan 09 12:10:58 2016 +0530<br>
@@ -75,10 +75,14 @@<br>
{<br>
uint32_t a = 0;<br>
<br>
+#if X265_ARCH_X86<br>
asm volatile("rdtsc" : "=a" (a) ::"edx");<br>
+#elseif X265_ARCH_ARM<br>
+ // TOD-DO: verify following inline asm to get cpu Timestamp Counter for ARM arch<br>
+ // asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r"(a));<br>
+#endif<br>
return a;<br>
}<br>
-<br>
#endif // ifdef _MSC_VER<br>
<br>
#define BENCH_RUNS 1000<br>
@@ -125,7 +129,7 @@<br>
* needs an explicit asm check because it only sometimes crashes in normal use. */<br>
intptr_t PFX(checkasm_call)(intptr_t (*func)(), int *ok, ...);<br>
float PFX(checkasm_call_float)(float (*func)(), int *ok, ...);<br>
-#else<br>
+#elseif X265_ARCH_ARM == 0<br>
#define PFX(stack_pagealign)(func, align) func()<br>
#endif<br>
<br>
</blockquote></div><br></div>