mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 18:07:31 +09:00
libjpeg-turbo: update to 2.1.x rev 0734e34f6
This commit is contained in:
parent
667129e471
commit
19dc62b0a2
139 changed files with 989 additions and 962 deletions
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jcolsamp.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jcolsamp.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jcolsamp.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jcolsamp.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
;
|
||||
; jchuff-sse2.asm - Huffman entropy encoding (64-bit SSE2)
|
||||
;
|
||||
; Copyright (C) 2009-2011, 2014-2016, 2019, 2021, D. R. Commander.
|
||||
; Copyright (C) 2009-2011, 2014-2016, 2019, 2021, 2024, D. R. Commander.
|
||||
; Copyright (C) 2015, Matthieu Darbois.
|
||||
; Copyright (C) 2018, Matthias Räncker.
|
||||
;
|
||||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
;
|
||||
; This file contains an SSE2 implementation for Huffman coding of one block.
|
||||
; The following code is based on jchuff.c; see jchuff.c for more details.
|
||||
|
|
@ -66,7 +62,8 @@ times 1 << 2 db 3
|
|||
times 1 << 1 db 2
|
||||
times 1 << 0 db 1
|
||||
times 1 db 0
|
||||
jpeg_nbits_table:
|
||||
GLOBAL_DATA(jpeg_nbits_table)
|
||||
EXTN(jpeg_nbits_table):
|
||||
times 1 db 0
|
||||
times 1 << 0 db 1
|
||||
times 1 << 1 db 2
|
||||
|
|
@ -88,7 +85,7 @@ times 1 << 15 db 16
|
|||
alignz 32
|
||||
|
||||
%define NBITS(x) nbits_base + x
|
||||
%define MASK_BITS(x) NBITS((x) * 4) + (jpeg_mask_bits - jpeg_nbits_table)
|
||||
%define MASK_BITS(x) NBITS((x) * 4) + (jpeg_mask_bits - EXTN(jpeg_nbits_table))
|
||||
|
||||
; --------------------------------------------------------------------------
|
||||
SECTION SEG_TEXT
|
||||
|
|
@ -287,7 +284,7 @@ EXTN(jsimd_huff_encode_one_block_sse2):
|
|||
mov dctbl, POINTER [rsp+6*8+4*8]
|
||||
mov actbl, POINTER [rsp+6*8+5*8]
|
||||
punpckldq xmm0, xmm1 ;A: w0 = xx 01 08 09 02 03 10 11
|
||||
lea nbits_base, [rel jpeg_nbits_table]
|
||||
lea nbits_base, [rel EXTN(jpeg_nbits_table)]
|
||||
add rsp, -DCTSIZE2 * SIZEOF_WORD
|
||||
mov t, rsp
|
||||
|
||||
|
|
@ -310,7 +307,7 @@ EXTN(jsimd_huff_encode_one_block_sse2):
|
|||
mov buffer, rsi
|
||||
movups xmm1, XMMWORD [block + 8 * SIZEOF_WORD] ;B: w1 = 08 09 10 11 12 13 14 15
|
||||
movsx codeq, word [block] ;Z: code = block[0];
|
||||
lea nbits_base, [rel jpeg_nbits_table]
|
||||
lea nbits_base, [rel EXTN(jpeg_nbits_table)]
|
||||
pxor xmm4, xmm4 ;A: w4[i] = 0;
|
||||
sub codeq, rcx ;Z: code -= last_dc_val;
|
||||
punpckldq xmm0, xmm1 ;A: w0 = xx 01 08 09 02 03 10 11
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
;
|
||||
; This file contains an SSE2 implementation of data preparation for progressive
|
||||
; Huffman encoding. See jcphuff.c for more details.
|
||||
|
|
|
|||
|
|
@ -10,11 +10,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -10,11 +10,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jcolsamp.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jcolsamp.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -10,11 +10,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jcolsamp.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jcolsamp.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -10,11 +10,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
;
|
||||
; This file contains a floating-point implementation of the forward DCT
|
||||
; (Discrete Cosine Transform). The following code is based directly on
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
;
|
||||
; This file contains a fast, not so accurate integer implementation of
|
||||
; the forward DCT (Discrete Cosine Transform). The following code is
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
;
|
||||
; This file contains a slower but more accurate integer implementation of the
|
||||
; forward DCT (Discrete Cosine Transform). The following code is based
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
;
|
||||
; This file contains a slower but more accurate integer implementation of the
|
||||
; forward DCT (Discrete Cosine Transform). The following code is based
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
;
|
||||
; This file contains a floating-point implementation of the inverse DCT
|
||||
; (Discrete Cosine Transform). The following code is based directly on
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
;
|
||||
; This file contains a fast, not so accurate integer implementation of
|
||||
; the inverse DCT (Discrete Cosine Transform). The following code is
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
;
|
||||
; This file contains a slower but more accurate integer implementation of the
|
||||
; inverse DCT (Discrete Cosine Transform). The following code is based
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
;
|
||||
; This file contains a slower but more accurate integer implementation of the
|
||||
; inverse DCT (Discrete Cosine Transform). The following code is based
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
;
|
||||
; This file contains inverse-DCT routines that produce reduced-size
|
||||
; output: either 4x4 or 2x2 pixels from an 8x8 DCT block.
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
%include "jdct.inc"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
; jquanti.asm - sample data conversion and quantization (64-bit AVX2)
|
||||
;
|
||||
; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
||||
; Copyright (C) 2009, 2016, 2018, D. R. Commander.
|
||||
; Copyright (C) 2009, 2016, 2018, 2024, D. R. Commander.
|
||||
; Copyright (C) 2016, Matthieu Darbois.
|
||||
; Copyright (C) 2018, Matthias Räncker.
|
||||
;
|
||||
|
|
@ -10,11 +10,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
%include "jdct.inc"
|
||||
|
|
@ -93,8 +89,8 @@ EXTN(jsimd_convsamp_avx2):
|
|||
; Quantize/descale the coefficients, and store into coef_block
|
||||
;
|
||||
; This implementation is based on an algorithm described in
|
||||
; "How to optimize for the Pentium family of microprocessors"
|
||||
; (http://www.agner.org/assem/).
|
||||
; "Optimizing subroutines in assembly language:
|
||||
; An optimization guide for x86 platforms" (https://agner.org/optimize).
|
||||
;
|
||||
; GLOBAL(void)
|
||||
; jsimd_quantize_avx2(JCOEFPTR coef_block, DCTELEM *divisors,
|
||||
|
|
|
|||
|
|
@ -2,18 +2,14 @@
|
|||
; jquanti.asm - sample data conversion and quantization (64-bit SSE2)
|
||||
;
|
||||
; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
||||
; Copyright (C) 2009, 2016, D. R. Commander.
|
||||
; Copyright (C) 2009, 2016, 2024, D. R. Commander.
|
||||
; Copyright (C) 2018, Matthias Räncker.
|
||||
;
|
||||
; Based on the x86 SIMD extension for IJG JPEG library
|
||||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
%include "jdct.inc"
|
||||
|
|
@ -93,8 +89,8 @@ EXTN(jsimd_convsamp_sse2):
|
|||
; Quantize/descale the coefficients, and store into coef_block
|
||||
;
|
||||
; This implementation is based on an algorithm described in
|
||||
; "How to optimize for the Pentium family of microprocessors"
|
||||
; (http://www.agner.org/assem/).
|
||||
; "Optimizing subroutines in assembly language:
|
||||
; An optimization guide for x86 platforms" (https://agner.org/optimize).
|
||||
;
|
||||
; GLOBAL(void)
|
||||
; jsimd_quantize_sse2(JCOEFPTR coef_block, DCTELEM *divisors,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
* jsimd_x86_64.c
|
||||
*
|
||||
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
||||
* Copyright (C) 2009-2011, 2014, 2016, 2018, 2022, D. R. Commander.
|
||||
* Copyright (C) 2015-2016, 2018, Matthieu Darbois.
|
||||
* Copyright (C) 2009-2011, 2014, 2016, 2018, 2022-2023, D. R. Commander.
|
||||
* Copyright (C) 2015-2016, 2018, 2022, Matthieu Darbois.
|
||||
*
|
||||
* Based on the x86 SIMD extension for IJG JPEG library,
|
||||
* Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
|
|
@ -21,7 +21,6 @@
|
|||
#include "../../jdct.h"
|
||||
#include "../../jsimddct.h"
|
||||
#include "../jsimd.h"
|
||||
#include "jconfigint.h"
|
||||
|
||||
/*
|
||||
* In the PIC cases, we have no guarantee that constants will keep
|
||||
|
|
@ -32,13 +31,11 @@
|
|||
#define IS_ALIGNED_SSE(ptr) (IS_ALIGNED(ptr, 4)) /* 16 byte alignment */
|
||||
#define IS_ALIGNED_AVX(ptr) (IS_ALIGNED(ptr, 5)) /* 32 byte alignment */
|
||||
|
||||
static unsigned int simd_support = (unsigned int)(~0);
|
||||
static unsigned int simd_huffman = 1;
|
||||
static THREAD_LOCAL unsigned int simd_support = (unsigned int)(~0);
|
||||
static THREAD_LOCAL unsigned int simd_huffman = 1;
|
||||
|
||||
/*
|
||||
* Check what SIMD accelerations are supported.
|
||||
*
|
||||
* FIXME: This code is racy under a multi-threaded environment.
|
||||
*/
|
||||
LOCAL(void)
|
||||
init_simd(void)
|
||||
|
|
@ -148,6 +145,9 @@ jsimd_rgb_ycc_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf,
|
|||
void (*avx2fct) (JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
|
||||
void (*sse2fct) (JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
|
||||
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
switch (cinfo->in_color_space) {
|
||||
case JCS_EXT_RGB:
|
||||
avx2fct = jsimd_extrgb_ycc_convert_avx2;
|
||||
|
|
@ -197,6 +197,9 @@ jsimd_rgb_gray_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf,
|
|||
void (*avx2fct) (JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
|
||||
void (*sse2fct) (JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
|
||||
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
switch (cinfo->in_color_space) {
|
||||
case JCS_EXT_RGB:
|
||||
avx2fct = jsimd_extrgb_gray_convert_avx2;
|
||||
|
|
@ -246,6 +249,9 @@ jsimd_ycc_rgb_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
|||
void (*avx2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int);
|
||||
void (*sse2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int);
|
||||
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
switch (cinfo->out_color_space) {
|
||||
case JCS_EXT_RGB:
|
||||
avx2fct = jsimd_ycc_extrgb_convert_avx2;
|
||||
|
|
@ -336,6 +342,9 @@ GLOBAL(void)
|
|||
jsimd_h2v2_downsample(j_compress_ptr cinfo, jpeg_component_info *compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY output_data)
|
||||
{
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
if (simd_support & JSIMD_AVX2)
|
||||
jsimd_h2v2_downsample_avx2(cinfo->image_width, cinfo->max_v_samp_factor,
|
||||
compptr->v_samp_factor,
|
||||
|
|
@ -352,6 +361,9 @@ GLOBAL(void)
|
|||
jsimd_h2v1_downsample(j_compress_ptr cinfo, jpeg_component_info *compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY output_data)
|
||||
{
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
if (simd_support & JSIMD_AVX2)
|
||||
jsimd_h2v1_downsample_avx2(cinfo->image_width, cinfo->max_v_samp_factor,
|
||||
compptr->v_samp_factor,
|
||||
|
|
@ -406,6 +418,9 @@ GLOBAL(void)
|
|||
jsimd_h2v2_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
|
||||
{
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
if (simd_support & JSIMD_AVX2)
|
||||
jsimd_h2v2_upsample_avx2(cinfo->max_v_samp_factor, cinfo->output_width,
|
||||
input_data, output_data_ptr);
|
||||
|
|
@ -418,6 +433,9 @@ GLOBAL(void)
|
|||
jsimd_h2v1_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
|
||||
{
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
if (simd_support & JSIMD_AVX2)
|
||||
jsimd_h2v1_upsample_avx2(cinfo->max_v_samp_factor, cinfo->output_width,
|
||||
input_data, output_data_ptr);
|
||||
|
|
@ -472,6 +490,9 @@ GLOBAL(void)
|
|||
jsimd_h2v2_fancy_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
|
||||
{
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
if (simd_support & JSIMD_AVX2)
|
||||
jsimd_h2v2_fancy_upsample_avx2(cinfo->max_v_samp_factor,
|
||||
compptr->downsampled_width, input_data,
|
||||
|
|
@ -486,6 +507,9 @@ GLOBAL(void)
|
|||
jsimd_h2v1_fancy_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
|
||||
{
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
if (simd_support & JSIMD_AVX2)
|
||||
jsimd_h2v1_fancy_upsample_avx2(cinfo->max_v_samp_factor,
|
||||
compptr->downsampled_width, input_data,
|
||||
|
|
@ -545,6 +569,9 @@ jsimd_h2v2_merged_upsample(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
|||
void (*avx2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY);
|
||||
void (*sse2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY);
|
||||
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
switch (cinfo->out_color_space) {
|
||||
case JCS_EXT_RGB:
|
||||
avx2fct = jsimd_h2v2_extrgb_merged_upsample_avx2;
|
||||
|
|
@ -593,6 +620,9 @@ jsimd_h2v1_merged_upsample(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
|||
void (*avx2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY);
|
||||
void (*sse2fct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY);
|
||||
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
switch (cinfo->out_color_space) {
|
||||
case JCS_EXT_RGB:
|
||||
avx2fct = jsimd_h2v1_extrgb_merged_upsample_avx2;
|
||||
|
|
@ -682,6 +712,9 @@ GLOBAL(void)
|
|||
jsimd_convsamp(JSAMPARRAY sample_data, JDIMENSION start_col,
|
||||
DCTELEM *workspace)
|
||||
{
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
if (simd_support & JSIMD_AVX2)
|
||||
jsimd_convsamp_avx2(sample_data, start_col, workspace);
|
||||
else
|
||||
|
|
@ -751,6 +784,9 @@ jsimd_can_fdct_float(void)
|
|||
GLOBAL(void)
|
||||
jsimd_fdct_islow(DCTELEM *data)
|
||||
{
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
if (simd_support & JSIMD_AVX2)
|
||||
jsimd_fdct_islow_avx2(data);
|
||||
else
|
||||
|
|
@ -812,6 +848,9 @@ jsimd_can_quantize_float(void)
|
|||
GLOBAL(void)
|
||||
jsimd_quantize(JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace)
|
||||
{
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
if (simd_support & JSIMD_AVX2)
|
||||
jsimd_quantize_avx2(coef_block, divisors, workspace);
|
||||
else
|
||||
|
|
@ -966,6 +1005,9 @@ jsimd_idct_islow(j_decompress_ptr cinfo, jpeg_component_info *compptr,
|
|||
JCOEFPTR coef_block, JSAMPARRAY output_buf,
|
||||
JDIMENSION output_col)
|
||||
{
|
||||
if (simd_support == ~0U)
|
||||
init_simd();
|
||||
|
||||
if (simd_support & JSIMD_AVX2)
|
||||
jsimd_idct_islow_avx2(compptr->dct_table, coef_block, output_buf,
|
||||
output_col);
|
||||
|
|
@ -1036,7 +1078,7 @@ jsimd_can_encode_mcu_AC_first_prepare(void)
|
|||
GLOBAL(void)
|
||||
jsimd_encode_mcu_AC_first_prepare(const JCOEF *block,
|
||||
const int *jpeg_natural_order_start, int Sl,
|
||||
int Al, JCOEF *values, size_t *zerobits)
|
||||
int Al, UJCOEF *values, size_t *zerobits)
|
||||
{
|
||||
jsimd_encode_mcu_AC_first_prepare_sse2(block, jpeg_natural_order_start,
|
||||
Sl, Al, values, zerobits);
|
||||
|
|
@ -1060,7 +1102,7 @@ jsimd_can_encode_mcu_AC_refine_prepare(void)
|
|||
GLOBAL(int)
|
||||
jsimd_encode_mcu_AC_refine_prepare(const JCOEF *block,
|
||||
const int *jpeg_natural_order_start, int Sl,
|
||||
int Al, JCOEF *absvalues, size_t *bits)
|
||||
int Al, UJCOEF *absvalues, size_t *bits)
|
||||
{
|
||||
return jsimd_encode_mcu_AC_refine_prepare_sse2(block,
|
||||
jpeg_natural_order_start,
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
; Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
; For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
;
|
||||
; This file should be assembled with NASM (Netwide Assembler),
|
||||
; can *not* be assembled with Microsoft's MASM or any compatible
|
||||
; assembler (including Borland's Turbo Assembler).
|
||||
; NASM is available from http://nasm.sourceforge.net/ or
|
||||
; http://sourceforge.net/project/showfiles.php?group_id=6208
|
||||
; This file should be assembled with NASM (Netwide Assembler) or Yasm.
|
||||
|
||||
%include "jsimdext.inc"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue