[x265] [PATCH 09 of 13] x86: Remove some legacy CPU detection hacks

vignesh at multicorewareinc.com vignesh at multicorewareinc.com
Fri Jul 6 11:18:09 CEST 2018


# HG changeset patch
# User Vignesh Vijayakumar<vignesh at multicorewareinc.com>
# Date 1517546600 -19800
#      Fri Feb 02 10:13:20 2018 +0530
# Node ID 038a52e0813279f4812e9d170a50a134122df4f4
# Parent  801c3fde5a56db5c33e2512a68db5ae6297f451c
x86: Remove some legacy CPU detection hacks

Some ancient Pentium-M and Core 1 CPUs had slow SSE units, and using MMX was preferable.
Some misconfigured virtualized systems could sometimes also trigger this code path and cause assertions.

diff -r 801c3fde5a56 -r 038a52e08132 source/common/cpu.cpp
--- a/source/common/cpu.cpp	Fri Feb 02 10:09:54 2018 +0530
+++ b/source/common/cpu.cpp	Fri Feb 02 10:13:20 2018 +0530
@@ -254,16 +254,8 @@
         int model  = ((eax >> 4) & 0xf) + ((eax >> 12) & 0xf0);
         if (family == 6)
         {
-            /* 6/9 (pentium-m "banias"), 6/13 (pentium-m "dothan"), and 6/14 (core1 "yonah")
-             * theoretically support sse2, but it's significantly slower than mmx for
-             * almost all of x264's functions, so let's just pretend they don't. */
-            if (model == 9 || model == 13 || model == 14)
-            {
-                cpu &= ~(X265_CPU_SSE2 | X265_CPU_SSE3);
-                X265_CHECK(!(cpu & (X265_CPU_SSSE3 | X265_CPU_SSE4)), "unexpected CPU ID %d\n", cpu);
-            }
             /* Detect Atom CPU */
-            else if (model == 28)
+            if (model == 28)
             {
                 cpu |= X265_CPU_SLOW_ATOM;
                 cpu |= X265_CPU_SLOW_PSHUFB;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265-09.patch
Type: text/x-patch
Size: 1504 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180706/09264c7a/attachment.bin>


More information about the x265-devel mailing list