[x264-devel] commit: Fix crash with threads and SSEMisalign on Phenom ( Jason Garrett-Glaser )

git version control git at videolan.org
Tue Nov 25 07:38:45 CET 2008


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Mon Nov 24 21:56:24 2008 -0800| [3a028c8e50238b7799175bd5a172e5517b4baf8d] | committer: Loren Merritt 

Fix crash with threads and SSEMisalign on Phenom
Misalign mask needed to be set separately for each encoding thread.

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

 encoder/encoder.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/encoder/encoder.c b/encoder/encoder.c
index fbb2ea1..1fd8611 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -1312,6 +1312,12 @@ static int x264_slices_write( x264_t *h )
 {
     int i_frame_size;
 
+#ifdef HAVE_MMX
+    /* Misalign mask has to be set separately for each thread. */
+    if( h->param.cpu&X264_CPU_SSE_MISALIGN )
+        x264_cpu_mask_misalign_sse();
+#endif
+
 #if VISUALIZE
     if( h->param.b_visualize )
         x264_visualize_init( h );



More information about the x264-devel mailing list