]> granicus.if.org Git - libx264/commitdiff
Fix crash with threads and SSEMisalign on Phenom
authorFiona Glaser <fiona@x264.com>
Tue, 25 Nov 2008 05:56:24 +0000 (21:56 -0800)
committerLoren Merritt <pengvado@akuvian.org>
Tue, 25 Nov 2008 06:37:02 +0000 (06:37 +0000)
Misalign mask needed to be set separately for each encoding thread.

encoder/encoder.c

index fbb2ea1da1d7d25aec5c7ae2d63eeef7ffe6fa51..1fd8611341ac88d5afe7d51761058a5772b8d589 100644 (file)
@@ -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 );