[x264-devel] commit: r810 borked hpel_filter_sse2 on unaligned buffers (Loren Merritt )

git version control git at videolan.org
Sat Apr 12 04:04:47 CEST 2008


x264 | branch: master | Loren Merritt <pengvado at akuvian.org> | Fri Apr 11 18:48:30 2008 -0600| [69172761934ee2e531fd551d00ba696ad42029d4]

r810 borked hpel_filter_sse2 on unaligned buffers

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

 common/x86/mc-c.c |    1 +
 tools/checkasm.c  |    6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/common/x86/mc-c.c b/common/x86/mc-c.c
index 7401555..356df36 100644
--- a/common/x86/mc-c.c
+++ b/common/x86/mc-c.c
@@ -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-- )\
     {\
diff --git a/tools/checkasm.c b/tools/checkasm.c
index 2aee2b8..d301a8b 100644
--- a/tools/checkasm.c
+++ b/tools/checkasm.c
@@ -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 );



More information about the x264-devel mailing list