2 ; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 ; Use of this source code is governed by a BSD-style license
5 ; that can be found in the LICENSE file in the root of the source
6 ; tree. An additional intellectual property rights grant can be found
7 ; in the file PATENTS. All contributing project authors may
8 ; be found in the AUTHORS file in the root of the source tree.
12 %include "vpx_ports/x86_abi_support.asm"
14 ;int vp8_fast_quantize_b_impl_mmx(short *coeff_ptr, short *zbin_ptr,
15 ; short *qcoeff_ptr,short *dequant_ptr,
16 ; short *scan_mask, short *round_ptr,
17 ; short *quant_ptr, short *dqcoeff_ptr);
18 global sym
(vp8_fast_quantize_b_impl_mmx
)
19 sym
(vp8_fast_quantize_b_impl_mmx
):
22 SHADOW_ARGS_TO_STACK
8
28 mov rsi
, arg
(0) ;coeff_ptr
31 mov rax
, arg
(1) ;zbin_ptr
46 mov rdx
, arg
(6) ;quant_ptr
49 mov rcx
, arg
(5) ;round_ptr
56 psubw mm3
, mm0
;gain the sign back
58 mov rdi
, arg
(2) ;qcoeff_ptr
63 mov rax
, arg
(3) ;dequant_ptr
67 mov rax
, arg
(7) ;dqcoeff_ptr
74 mov rax
, arg
(1) ;zbin_ptr
96 psubw mm7
, mm4
;gain the sign back
98 mov rdi
, arg
(2) ;qcoeff_ptr
103 mov rax
, arg
(3) ;dequant_ptr
107 mov rax
, arg
(7) ;dqcoeff_ptr
115 mov rax
, arg
(1) ;zbin_ptr
137 psubw mm7
, mm4
;gain the sign back
139 mov rdi
, arg
(2) ;qcoeff_ptr
144 mov rax
, arg
(3) ;dequant_ptr
148 mov rax
, arg
(7) ;dqcoeff_ptr
156 mov rax
, arg
(1) ;zbin_ptr
178 psubw mm7
, mm4
;gain the sign back
180 mov rdi
, arg
(2) ;qcoeff_ptr
185 mov rax
, arg
(3) ;dequant_ptr
189 mov rax
, arg
(7) ;dqcoeff_ptr
195 mov rdi
, arg
(4) ;scan_mask
196 mov rsi
, arg
(2) ;qcoeff_ptr
251 ; eob adjustment begins here
256 sub rdx
, rcx
; rdx=-rcx
263 ; Substitute the sse assembly for the old mmx mixed assembly/C. The
264 ; following is kept as reference