[x264-devel] commit: Fix crash on new AMD M300 and similar CPUs (Jason Garrett-Glaser )

git version control git at videolan.org
Thu Jan 21 05:44:11 CET 2010


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Mon Jan 18 15:50:06 2010 -0800| [bef4e3e601970c9bfd0c94d6621f100cf015e1f8] | committer: Jason Garrett-Glaser 

Fix crash on new AMD M300 and similar CPUs
Apparently these CPUs have SSE4a, but not misaligned SSE.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=bef4e3e601970c9bfd0c94d6621f100cf015e1f8
---

 common/cpu.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/common/cpu.c b/common/cpu.c
index 8bfd21f..2715652 100644
--- a/common/cpu.c
+++ b/common/cpu.c
@@ -143,13 +143,17 @@ uint32_t x264_cpu_detect( void )
             if( ecx&0x00000040 ) /* SSE4a */
             {
                 cpu |= X264_CPU_SSE2_IS_FAST;
-                cpu |= X264_CPU_SSE_MISALIGN;
                 cpu |= X264_CPU_LZCNT;
                 cpu |= X264_CPU_SHUFFLE_IS_FAST;
-                x264_cpu_mask_misalign_sse();
             }
             else
                 cpu |= X264_CPU_SSE2_IS_SLOW;
+
+            if( ecx&0x00000080 ) /* Misalign SSE */
+            {
+                cpu |= X264_CPU_SSE_MISALIGN;
+                x264_cpu_mask_misalign_sse();
+            }
         }
     }
 



More information about the x264-devel mailing list