|
shun-iwasawa |
82a8f5 |
;
|
|
shun-iwasawa |
82a8f5 |
; jidctfst.asm - fast integer IDCT (64-bit SSE2)
|
|
shun-iwasawa |
82a8f5 |
;
|
|
shun-iwasawa |
82a8f5 |
; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB</ossman@cendio.se>
|
|
shun-iwasawa |
82a8f5 |
; Copyright (C) 2009, 2016, D. R. Commander.
|
|
shun-iwasawa |
82a8f5 |
;
|
|
shun-iwasawa |
82a8f5 |
; Based on the x86 SIMD extension for IJG JPEG library
|
|
shun-iwasawa |
82a8f5 |
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
|
shun-iwasawa |
82a8f5 |
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
|
shun-iwasawa |
82a8f5 |
;
|
|
shun-iwasawa |
82a8f5 |
; This file should be assembled with NASM (Netwide Assembler),
|
|
shun-iwasawa |
82a8f5 |
; can *not* be assembled with Microsoft's MASM or any compatible
|
|
shun-iwasawa |
82a8f5 |
; assembler (including Borland's Turbo Assembler).
|
|
shun-iwasawa |
82a8f5 |
; NASM is available from http://nasm.sourceforge.net/ or
|
|
shun-iwasawa |
82a8f5 |
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
|
shun-iwasawa |
82a8f5 |
;
|
|
shun-iwasawa |
82a8f5 |
; This file contains a fast, not so accurate integer implementation of
|
|
shun-iwasawa |
82a8f5 |
; the inverse DCT (Discrete Cosine Transform). The following code is
|
|
shun-iwasawa |
82a8f5 |
; based directly on the IJG's original jidctfst.c; see the jidctfst.c
|
|
shun-iwasawa |
82a8f5 |
; for more details.
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
%include "jsimdext.inc"
|
|
shun-iwasawa |
82a8f5 |
%include "jdct.inc"
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; --------------------------------------------------------------------------
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
%define CONST_BITS 8 ; 14 is also OK.
|
|
shun-iwasawa |
82a8f5 |
%define PASS1_BITS 2
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
%if IFAST_SCALE_BITS != PASS1_BITS
|
|
shun-iwasawa |
82a8f5 |
%error "'IFAST_SCALE_BITS' must be equal to 'PASS1_BITS'."
|
|
shun-iwasawa |
82a8f5 |
%endif
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
%if CONST_BITS == 8
|
|
shun-iwasawa |
82a8f5 |
F_1_082 equ 277 ; FIX(1.082392200)
|
|
shun-iwasawa |
82a8f5 |
F_1_414 equ 362 ; FIX(1.414213562)
|
|
shun-iwasawa |
82a8f5 |
F_1_847 equ 473 ; FIX(1.847759065)
|
|
shun-iwasawa |
82a8f5 |
F_2_613 equ 669 ; FIX(2.613125930)
|
|
shun-iwasawa |
82a8f5 |
F_1_613 equ (F_2_613 - 256) ; FIX(2.613125930) - FIX(1)
|
|
shun-iwasawa |
82a8f5 |
%else
|
|
shun-iwasawa |
82a8f5 |
; NASM cannot do compile-time arithmetic on floating-point constants.
|
|
shun-iwasawa |
82a8f5 |
%define DESCALE(x, n) (((x) + (1 << ((n) - 1))) >> (n))
|
|
shun-iwasawa |
82a8f5 |
F_1_082 equ DESCALE(1162209775, 30 - CONST_BITS) ; FIX(1.082392200)
|
|
shun-iwasawa |
82a8f5 |
F_1_414 equ DESCALE(1518500249, 30 - CONST_BITS) ; FIX(1.414213562)
|
|
shun-iwasawa |
82a8f5 |
F_1_847 equ DESCALE(1984016188, 30 - CONST_BITS) ; FIX(1.847759065)
|
|
shun-iwasawa |
82a8f5 |
F_2_613 equ DESCALE(2805822602, 30 - CONST_BITS) ; FIX(2.613125930)
|
|
shun-iwasawa |
82a8f5 |
F_1_613 equ (F_2_613 - (1 << CONST_BITS)) ; FIX(2.613125930) - FIX(1)
|
|
shun-iwasawa |
82a8f5 |
%endif
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; --------------------------------------------------------------------------
|
|
shun-iwasawa |
82a8f5 |
SECTION SEG_CONST
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; PRE_MULTIPLY_SCALE_BITS <= 2 (to avoid overflow)
|
|
shun-iwasawa |
82a8f5 |
; CONST_BITS + CONST_SHIFT + PRE_MULTIPLY_SCALE_BITS == 16 (for pmulhw)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
%define PRE_MULTIPLY_SCALE_BITS 2
|
|
shun-iwasawa |
82a8f5 |
%define CONST_SHIFT (16 - PRE_MULTIPLY_SCALE_BITS - CONST_BITS)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
alignz 32
|
|
shun-iwasawa |
82a8f5 |
GLOBAL_DATA(jconst_idct_ifast_sse2)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
EXTN(jconst_idct_ifast_sse2):
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
PW_F1414 times 8 dw F_1_414 << CONST_SHIFT
|
|
shun-iwasawa |
82a8f5 |
PW_F1847 times 8 dw F_1_847 << CONST_SHIFT
|
|
shun-iwasawa |
82a8f5 |
PW_MF1613 times 8 dw -F_1_613 << CONST_SHIFT
|
|
shun-iwasawa |
82a8f5 |
PW_F1082 times 8 dw F_1_082 << CONST_SHIFT
|
|
shun-iwasawa |
82a8f5 |
PB_CENTERJSAMP times 16 db CENTERJSAMPLE
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
alignz 32
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; --------------------------------------------------------------------------
|
|
shun-iwasawa |
82a8f5 |
SECTION SEG_TEXT
|
|
shun-iwasawa |
82a8f5 |
BITS 64
|
|
shun-iwasawa |
82a8f5 |
;
|
|
shun-iwasawa |
82a8f5 |
; Perform dequantization and inverse DCT on one block of coefficients.
|
|
shun-iwasawa |
82a8f5 |
;
|
|
shun-iwasawa |
82a8f5 |
; GLOBAL(void)
|
|
shun-iwasawa |
82a8f5 |
; jsimd_idct_ifast_sse2(void *dct_table, JCOEFPTR coef_block,
|
|
shun-iwasawa |
82a8f5 |
; JSAMPARRAY output_buf, JDIMENSION output_col)
|
|
shun-iwasawa |
82a8f5 |
;
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; r10 = jpeg_component_info *compptr
|
|
shun-iwasawa |
82a8f5 |
; r11 = JCOEFPTR coef_block
|
|
shun-iwasawa |
82a8f5 |
; r12 = JSAMPARRAY output_buf
|
|
shun-iwasawa |
82a8f5 |
; r13d = JDIMENSION output_col
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
%define original_rbp rbp + 0
|
|
shun-iwasawa |
82a8f5 |
%define wk(i) rbp - (WK_NUM - (i)) * SIZEOF_XMMWORD
|
|
shun-iwasawa |
82a8f5 |
; xmmword wk[WK_NUM]
|
|
shun-iwasawa |
82a8f5 |
%define WK_NUM 2
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
align 32
|
|
shun-iwasawa |
82a8f5 |
GLOBAL_FUNCTION(jsimd_idct_ifast_sse2)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
EXTN(jsimd_idct_ifast_sse2):
|
|
shun-iwasawa |
82a8f5 |
push rbp
|
|
shun-iwasawa |
82a8f5 |
mov rax, rsp ; rax = original rbp
|
|
shun-iwasawa |
82a8f5 |
sub rsp, byte 4
|
|
shun-iwasawa |
82a8f5 |
and rsp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
|
|
shun-iwasawa |
82a8f5 |
mov [rsp], rax
|
|
shun-iwasawa |
82a8f5 |
mov rbp, rsp ; rbp = aligned rbp
|
|
shun-iwasawa |
82a8f5 |
lea rsp, [wk(0)]
|
|
shun-iwasawa |
82a8f5 |
collect_args 4
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; ---- Pass 1: process columns from input.
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
mov rdx, r10 ; quantptr
|
|
shun-iwasawa |
82a8f5 |
mov rsi, r11 ; inptr
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
%ifndef NO_ZERO_COLUMN_TEST_IFAST_SSE2
|
|
shun-iwasawa |
82a8f5 |
mov eax, dword [DWBLOCK(1,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
or eax, dword [DWBLOCK(2,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
jnz near .columnDCT
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm0, XMMWORD [XMMBLOCK(1,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm1, XMMWORD [XMMBLOCK(2,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
por xmm0, XMMWORD [XMMBLOCK(3,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
por xmm1, XMMWORD [XMMBLOCK(4,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
por xmm0, XMMWORD [XMMBLOCK(5,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
por xmm1, XMMWORD [XMMBLOCK(6,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
por xmm0, XMMWORD [XMMBLOCK(7,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
por xmm1, xmm0
|
|
shun-iwasawa |
82a8f5 |
packsswb xmm1, xmm1
|
|
shun-iwasawa |
82a8f5 |
packsswb xmm1, xmm1
|
|
shun-iwasawa |
82a8f5 |
movd eax, xmm1
|
|
shun-iwasawa |
82a8f5 |
test rax, rax
|
|
shun-iwasawa |
82a8f5 |
jnz short .columnDCT
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; -- AC terms all zero
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm0, XMMWORD [XMMBLOCK(0,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
pmullw xmm0, XMMWORD [XMMBLOCK(0,0,rdx,SIZEOF_ISLOW_MULT_TYPE)]
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm7, xmm0 ; xmm0=in0=(00 01 02 03 04 05 06 07)
|
|
shun-iwasawa |
82a8f5 |
punpcklwd xmm0, xmm0 ; xmm0=(00 00 01 01 02 02 03 03)
|
|
shun-iwasawa |
82a8f5 |
punpckhwd xmm7, xmm7 ; xmm7=(04 04 05 05 06 06 07 07)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
pshufd xmm6, xmm0, 0x00 ; xmm6=col0=(00 00 00 00 00 00 00 00)
|
|
shun-iwasawa |
82a8f5 |
pshufd xmm2, xmm0, 0x55 ; xmm2=col1=(01 01 01 01 01 01 01 01)
|
|
shun-iwasawa |
82a8f5 |
pshufd xmm5, xmm0, 0xAA ; xmm5=col2=(02 02 02 02 02 02 02 02)
|
|
shun-iwasawa |
82a8f5 |
pshufd xmm0, xmm0, 0xFF ; xmm0=col3=(03 03 03 03 03 03 03 03)
|
|
shun-iwasawa |
82a8f5 |
pshufd xmm1, xmm7, 0x00 ; xmm1=col4=(04 04 04 04 04 04 04 04)
|
|
shun-iwasawa |
82a8f5 |
pshufd xmm4, xmm7, 0x55 ; xmm4=col5=(05 05 05 05 05 05 05 05)
|
|
shun-iwasawa |
82a8f5 |
pshufd xmm3, xmm7, 0xAA ; xmm3=col6=(06 06 06 06 06 06 06 06)
|
|
shun-iwasawa |
82a8f5 |
pshufd xmm7, xmm7, 0xFF ; xmm7=col7=(07 07 07 07 07 07 07 07)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa XMMWORD [wk(0)], xmm2 ; wk(0)=col1
|
|
shun-iwasawa |
82a8f5 |
movdqa XMMWORD [wk(1)], xmm0 ; wk(1)=col3
|
|
shun-iwasawa |
82a8f5 |
jmp near .column_end
|
|
shun-iwasawa |
82a8f5 |
%endif
|
|
shun-iwasawa |
82a8f5 |
.columnDCT:
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; -- Even part
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm0, XMMWORD [XMMBLOCK(0,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm1, XMMWORD [XMMBLOCK(2,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
pmullw xmm0, XMMWORD [XMMBLOCK(0,0,rdx,SIZEOF_IFAST_MULT_TYPE)]
|
|
shun-iwasawa |
82a8f5 |
pmullw xmm1, XMMWORD [XMMBLOCK(2,0,rdx,SIZEOF_IFAST_MULT_TYPE)]
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm2, XMMWORD [XMMBLOCK(4,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm3, XMMWORD [XMMBLOCK(6,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
pmullw xmm2, XMMWORD [XMMBLOCK(4,0,rdx,SIZEOF_IFAST_MULT_TYPE)]
|
|
shun-iwasawa |
82a8f5 |
pmullw xmm3, XMMWORD [XMMBLOCK(6,0,rdx,SIZEOF_IFAST_MULT_TYPE)]
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm4, xmm0
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm5, xmm1
|
|
shun-iwasawa |
82a8f5 |
psubw xmm0, xmm2 ; xmm0=tmp11
|
|
shun-iwasawa |
82a8f5 |
psubw xmm1, xmm3
|
|
shun-iwasawa |
82a8f5 |
paddw xmm4, xmm2 ; xmm4=tmp10
|
|
shun-iwasawa |
82a8f5 |
paddw xmm5, xmm3 ; xmm5=tmp13
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
psllw xmm1, PRE_MULTIPLY_SCALE_BITS
|
|
shun-iwasawa |
82a8f5 |
pmulhw xmm1, [rel PW_F1414]
|
|
shun-iwasawa |
82a8f5 |
psubw xmm1, xmm5 ; xmm1=tmp12
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm6, xmm4
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm7, xmm0
|
|
shun-iwasawa |
82a8f5 |
psubw xmm4, xmm5 ; xmm4=tmp3
|
|
shun-iwasawa |
82a8f5 |
psubw xmm0, xmm1 ; xmm0=tmp2
|
|
shun-iwasawa |
82a8f5 |
paddw xmm6, xmm5 ; xmm6=tmp0
|
|
shun-iwasawa |
82a8f5 |
paddw xmm7, xmm1 ; xmm7=tmp1
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa XMMWORD [wk(1)], xmm4 ; wk(1)=tmp3
|
|
shun-iwasawa |
82a8f5 |
movdqa XMMWORD [wk(0)], xmm0 ; wk(0)=tmp2
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; -- Odd part
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm2, XMMWORD [XMMBLOCK(1,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm3, XMMWORD [XMMBLOCK(3,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
pmullw xmm2, XMMWORD [XMMBLOCK(1,0,rdx,SIZEOF_IFAST_MULT_TYPE)]
|
|
shun-iwasawa |
82a8f5 |
pmullw xmm3, XMMWORD [XMMBLOCK(3,0,rdx,SIZEOF_IFAST_MULT_TYPE)]
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm5, XMMWORD [XMMBLOCK(5,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm1, XMMWORD [XMMBLOCK(7,0,rsi,SIZEOF_JCOEF)]
|
|
shun-iwasawa |
82a8f5 |
pmullw xmm5, XMMWORD [XMMBLOCK(5,0,rdx,SIZEOF_IFAST_MULT_TYPE)]
|
|
shun-iwasawa |
82a8f5 |
pmullw xmm1, XMMWORD [XMMBLOCK(7,0,rdx,SIZEOF_IFAST_MULT_TYPE)]
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm4, xmm2
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm0, xmm5
|
|
shun-iwasawa |
82a8f5 |
psubw xmm2, xmm1 ; xmm2=z12
|
|
shun-iwasawa |
82a8f5 |
psubw xmm5, xmm3 ; xmm5=z10
|
|
shun-iwasawa |
82a8f5 |
paddw xmm4, xmm1 ; xmm4=z11
|
|
shun-iwasawa |
82a8f5 |
paddw xmm0, xmm3 ; xmm0=z13
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm1, xmm5 ; xmm1=z10(unscaled)
|
|
shun-iwasawa |
82a8f5 |
psllw xmm2, PRE_MULTIPLY_SCALE_BITS
|
|
shun-iwasawa |
82a8f5 |
psllw xmm5, PRE_MULTIPLY_SCALE_BITS
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm3, xmm4
|
|
shun-iwasawa |
82a8f5 |
psubw xmm4, xmm0
|
|
shun-iwasawa |
82a8f5 |
paddw xmm3, xmm0 ; xmm3=tmp7
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
psllw xmm4, PRE_MULTIPLY_SCALE_BITS
|
|
shun-iwasawa |
82a8f5 |
pmulhw xmm4, [rel PW_F1414] ; xmm4=tmp11
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; To avoid overflow...
|
|
shun-iwasawa |
82a8f5 |
;
|
|
shun-iwasawa |
82a8f5 |
; (Original)
|
|
shun-iwasawa |
82a8f5 |
; tmp12 = -2.613125930 * z10 + z5;
|
|
shun-iwasawa |
82a8f5 |
;
|
|
shun-iwasawa |
82a8f5 |
; (This implementation)
|
|
shun-iwasawa |
82a8f5 |
; tmp12 = (-1.613125930 - 1) * z10 + z5;
|
|
shun-iwasawa |
82a8f5 |
; = -1.613125930 * z10 - z10 + z5;
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm0, xmm5
|
|
shun-iwasawa |
82a8f5 |
paddw xmm5, xmm2
|
|
shun-iwasawa |
82a8f5 |
pmulhw xmm5, [rel PW_F1847] ; xmm5=z5
|
|
shun-iwasawa |
82a8f5 |
pmulhw xmm0, [rel PW_MF1613]
|
|
shun-iwasawa |
82a8f5 |
pmulhw xmm2, [rel PW_F1082]
|
|
shun-iwasawa |
82a8f5 |
psubw xmm0, xmm1
|
|
shun-iwasawa |
82a8f5 |
psubw xmm2, xmm5 ; xmm2=tmp10
|
|
shun-iwasawa |
82a8f5 |
paddw xmm0, xmm5 ; xmm0=tmp12
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; -- Final output stage
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
psubw xmm0, xmm3 ; xmm0=tmp6
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm1, xmm6
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm5, xmm7
|
|
shun-iwasawa |
82a8f5 |
paddw xmm6, xmm3 ; xmm6=data0=(00 01 02 03 04 05 06 07)
|
|
shun-iwasawa |
82a8f5 |
paddw xmm7, xmm0 ; xmm7=data1=(10 11 12 13 14 15 16 17)
|
|
shun-iwasawa |
82a8f5 |
psubw xmm1, xmm3 ; xmm1=data7=(70 71 72 73 74 75 76 77)
|
|
shun-iwasawa |
82a8f5 |
psubw xmm5, xmm0 ; xmm5=data6=(60 61 62 63 64 65 66 67)
|
|
shun-iwasawa |
82a8f5 |
psubw xmm4, xmm0 ; xmm4=tmp5
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm3, xmm6 ; transpose coefficients(phase 1)
|
|
shun-iwasawa |
82a8f5 |
punpcklwd xmm6, xmm7 ; xmm6=(00 10 01 11 02 12 03 13)
|
|
shun-iwasawa |
82a8f5 |
punpckhwd xmm3, xmm7 ; xmm3=(04 14 05 15 06 16 07 17)
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm0, xmm5 ; transpose coefficients(phase 1)
|
|
shun-iwasawa |
82a8f5 |
punpcklwd xmm5, xmm1 ; xmm5=(60 70 61 71 62 72 63 73)
|
|
shun-iwasawa |
82a8f5 |
punpckhwd xmm0, xmm1 ; xmm0=(64 74 65 75 66 76 67 77)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm7, XMMWORD [wk(0)] ; xmm7=tmp2
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm1, XMMWORD [wk(1)] ; xmm1=tmp3
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa XMMWORD [wk(0)], xmm5 ; wk(0)=(60 70 61 71 62 72 63 73)
|
|
shun-iwasawa |
82a8f5 |
movdqa XMMWORD [wk(1)], xmm0 ; wk(1)=(64 74 65 75 66 76 67 77)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
paddw xmm2, xmm4 ; xmm2=tmp4
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm5, xmm7
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm0, xmm1
|
|
shun-iwasawa |
82a8f5 |
paddw xmm7, xmm4 ; xmm7=data2=(20 21 22 23 24 25 26 27)
|
|
shun-iwasawa |
82a8f5 |
paddw xmm1, xmm2 ; xmm1=data4=(40 41 42 43 44 45 46 47)
|
|
shun-iwasawa |
82a8f5 |
psubw xmm5, xmm4 ; xmm5=data5=(50 51 52 53 54 55 56 57)
|
|
shun-iwasawa |
82a8f5 |
psubw xmm0, xmm2 ; xmm0=data3=(30 31 32 33 34 35 36 37)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm4, xmm7 ; transpose coefficients(phase 1)
|
|
shun-iwasawa |
82a8f5 |
punpcklwd xmm7, xmm0 ; xmm7=(20 30 21 31 22 32 23 33)
|
|
shun-iwasawa |
82a8f5 |
punpckhwd xmm4, xmm0 ; xmm4=(24 34 25 35 26 36 27 37)
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm2, xmm1 ; transpose coefficients(phase 1)
|
|
shun-iwasawa |
82a8f5 |
punpcklwd xmm1, xmm5 ; xmm1=(40 50 41 51 42 52 43 53)
|
|
shun-iwasawa |
82a8f5 |
punpckhwd xmm2, xmm5 ; xmm2=(44 54 45 55 46 56 47 57)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm0, xmm3 ; transpose coefficients(phase 2)
|
|
shun-iwasawa |
82a8f5 |
punpckldq xmm3, xmm4 ; xmm3=(04 14 24 34 05 15 25 35)
|
|
shun-iwasawa |
82a8f5 |
punpckhdq xmm0, xmm4 ; xmm0=(06 16 26 36 07 17 27 37)
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm5, xmm6 ; transpose coefficients(phase 2)
|
|
shun-iwasawa |
82a8f5 |
punpckldq xmm6, xmm7 ; xmm6=(00 10 20 30 01 11 21 31)
|
|
shun-iwasawa |
82a8f5 |
punpckhdq xmm5, xmm7 ; xmm5=(02 12 22 32 03 13 23 33)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm4, XMMWORD [wk(0)] ; xmm4=(60 70 61 71 62 72 63 73)
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm7, XMMWORD [wk(1)] ; xmm7=(64 74 65 75 66 76 67 77)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa XMMWORD [wk(0)], xmm3 ; wk(0)=(04 14 24 34 05 15 25 35)
|
|
shun-iwasawa |
82a8f5 |
movdqa XMMWORD [wk(1)], xmm0 ; wk(1)=(06 16 26 36 07 17 27 37)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm3, xmm1 ; transpose coefficients(phase 2)
|
|
shun-iwasawa |
82a8f5 |
punpckldq xmm1, xmm4 ; xmm1=(40 50 60 70 41 51 61 71)
|
|
shun-iwasawa |
82a8f5 |
punpckhdq xmm3, xmm4 ; xmm3=(42 52 62 72 43 53 63 73)
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm0, xmm2 ; transpose coefficients(phase 2)
|
|
shun-iwasawa |
82a8f5 |
punpckldq xmm2, xmm7 ; xmm2=(44 54 64 74 45 55 65 75)
|
|
shun-iwasawa |
82a8f5 |
punpckhdq xmm0, xmm7 ; xmm0=(46 56 66 76 47 57 67 77)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm4, xmm6 ; transpose coefficients(phase 3)
|
|
shun-iwasawa |
82a8f5 |
punpcklqdq xmm6, xmm1 ; xmm6=col0=(00 10 20 30 40 50 60 70)
|
|
shun-iwasawa |
82a8f5 |
punpckhqdq xmm4, xmm1 ; xmm4=col1=(01 11 21 31 41 51 61 71)
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm7, xmm5 ; transpose coefficients(phase 3)
|
|
shun-iwasawa |
82a8f5 |
punpcklqdq xmm5, xmm3 ; xmm5=col2=(02 12 22 32 42 52 62 72)
|
|
shun-iwasawa |
82a8f5 |
punpckhqdq xmm7, xmm3 ; xmm7=col3=(03 13 23 33 43 53 63 73)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm1, XMMWORD [wk(0)] ; xmm1=(04 14 24 34 05 15 25 35)
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm3, XMMWORD [wk(1)] ; xmm3=(06 16 26 36 07 17 27 37)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa XMMWORD [wk(0)], xmm4 ; wk(0)=col1
|
|
shun-iwasawa |
82a8f5 |
movdqa XMMWORD [wk(1)], xmm7 ; wk(1)=col3
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm4, xmm1 ; transpose coefficients(phase 3)
|
|
shun-iwasawa |
82a8f5 |
punpcklqdq xmm1, xmm2 ; xmm1=col4=(04 14 24 34 44 54 64 74)
|
|
shun-iwasawa |
82a8f5 |
punpckhqdq xmm4, xmm2 ; xmm4=col5=(05 15 25 35 45 55 65 75)
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm7, xmm3 ; transpose coefficients(phase 3)
|
|
shun-iwasawa |
82a8f5 |
punpcklqdq xmm3, xmm0 ; xmm3=col6=(06 16 26 36 46 56 66 76)
|
|
shun-iwasawa |
82a8f5 |
punpckhqdq xmm7, xmm0 ; xmm7=col7=(07 17 27 37 47 57 67 77)
|
|
shun-iwasawa |
82a8f5 |
.column_end:
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; -- Prefetch the next coefficient block
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
prefetchnta [rsi + DCTSIZE2*SIZEOF_JCOEF + 0*32]
|
|
shun-iwasawa |
82a8f5 |
prefetchnta [rsi + DCTSIZE2*SIZEOF_JCOEF + 1*32]
|
|
shun-iwasawa |
82a8f5 |
prefetchnta [rsi + DCTSIZE2*SIZEOF_JCOEF + 2*32]
|
|
shun-iwasawa |
82a8f5 |
prefetchnta [rsi + DCTSIZE2*SIZEOF_JCOEF + 3*32]
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; ---- Pass 2: process rows from work array, store into output array.
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
mov rax, [original_rbp]
|
|
shun-iwasawa |
82a8f5 |
mov rdi, r12 ; (JSAMPROW *)
|
|
shun-iwasawa |
82a8f5 |
mov eax, r13d
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; -- Even part
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; xmm6=col0, xmm5=col2, xmm1=col4, xmm3=col6
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm2, xmm6
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm0, xmm5
|
|
shun-iwasawa |
82a8f5 |
psubw xmm6, xmm1 ; xmm6=tmp11
|
|
shun-iwasawa |
82a8f5 |
psubw xmm5, xmm3
|
|
shun-iwasawa |
82a8f5 |
paddw xmm2, xmm1 ; xmm2=tmp10
|
|
shun-iwasawa |
82a8f5 |
paddw xmm0, xmm3 ; xmm0=tmp13
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
psllw xmm5, PRE_MULTIPLY_SCALE_BITS
|
|
shun-iwasawa |
82a8f5 |
pmulhw xmm5, [rel PW_F1414]
|
|
shun-iwasawa |
82a8f5 |
psubw xmm5, xmm0 ; xmm5=tmp12
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm1, xmm2
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm3, xmm6
|
|
shun-iwasawa |
82a8f5 |
psubw xmm2, xmm0 ; xmm2=tmp3
|
|
shun-iwasawa |
82a8f5 |
psubw xmm6, xmm5 ; xmm6=tmp2
|
|
shun-iwasawa |
82a8f5 |
paddw xmm1, xmm0 ; xmm1=tmp0
|
|
shun-iwasawa |
82a8f5 |
paddw xmm3, xmm5 ; xmm3=tmp1
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm0, XMMWORD [wk(0)] ; xmm0=col1
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm5, XMMWORD [wk(1)] ; xmm5=col3
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa XMMWORD [wk(0)], xmm2 ; wk(0)=tmp3
|
|
shun-iwasawa |
82a8f5 |
movdqa XMMWORD [wk(1)], xmm6 ; wk(1)=tmp2
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; -- Odd part
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; xmm0=col1, xmm5=col3, xmm4=col5, xmm7=col7
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm2, xmm0
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm6, xmm4
|
|
shun-iwasawa |
82a8f5 |
psubw xmm0, xmm7 ; xmm0=z12
|
|
shun-iwasawa |
82a8f5 |
psubw xmm4, xmm5 ; xmm4=z10
|
|
shun-iwasawa |
82a8f5 |
paddw xmm2, xmm7 ; xmm2=z11
|
|
shun-iwasawa |
82a8f5 |
paddw xmm6, xmm5 ; xmm6=z13
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm7, xmm4 ; xmm7=z10(unscaled)
|
|
shun-iwasawa |
82a8f5 |
psllw xmm0, PRE_MULTIPLY_SCALE_BITS
|
|
shun-iwasawa |
82a8f5 |
psllw xmm4, PRE_MULTIPLY_SCALE_BITS
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm5, xmm2
|
|
shun-iwasawa |
82a8f5 |
psubw xmm2, xmm6
|
|
shun-iwasawa |
82a8f5 |
paddw xmm5, xmm6 ; xmm5=tmp7
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
psllw xmm2, PRE_MULTIPLY_SCALE_BITS
|
|
shun-iwasawa |
82a8f5 |
pmulhw xmm2, [rel PW_F1414] ; xmm2=tmp11
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; To avoid overflow...
|
|
shun-iwasawa |
82a8f5 |
;
|
|
shun-iwasawa |
82a8f5 |
; (Original)
|
|
shun-iwasawa |
82a8f5 |
; tmp12 = -2.613125930 * z10 + z5;
|
|
shun-iwasawa |
82a8f5 |
;
|
|
shun-iwasawa |
82a8f5 |
; (This implementation)
|
|
shun-iwasawa |
82a8f5 |
; tmp12 = (-1.613125930 - 1) * z10 + z5;
|
|
shun-iwasawa |
82a8f5 |
; = -1.613125930 * z10 - z10 + z5;
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm6, xmm4
|
|
shun-iwasawa |
82a8f5 |
paddw xmm4, xmm0
|
|
shun-iwasawa |
82a8f5 |
pmulhw xmm4, [rel PW_F1847] ; xmm4=z5
|
|
shun-iwasawa |
82a8f5 |
pmulhw xmm6, [rel PW_MF1613]
|
|
shun-iwasawa |
82a8f5 |
pmulhw xmm0, [rel PW_F1082]
|
|
shun-iwasawa |
82a8f5 |
psubw xmm6, xmm7
|
|
shun-iwasawa |
82a8f5 |
psubw xmm0, xmm4 ; xmm0=tmp10
|
|
shun-iwasawa |
82a8f5 |
paddw xmm6, xmm4 ; xmm6=tmp12
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; -- Final output stage
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
psubw xmm6, xmm5 ; xmm6=tmp6
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm7, xmm1
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm4, xmm3
|
|
shun-iwasawa |
82a8f5 |
paddw xmm1, xmm5 ; xmm1=data0=(00 10 20 30 40 50 60 70)
|
|
shun-iwasawa |
82a8f5 |
paddw xmm3, xmm6 ; xmm3=data1=(01 11 21 31 41 51 61 71)
|
|
shun-iwasawa |
82a8f5 |
psraw xmm1, (PASS1_BITS+3) ; descale
|
|
shun-iwasawa |
82a8f5 |
psraw xmm3, (PASS1_BITS+3) ; descale
|
|
shun-iwasawa |
82a8f5 |
psubw xmm7, xmm5 ; xmm7=data7=(07 17 27 37 47 57 67 77)
|
|
shun-iwasawa |
82a8f5 |
psubw xmm4, xmm6 ; xmm4=data6=(06 16 26 36 46 56 66 76)
|
|
shun-iwasawa |
82a8f5 |
psraw xmm7, (PASS1_BITS+3) ; descale
|
|
shun-iwasawa |
82a8f5 |
psraw xmm4, (PASS1_BITS+3) ; descale
|
|
shun-iwasawa |
82a8f5 |
psubw xmm2, xmm6 ; xmm2=tmp5
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
packsswb xmm1, xmm4 ; xmm1=(00 10 20 30 40 50 60 70 06 16 26 36 46 56 66 76)
|
|
shun-iwasawa |
82a8f5 |
packsswb xmm3, xmm7 ; xmm3=(01 11 21 31 41 51 61 71 07 17 27 37 47 57 67 77)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm5, XMMWORD [wk(1)] ; xmm5=tmp2
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm6, XMMWORD [wk(0)] ; xmm6=tmp3
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
paddw xmm0, xmm2 ; xmm0=tmp4
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm4, xmm5
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm7, xmm6
|
|
shun-iwasawa |
82a8f5 |
paddw xmm5, xmm2 ; xmm5=data2=(02 12 22 32 42 52 62 72)
|
|
shun-iwasawa |
82a8f5 |
paddw xmm6, xmm0 ; xmm6=data4=(04 14 24 34 44 54 64 74)
|
|
shun-iwasawa |
82a8f5 |
psraw xmm5, (PASS1_BITS+3) ; descale
|
|
shun-iwasawa |
82a8f5 |
psraw xmm6, (PASS1_BITS+3) ; descale
|
|
shun-iwasawa |
82a8f5 |
psubw xmm4, xmm2 ; xmm4=data5=(05 15 25 35 45 55 65 75)
|
|
shun-iwasawa |
82a8f5 |
psubw xmm7, xmm0 ; xmm7=data3=(03 13 23 33 43 53 63 73)
|
|
shun-iwasawa |
82a8f5 |
psraw xmm4, (PASS1_BITS+3) ; descale
|
|
shun-iwasawa |
82a8f5 |
psraw xmm7, (PASS1_BITS+3) ; descale
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm2, [rel PB_CENTERJSAMP] ; xmm2=[rel PB_CENTERJSAMP]
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
packsswb xmm5, xmm6 ; xmm5=(02 12 22 32 42 52 62 72 04 14 24 34 44 54 64 74)
|
|
shun-iwasawa |
82a8f5 |
packsswb xmm7, xmm4 ; xmm7=(03 13 23 33 43 53 63 73 05 15 25 35 45 55 65 75)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
paddb xmm1, xmm2
|
|
shun-iwasawa |
82a8f5 |
paddb xmm3, xmm2
|
|
shun-iwasawa |
82a8f5 |
paddb xmm5, xmm2
|
|
shun-iwasawa |
82a8f5 |
paddb xmm7, xmm2
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm0, xmm1 ; transpose coefficients(phase 1)
|
|
shun-iwasawa |
82a8f5 |
punpcklbw xmm1, xmm3 ; xmm1=(00 01 10 11 20 21 30 31 40 41 50 51 60 61 70 71)
|
|
shun-iwasawa |
82a8f5 |
punpckhbw xmm0, xmm3 ; xmm0=(06 07 16 17 26 27 36 37 46 47 56 57 66 67 76 77)
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm6, xmm5 ; transpose coefficients(phase 1)
|
|
shun-iwasawa |
82a8f5 |
punpcklbw xmm5, xmm7 ; xmm5=(02 03 12 13 22 23 32 33 42 43 52 53 62 63 72 73)
|
|
shun-iwasawa |
82a8f5 |
punpckhbw xmm6, xmm7 ; xmm6=(04 05 14 15 24 25 34 35 44 45 54 55 64 65 74 75)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm4, xmm1 ; transpose coefficients(phase 2)
|
|
shun-iwasawa |
82a8f5 |
punpcklwd xmm1, xmm5 ; xmm1=(00 01 02 03 10 11 12 13 20 21 22 23 30 31 32 33)
|
|
shun-iwasawa |
82a8f5 |
punpckhwd xmm4, xmm5 ; xmm4=(40 41 42 43 50 51 52 53 60 61 62 63 70 71 72 73)
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm2, xmm6 ; transpose coefficients(phase 2)
|
|
shun-iwasawa |
82a8f5 |
punpcklwd xmm6, xmm0 ; xmm6=(04 05 06 07 14 15 16 17 24 25 26 27 34 35 36 37)
|
|
shun-iwasawa |
82a8f5 |
punpckhwd xmm2, xmm0 ; xmm2=(44 45 46 47 54 55 56 57 64 65 66 67 74 75 76 77)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm3, xmm1 ; transpose coefficients(phase 3)
|
|
shun-iwasawa |
82a8f5 |
punpckldq xmm1, xmm6 ; xmm1=(00 01 02 03 04 05 06 07 10 11 12 13 14 15 16 17)
|
|
shun-iwasawa |
82a8f5 |
punpckhdq xmm3, xmm6 ; xmm3=(20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37)
|
|
shun-iwasawa |
82a8f5 |
movdqa xmm7, xmm4 ; transpose coefficients(phase 3)
|
|
shun-iwasawa |
82a8f5 |
punpckldq xmm4, xmm2 ; xmm4=(40 41 42 43 44 45 46 47 50 51 52 53 54 55 56 57)
|
|
shun-iwasawa |
82a8f5 |
punpckhdq xmm7, xmm2 ; xmm7=(60 61 62 63 64 65 66 67 70 71 72 73 74 75 76 77)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
pshufd xmm5, xmm1, 0x4E ; xmm5=(10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07)
|
|
shun-iwasawa |
82a8f5 |
pshufd xmm0, xmm3, 0x4E ; xmm0=(30 31 32 33 34 35 36 37 20 21 22 23 24 25 26 27)
|
|
shun-iwasawa |
82a8f5 |
pshufd xmm6, xmm4, 0x4E ; xmm6=(50 51 52 53 54 55 56 57 40 41 42 43 44 45 46 47)
|
|
shun-iwasawa |
82a8f5 |
pshufd xmm2, xmm7, 0x4E ; xmm2=(70 71 72 73 74 75 76 77 60 61 62 63 64 65 66 67)
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
mov rdx, JSAMPROW [rdi+0*SIZEOF_JSAMPROW]
|
|
shun-iwasawa |
82a8f5 |
mov rsi, JSAMPROW [rdi+2*SIZEOF_JSAMPROW]
|
|
shun-iwasawa |
82a8f5 |
movq XMM_MMWORD [rdx+rax*SIZEOF_JSAMPLE], xmm1
|
|
shun-iwasawa |
82a8f5 |
movq XMM_MMWORD [rsi+rax*SIZEOF_JSAMPLE], xmm3
|
|
shun-iwasawa |
82a8f5 |
mov rdx, JSAMPROW [rdi+4*SIZEOF_JSAMPROW]
|
|
shun-iwasawa |
82a8f5 |
mov rsi, JSAMPROW [rdi+6*SIZEOF_JSAMPROW]
|
|
shun-iwasawa |
82a8f5 |
movq XMM_MMWORD [rdx+rax*SIZEOF_JSAMPLE], xmm4
|
|
shun-iwasawa |
82a8f5 |
movq XMM_MMWORD [rsi+rax*SIZEOF_JSAMPLE], xmm7
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
mov rdx, JSAMPROW [rdi+1*SIZEOF_JSAMPROW]
|
|
shun-iwasawa |
82a8f5 |
mov rsi, JSAMPROW [rdi+3*SIZEOF_JSAMPROW]
|
|
shun-iwasawa |
82a8f5 |
movq XMM_MMWORD [rdx+rax*SIZEOF_JSAMPLE], xmm5
|
|
shun-iwasawa |
82a8f5 |
movq XMM_MMWORD [rsi+rax*SIZEOF_JSAMPLE], xmm0
|
|
shun-iwasawa |
82a8f5 |
mov rdx, JSAMPROW [rdi+5*SIZEOF_JSAMPROW]
|
|
shun-iwasawa |
82a8f5 |
mov rsi, JSAMPROW [rdi+7*SIZEOF_JSAMPROW]
|
|
shun-iwasawa |
82a8f5 |
movq XMM_MMWORD [rdx+rax*SIZEOF_JSAMPLE], xmm6
|
|
shun-iwasawa |
82a8f5 |
movq XMM_MMWORD [rsi+rax*SIZEOF_JSAMPLE], xmm2
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
uncollect_args 4
|
|
shun-iwasawa |
82a8f5 |
mov rsp, rbp ; rsp <- aligned rbp
|
|
shun-iwasawa |
82a8f5 |
pop rsp ; rsp <- original rbp
|
|
shun-iwasawa |
82a8f5 |
pop rbp
|
|
shun-iwasawa |
82a8f5 |
ret
|
|
shun-iwasawa |
82a8f5 |
ret
|
|
shun-iwasawa |
82a8f5 |
|
|
shun-iwasawa |
82a8f5 |
; For some reason, the OS X linker does not honor the request to align the
|
|
shun-iwasawa |
82a8f5 |
; segment unless we do this.
|
|
shun-iwasawa |
82a8f5 |
align 32
|