Commit 7725a7eb authored by Yunqing Wang's avatar Yunqing Wang Committed by Code Review
Browse files

Merge "Improve vp8_sad16x16_sse3 function"

Showing with 25 additions and 32 deletions
...@@ -586,52 +586,45 @@ sym(vp8_sad16x16_sse3): ...@@ -586,52 +586,45 @@ sym(vp8_sad16x16_sse3):
STACK_FRAME_CREATE_X3 STACK_FRAME_CREATE_X3
lea end_ptr, [src_ptr+src_stride*8] mov end_ptr, 4
pxor xmm7, xmm7
lea end_ptr, [end_ptr+src_stride*8]
pxor mm7, mm7
.vp8_sad16x16_sse3_loop: .vp8_sad16x16_sse3_loop:
movdqa xmm0, XMMWORD PTR [src_ptr]
movdqu xmm1, XMMWORD PTR [ref_ptr]
movdqa xmm2, XMMWORD PTR [src_ptr+src_stride]
movdqu xmm3, XMMWORD PTR [ref_ptr+ref_stride]
movq ret_var, mm7 lea src_ptr, [src_ptr+src_stride*2]
cmp ret_var, max_err lea ref_ptr, [ref_ptr+ref_stride*2]
jg .vp8_sad16x16_early_exit
movq mm0, QWORD PTR [src_ptr]
movq mm2, QWORD PTR [src_ptr+8]
movq mm1, QWORD PTR [ref_ptr]
movq mm3, QWORD PTR [ref_ptr+8]
movq mm4, QWORD PTR [src_ptr+src_stride] movdqa xmm4, XMMWORD PTR [src_ptr]
movq mm5, QWORD PTR [ref_ptr+ref_stride] movdqu xmm5, XMMWORD PTR [ref_ptr]
movdqa xmm6, XMMWORD PTR [src_ptr+src_stride]
psadbw mm0, mm1 psadbw xmm0, xmm1
psadbw mm2, mm3
movq mm1, QWORD PTR [src_ptr+src_stride+8] movdqu xmm1, XMMWORD PTR [ref_ptr+ref_stride]
movq mm3, QWORD PTR [ref_ptr+ref_stride+8]
psadbw mm4, mm5 psadbw xmm2, xmm3
psadbw mm1, mm3 psadbw xmm4, xmm5
psadbw xmm6, xmm1
lea src_ptr, [src_ptr+src_stride*2] lea src_ptr, [src_ptr+src_stride*2]
lea ref_ptr, [ref_ptr+ref_stride*2] lea ref_ptr, [ref_ptr+ref_stride*2]
paddw mm0, mm2 paddw xmm7, xmm0
paddw mm4, mm1 paddw xmm7, xmm2
paddw xmm7, xmm4
paddw mm7, mm0 paddw xmm7, xmm6
paddw mm7, mm4
cmp src_ptr, end_ptr sub end_ptr, 1
jne .vp8_sad16x16_sse3_loop jne .vp8_sad16x16_sse3_loop
movq ret_var, mm7 movq xmm0, xmm7
psrldq xmm7, 8
.vp8_sad16x16_early_exit: paddw xmm0, xmm7
movq rax, xmm0
mov rax, ret_var
STACK_FRAME_DESTROY_X3 STACK_FRAME_DESTROY_X3
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment