2010-06-14 20:07:56 +02:00
|
|
|
;
|
2010-09-09 14:16:39 +02:00
|
|
|
; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
2010-06-14 20:07:56 +02:00
|
|
|
;
|
|
|
|
; Use of this source code is governed by a BSD-style license and patent
|
|
|
|
; grant that can be found in the LICENSE file in the root of the source
|
|
|
|
; tree. All contributing project authors may be found in the AUTHORS
|
|
|
|
; file in the root of the source tree.
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
%include "vpx_ports/x86_abi_support.asm"
|
2012-11-07 01:59:01 +01:00
|
|
|
%include "vp9_asm_enc_offsets.asm"
|
2010-06-14 20:07:56 +02:00
|
|
|
|
|
|
|
|
2012-10-30 20:58:42 +01:00
|
|
|
; void vp9_regular_quantize_b_sse2 | arg
|
2011-02-10 20:57:43 +01:00
|
|
|
; (BLOCK *b, | 0
|
|
|
|
; BLOCKD *d) | 1
|
|
|
|
|
2012-12-20 18:40:18 +01:00
|
|
|
global sym(vp9_regular_quantize_b_sse2) PRIVATE
|
2012-10-30 20:58:42 +01:00
|
|
|
sym(vp9_regular_quantize_b_sse2):
|
2010-06-14 20:07:56 +02:00
|
|
|
push rbp
|
|
|
|
mov rbp, rsp
|
2011-04-15 16:05:20 +02:00
|
|
|
SAVE_XMM 7
|
2011-02-10 20:57:43 +01:00
|
|
|
GET_GOT rbx
|
|
|
|
|
|
|
|
%if ABI_IS_32BIT
|
|
|
|
push rdi
|
2011-04-01 15:58:23 +02:00
|
|
|
push rsi
|
2011-02-10 20:57:43 +01:00
|
|
|
%else
|
2013-02-01 00:36:55 +01:00
|
|
|
%if LIBVPX_YASM_WIN64
|
2010-06-14 20:07:56 +02:00
|
|
|
push rdi
|
2011-04-01 15:58:23 +02:00
|
|
|
push rsi
|
2011-02-10 20:57:43 +01:00
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2010-06-14 20:07:56 +02:00
|
|
|
ALIGN_STACK 16, rax
|
2011-04-01 15:58:23 +02:00
|
|
|
%define zrun_zbin_boost 0 ; 8
|
|
|
|
%define abs_minus_zbin 8 ; 32
|
|
|
|
%define temp_qcoeff 40 ; 32
|
|
|
|
%define qcoeff 72 ; 32
|
|
|
|
%define stack_size 104
|
2011-01-11 15:41:57 +01:00
|
|
|
sub rsp, stack_size
|
|
|
|
; end prolog
|
2010-06-14 20:07:56 +02:00
|
|
|
|
2011-02-10 20:57:43 +01:00
|
|
|
%if ABI_IS_32BIT
|
2011-04-01 15:58:23 +02:00
|
|
|
mov rdi, arg(0) ; BLOCK *b
|
|
|
|
mov rsi, arg(1) ; BLOCKD *d
|
2011-02-10 20:57:43 +01:00
|
|
|
%else
|
2013-02-01 00:36:55 +01:00
|
|
|
%if LIBVPX_YASM_WIN64
|
2011-02-10 20:57:43 +01:00
|
|
|
mov rdi, rcx ; BLOCK *b
|
2011-04-01 15:58:23 +02:00
|
|
|
mov rsi, rdx ; BLOCKD *d
|
2011-02-10 20:57:43 +01:00
|
|
|
%else
|
|
|
|
;mov rdi, rdi ; BLOCK *b
|
2011-04-01 15:58:23 +02:00
|
|
|
;mov rsi, rsi ; BLOCKD *d
|
2011-02-10 20:57:43 +01:00
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2012-10-31 01:12:12 +01:00
|
|
|
mov rdx, [rdi + vp9_block_coeff] ; coeff_ptr
|
|
|
|
mov rcx, [rdi + vp9_block_zbin] ; zbin_ptr
|
|
|
|
movd xmm7, [rdi + vp9_block_zbin_extra] ; zbin_oq_value
|
2010-06-14 20:07:56 +02:00
|
|
|
|
2011-01-11 15:41:57 +01:00
|
|
|
; z
|
2011-02-10 20:57:43 +01:00
|
|
|
movdqa xmm0, [rdx]
|
|
|
|
movdqa xmm4, [rdx + 16]
|
2012-10-31 01:12:12 +01:00
|
|
|
mov rdx, [rdi + vp9_block_round] ; round_ptr
|
2010-06-14 20:07:56 +02:00
|
|
|
|
2011-01-11 15:41:57 +01:00
|
|
|
pshuflw xmm7, xmm7, 0
|
|
|
|
punpcklwd xmm7, xmm7 ; duplicated zbin_oq_value
|
|
|
|
|
2010-06-14 20:07:56 +02:00
|
|
|
movdqa xmm1, xmm0
|
|
|
|
movdqa xmm5, xmm4
|
|
|
|
|
2011-01-11 15:41:57 +01:00
|
|
|
; sz
|
|
|
|
psraw xmm0, 15
|
|
|
|
psraw xmm4, 15
|
2010-06-14 20:07:56 +02:00
|
|
|
|
2011-01-11 15:41:57 +01:00
|
|
|
; (z ^ sz)
|
2010-06-14 20:07:56 +02:00
|
|
|
pxor xmm1, xmm0
|
|
|
|
pxor xmm5, xmm4
|
|
|
|
|
2011-01-11 15:41:57 +01:00
|
|
|
; x = abs(z)
|
|
|
|
psubw xmm1, xmm0
|
|
|
|
psubw xmm5, xmm4
|
2010-06-14 20:07:56 +02:00
|
|
|
|
2011-02-10 20:57:43 +01:00
|
|
|
movdqa xmm2, [rcx]
|
|
|
|
movdqa xmm3, [rcx + 16]
|
2012-10-31 01:12:12 +01:00
|
|
|
mov rcx, [rdi + vp9_block_quant] ; quant_ptr
|
2010-06-14 20:07:56 +02:00
|
|
|
|
2011-01-11 15:41:57 +01:00
|
|
|
; *zbin_ptr + zbin_oq_value
|
2010-06-14 20:07:56 +02:00
|
|
|
paddw xmm2, xmm7
|
|
|
|
paddw xmm3, xmm7
|
|
|
|
|
2011-01-11 15:41:57 +01:00
|
|
|
; x - (*zbin_ptr + zbin_oq_value)
|
|
|
|
psubw xmm1, xmm2
|
|
|
|
psubw xmm5, xmm3
|
2011-02-10 20:57:43 +01:00
|
|
|
movdqa [rsp + abs_minus_zbin], xmm1
|
|
|
|
movdqa [rsp + abs_minus_zbin + 16], xmm5
|
2010-06-14 20:07:56 +02:00
|
|
|
|
2011-01-11 15:41:57 +01:00
|
|
|
; add (zbin_ptr + zbin_oq_value) back
|
|
|
|
paddw xmm1, xmm2
|
|
|
|
paddw xmm5, xmm3
|
2010-06-14 20:07:56 +02:00
|
|
|
|
2011-02-10 20:57:43 +01:00
|
|
|
movdqa xmm2, [rdx]
|
|
|
|
movdqa xmm6, [rdx + 16]
|
2011-01-11 15:41:57 +01:00
|
|
|
|
2011-02-10 20:57:43 +01:00
|
|
|
movdqa xmm3, [rcx]
|
|
|
|
movdqa xmm7, [rcx + 16]
|
2010-06-14 20:07:56 +02:00
|
|
|
|
2011-01-11 15:41:57 +01:00
|
|
|
; x + round
|
2010-06-14 20:07:56 +02:00
|
|
|
paddw xmm1, xmm2
|
|
|
|
paddw xmm5, xmm6
|
|
|
|
|
2011-01-11 15:41:57 +01:00
|
|
|
; y = x * quant_ptr >> 16
|
|
|
|
pmulhw xmm3, xmm1
|
|
|
|
pmulhw xmm7, xmm5
|
2010-06-14 20:07:56 +02:00
|
|
|
|
2011-01-11 15:41:57 +01:00
|
|
|
; y += x
|
|
|
|
paddw xmm1, xmm3
|
|
|
|
paddw xmm5, xmm7
|
2010-06-14 20:07:56 +02:00
|
|
|
|
2011-02-10 20:57:43 +01:00
|
|
|
movdqa [rsp + temp_qcoeff], xmm1
|
|
|
|
movdqa [rsp + temp_qcoeff + 16], xmm5
|
2010-06-14 20:07:56 +02:00
|
|
|
|
2011-01-11 15:41:57 +01:00
|
|
|
pxor xmm6, xmm6
|
|
|
|
; zero qcoeff
|
2011-02-10 20:57:43 +01:00
|
|
|
movdqa [rsp + qcoeff], xmm6
|
|
|
|
movdqa [rsp + qcoeff + 16], xmm6
|
2011-01-11 15:41:57 +01:00
|
|
|
|
2012-10-31 01:12:12 +01:00
|
|
|
mov rdx, [rdi + vp9_block_zrun_zbin_boost] ; zbin_boost_ptr
|
|
|
|
mov rax, [rdi + vp9_block_quant_shift] ; quant_shift_ptr
|
2011-04-01 15:58:23 +02:00
|
|
|
mov [rsp + zrun_zbin_boost], rdx
|
2011-01-11 15:41:57 +01:00
|
|
|
|
2011-02-10 20:57:43 +01:00
|
|
|
%macro ZIGZAG_LOOP 1
|
2011-01-11 15:41:57 +01:00
|
|
|
; x
|
2011-04-01 15:58:23 +02:00
|
|
|
movsx ecx, WORD PTR[rsp + abs_minus_zbin + %1 * 2]
|
2011-01-11 15:41:57 +01:00
|
|
|
|
|
|
|
; if (x >= zbin)
|
2011-04-01 15:58:23 +02:00
|
|
|
sub cx, WORD PTR[rdx] ; x - zbin
|
|
|
|
lea rdx, [rdx + 2] ; zbin_boost_ptr++
|
2011-08-23 00:29:41 +02:00
|
|
|
jl .rq_zigzag_loop_%1 ; x < zbin
|
2011-01-11 15:41:57 +01:00
|
|
|
|
2011-04-01 15:58:23 +02:00
|
|
|
movsx edi, WORD PTR[rsp + temp_qcoeff + %1 * 2]
|
2011-01-11 15:41:57 +01:00
|
|
|
|
2011-04-01 15:58:23 +02:00
|
|
|
; downshift by quant_shift[rc]
|
2011-04-13 19:45:58 +02:00
|
|
|
movsx cx, BYTE PTR[rax + %1] ; quant_shift_ptr[rc]
|
2011-02-10 20:57:43 +01:00
|
|
|
sar edi, cl ; also sets Z bit
|
2011-08-23 00:29:41 +02:00
|
|
|
je .rq_zigzag_loop_%1 ; !y
|
2011-04-01 15:58:23 +02:00
|
|
|
mov WORD PTR[rsp + qcoeff + %1 * 2], di ;qcoeff_ptr[rc] = temp_qcoeff[rc]
|
|
|
|
mov rdx, [rsp + zrun_zbin_boost] ; reset to b->zrun_zbin_boost
|
2011-08-23 00:29:41 +02:00
|
|
|
.rq_zigzag_loop_%1:
|
2011-01-11 15:41:57 +01:00
|
|
|
%endmacro
|
2012-11-27 22:59:17 +01:00
|
|
|
; in vp9_default_zig_zag1d order: see vp9/common/vp9_entropy.c
|
2011-04-01 15:58:23 +02:00
|
|
|
ZIGZAG_LOOP 0
|
|
|
|
ZIGZAG_LOOP 1
|
|
|
|
ZIGZAG_LOOP 4
|
|
|
|
ZIGZAG_LOOP 8
|
|
|
|
ZIGZAG_LOOP 5
|
|
|
|
ZIGZAG_LOOP 2
|
|
|
|
ZIGZAG_LOOP 3
|
|
|
|
ZIGZAG_LOOP 6
|
|
|
|
ZIGZAG_LOOP 9
|
2011-02-10 20:57:43 +01:00
|
|
|
ZIGZAG_LOOP 12
|
|
|
|
ZIGZAG_LOOP 13
|
2011-04-01 15:58:23 +02:00
|
|
|
ZIGZAG_LOOP 10
|
|
|
|
ZIGZAG_LOOP 7
|
|
|
|
ZIGZAG_LOOP 11
|
2011-02-10 20:57:43 +01:00
|
|
|
ZIGZAG_LOOP 14
|
|
|
|
ZIGZAG_LOOP 15
|
|
|
|
|
|
|
|
movdqa xmm2, [rsp + qcoeff]
|
|
|
|
movdqa xmm3, [rsp + qcoeff + 16]
|
|
|
|
|
2012-10-31 01:12:12 +01:00
|
|
|
mov rcx, [rsi + vp9_blockd_dequant] ; dequant_ptr
|
|
|
|
mov rdi, [rsi + vp9_blockd_dqcoeff] ; dqcoeff_ptr
|
2011-01-11 15:41:57 +01:00
|
|
|
|
|
|
|
; y ^ sz
|
|
|
|
pxor xmm2, xmm0
|
|
|
|
pxor xmm3, xmm4
|
|
|
|
; x = (y ^ sz) - sz
|
|
|
|
psubw xmm2, xmm0
|
|
|
|
psubw xmm3, xmm4
|
2010-06-14 20:07:56 +02:00
|
|
|
|
2011-02-10 20:57:43 +01:00
|
|
|
; dequant
|
|
|
|
movdqa xmm0, [rcx]
|
|
|
|
movdqa xmm1, [rcx + 16]
|
|
|
|
|
2012-10-31 01:12:12 +01:00
|
|
|
mov rcx, [rsi + vp9_blockd_qcoeff] ; qcoeff_ptr
|
2010-06-14 20:07:56 +02:00
|
|
|
|
|
|
|
pmullw xmm0, xmm2
|
|
|
|
pmullw xmm1, xmm3
|
|
|
|
|
2011-02-10 20:57:43 +01:00
|
|
|
movdqa [rcx], xmm2 ; store qcoeff
|
|
|
|
movdqa [rcx + 16], xmm3
|
2011-04-01 15:58:23 +02:00
|
|
|
movdqa [rdi], xmm0 ; store dqcoeff
|
|
|
|
movdqa [rdi + 16], xmm1
|
2011-02-10 20:57:43 +01:00
|
|
|
|
|
|
|
; select the last value (in zig_zag order) for EOB
|
|
|
|
pcmpeqw xmm2, xmm6
|
|
|
|
pcmpeqw xmm3, xmm6
|
|
|
|
; !
|
|
|
|
pcmpeqw xmm6, xmm6
|
|
|
|
pxor xmm2, xmm6
|
|
|
|
pxor xmm3, xmm6
|
|
|
|
; mask inv_zig_zag
|
|
|
|
pand xmm2, [GLOBAL(inv_zig_zag)]
|
2011-03-29 16:28:30 +02:00
|
|
|
pand xmm3, [GLOBAL(inv_zig_zag + 16)]
|
2011-02-10 20:57:43 +01:00
|
|
|
; select the max value
|
|
|
|
pmaxsw xmm2, xmm3
|
|
|
|
pshufd xmm3, xmm2, 00001110b
|
|
|
|
pmaxsw xmm2, xmm3
|
|
|
|
pshuflw xmm3, xmm2, 00001110b
|
|
|
|
pmaxsw xmm2, xmm3
|
|
|
|
pshuflw xmm3, xmm2, 00000001b
|
|
|
|
pmaxsw xmm2, xmm3
|
|
|
|
movd eax, xmm2
|
|
|
|
and eax, 0xff
|
2012-10-31 01:12:12 +01:00
|
|
|
mov [rsi + vp9_blockd_eob], eax
|
2010-06-14 20:07:56 +02:00
|
|
|
|
|
|
|
; begin epilog
|
2011-01-11 15:41:57 +01:00
|
|
|
add rsp, stack_size
|
|
|
|
pop rsp
|
2011-02-10 20:57:43 +01:00
|
|
|
%if ABI_IS_32BIT
|
2011-04-01 15:58:23 +02:00
|
|
|
pop rsi
|
2010-06-14 20:07:56 +02:00
|
|
|
pop rdi
|
2011-02-10 20:57:43 +01:00
|
|
|
%else
|
2013-02-01 00:36:55 +01:00
|
|
|
%if LIBVPX_YASM_WIN64
|
2011-04-01 15:58:23 +02:00
|
|
|
pop rsi
|
2011-02-10 20:57:43 +01:00
|
|
|
pop rdi
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
RESTORE_GOT
|
2011-01-11 15:41:57 +01:00
|
|
|
RESTORE_XMM
|
2010-06-14 20:07:56 +02:00
|
|
|
pop rbp
|
|
|
|
ret
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2012-10-30 20:58:42 +01:00
|
|
|
; void vp9_fast_quantize_b_sse2 | arg
|
2011-03-24 18:31:10 +01:00
|
|
|
; (BLOCK *b, | 0
|
|
|
|
; BLOCKD *d) | 1
|
|
|
|
|
2012-12-20 18:40:18 +01:00
|
|
|
global sym(vp9_fast_quantize_b_sse2) PRIVATE
|
2012-10-30 20:58:42 +01:00
|
|
|
sym(vp9_fast_quantize_b_sse2):
|
2010-10-07 17:43:19 +02:00
|
|
|
push rbp
|
|
|
|
mov rbp, rsp
|
2011-03-24 18:31:10 +01:00
|
|
|
GET_GOT rbx
|
|
|
|
|
|
|
|
%if ABI_IS_32BIT
|
|
|
|
push rdi
|
2010-10-07 17:43:19 +02:00
|
|
|
push rsi
|
2011-03-24 18:31:10 +01:00
|
|
|
%else
|
2013-02-01 00:36:55 +01:00
|
|
|
%if LIBVPX_YASM_WIN64
|
2010-10-07 17:43:19 +02:00
|
|
|
push rdi
|
2011-03-24 18:31:10 +01:00
|
|
|
push rsi
|
|
|
|
%else
|
|
|
|
; these registers are used for passing arguments
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2010-10-07 17:43:19 +02:00
|
|
|
; end prolog
|
|
|
|
|
2011-03-24 18:31:10 +01:00
|
|
|
%if ABI_IS_32BIT
|
|
|
|
mov rdi, arg(0) ; BLOCK *b
|
|
|
|
mov rsi, arg(1) ; BLOCKD *d
|
|
|
|
%else
|
2013-02-01 00:36:55 +01:00
|
|
|
%if LIBVPX_YASM_WIN64
|
2011-03-24 18:31:10 +01:00
|
|
|
mov rdi, rcx ; BLOCK *b
|
|
|
|
mov rsi, rdx ; BLOCKD *d
|
|
|
|
%else
|
|
|
|
;mov rdi, rdi ; BLOCK *b
|
|
|
|
;mov rsi, rsi ; BLOCKD *d
|
|
|
|
%endif
|
|
|
|
%endif
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2012-10-31 01:12:12 +01:00
|
|
|
mov rax, [rdi + vp9_block_coeff]
|
|
|
|
mov rcx, [rdi + vp9_block_round]
|
|
|
|
mov rdx, [rdi + vp9_block_quant_fast]
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2011-03-24 18:31:10 +01:00
|
|
|
; z = coeff
|
|
|
|
movdqa xmm0, [rax]
|
|
|
|
movdqa xmm4, [rax + 16]
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2011-03-24 18:31:10 +01:00
|
|
|
; dup z so we can save sz
|
2010-10-07 17:43:19 +02:00
|
|
|
movdqa xmm1, xmm0
|
|
|
|
movdqa xmm5, xmm4
|
|
|
|
|
2011-03-24 18:31:10 +01:00
|
|
|
; sz = z >> 15
|
|
|
|
psraw xmm0, 15
|
|
|
|
psraw xmm4, 15
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2011-03-24 18:31:10 +01:00
|
|
|
; x = abs(z) = (z ^ sz) - sz
|
2010-10-07 17:43:19 +02:00
|
|
|
pxor xmm1, xmm0
|
|
|
|
pxor xmm5, xmm4
|
2011-03-24 18:31:10 +01:00
|
|
|
psubw xmm1, xmm0
|
|
|
|
psubw xmm5, xmm4
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2011-03-24 18:31:10 +01:00
|
|
|
; x += round
|
|
|
|
paddw xmm1, [rcx]
|
|
|
|
paddw xmm5, [rcx + 16]
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2012-10-31 01:12:12 +01:00
|
|
|
mov rax, [rsi + vp9_blockd_qcoeff]
|
|
|
|
mov rcx, [rsi + vp9_blockd_dequant]
|
|
|
|
mov rdi, [rsi + vp9_blockd_dqcoeff]
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2011-03-24 18:31:10 +01:00
|
|
|
; y = x * quant >> 16
|
|
|
|
pmulhw xmm1, [rdx]
|
|
|
|
pmulhw xmm5, [rdx + 16]
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2011-03-24 18:31:10 +01:00
|
|
|
; x = (y ^ sz) - sz
|
2010-10-07 17:43:19 +02:00
|
|
|
pxor xmm1, xmm0
|
|
|
|
pxor xmm5, xmm4
|
|
|
|
psubw xmm1, xmm0
|
|
|
|
psubw xmm5, xmm4
|
|
|
|
|
2011-03-24 18:31:10 +01:00
|
|
|
; qcoeff = x
|
|
|
|
movdqa [rax], xmm1
|
|
|
|
movdqa [rax + 16], xmm5
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2011-03-24 18:31:10 +01:00
|
|
|
; x * dequant
|
|
|
|
movdqa xmm2, xmm1
|
|
|
|
movdqa xmm3, xmm5
|
|
|
|
pmullw xmm2, [rcx]
|
|
|
|
pmullw xmm3, [rcx + 16]
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2011-03-24 18:31:10 +01:00
|
|
|
; dqcoeff = x * dequant
|
|
|
|
movdqa [rdi], xmm2
|
|
|
|
movdqa [rdi + 16], xmm3
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2010-12-10 00:00:30 +01:00
|
|
|
pxor xmm4, xmm4 ;clear all bits
|
2010-10-07 17:43:19 +02:00
|
|
|
pcmpeqw xmm1, xmm4
|
|
|
|
pcmpeqw xmm5, xmm4
|
|
|
|
|
2010-12-10 00:00:30 +01:00
|
|
|
pcmpeqw xmm4, xmm4 ;set all bits
|
2010-10-07 17:43:19 +02:00
|
|
|
pxor xmm1, xmm4
|
|
|
|
pxor xmm5, xmm4
|
|
|
|
|
2011-03-24 18:31:10 +01:00
|
|
|
pand xmm1, [GLOBAL(inv_zig_zag)]
|
|
|
|
pand xmm5, [GLOBAL(inv_zig_zag + 16)]
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2010-12-10 00:00:30 +01:00
|
|
|
pmaxsw xmm1, xmm5
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2010-12-10 00:00:30 +01:00
|
|
|
; now down to 8
|
|
|
|
pshufd xmm5, xmm1, 00001110b
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2010-12-10 00:00:30 +01:00
|
|
|
pmaxsw xmm1, xmm5
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2010-12-10 00:00:30 +01:00
|
|
|
; only 4 left
|
|
|
|
pshuflw xmm5, xmm1, 00001110b
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2010-12-10 00:00:30 +01:00
|
|
|
pmaxsw xmm1, xmm5
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2010-12-10 00:00:30 +01:00
|
|
|
; okay, just 2!
|
|
|
|
pshuflw xmm5, xmm1, 00000001b
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2010-12-10 00:00:30 +01:00
|
|
|
pmaxsw xmm1, xmm5
|
2010-10-07 17:43:19 +02:00
|
|
|
|
2011-03-24 18:31:10 +01:00
|
|
|
movd eax, xmm1
|
|
|
|
and eax, 0xff
|
2012-10-31 01:12:12 +01:00
|
|
|
mov [rsi + vp9_blockd_eob], eax
|
2010-10-07 17:43:19 +02:00
|
|
|
|
|
|
|
; begin epilog
|
2011-03-24 18:31:10 +01:00
|
|
|
%if ABI_IS_32BIT
|
|
|
|
pop rsi
|
2010-10-07 17:43:19 +02:00
|
|
|
pop rdi
|
2011-03-24 18:31:10 +01:00
|
|
|
%else
|
2013-02-01 00:36:55 +01:00
|
|
|
%if LIBVPX_YASM_WIN64
|
2010-10-07 17:43:19 +02:00
|
|
|
pop rsi
|
2011-03-24 18:31:10 +01:00
|
|
|
pop rdi
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
RESTORE_GOT
|
2010-10-07 17:43:19 +02:00
|
|
|
pop rbp
|
|
|
|
ret
|
2011-02-10 20:57:43 +01:00
|
|
|
|
|
|
|
SECTION_RODATA
|
|
|
|
align 16
|
|
|
|
inv_zig_zag:
|
|
|
|
dw 0x0001, 0x0002, 0x0006, 0x0007
|
|
|
|
dw 0x0003, 0x0005, 0x0008, 0x000d
|
|
|
|
dw 0x0004, 0x0009, 0x000c, 0x000e
|
|
|
|
dw 0x000a, 0x000b, 0x000f, 0x0010
|