From: Loren Merritt Date: Wed, 9 Jan 2008 11:25:09 +0000 (+0000) Subject: shut up some valgrind warnings X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85a9209e7b85e7a38fa3770f963dc9535fe4a19c;p=libx264 shut up some valgrind warnings git-svn-id: svn://svn.videolan.org/x264/trunk@719 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/common/amd64/deblock-a.asm b/common/amd64/deblock-a.asm index 3e9d5938..70aad4c6 100644 --- a/common/amd64/deblock-a.asm +++ b/common/amd64/deblock-a.asm @@ -318,7 +318,8 @@ cglobal x264_deblock_h_luma_sse2 lea r11, [r10+r10*2] lea rax, [rdi-4] lea r9, [rdi-4+r11] - %define pix_tmp rsp-104 ; 16x6 for the buffer + 8 for x264_deblock_v_luma_sse2's return address + sub rsp, 0x68 + %define pix_tmp rsp ; transpose 6x16 -> tmp space TRANSPOSE6x8_MEM PASS8ROWS(rax, r9, r10, r11), pix_tmp @@ -352,6 +353,7 @@ cglobal x264_deblock_h_luma_sse2 movq mm3, [pix_tmp+0x40] TRANSPOSE8x4_STORE PASS8ROWS(rax, r9, r10, r11) + add rsp, 0x68 ret diff --git a/common/amd64/pixel-a.asm b/common/amd64/pixel-a.asm index 6de7ffeb..0cebcecf 100644 --- a/common/amd64/pixel-a.asm +++ b/common/amd64/pixel-a.asm @@ -805,9 +805,10 @@ cglobal x264_intra_satd_x3_4x4_mmxext ; void x264_intra_satd_x3_16x16_mmxext( uint8_t *fenc, uint8_t *fdec, int *res ) ;----------------------------------------------------------------------------- cglobal x264_intra_satd_x3_16x16_mmxext -%define sums rsp-32 ; +24 -%define top_1d rsp-64 ; +32 -%define left_1d rsp-96 ; +32 + sub rsp, 96 +%define sums rsp+64 ; size 24 +%define top_1d rsp+32 ; size 32 +%define left_1d rsp ; size 32 mov qword [sums+0], 0 mov qword [sums+8], 0 @@ -913,15 +914,17 @@ cglobal x264_intra_satd_x3_16x16_mmxext movd [parm3q+8], mm2 ; i16x16_dc satd movd [parm3q+4], mm1 ; i16x16_h satd movd [parm3q+0], mm0 ; i16x16_v satd + add rsp, 96 ret ;----------------------------------------------------------------------------- ; void x264_intra_satd_x3_8x8c_mmxext( uint8_t *fenc, uint8_t *fdec, int *res ) ;----------------------------------------------------------------------------- cglobal x264_intra_satd_x3_8x8c_mmxext -%define sums rsp-32 ; +24 -%define top_1d rsp-48 ; +16 -%define left_1d rsp-64 ; +16 + sub rsp, 64 +%define sums rsp+32 ; size 24 +%define top_1d rsp+16 ; size 16 +%define left_1d rsp ; size 16 mov qword [sums+0], 0 mov qword [sums+8], 0 @@ -1041,6 +1044,7 @@ cglobal x264_intra_satd_x3_8x8c_mmxext movd [parm3q+0], mm0 ; i8x8c_dc satd movd [parm3q+4], mm1 ; i8x8c_h satd movd [parm3q+8], mm2 ; i8x8c_v satd + add rsp, 64 ret diff --git a/common/amd64/pixel-sse2.asm b/common/amd64/pixel-sse2.asm index fa8668e3..a906d3a1 100644 --- a/common/amd64/pixel-sse2.asm +++ b/common/amd64/pixel-sse2.asm @@ -1000,9 +1000,9 @@ cglobal x264_pixel_ssim_4x4x2_core_sse2 pshufd xmm6, xmm4, 0xB1 packssdw xmm1, xmm2 paddd xmm3, xmm5 - pmaddwd xmm1, xmm8 - paddd xmm4, xmm6 pshufd xmm1, xmm1, 0xD8 + paddd xmm4, xmm6 + pmaddwd xmm1, xmm8 movdqa xmm5, xmm3 punpckldq xmm3, xmm4 punpckhdq xmm5, xmm4 diff --git a/common/i386/pixel-sse2.asm b/common/i386/pixel-sse2.asm index 45e2af73..9ab23c61 100644 --- a/common/i386/pixel-sse2.asm +++ b/common/i386/pixel-sse2.asm @@ -973,9 +973,9 @@ cglobal x264_pixel_ssim_4x4x2_core_sse2 pshufd xmm6, xmm4, 0xB1 packssdw xmm1, xmm2 paddd xmm3, xmm5 - pmaddwd xmm1, xmm7 - paddd xmm4, xmm6 pshufd xmm1, xmm1, 0xD8 + paddd xmm4, xmm6 + pmaddwd xmm1, xmm7 movdqa xmm5, xmm3 punpckldq xmm3, xmm4 punpckhdq xmm5, xmm4 diff --git a/common/mc.c b/common/mc.c index 00547adb..6ce44e34 100644 --- a/common/mc.c +++ b/common/mc.c @@ -430,7 +430,7 @@ void x264_frame_filter( x264_t *h, x264_frame_t *frame, int mb_y, int b_end ) uint8_t *ref = frame->plane[0] + y * stride - PADH; uint16_t *line = frame->integral + (y+1) * stride - PADH + 1; uint16_t v = line[0] = 0; - for( x = 0; x < stride-1; x++ ) + for( x = 1; x < stride-1; x++ ) line[x] = v += ref[x] + line[x-stride] - line[x-stride-1]; line -= 8*stride; if( y >= 9-PADV )