From 69172761934ee2e531fd551d00ba696ad42029d4 Mon Sep 17 00:00:00 2001 From: Loren Merritt Date: Fri, 11 Apr 2008 18:48:30 -0600 Subject: [PATCH] r810 borked hpel_filter_sse2 on unaligned buffers --- 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 7401555a..356df36b 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 2aee2b8c..d301a8ba 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 ); -- 2.47.3