]> granicus.if.org Git - libx264/commitdiff
r810 borked hpel_filter_sse2 on unaligned buffers
authorLoren Merritt <pengvado@akuvian.org>
Sat, 12 Apr 2008 00:48:30 +0000 (18:48 -0600)
committerLoren Merritt <pengvado@akuvian.org>
Sat, 12 Apr 2008 01:00:22 +0000 (19:00 -0600)
common/x86/mc-c.c
tools/checkasm.c

index 7401555ae871a82b951eb8559955fa64749c0750..356df36b24a56f426ed3d90d4cb7adbdc8cd3547 100644 (file)
@@ -177,6 +177,7 @@ void x264_hpel_filter_##cpu( uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8_
     dstv -= realign;\
     dstc -= realign;\
     dsth -= realign;\
+    width += realign;\
     buf = x264_malloc(((width+2*align-1)&-align)*sizeof(int16_t));\
     while( height-- )\
     {\
index 2aee2b8cc6db0e58ab1f62bc4635145bf4d8703e..d301a8ba04530d8b333af1ae0ab1f1bcaba61628 100644 (file)
@@ -532,9 +532,9 @@ static int check_mc( int cpu_ref, int cpu_new )
 
     if( mc_a.hpel_filter != mc_ref.hpel_filter )
     {
-        uint8_t *src = buf1+16+2*64;
-        uint8_t *dstc[3] = { buf3+16, buf3+16+16*64, buf3+16+32*64 };
-        uint8_t *dsta[3] = { buf4+16, buf4+16+16*64, buf4+16+32*64 };
+        uint8_t *src = buf1+8+2*64;
+        uint8_t *dstc[3] = { buf3+8, buf3+8+16*64, buf3+8+32*64 };
+        uint8_t *dsta[3] = { buf4+8, buf4+8+16*64, buf4+8+32*64 };
         ok = 1; used_asm = 1;
         memset( buf3, 0, 4096 );
         memset( buf4, 0, 4096 );