[SCM] x265/master: Refresh patch
sramacher at users.alioth.debian.org
sramacher at users.alioth.debian.org
Wed Feb 18 01:09:17 UTC 2015
The following commit has been merged in the master branch:
commit cce893eec53b5bbb9f62b11fbc3830b65190b2fe
Author: Sebastian Ramacher <sramacher at debian.org>
Date: Wed Feb 18 01:33:07 2015 +0100
Refresh patch
diff --git a/debian/patches/compile-flags.patch b/debian/patches/compile-flags.patch
index 931f5a2..eea3b9a 100644
--- a/debian/patches/compile-flags.patch
+++ b/debian/patches/compile-flags.patch
@@ -3,23 +3,18 @@ Description: Use -fPIC everywhere
Author: Sebastian Ramacher <sramacher at debian.org>
Last-Update: 2014-11-30
---- x265-1.4.orig/source/CMakeLists.txt
-+++ x265-1.4/source/CMakeLists.txt
-@@ -121,15 +121,9 @@ endif()
- if(GCC)
- add_definitions(-Wall -Wextra -Wshadow)
- add_definitions(-D__STDC_LIMIT_MACROS=1)
-- if(X64 AND NOT WIN32)
-+ if(NOT WIN32)
- add_definitions(-fPIC)
-- endif(X64 AND NOT WIN32)
+--- a/source/CMakeLists.txt
++++ b/source/CMakeLists.txt
+@@ -130,12 +130,6 @@
+ if(ENABLE_PIC)
+ add_definitions(-fPIC)
+ endif(ENABLE_PIC)
- if(X86 AND NOT X64)
- add_definitions(-march=i686)
- endif()
- if(ARM)
- add_definitions(-march=armv6 -mfloat-abi=hard -mfpu=vfp)
- endif()
-+ endif(NOT WIN32)
check_cxx_compiler_flag(-Wno-narrowing CC_HAS_NO_NARROWING)
check_cxx_compiler_flag(-Wno-array-bounds CC_HAS_NO_ARRAY_BOUNDS)
if (CC_HAS_NO_ARRAY_BOUNDS)
diff --git a/debian/patches/workaround-partial-SIMD-support.patch b/debian/patches/workaround-partial-SIMD-support.patch
index de3ccbb..24cc1cd 100644
--- a/debian/patches/workaround-partial-SIMD-support.patch
+++ b/debian/patches/workaround-partial-SIMD-support.patch
@@ -8,192 +8,11 @@ Description: remove buggy workarounds for partial SIMD support
Origin: upstream,
https://bitbucket.org/multicoreware/x265/commits/d7b5e73fc91ab20f86c36d5c1924632c1bcf3e68
Bug: https://bitbucket.org/multicoreware/x265/issue/92/fails-to-build-on-x86-32-without-yasm
-Last-Update: 2014-12-05
+Last-Update: 2015-02-18
---- a/source/common/CMakeLists.txt
-+++ b/source/common/CMakeLists.txt
-@@ -1,44 +1,46 @@
- # vim: syntax=cmake
--set(SSE3 vec/dct-sse3.cpp)
--set(SSSE3 vec/dct-ssse3.cpp)
--set(SSE41 vec/dct-sse41.cpp)
-
--if(MSVC AND X86)
-- set(PRIMITIVES ${SSE3} ${SSSE3} ${SSE41})
-- set(WARNDISABLE "/wd4100") # unreferenced formal parameter
-- if(INTEL_CXX)
-- add_definitions(/Qwd111) # statement is unreachable
-- add_definitions(/Qwd128) # loop is unreachable
-- add_definitions(/Qwd177) # declared function is unused
-- add_definitions(/Qwd185) # dynamic initialization in unreachable code
-- add_definitions(/Qwd280) # conditional expression is constant
-- endif()
-- if(X64)
-- set_source_files_properties(${SSE3} ${SSSE3} ${SSE41} PROPERTIES COMPILE_FLAGS "${WARNDISABLE}")
-- else()
-- # x64 implies SSE4, so only add /arch:SSE2 if building for Win32
-- set_source_files_properties(${SSE3} ${SSSE3} ${SSE41} PROPERTIES COMPILE_FLAGS "${WARNDISABLE} /arch:SSE2")
-- endif()
--endif()
--if(GCC AND X86)
-- if(CLANG)
-- # llvm intrinsic headers cause shadow warnings
-- set(WARNDISABLE "-Wno-shadow -Wno-unused-parameter")
-- else()
-- set(WARNDISABLE "-Wno-unused-parameter")
-- endif()
-- if(INTEL_CXX OR CLANG OR (NOT CC_VERSION VERSION_LESS 4.3))
-+if(ENABLE_ASSEMBLY)
-+ set_source_files_properties(primitives.cpp PROPERTIES COMPILE_FLAGS -DENABLE_ASSEMBLY=1)
-+
-+ set(SSE3 vec/dct-sse3.cpp)
-+ set(SSSE3 vec/dct-ssse3.cpp)
-+ set(SSE41 vec/dct-sse41.cpp)
-+
-+ if(MSVC AND X86)
- set(PRIMITIVES ${SSE3} ${SSSE3} ${SSE41})
-- set_source_files_properties(${SSE3} PROPERTIES COMPILE_FLAGS "${WARNDISABLE} -msse3")
-- set_source_files_properties(${SSSE3} PROPERTIES COMPILE_FLAGS "${WARNDISABLE} -mssse3")
-- set_source_files_properties(${SSE41} PROPERTIES COMPILE_FLAGS "${WARNDISABLE} -msse4.1")
-+ set(WARNDISABLE "/wd4100") # unreferenced formal parameter
-+ if(INTEL_CXX)
-+ add_definitions(/Qwd111) # statement is unreachable
-+ add_definitions(/Qwd128) # loop is unreachable
-+ add_definitions(/Qwd177) # declared function is unused
-+ add_definitions(/Qwd185) # dynamic initialization in unreachable code
-+ add_definitions(/Qwd280) # conditional expression is constant
-+ endif()
-+ if(X64)
-+ set_source_files_properties(${SSE3} ${SSSE3} ${SSE41} PROPERTIES COMPILE_FLAGS "${WARNDISABLE}")
-+ else()
-+ # x64 implies SSE4, so only add /arch:SSE2 if building for Win32
-+ set_source_files_properties(${SSE3} ${SSSE3} ${SSE41} PROPERTIES COMPILE_FLAGS "${WARNDISABLE} /arch:SSE2")
-+ endif()
-+ endif()
-+ if(GCC AND X86)
-+ if(CLANG)
-+ # llvm intrinsic headers cause shadow warnings
-+ set(WARNDISABLE "-Wno-shadow -Wno-unused-parameter")
-+ else()
-+ set(WARNDISABLE "-Wno-unused-parameter")
-+ endif()
-+ if(INTEL_CXX OR CLANG OR (NOT CC_VERSION VERSION_LESS 4.3))
-+ set(PRIMITIVES ${SSE3} ${SSSE3} ${SSE41})
-+ set_source_files_properties(${SSE3} PROPERTIES COMPILE_FLAGS "${WARNDISABLE} -msse3")
-+ set_source_files_properties(${SSSE3} PROPERTIES COMPILE_FLAGS "${WARNDISABLE} -mssse3")
-+ set_source_files_properties(${SSE41} PROPERTIES COMPILE_FLAGS "${WARNDISABLE} -msse4.1")
-+ endif()
- endif()
--endif()
--set(VEC_PRIMITIVES vec/vec-primitives.cpp ${PRIMITIVES})
--source_group(Intrinsics FILES ${VEC_PRIMITIVES})
-+ set(VEC_PRIMITIVES vec/vec-primitives.cpp ${PRIMITIVES})
-+ source_group(Intrinsics FILES ${VEC_PRIMITIVES})
-
--if(ENABLE_ASSEMBLY)
-- set_source_files_properties(primitives.cpp PROPERTIES COMPILE_FLAGS -DENABLE_ASSEMBLY=1)
- set(C_SRCS asm-primitives.cpp pixel.h mc.h ipfilter8.h blockcopy8.h dct8.h loopfilter.h)
- set(A_SRCS pixel-a.asm const-a.asm cpu-a.asm ssd-a.asm mc-a.asm
- mc-a2.asm pixel-util8.asm blockcopy8.asm
---- a/source/common/primitives.cpp
-+++ b/source/common/primitives.cpp
-@@ -123,9 +123,9 @@
- if (!primitives.sad[0])
- {
- Setup_C_Primitives(primitives);
-- Setup_Instrinsic_Primitives(primitives, cpuid);
-
- #if ENABLE_ASSEMBLY
-+ Setup_Instrinsic_Primitives(primitives, cpuid);
- Setup_Assembly_Primitives(primitives, cpuid);
- #else
- x265_log(param, X265_LOG_WARNING, "Assembly not supported in this binary\n");
-@@ -169,74 +169,14 @@
- }
- }
-
--#if !defined(ENABLE_ASSEMBLY)
--#if defined(_MSC_VER)
--#include <intrin.h>
--#endif
--
-+#if ENABLE_ASSEMBLY
-+/* these functions are implemented in assembly. When assembly is not being
-+ * compiled, they are unnecessary and can be NOPs */
-+#else
- extern "C" {
--// the intrinsic primitives will not use MMX instructions, so if assembly
--// is disabled there should be no reason to use EMMS.
-+int x265_cpu_cpuid_test(void) { return 0; }
- void x265_cpu_emms(void) {}
--
--#if defined(X265_ARCH_X86)
--
--#if defined(_MSC_VER)
--# pragma warning(disable: 4100)
--#elif defined(__GNUC__) || defined(__clang__) // use inline assembly, Gnu/AT&T syntax
--# define __cpuidex(regsArray, level, index) \
-- __asm__ __volatile__ ("cpuid" \
-- : "=a" ((regsArray)[0]), "=b" ((regsArray)[1]), "=c" ((regsArray)[2]), "=d" ((regsArray)[3]) \
-- : "0" (level), "2" (index));
--#else
--# error "compiler not supported"
--#endif
--
--int x265_cpu_cpuid_test(void)
--{
-- return 0;
-+void x265_cpu_cpuid(uint32_t, uint32_t *, uint32_t *, uint32_t *, uint32_t *) {}
-+void x265_cpu_xgetbv(uint32_t, uint32_t *, uint32_t *) {}
- }
--
--void x265_cpu_cpuid(uint32_t op, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)
--{
-- int output[4];
--
-- __cpuidex(output, op, 0);
-- *eax = output[0];
-- *ebx = output[1];
-- *ecx = output[2];
-- *edx = output[3];
--}
--
--void x265_cpu_xgetbv(uint32_t op, uint32_t *eax, uint32_t *edx)
--{
-- uint64_t out = 0;
--
--#if X265_ARCH_X86
--
--#if (defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040000) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1200)
--
-- // MSVC 2010 SP1 or later, or similar Intel release
-- out = _xgetbv(op);
--
--#elif defined(__GNUC__) || defined(__clang__) // use inline assembly, Gnu/AT&T syntax
--
-- uint32_t a, d;
-- __asm("xgetbv" : "=a" (a), "=d" (d) : "c" (op) :);
-- *eax = a;
-- *edx = d;
-- return;
--
--#elif defined(_WIN64) // On x64 with older compilers, this is impossible
--
--#endif // if (defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040000) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1200)
--
--#endif // if x86
--
-- *eax = (uint32_t)out;
-- *edx = (uint32_t)(out >> 32);
--}
--
--#endif // X265_ARCH_X86
--}
--#endif // if !ENABLE_ASSEMBLY
-+#endif
--- a/source/common/common.h
+++ b/source/common/common.h
-@@ -49,7 +49,7 @@
+@@ -74,7 +74,7 @@
#define ALIGN_VAR_16(T, var) T var __attribute__((aligned(16)))
#define ALIGN_VAR_32(T, var) T var __attribute__((aligned(32)))
--
x265 packaging
More information about the pkg-multimedia-commits
mailing list