]> granicus.if.org Git - libjpeg-turbo/commitdiff
Lay the groundwork for 32-bit AVX2 SIMD support
authorDRC <information@libjpeg-turbo.org>
Tue, 5 Jul 2016 21:19:26 +0000 (16:19 -0500)
committerDRC <information@libjpeg-turbo.org>
Tue, 5 Jul 2016 21:23:06 +0000 (16:23 -0500)
45 files changed:
simd/jccolext-mmx.asm
simd/jccolext-sse2.asm
simd/jccolor-mmx.asm
simd/jccolor-sse2.asm
simd/jcgray-mmx.asm
simd/jcgray-sse2.asm
simd/jcgryext-mmx.asm
simd/jcgryext-sse2.asm
simd/jchuff-sse2.asm
simd/jcsample-mmx.asm
simd/jcsample-sse2.asm
simd/jdcolext-mmx.asm
simd/jdcolext-sse2.asm
simd/jdcolor-mmx.asm
simd/jdcolor-sse2.asm
simd/jdmerge-mmx.asm
simd/jdmerge-sse2.asm
simd/jdmrgext-mmx.asm
simd/jdmrgext-sse2.asm
simd/jdsample-mmx.asm
simd/jdsample-sse2.asm
simd/jfdctflt-3dn.asm
simd/jfdctflt-sse.asm
simd/jfdctfst-mmx.asm
simd/jfdctfst-sse2.asm
simd/jfdctint-mmx.asm
simd/jfdctint-sse2.asm
simd/jidctflt-3dn.asm
simd/jidctflt-sse.asm
simd/jidctflt-sse2.asm
simd/jidctfst-mmx.asm
simd/jidctfst-sse2.asm
simd/jidctint-mmx.asm
simd/jidctint-sse2.asm
simd/jidctred-mmx.asm
simd/jidctred-sse2.asm
simd/jquant-3dn.asm
simd/jquant-mmx.asm
simd/jquant-sse.asm
simd/jquantf-sse2.asm
simd/jquanti-sse2.asm
simd/jsimd_i386.c
simd/jsimdcpu.asm
simd/jsimdext.inc
turbojpeg.c

index 96a0372b1b3abe48038964c92c8150966c255394..4748b207e9fdb9c7db9ae0dba5844f7b1e782391 100644 (file)
@@ -2,6 +2,7 @@
 ; jccolext.asm - colorspace conversion (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -38,7 +39,7 @@
 %define WK_NUM          8
 %define gotptr          wk(0)-SIZEOF_POINTER    ; void * gotptr
 
-        align   16
+        align   32
         global  EXTN(jsimd_rgb_ycc_convert_mmx)
 
 EXTN(jsimd_rgb_ycc_convert_mmx):
@@ -473,4 +474,4 @@ EXTN(jsimd_rgb_ycc_convert_mmx):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index d8496dcfc19e67981eb5d2ee54c52fb494b4fd58..611d80453d832ca1d1f487b83fc2a37a0f463f08 100644 (file)
@@ -1,7 +1,9 @@
 ;
 ; jccolext.asm - colorspace conversion (SSE2)
 ;
-; x86 SIMD extension for IJG JPEG library
+; Copyright (C) 2016, D. R. Commander.
+;
+; 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
 ;
@@ -36,7 +38,7 @@
 %define WK_NUM         8
 %define gotptr         wk(0)-SIZEOF_POINTER  ; void * gotptr
 
-    align       16
+    align       32
 
     global      EXTN(jsimd_rgb_ycc_convert_sse2)
 
@@ -500,4 +502,4 @@ EXTN(jsimd_rgb_ycc_convert_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index c4e6d88be3769a609cd57e2aadaa6ff1656fa058..aecdeed4064a1087a3f92ae3aefcc2c2722ba4cf 100644 (file)
@@ -2,7 +2,7 @@
 ; jccolor.asm - colorspace conversion (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
-; Copyright (C) 2009, D. R. Commander.
+; Copyright (C) 2009, 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -35,7 +35,7 @@ F_0_337 equ     (F_0_587 - F_0_250)     ; FIX(0.58700) - FIX(0.25000)
 ; --------------------------------------------------------------------------
         SECTION SEG_CONST
 
-        alignz  16
+        alignz  32
         global  EXTN(jconst_rgb_ycc_convert_mmx)
 
 EXTN(jconst_rgb_ycc_convert_mmx):
@@ -47,7 +47,7 @@ PW_MF008_MF041  times 2 dw -F_0_081,-F_0_418
 PD_ONEHALFM1_CJ times 2 dd  (1 << (SCALEBITS-1)) - 1 + (CENTERJSAMPLE << SCALEBITS)
 PD_ONEHALF      times 2 dd  (1 << (SCALEBITS-1))
 
-        alignz  16
+        alignz  32
 
 ; --------------------------------------------------------------------------
         SECTION SEG_TEXT
index aae51ba67e35f27b2f9c26264f16f9fe1ebc09ba..f9b4c9176119a0c73b51e226c11de514b4f15dc2 100644 (file)
@@ -1,7 +1,7 @@
 ;
 ; jccolor.asm - colorspace conversion (SSE2)
 ;
-; Copyright (C) 2009, D. R. Commander.
+; Copyright (C) 2009, 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -34,7 +34,7 @@ F_0_337 equ (F_0_587 - F_0_250)  ; FIX(0.58700) - FIX(0.25000)
 ; --------------------------------------------------------------------------
     SECTION     SEG_CONST
 
-    alignz      16
+    alignz      32
     global      EXTN(jconst_rgb_ycc_convert_sse2)
 
 EXTN(jconst_rgb_ycc_convert_sse2):
@@ -46,7 +46,7 @@ PW_MF008_MF041  times 4 dw -F_0_081,-F_0_418
 PD_ONEHALFM1_CJ times 4 dd  (1 << (SCALEBITS-1)) - 1 + (CENTERJSAMPLE << SCALEBITS)
 PD_ONEHALF      times 4 dd  (1 << (SCALEBITS-1))
 
-    alignz      16
+    alignz      32
 
 ; --------------------------------------------------------------------------
     SECTION     SEG_TEXT
index 0819b6ca01416f2d29bd246d4655bfff460e99b5..48decc8fc78a59948c5221e7d8a526d4db1a20ae 100644 (file)
@@ -2,7 +2,7 @@
 ; jcgray.asm - grayscale colorspace conversion (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
-; Copyright (C) 2011, D. R. Commander.
+; Copyright (C) 2011, 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -31,7 +31,7 @@ F_0_337 equ     (F_0_587 - F_0_250)     ; FIX(0.58700) - FIX(0.25000)
 ; --------------------------------------------------------------------------
         SECTION SEG_CONST
 
-        alignz  16
+        alignz  32
         global  EXTN(jconst_rgb_gray_convert_mmx)
 
 EXTN(jconst_rgb_gray_convert_mmx):
@@ -40,7 +40,7 @@ PW_F0299_F0337  times 2 dw  F_0_299, F_0_337
 PW_F0114_F0250  times 2 dw  F_0_114, F_0_250
 PD_ONEHALF      times 2 dd  (1 << (SCALEBITS-1))
 
-        alignz  16
+        alignz  32
 
 ; --------------------------------------------------------------------------
         SECTION SEG_TEXT
index 831fda615c25285488f8da21f310edf40091de0d..dedfc8ac5cc5defd4b65bc13db9785bde0f95433 100644 (file)
@@ -1,7 +1,7 @@
 ;
 ; jcgray.asm - grayscale colorspace conversion (SSE2)
 ;
-; Copyright (C) 2011, D. R. Commander.
+; Copyright (C) 2011, 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -30,7 +30,7 @@ F_0_337 equ (F_0_587 - F_0_250)  ; FIX(0.58700) - FIX(0.25000)
 ; --------------------------------------------------------------------------
     SECTION     SEG_CONST
 
-    alignz      16
+    alignz      32
     global      EXTN(jconst_rgb_gray_convert_sse2)
 
 EXTN(jconst_rgb_gray_convert_sse2):
@@ -39,7 +39,7 @@ PW_F0299_F0337 times 4 dw F_0_299, F_0_337
 PW_F0114_F0250 times 4 dw F_0_114, F_0_250
 PD_ONEHALF     times 4 dd (1 << (SCALEBITS-1))
 
-    alignz      16
+    alignz      32
 
 ; --------------------------------------------------------------------------
     SECTION     SEG_TEXT
index 1c1b8d8bc458cb08eda87c9b64bd0759e194301e..841eb0b5fa38f5f7069502eb0bfcef0d0a030bd9 100644 (file)
@@ -2,7 +2,7 @@
 ; jcgryext.asm - grayscale colorspace conversion (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
-; Copyright (C) 2011, D. R. Commander.
+; Copyright (C) 2011, 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -39,7 +39,7 @@
 %define WK_NUM          2
 %define gotptr          wk(0)-SIZEOF_POINTER    ; void * gotptr
 
-        align   16
+        align   32
         global  EXTN(jsimd_rgb_gray_convert_mmx)
 
 EXTN(jsimd_rgb_gray_convert_mmx):
@@ -353,4 +353,4 @@ EXTN(jsimd_rgb_gray_convert_mmx):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index 78beac7e51ea3df134e8abeb61e02439bd2c61d2..40505a58e3abeeb94d1ecaa4da7c9ccfdf0624f6 100644 (file)
@@ -1,7 +1,7 @@
 ;
 ; jcgryext.asm - grayscale colorspace conversion (SSE2)
 ;
-; Copyright (C) 2011, D. R. Commander.
+; Copyright (C) 2011, 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -38,7 +38,7 @@
 %define WK_NUM        2
 %define gotptr        wk(0)-SIZEOF_POINTER  ; void * gotptr
 
-    align       16
+    align       32
 
     global      EXTN(jsimd_rgb_gray_convert_sse2)
 
@@ -381,4 +381,4 @@ EXTN(jsimd_rgb_gray_convert_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index cfae68c5a9399a7017a1b1f5f097021a70c1d487..c018c87ba1d97af997bed5515168bf21c79307f6 100644 (file)
 ; --------------------------------------------------------------------------
     SECTION     SEG_CONST
 
-    alignz      16
+    alignz      32
     global      EXTN(jconst_huff_encode_one_block)
 
 EXTN(jconst_huff_encode_one_block):
 
 %include "jpeg_nbits_table.inc"
 
-    alignz      16
+    alignz      32
 
 ; --------------------------------------------------------------------------
     SECTION     SEG_TEXT
@@ -178,7 +178,7 @@ EXTN(jconst_huff_encode_one_block):
 %define put_buffer  ebx
 %define put_bits    edi
 
-    align       16
+    align       32
     global      EXTN(jsimd_huff_encode_one_block_sse2)
 
 EXTN(jsimd_huff_encode_one_block_sse2):
@@ -423,4 +423,4 @@ EXTN(jsimd_huff_encode_one_block_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index 6cd544e74d5cd4ed0e774211b1b807ed848bf1bc..2fa6a1aa34d522ea4ced24947746a41369124e66 100644 (file)
@@ -2,6 +2,7 @@
 ; jcsample.asm - downsampling (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -38,7 +39,7 @@
 %define input_data(b)   (b)+24          ; JSAMPARRAY input_data
 %define output_data(b)  (b)+28          ; JSAMPARRAY output_data
 
-        align   16
+        align   32
         global  EXTN(jsimd_h2v1_downsample_mmx)
 
 EXTN(jsimd_h2v1_downsample_mmx):
@@ -180,7 +181,7 @@ EXTN(jsimd_h2v1_downsample_mmx):
 %define input_data(b)   (b)+24          ; JSAMPARRAY input_data
 %define output_data(b)  (b)+28          ; JSAMPARRAY output_data
 
-        align   16
+        align   32
         global  EXTN(jsimd_h2v2_downsample_mmx)
 
 EXTN(jsimd_h2v2_downsample_mmx):
@@ -320,4 +321,4 @@ EXTN(jsimd_h2v2_downsample_mmx):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index 5fc26374addd1b0e139c040cedebe39c778f514e..3d34ab988e46be27ab512c5873a8adf13593a51c 100644 (file)
@@ -2,6 +2,7 @@
 ; jcsample.asm - downsampling (SSE2)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -38,7 +39,7 @@
 %define input_data(b)   (b)+24          ; JSAMPARRAY input_data
 %define output_data(b)  (b)+28          ; JSAMPARRAY output_data
 
-    align       16
+    align       32
     global      EXTN(jsimd_h2v1_downsample_sse2)
 
 EXTN(jsimd_h2v1_downsample_sse2):
@@ -193,7 +194,7 @@ EXTN(jsimd_h2v1_downsample_sse2):
 %define input_data(b)   (b)+24          ; JSAMPARRAY input_data
 %define output_data(b)  (b)+28          ; JSAMPARRAY output_data
 
-    align       16
+    align       32
     global      EXTN(jsimd_h2v2_downsample_sse2)
 
 EXTN(jsimd_h2v2_downsample_sse2):
@@ -347,4 +348,4 @@ EXTN(jsimd_h2v2_downsample_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index 21e34f6786911734583ec6cb063083e0a56ec954..1f0614e781d4cafc6bdf95a7f2d8f7c0f3c1120d 100644 (file)
@@ -2,6 +2,7 @@
 ; jdcolext.asm - colorspace conversion (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -38,7 +39,7 @@
 %define WK_NUM          2
 %define gotptr          wk(0)-SIZEOF_POINTER    ; void * gotptr
 
-        align   16
+        align   32
         global  EXTN(jsimd_ycc_rgb_convert_mmx)
 
 EXTN(jsimd_ycc_rgb_convert_mmx):
@@ -401,4 +402,4 @@ EXTN(jsimd_ycc_rgb_convert_mmx):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index 09844bf1276c3ad2c790372324cbd1d4a48b53c7..69462ef1a3b3a401433a679fe0f8e9e915f7c09f 100644 (file)
@@ -2,7 +2,7 @@
 ; jdcolext.asm - colorspace conversion (SSE2)
 ;
 ; Copyright 2009, 2012 Pierre Ossman <ossman@cendio.se> for Cendio AB
-; Copyright (C) 2012, D. R. Commander.
+; Copyright (C) 2012, 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -39,7 +39,7 @@
 %define WK_NUM        2
 %define gotptr        wk(0)-SIZEOF_POINTER  ; void * gotptr
 
-    align       16
+    align       32
     global      EXTN(jsimd_ycc_rgb_convert_sse2)
 
 EXTN(jsimd_ycc_rgb_convert_sse2):
@@ -456,4 +456,4 @@ EXTN(jsimd_ycc_rgb_convert_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index 4e58031dd005b06350cf49cdb2c905095b891d33..5136fe6331da6b2f046f16139f24fda080f9aa1a 100644 (file)
@@ -2,7 +2,7 @@
 ; jdcolor.asm - colorspace conversion (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
-; Copyright (C) 2009, D. R. Commander.
+; Copyright (C) 2009, 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -33,7 +33,7 @@ F_0_228 equ     (131072 - F_1_772)      ; FIX(2) - FIX(1.77200)
 ; --------------------------------------------------------------------------
         SECTION SEG_CONST
 
-        alignz  16
+        alignz  32
         global  EXTN(jconst_ycc_rgb_convert_mmx)
 
 EXTN(jconst_ycc_rgb_convert_mmx):
@@ -44,7 +44,7 @@ PW_MF0344_F0285 times 2 dw -F_0_344, F_0_285
 PW_ONE          times 4 dw  1
 PD_ONEHALF      times 2 dd  1 << (SCALEBITS-1)
 
-        alignz  16
+        alignz  32
 
 ; --------------------------------------------------------------------------
         SECTION SEG_TEXT
index 1345df9ed636316f5e5b927a03fb5fc346c2eb07..5552dcae79446e0aabe37ffe6a2374481e31befc 100644 (file)
@@ -2,7 +2,7 @@
 ; jdcolor.asm - colorspace conversion (SSE2)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
-; Copyright (C) 2009, D. R. Commander.
+; Copyright (C) 2009, 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -33,7 +33,7 @@ F_0_228 equ (131072 - F_1_772)  ; FIX(2) - FIX(1.77200)
 ; --------------------------------------------------------------------------
     SECTION     SEG_CONST
 
-    alignz      16
+    alignz      32
     global      EXTN(jconst_ycc_rgb_convert_sse2)
 
 EXTN(jconst_ycc_rgb_convert_sse2):
@@ -44,7 +44,7 @@ PW_MF0344_F0285 times 4 dw -F_0_344, F_0_285
 PW_ONE          times 8 dw  1
 PD_ONEHALF      times 4 dd  1 << (SCALEBITS-1)
 
-    alignz      16
+    alignz      32
 
 ; --------------------------------------------------------------------------
     SECTION     SEG_TEXT
index ee58bff1c66c1ec0ee7584b52578979a717ad84d..7ce1d86b55881bcd94eb732b3d01f529413985d6 100644 (file)
@@ -2,7 +2,7 @@
 ; jdmerge.asm - merged upsampling/color conversion (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
-; Copyright (C) 2009, D. R. Commander.
+; Copyright (C) 2009, 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -33,7 +33,7 @@ F_0_228 equ     (131072 - F_1_772)      ; FIX(2) - FIX(1.77200)
 ; --------------------------------------------------------------------------
         SECTION SEG_CONST
 
-        alignz  16
+        alignz  32
         global  EXTN(jconst_merged_upsample_mmx)
 
 EXTN(jconst_merged_upsample_mmx):
@@ -44,7 +44,7 @@ PW_MF0344_F0285 times 2 dw -F_0_344, F_0_285
 PW_ONE          times 4 dw  1
 PD_ONEHALF      times 2 dd  1 << (SCALEBITS-1)
 
-        alignz  16
+        alignz  32
 
 ; --------------------------------------------------------------------------
         SECTION SEG_TEXT
index 0683fd06631f44d846f5eee5ff15ce31ff6e7967..fc1d6ad5338698806519b1d4ebdccb5f2421e7c5 100644 (file)
@@ -2,7 +2,7 @@
 ; jdmerge.asm - merged upsampling/color conversion (SSE2)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
-; Copyright (C) 2009, D. R. Commander.
+; Copyright (C) 2009, 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -33,7 +33,7 @@ F_0_228 equ (131072 - F_1_772)  ; FIX(2) - FIX(1.77200)
 ; --------------------------------------------------------------------------
     SECTION     SEG_CONST
 
-    alignz      16
+    alignz      32
     global      EXTN(jconst_merged_upsample_sse2)
 
 EXTN(jconst_merged_upsample_sse2):
@@ -44,7 +44,7 @@ PW_MF0344_F0285 times 4 dw -F_0_344, F_0_285
 PW_ONE          times 8 dw  1
 PD_ONEHALF      times 4 dd  1 << (SCALEBITS-1)
 
-    alignz      16
+    alignz      32
 
 ; --------------------------------------------------------------------------
     SECTION     SEG_TEXT
index 63f45cf373db45fb825d86f6ba978a6ce48b9b0c..04446324ba5223fa23ae003482bc916e957ae4a9 100644 (file)
@@ -2,6 +2,7 @@
 ; jdmrgext.asm - merged upsampling/color conversion (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -38,7 +39,7 @@
 %define WK_NUM          3
 %define gotptr          wk(0)-SIZEOF_POINTER    ; void * gotptr
 
-        align   16
+        align   32
         global  EXTN(jsimd_h2v1_merged_upsample_mmx)
 
 EXTN(jsimd_h2v1_merged_upsample_mmx):
@@ -407,7 +408,7 @@ EXTN(jsimd_h2v1_merged_upsample_mmx):
 %define in_row_group_ctr(b)     (b)+16          ; JDIMENSION in_row_group_ctr
 %define output_buf(b)           (b)+20          ; JSAMPARRAY output_buf
 
-        align   16
+        align   32
         global  EXTN(jsimd_h2v2_merged_upsample_mmx)
 
 EXTN(jsimd_h2v2_merged_upsample_mmx):
@@ -460,4 +461,4 @@ EXTN(jsimd_h2v2_merged_upsample_mmx):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index 187ba0c926e9442cfd7c3b734218d79ad30d5860..50702c6ed4ac901e517e192f97511205177afb50 100644 (file)
@@ -2,7 +2,7 @@
 ; jdmrgext.asm - merged upsampling/color conversion (SSE2)
 ;
 ; Copyright 2009, 2012 Pierre Ossman <ossman@cendio.se> for Cendio AB
-; Copyright (C) 2012, D. R. Commander.
+; Copyright (C) 2012, 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -39,7 +39,7 @@
 %define WK_NUM        3
 %define gotptr        wk(0)-SIZEOF_POINTER  ; void * gotptr
 
-    align       16
+    align       32
     global      EXTN(jsimd_h2v1_merged_upsample_sse2)
 
 EXTN(jsimd_h2v1_merged_upsample_sse2):
@@ -462,7 +462,7 @@ EXTN(jsimd_h2v1_merged_upsample_sse2):
 %define in_row_group_ctr(b)  (b)+16     ; JDIMENSION in_row_group_ctr
 %define output_buf(b)        (b)+20     ; JSAMPARRAY output_buf
 
-    align       16
+    align       32
     global      EXTN(jsimd_h2v2_merged_upsample_sse2)
 
 EXTN(jsimd_h2v2_merged_upsample_sse2):
@@ -515,4 +515,4 @@ EXTN(jsimd_h2v2_merged_upsample_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index 5e4fa7ae226d36e46b3ddf859a4f0df2b247435a..266ee7aeb5753418890e7a91d8cef716884bc96d 100644 (file)
@@ -2,6 +2,7 @@
 ; jdsample.asm - upsampling (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -20,7 +21,7 @@
 ; --------------------------------------------------------------------------
         SECTION SEG_CONST
 
-        alignz  16
+        alignz  32
         global  EXTN(jconst_fancy_upsample_mmx)
 
 EXTN(jconst_fancy_upsample_mmx):
@@ -31,7 +32,7 @@ PW_THREE        times 4 dw  3
 PW_SEVEN        times 4 dw  7
 PW_EIGHT        times 4 dw  8
 
-        alignz  16
+        alignz  32
 
 ; --------------------------------------------------------------------------
         SECTION SEG_TEXT
@@ -56,7 +57,7 @@ PW_EIGHT        times 4 dw  8
 %define input_data(b)           (b)+16          ; JSAMPARRAY input_data
 %define output_data_ptr(b)      (b)+20          ; JSAMPARRAY *output_data_ptr
 
-        align   16
+        align   32
         global  EXTN(jsimd_h2v1_fancy_upsample_mmx)
 
 EXTN(jsimd_h2v1_fancy_upsample_mmx):
@@ -214,7 +215,7 @@ EXTN(jsimd_h2v1_fancy_upsample_mmx):
 %define WK_NUM          4
 %define gotptr          wk(0)-SIZEOF_POINTER    ; void *gotptr
 
-        align   16
+        align   32
         global  EXTN(jsimd_h2v2_fancy_upsample_mmx)
 
 EXTN(jsimd_h2v2_fancy_upsample_mmx):
@@ -540,7 +541,7 @@ EXTN(jsimd_h2v2_fancy_upsample_mmx):
 %define input_data(b)           (b)+16          ; JSAMPARRAY input_data
 %define output_data_ptr(b)      (b)+20          ; JSAMPARRAY *output_data_ptr
 
-        align   16
+        align   32
         global  EXTN(jsimd_h2v1_upsample_mmx)
 
 EXTN(jsimd_h2v1_upsample_mmx):
@@ -641,7 +642,7 @@ EXTN(jsimd_h2v1_upsample_mmx):
 %define input_data(b)           (b)+16          ; JSAMPARRAY input_data
 %define output_data_ptr(b)      (b)+20          ; JSAMPARRAY *output_data_ptr
 
-        align   16
+        align   32
         global  EXTN(jsimd_h2v2_upsample_mmx)
 
 EXTN(jsimd_h2v2_upsample_mmx):
@@ -733,4 +734,4 @@ EXTN(jsimd_h2v2_upsample_mmx):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index 99a8c7ce1bbcf80048c4a26172ab781e6a111c96..01d96b7fe50e5722bc9176c133cba290305f38dd 100644 (file)
@@ -2,6 +2,7 @@
 ; jdsample.asm - upsampling (SSE2)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -20,7 +21,7 @@
 ; --------------------------------------------------------------------------
     SECTION     SEG_CONST
 
-    alignz      16
+    alignz      32
     global      EXTN(jconst_fancy_upsample_sse2)
 
 EXTN(jconst_fancy_upsample_sse2):
@@ -31,7 +32,7 @@ PW_THREE times 8 dw 3
 PW_SEVEN times 8 dw 7
 PW_EIGHT times 8 dw 8
 
-    alignz      16
+    alignz      32
 
 ; --------------------------------------------------------------------------
     SECTION     SEG_TEXT
@@ -56,7 +57,7 @@ PW_EIGHT times 8 dw 8
 %define input_data(b)       (b)+16      ; JSAMPARRAY input_data
 %define output_data_ptr(b)  (b)+20      ; JSAMPARRAY *output_data_ptr
 
-    align       16
+    align       32
     global      EXTN(jsimd_h2v1_fancy_upsample_sse2)
 
 EXTN(jsimd_h2v1_fancy_upsample_sse2):
@@ -212,7 +213,7 @@ EXTN(jsimd_h2v1_fancy_upsample_sse2):
 %define WK_NUM        4
 %define gotptr        wk(0)-SIZEOF_POINTER  ; void *gotptr
 
-    align       16
+    align       32
     global      EXTN(jsimd_h2v2_fancy_upsample_sse2)
 
 EXTN(jsimd_h2v2_fancy_upsample_sse2):
@@ -536,7 +537,7 @@ EXTN(jsimd_h2v2_fancy_upsample_sse2):
 %define input_data(b)       (b)+16      ; JSAMPARRAY input_data
 %define output_data_ptr(b)  (b)+20      ; JSAMPARRAY *output_data_ptr
 
-    align       16
+    align       32
     global      EXTN(jsimd_h2v1_upsample_sse2)
 
 EXTN(jsimd_h2v1_upsample_sse2):
@@ -635,7 +636,7 @@ EXTN(jsimd_h2v1_upsample_sse2):
 %define input_data(b)       (b)+16      ; JSAMPARRAY input_data
 %define output_data_ptr(b)  (b)+20      ; JSAMPARRAY *output_data_ptr
 
-    align       16
+    align       32
     global      EXTN(jsimd_h2v2_upsample_sse2)
 
 EXTN(jsimd_h2v2_upsample_sse2):
@@ -725,4 +726,4 @@ EXTN(jsimd_h2v2_upsample_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index 219161819a4ff109add0d86942efcae02e5e4e34..c3d8fba6724ba9140d1928213e72df847ea2e311 100644 (file)
@@ -2,6 +2,7 @@
 ; jfdctflt.asm - floating-point FDCT (3DNow!)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -25,7 +26,7 @@
 ; --------------------------------------------------------------------------
         SECTION SEG_CONST
 
-        alignz  16
+        alignz  32
         global  EXTN(jconst_fdct_float_3dnow)
 
 EXTN(jconst_fdct_float_3dnow):
@@ -35,7 +36,7 @@ PD_0_707        times 2 dd  0.707106781186547524400844
 PD_0_541        times 2 dd  0.541196100146196984399723
 PD_1_306        times 2 dd  1.306562964876376527856643
 
-        alignz  16
+        alignz  32
 
 ; --------------------------------------------------------------------------
         SECTION SEG_TEXT
@@ -53,7 +54,7 @@ PD_1_306        times 2 dd  1.306562964876376527856643
 %define wk(i)           ebp-(WK_NUM-(i))*SIZEOF_MMWORD  ; mmword wk[WK_NUM]
 %define WK_NUM          2
 
-        align   16
+        align   32
         global  EXTN(jsimd_fdct_float_3dnow)
 
 EXTN(jsimd_fdct_float_3dnow):
@@ -316,4 +317,4 @@ EXTN(jsimd_fdct_float_3dnow):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index 8b1ce189bc23c49832db2b94650667b18b370396..b15eb5c6e55b3ce4bff389748d47748891decf52 100644 (file)
@@ -2,6 +2,7 @@
 ; jfdctflt.asm - floating-point FDCT (SSE)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -35,7 +36,7 @@
 ; --------------------------------------------------------------------------
     SECTION     SEG_CONST
 
-    alignz      16
+    alignz      32
     global      EXTN(jconst_fdct_float_sse)
 
 EXTN(jconst_fdct_float_sse):
@@ -45,7 +46,7 @@ PD_0_707 times 4 dd 0.707106781186547524400844
 PD_0_541 times 4 dd 0.541196100146196984399723
 PD_1_306 times 4 dd 1.306562964876376527856643
 
-    alignz      16
+    alignz      32
 
 ; --------------------------------------------------------------------------
     SECTION     SEG_TEXT
@@ -63,7 +64,7 @@ PD_1_306 times 4 dd 1.306562964876376527856643
 %define wk(i)         ebp-(WK_NUM-(i))*SIZEOF_XMMWORD  ; xmmword wk[WK_NUM]
 %define WK_NUM        2
 
-    align       16
+    align       32
     global      EXTN(jsimd_fdct_float_sse)
 
 EXTN(jsimd_fdct_float_sse):
@@ -366,4 +367,4 @@ EXTN(jsimd_fdct_float_sse):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index eb2eb9c50d9721dbff9d0d7e02be94a7e7246425..f274924a5606207a236428ebba071f0bd0c79fd1 100644 (file)
@@ -2,6 +2,7 @@
 ; jfdctfst.asm - fast integer FDCT (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -50,7 +51,7 @@ F_1_306 equ     DESCALE(1402911301,30-CONST_BITS)       ; FIX(1.306562965)
 %define PRE_MULTIPLY_SCALE_BITS   2
 %define CONST_SHIFT     (16 - PRE_MULTIPLY_SCALE_BITS - CONST_BITS)
 
-        alignz  16
+        alignz  32
         global  EXTN(jconst_fdct_ifast_mmx)
 
 EXTN(jconst_fdct_ifast_mmx):
@@ -60,7 +61,7 @@ PW_F0382        times 4 dw  F_0_382 << CONST_SHIFT
 PW_F0541        times 4 dw  F_0_541 << CONST_SHIFT
 PW_F1306        times 4 dw  F_1_306 << CONST_SHIFT
 
-        alignz  16
+        alignz  32
 
 ; --------------------------------------------------------------------------
         SECTION SEG_TEXT
@@ -78,7 +79,7 @@ PW_F1306        times 4 dw  F_1_306 << CONST_SHIFT
 %define wk(i)           ebp-(WK_NUM-(i))*SIZEOF_MMWORD  ; mmword wk[WK_NUM]
 %define WK_NUM          2
 
-        align   16
+        align   32
         global  EXTN(jsimd_fdct_ifast_mmx)
 
 EXTN(jsimd_fdct_ifast_mmx):
@@ -393,4 +394,4 @@ EXTN(jsimd_fdct_ifast_mmx):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index bd7723c79ca0f57af42822229560bf16872cd581..fb140fa9a49a12d3a7d2dcc4101dc47fa0c2eb51 100644 (file)
@@ -2,6 +2,7 @@
 ; jfdctfst.asm - fast integer FDCT (SSE2)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -50,7 +51,7 @@ F_1_306 equ DESCALE(1402911301, 30-CONST_BITS)  ; FIX(1.306562965)
 %define PRE_MULTIPLY_SCALE_BITS  2
 %define CONST_SHIFT              (16 - PRE_MULTIPLY_SCALE_BITS - CONST_BITS)
 
-    alignz      16
+    alignz      32
     global      EXTN(jconst_fdct_ifast_sse2)
 
 EXTN(jconst_fdct_ifast_sse2):
@@ -60,7 +61,7 @@ PW_F0382 times 8 dw F_0_382 << CONST_SHIFT
 PW_F0541 times 8 dw F_0_541 << CONST_SHIFT
 PW_F1306 times 8 dw F_1_306 << CONST_SHIFT
 
-    alignz      16
+    alignz      32
 
 ; --------------------------------------------------------------------------
     SECTION     SEG_TEXT
@@ -78,7 +79,7 @@ PW_F1306 times 8 dw F_1_306 << CONST_SHIFT
 %define wk(i)         ebp-(WK_NUM-(i))*SIZEOF_XMMWORD  ; xmmword wk[WK_NUM]
 %define WK_NUM        2
 
-    align       16
+    align       32
     global      EXTN(jsimd_fdct_ifast_sse2)
 
 EXTN(jsimd_fdct_ifast_sse2):
@@ -400,4 +401,4 @@ EXTN(jsimd_fdct_ifast_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index 9142ad8816e1e3bfd3cbaf7baeb0319cb7c6d4d1..c035b0c958b631680ef88feddf336cd5239b241d 100644 (file)
@@ -2,6 +2,7 @@
 ; jfdctint.asm - accurate integer FDCT (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -64,7 +65,7 @@ F_3_072 equ     DESCALE(3299298341,30-CONST_BITS)       ; FIX(3.072711026)
 ; --------------------------------------------------------------------------
         SECTION SEG_CONST
 
-        alignz  16
+        alignz  32
         global  EXTN(jconst_fdct_islow_mmx)
 
 EXTN(jconst_fdct_islow_mmx):
@@ -81,7 +82,7 @@ PD_DESCALE_P1   times 2 dd  1 << (DESCALE_P1-1)
 PD_DESCALE_P2   times 2 dd  1 << (DESCALE_P2-1)
 PW_DESCALE_P2X  times 4 dw  1 << (PASS1_BITS-1)
 
-        alignz  16
+        alignz  32
 
 ; --------------------------------------------------------------------------
         SECTION SEG_TEXT
@@ -99,7 +100,7 @@ PW_DESCALE_P2X  times 4 dw  1 << (PASS1_BITS-1)
 %define wk(i)           ebp-(WK_NUM-(i))*SIZEOF_MMWORD  ; mmword wk[WK_NUM]
 %define WK_NUM          2
 
-        align   16
+        align   32
         global  EXTN(jsimd_fdct_islow_mmx)
 
 EXTN(jsimd_fdct_islow_mmx):
@@ -618,4 +619,4 @@ EXTN(jsimd_fdct_islow_mmx):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index ecfff301cd21fa491f18f6e076aa550a7aa5f4c4..66f2cc60f49d178878fefbf5739f7e1dd46448ee 100644 (file)
@@ -2,6 +2,7 @@
 ; jfdctint.asm - accurate integer FDCT (SSE2)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -64,7 +65,7 @@ F_3_072 equ DESCALE(3299298341, 30-CONST_BITS)  ; FIX(3.072711026)
 ; --------------------------------------------------------------------------
     SECTION     SEG_CONST
 
-    alignz      16
+    alignz      32
     global      EXTN(jconst_fdct_islow_sse2)
 
 EXTN(jconst_fdct_islow_sse2):
@@ -81,7 +82,7 @@ PD_DESCALE_P1  times 4 dd  1 << (DESCALE_P1-1)
 PD_DESCALE_P2  times 4 dd  1 << (DESCALE_P2-1)
 PW_DESCALE_P2X times 8 dw  1 << (PASS1_BITS-1)
 
-    alignz      16
+    alignz      32
 
 ; --------------------------------------------------------------------------
     SECTION     SEG_TEXT
@@ -99,7 +100,7 @@ PW_DESCALE_P2X times 8 dw  1 << (PASS1_BITS-1)
 %define wk(i)         ebp-(WK_NUM-(i))*SIZEOF_XMMWORD  ; xmmword wk[WK_NUM]
 %define WK_NUM        6
 
-    align       16
+    align       32
     global      EXTN(jsimd_fdct_islow_sse2)
 
 EXTN(jsimd_fdct_islow_sse2):
@@ -630,4 +631,4 @@ EXTN(jsimd_fdct_islow_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index 99356f20a4b7d41384d467df0a73a267c87e1827..1e47cf1e215d1fdac3e31110c289fbf8392c1863 100644 (file)
@@ -2,6 +2,7 @@
 ; jidctflt.asm - floating-point IDCT (3DNow! & MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -25,7 +26,7 @@
 ; --------------------------------------------------------------------------
         SECTION SEG_CONST
 
-        alignz  16
+        alignz  32
         global  EXTN(jconst_idct_float_3dnow)
 
 EXTN(jconst_idct_float_3dnow):
@@ -37,7 +38,7 @@ PD_2_613        times 2 dd  2.613125929752753055713286
 PD_RNDINT_MAGIC times 2 dd  100663296.0 ; (float)(0x00C00000 << 3)
 PB_CENTERJSAMP  times 8 db  CENTERJSAMPLE
 
-        alignz  16
+        alignz  32
 
 ; --------------------------------------------------------------------------
         SECTION SEG_TEXT
@@ -61,7 +62,7 @@ PB_CENTERJSAMP  times 8 db  CENTERJSAMPLE
 %define workspace       wk(0)-DCTSIZE2*SIZEOF_FAST_FLOAT
                                         ; FAST_FLOAT workspace[DCTSIZE2]
 
-        align   16
+        align   32
         global  EXTN(jsimd_idct_float_3dnow)
 
 EXTN(jsimd_idct_float_3dnow):
@@ -448,4 +449,4 @@ EXTN(jsimd_idct_float_3dnow):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index 4d4af2fffc643647cb51c9b272e06ec16aad537c..a1c99e96774ab7e56088128aa41a655b00c71929 100644 (file)
@@ -2,6 +2,7 @@
 ; jidctflt.asm - floating-point IDCT (SSE & MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -35,7 +36,7 @@
 ; --------------------------------------------------------------------------
         SECTION SEG_CONST
 
-        alignz  16
+        alignz  32
         global  EXTN(jconst_idct_float_sse)
 
 EXTN(jconst_idct_float_sse):
@@ -47,7 +48,7 @@ PD_M2_613       times 4 dd -2.613125929752753055713286
 PD_0_125        times 4 dd  0.125       ; 1/8
 PB_CENTERJSAMP  times 8 db  CENTERJSAMPLE
 
-        alignz  16
+        alignz  32
 
 ; --------------------------------------------------------------------------
         SECTION SEG_TEXT
@@ -71,7 +72,7 @@ PB_CENTERJSAMP  times 8 db  CENTERJSAMPLE
 %define workspace       wk(0)-DCTSIZE2*SIZEOF_FAST_FLOAT
                                         ; FAST_FLOAT workspace[DCTSIZE2]
 
-        align   16
+        align   32
         global  EXTN(jsimd_idct_float_sse)
 
 EXTN(jsimd_idct_float_sse):
@@ -568,4 +569,4 @@ EXTN(jsimd_idct_float_sse):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index e34d297647a203647ff0fbcc29dd749791fb4a04..e8be84427dd9a93c96ba1a4297fc996b45e09740 100644 (file)
@@ -2,6 +2,7 @@
 ; jidctflt.asm - floating-point IDCT (SSE & SSE2)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -35,7 +36,7 @@
 ; --------------------------------------------------------------------------
     SECTION     SEG_CONST
 
-    alignz      16
+    alignz      32
     global      EXTN(jconst_idct_float_sse2)
 
 EXTN(jconst_idct_float_sse2):
@@ -47,7 +48,7 @@ PD_M2_613       times 4  dd -2.613125929752753055713286
 PD_RNDINT_MAGIC times 4  dd  100663296.0  ; (float)(0x00C00000 << 3)
 PB_CENTERJSAMP  times 16 db  CENTERJSAMPLE
 
-    alignz      16
+    alignz      32
 
 ; --------------------------------------------------------------------------
     SECTION     SEG_TEXT
@@ -71,7 +72,7 @@ PB_CENTERJSAMP  times 16 db  CENTERJSAMPLE
 %define workspace      wk(0)-DCTSIZE2*SIZEOF_FAST_FLOAT
                                         ; FAST_FLOAT workspace[DCTSIZE2]
 
-    align       16
+    align       32
     global      EXTN(jsimd_idct_float_sse2)
 
 EXTN(jsimd_idct_float_sse2):
@@ -494,4 +495,4 @@ EXTN(jsimd_idct_float_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index 6e95bfbcafa7cc8610ead6edcc01fa346b9e545f..7b5c2f2f95063a2528ab4e1bf39b90587cc13010 100644 (file)
@@ -2,6 +2,7 @@
 ; jidctfst.asm - fast integer IDCT (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -57,7 +58,7 @@ F_1_613 equ     (F_2_613 - (1 << CONST_BITS))   ; FIX(2.613125930) - FIX(1)
 %define PRE_MULTIPLY_SCALE_BITS   2
 %define CONST_SHIFT     (16 - PRE_MULTIPLY_SCALE_BITS - CONST_BITS)
 
-        alignz  16
+        alignz  32
         global  EXTN(jconst_idct_ifast_mmx)
 
 EXTN(jconst_idct_ifast_mmx):
@@ -68,7 +69,7 @@ PW_MF1613       times 4 dw -F_1_613 << CONST_SHIFT
 PW_F1082        times 4 dw  F_1_082 << CONST_SHIFT
 PB_CENTERJSAMP  times 8 db  CENTERJSAMPLE
 
-        alignz  16
+        alignz  32
 
 ; --------------------------------------------------------------------------
         SECTION SEG_TEXT
@@ -92,7 +93,7 @@ PB_CENTERJSAMP  times 8 db  CENTERJSAMPLE
 %define workspace       wk(0)-DCTSIZE2*SIZEOF_JCOEF
                                         ; JCOEF workspace[DCTSIZE2]
 
-        align   16
+        align   32
         global  EXTN(jsimd_idct_ifast_mmx)
 
 EXTN(jsimd_idct_ifast_mmx):
@@ -496,4 +497,4 @@ EXTN(jsimd_idct_ifast_mmx):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index c5e5f33a9c44b07681fe83ab53264c74aaeec3d0..51e33179e86464addeb84fdab503f37d5176858c 100644 (file)
@@ -2,6 +2,7 @@
 ; jidctfst.asm - fast integer IDCT (SSE2)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -57,7 +58,7 @@ F_1_613 equ (F_2_613 - (1 << CONST_BITS))       ; FIX(2.613125930) - FIX(1)
 %define PRE_MULTIPLY_SCALE_BITS  2
 %define CONST_SHIFT              (16 - PRE_MULTIPLY_SCALE_BITS - CONST_BITS)
 
-    alignz      16
+    alignz      32
     global      EXTN(jconst_idct_ifast_sse2)
 
 EXTN(jconst_idct_ifast_sse2):
@@ -68,7 +69,7 @@ PW_MF1613      times 8  dw -F_1_613 << CONST_SHIFT
 PW_F1082       times 8  dw  F_1_082 << CONST_SHIFT
 PB_CENTERJSAMP times 16 db  CENTERJSAMPLE
 
-    alignz      16
+    alignz      32
 
 ; --------------------------------------------------------------------------
     SECTION     SEG_TEXT
@@ -90,7 +91,7 @@ PB_CENTERJSAMP times 16 db  CENTERJSAMPLE
 %define wk(i)          ebp-(WK_NUM-(i))*SIZEOF_XMMWORD  ; xmmword wk[WK_NUM]
 %define WK_NUM         2
 
-    align       16
+    align       32
     global      EXTN(jsimd_idct_ifast_sse2)
 
 EXTN(jsimd_idct_ifast_sse2):
@@ -498,4 +499,4 @@ EXTN(jsimd_idct_ifast_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index 5bd198120bddaba6984f9588401089d7080ee5a8..6ef7ff7ae9dd9a4ea1b8d2dd8e3bcb146372afbd 100644 (file)
@@ -2,6 +2,7 @@
 ; jidctint.asm - accurate integer IDCT (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -64,7 +65,7 @@ F_3_072 equ     DESCALE(3299298341,30-CONST_BITS)       ; FIX(3.072711026)
 ; --------------------------------------------------------------------------
         SECTION SEG_CONST
 
-        alignz  16
+        alignz  32
         global  EXTN(jconst_idct_islow_mmx)
 
 EXTN(jconst_idct_islow_mmx):
@@ -81,7 +82,7 @@ PD_DESCALE_P1   times 2 dd  1 << (DESCALE_P1-1)
 PD_DESCALE_P2   times 2 dd  1 << (DESCALE_P2-1)
 PB_CENTERJSAMP  times 8 db  CENTERJSAMPLE
 
-        alignz  16
+        alignz  32
 
 ; --------------------------------------------------------------------------
         SECTION SEG_TEXT
@@ -105,7 +106,7 @@ PB_CENTERJSAMP  times 8 db  CENTERJSAMPLE
 %define workspace       wk(0)-DCTSIZE2*SIZEOF_JCOEF
                                         ; JCOEF workspace[DCTSIZE2]
 
-        align   16
+        align   32
         global  EXTN(jsimd_idct_islow_mmx)
 
 EXTN(jsimd_idct_islow_mmx):
@@ -848,4 +849,4 @@ EXTN(jsimd_idct_islow_mmx):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index 03ef3d918e6290003fe1c8e2cf16fc8b0d1c0f7c..441da7012cc6ee9aa9ebde77ee78cdbf4e7bcc3c 100644 (file)
@@ -2,6 +2,7 @@
 ; jidctint.asm - accurate integer IDCT (SSE2)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -64,7 +65,7 @@ F_3_072 equ DESCALE(3299298341, 30-CONST_BITS)  ; FIX(3.072711026)
 ; --------------------------------------------------------------------------
     SECTION     SEG_CONST
 
-    alignz      16
+    alignz      32
     global      EXTN(jconst_idct_islow_sse2)
 
 EXTN(jconst_idct_islow_sse2):
@@ -81,7 +82,7 @@ PD_DESCALE_P1  times 4  dd  1 << (DESCALE_P1-1)
 PD_DESCALE_P2  times 4  dd  1 << (DESCALE_P2-1)
 PB_CENTERJSAMP times 16 db  CENTERJSAMPLE
 
-    alignz      16
+    alignz      32
 
 ; --------------------------------------------------------------------------
     SECTION     SEG_TEXT
@@ -103,7 +104,7 @@ PB_CENTERJSAMP times 16 db  CENTERJSAMPLE
 %define wk(i)          ebp-(WK_NUM-(i))*SIZEOF_XMMWORD  ; xmmword wk[WK_NUM]
 %define WK_NUM         12
 
-    align       16
+    align       32
     global      EXTN(jsimd_idct_islow_sse2)
 
 EXTN(jsimd_idct_islow_sse2):
@@ -855,4 +856,4 @@ EXTN(jsimd_idct_islow_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index ba054e31a0d19b76b1efddc2410bf59d11f9ed0c..d5b7e2ea6798eece8977d53b7cf8e0864a4174be 100644 (file)
@@ -2,6 +2,7 @@
 ; jidctred.asm - reduced-size IDCT (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -70,7 +71,7 @@ F_3_624 equ     DESCALE(3891787747,30-CONST_BITS)       ; FIX(3.624509785)
 ; --------------------------------------------------------------------------
         SECTION SEG_CONST
 
-        alignz  16
+        alignz  32
         global  EXTN(jconst_idct_red_mmx)
 
 EXTN(jconst_idct_red_mmx):
@@ -88,7 +89,7 @@ PD_DESCALE_P1_2 times 2 dd  1 << (DESCALE_P1_2-1)
 PD_DESCALE_P2_2 times 2 dd  1 << (DESCALE_P2_2-1)
 PB_CENTERJSAMP  times 8 db  CENTERJSAMPLE
 
-        alignz  16
+        alignz  32
 
 ; --------------------------------------------------------------------------
         SECTION SEG_TEXT
@@ -113,7 +114,7 @@ PB_CENTERJSAMP  times 8 db  CENTERJSAMPLE
 %define workspace       wk(0)-DCTSIZE2*SIZEOF_JCOEF
                                         ; JCOEF workspace[DCTSIZE2]
 
-        align   16
+        align   32
         global  EXTN(jsimd_idct_4x4_mmx)
 
 EXTN(jsimd_idct_4x4_mmx):
@@ -501,7 +502,7 @@ EXTN(jsimd_idct_4x4_mmx):
 %define output_buf(b)   (b)+16          ; JSAMPARRAY output_buf
 %define output_col(b)   (b)+20          ; JDIMENSION output_col
 
-        align   16
+        align   32
         global  EXTN(jsimd_idct_2x2_mmx)
 
 EXTN(jsimd_idct_2x2_mmx):
@@ -702,4 +703,4 @@ EXTN(jsimd_idct_2x2_mmx):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index 761fba84ca2287753a1dffaec4d6c6d3084602b1..d0609acd8b2579c7808646e9f3b60a21e9bb547b 100644 (file)
@@ -2,6 +2,7 @@
 ; jidctred.asm - reduced-size IDCT (SSE2)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -70,7 +71,7 @@ F_3_624 equ DESCALE(3891787747, 30-CONST_BITS)  ; FIX(3.624509785)
 ; --------------------------------------------------------------------------
     SECTION     SEG_CONST
 
-    alignz      16
+    alignz      32
     global      EXTN(jconst_idct_red_sse2)
 
 EXTN(jconst_idct_red_sse2):
@@ -88,7 +89,7 @@ PD_DESCALE_P1_2 times 4  dd  1 << (DESCALE_P1_2-1)
 PD_DESCALE_P2_2 times 4  dd  1 << (DESCALE_P2_2-1)
 PB_CENTERJSAMP  times 16 db  CENTERJSAMPLE
 
-    alignz      16
+    alignz      32
 
 ; --------------------------------------------------------------------------
     SECTION     SEG_TEXT
@@ -111,7 +112,7 @@ PB_CENTERJSAMP  times 16 db  CENTERJSAMPLE
 %define wk(i)          ebp-(WK_NUM-(i))*SIZEOF_XMMWORD  ; xmmword wk[WK_NUM]
 %define WK_NUM         2
 
-    align       16
+    align       32
     global      EXTN(jsimd_idct_4x4_sse2)
 
 EXTN(jsimd_idct_4x4_sse2):
@@ -422,7 +423,7 @@ EXTN(jsimd_idct_4x4_sse2):
 %define output_buf(b)  (b)+16           ; JSAMPARRAY output_buf
 %define output_col(b)  (b)+20           ; JDIMENSION output_col
 
-    align       16
+    align       32
     global      EXTN(jsimd_idct_2x2_sse2)
 
 EXTN(jsimd_idct_2x2_sse2):
@@ -590,4 +591,4 @@ EXTN(jsimd_idct_2x2_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index 0b4164b261aaefc2f44b6a679cd7c2c7c34a3314..73c02cdd5378fdc7b7fa2b880144a0e14f666b59 100644 (file)
@@ -2,6 +2,7 @@
 ; jquant.asm - sample data conversion and quantization (3DNow! & MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -33,7 +34,7 @@
 %define start_col       ebp+12          ; JDIMENSION start_col
 %define workspace       ebp+16          ; FAST_FLOAT *workspace
 
-        align   16
+        align   32
         global  EXTN(jsimd_convsamp_float_3dnow)
 
 EXTN(jsimd_convsamp_float_3dnow):
@@ -136,7 +137,7 @@ EXTN(jsimd_convsamp_float_3dnow):
 %define divisors        ebp+12          ; FAST_FLOAT *divisors
 %define workspace       ebp+16          ; FAST_FLOAT *workspace
 
-        align   16
+        align   32
         global  EXTN(jsimd_quantize_float_3dnow)
 
 EXTN(jsimd_quantize_float_3dnow):
@@ -229,4 +230,4 @@ EXTN(jsimd_quantize_float_3dnow):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index aed6071bfcc0a4e8e165c3624cf2980ff2c357d7..93dea316da15811fa42ee0212924e23aa7d92850 100644 (file)
@@ -2,6 +2,7 @@
 ; jquant.asm - sample data conversion and quantization (MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -33,7 +34,7 @@
 %define start_col       ebp+12          ; JDIMENSION start_col
 %define workspace       ebp+16          ; DCTELEM *workspace
 
-        align   16
+        align   32
         global  EXTN(jsimd_convsamp_mmx)
 
 EXTN(jsimd_convsamp_mmx):
@@ -138,7 +139,7 @@ EXTN(jsimd_convsamp_mmx):
 %define divisors        ebp+12          ; DCTELEM *divisors
 %define workspace       ebp+16          ; DCTELEM *workspace
 
-        align   16
+        align   32
         global  EXTN(jsimd_quantize_mmx)
 
 EXTN(jsimd_quantize_mmx):
@@ -270,4 +271,4 @@ EXTN(jsimd_quantize_mmx):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index 1baf88f2575c68e9f91fb188131e00925e107254..d6ab9438194e1af26d066de7a39f7509479d15e2 100644 (file)
@@ -2,6 +2,7 @@
 ; jquant.asm - sample data conversion and quantization (SSE & MMX)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -33,7 +34,7 @@
 %define start_col       ebp+12          ; JDIMENSION start_col
 %define workspace       ebp+16          ; FAST_FLOAT *workspace
 
-        align   16
+        align   32
         global  EXTN(jsimd_convsamp_float_sse)
 
 EXTN(jsimd_convsamp_float_sse):
@@ -136,7 +137,7 @@ EXTN(jsimd_convsamp_float_sse):
 %define divisors        ebp+12          ; FAST_FLOAT *divisors
 %define workspace       ebp+16          ; FAST_FLOAT *workspace
 
-        align   16
+        align   32
         global  EXTN(jsimd_quantize_float_sse)
 
 EXTN(jsimd_quantize_float_sse):
@@ -207,4 +208,4 @@ EXTN(jsimd_quantize_float_sse):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index 1dca26a11e3196709e4f8ec18543fd491b6b4246..3c0000e6094f713299ab423ed80fd05411582e92 100644 (file)
@@ -2,6 +2,7 @@
 ; jquantf.asm - sample data conversion and quantization (SSE & SSE2)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -33,7 +34,7 @@
 %define start_col    ebp+12             ; JDIMENSION start_col
 %define workspace    ebp+16             ; FAST_FLOAT *workspace
 
-    align       16
+    align       32
     global      EXTN(jsimd_convsamp_float_sse2)
 
 EXTN(jsimd_convsamp_float_sse2):
@@ -113,7 +114,7 @@ EXTN(jsimd_convsamp_float_sse2):
 %define divisors    ebp+12              ; FAST_FLOAT *divisors
 %define workspace   ebp+16              ; FAST_FLOAT *workspace
 
-    align       16
+    align       32
     global      EXTN(jsimd_quantize_float_sse2)
 
 EXTN(jsimd_quantize_float_sse2):
@@ -167,4 +168,4 @@ EXTN(jsimd_quantize_float_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index 6fb001f215ad6402c5e057e181010a8efa58e2fc..6f42947bb41afefaf46f0858fd897d0a4be8049d 100644 (file)
@@ -2,6 +2,7 @@
 ; jquanti.asm - sample data conversion and quantization (SSE2)
 ;
 ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+; Copyright (C) 2016, D. R. Commander.
 ;
 ; Based on the x86 SIMD extension for IJG JPEG library
 ; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -33,7 +34,7 @@
 %define start_col    ebp+12             ; JDIMENSION start_col
 %define workspace    ebp+16             ; DCTELEM *workspace
 
-    align       16
+    align       32
     global      EXTN(jsimd_convsamp_sse2)
 
 EXTN(jsimd_convsamp_sse2):
@@ -115,7 +116,7 @@ EXTN(jsimd_convsamp_sse2):
 %define divisors    ebp+12              ; DCTELEM *divisors
 %define workspace   ebp+16              ; DCTELEM *workspace
 
-    align       16
+    align       32
     global      EXTN(jsimd_quantize_sse2)
 
 EXTN(jsimd_quantize_sse2):
@@ -196,4 +197,4 @@ EXTN(jsimd_quantize_sse2):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-    align       16
+    align       32
index 6da8bd8913c4fcddd71940d72a440f56b3a936f9..2e770c183b7b0b79357475e1ab04f692be8e66ac 100644 (file)
@@ -61,6 +61,9 @@ init_simd (void)
   env = getenv("JSIMD_FORCESSE2");
   if ((env != NULL) && (strcmp(env, "1") == 0))
     simd_support &= JSIMD_SSE2;
+  env = getenv("JSIMD_FORCEAVX2");
+  if ((env != NULL) && (strcmp(env, "1") == 0))
+    simd_support &= JSIMD_AVX2;
   env = getenv("JSIMD_FORCENONE");
   if ((env != NULL) && (strcmp(env, "1") == 0))
     simd_support = 0;
index 580810b8578ab9627f60bf9178acafbd52321202..f42206e47690133e482a7c6ceeaa2b000dc20b64 100644 (file)
@@ -28,7 +28,7 @@
 ; jpeg_simd_cpu_support (void)
 ;
 
-        align   16
+        align   32
         global  EXTN(jpeg_simd_cpu_support)
 
 EXTN(jpeg_simd_cpu_support):
@@ -112,4 +112,4 @@ EXTN(jpeg_simd_cpu_support):
 
 ; For some reason, the OS X linker does not honor the request to align the
 ; segment unless we do this.
-        align   16
+        align   32
index d16bdefb675e834a3d5ddbdf50e7d9091ae789fa..3485d6d53cda73bd6576a19e40e40607c167addd 100644 (file)
@@ -64,8 +64,8 @@
 
 ; -- segment definition --
 ;
-%define SEG_TEXT   _text align=16 public use32 class=CODE
-%define SEG_CONST  _data align=16 public use32 class=DATA
+%define SEG_TEXT   _text align=32 public use32 class=CODE
+%define SEG_CONST  _data align=32 public use32 class=DATA
 
 %elifdef ELF    ; ----(nasm -felf[64] -DELF ...)------------
 ; * Linux
@@ -108,7 +108,7 @@ section .note.GNU-stack noalloc noexec nowrite progbits
 
 ; -- segment definition --
 ;
-%define SEG_TEXT   .text  ;align=32     ; nasm doesn't accept align=16. why?
+%define SEG_TEXT   .text  ;align=32     ; nasm doesn't accept align=32. why?
 %define SEG_CONST  .rodata align=32
 
 ; The generation of position-independent code (PIC) is the default on Darwin.
index 421b5f8dccb753db1a31293b65bbe2513f295ea0..95bf5dc6db1335fa25002d3dc9a0972efa596c77 100644 (file)
@@ -926,29 +926,29 @@ DLLEXPORT int DLLCALL tjEncodeYUVPlanes(tjhandle handle,
                compptr=&cinfo->comp_info[i];
                _tmpbuf[i]=(JSAMPLE *)malloc(
                        PAD((compptr->width_in_blocks*cinfo->max_h_samp_factor*DCTSIZE)
-                               /compptr->h_samp_factor, 16) * cinfo->max_v_samp_factor + 16);
+                               /compptr->h_samp_factor, 32) * cinfo->max_v_samp_factor + 32);
                if(!_tmpbuf[i]) _throw("tjEncodeYUVPlanes(): Memory allocation failure");
                tmpbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*cinfo->max_v_samp_factor);
                if(!tmpbuf[i]) _throw("tjEncodeYUVPlanes(): Memory allocation failure");
                for(row=0; row<cinfo->max_v_samp_factor; row++)
                {
                        unsigned char *_tmpbuf_aligned=
-                               (unsigned char *)PAD((size_t)_tmpbuf[i], 16);
+                               (unsigned char *)PAD((size_t)_tmpbuf[i], 32);
                        tmpbuf[i][row]=&_tmpbuf_aligned[
                                PAD((compptr->width_in_blocks*cinfo->max_h_samp_factor*DCTSIZE)
-                                       /compptr->h_samp_factor, 16) * row];
+                                       /compptr->h_samp_factor, 32) * row];
                }
-               _tmpbuf2[i]=(JSAMPLE *)malloc(PAD(compptr->width_in_blocks*DCTSIZE, 16)
-                       * compptr->v_samp_factor + 16);
+               _tmpbuf2[i]=(JSAMPLE *)malloc(PAD(compptr->width_in_blocks*DCTSIZE, 32)
+                       * compptr->v_samp_factor + 32);
                if(!_tmpbuf2[i]) _throw("tjEncodeYUVPlanes(): Memory allocation failure");
                tmpbuf2[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*compptr->v_samp_factor);
                if(!tmpbuf2[i]) _throw("tjEncodeYUVPlanes(): Memory allocation failure");
                for(row=0; row<compptr->v_samp_factor; row++)
                {
                        unsigned char *_tmpbuf2_aligned=
-                               (unsigned char *)PAD((size_t)_tmpbuf2[i], 16);
+                               (unsigned char *)PAD((size_t)_tmpbuf2[i], 32);
                        tmpbuf2[i][row]=&_tmpbuf2_aligned[
-                               PAD(compptr->width_in_blocks*DCTSIZE, 16) * row];
+                               PAD(compptr->width_in_blocks*DCTSIZE, 32) * row];
                }
                pw[i]=pw0*compptr->h_samp_factor/cinfo->max_h_samp_factor;
                ph[i]=ph0*compptr->v_samp_factor/cinfo->max_v_samp_factor;
@@ -1611,17 +1611,17 @@ DLLEXPORT int DLLCALL tjDecodeYUVPlanes(tjhandle handle,
        for(i=0; i<dinfo->num_components; i++)
        {
                compptr=&dinfo->comp_info[i];
-               _tmpbuf[i]=(JSAMPLE *)malloc(PAD(compptr->width_in_blocks*DCTSIZE, 16)
-                       * compptr->v_samp_factor + 16);
+               _tmpbuf[i]=(JSAMPLE *)malloc(PAD(compptr->width_in_blocks*DCTSIZE, 32)
+                       * compptr->v_samp_factor + 32);
                if(!_tmpbuf[i]) _throw("tjDecodeYUVPlanes(): Memory allocation failure");
                tmpbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*compptr->v_samp_factor);
                if(!tmpbuf[i]) _throw("tjDecodeYUVPlanes(): Memory allocation failure");
                for(row=0; row<compptr->v_samp_factor; row++)
                {
                        unsigned char *_tmpbuf_aligned=
-                               (unsigned char *)PAD((size_t)_tmpbuf[i], 16);
+                               (unsigned char *)PAD((size_t)_tmpbuf[i], 32);
                        tmpbuf[i][row]=&_tmpbuf_aligned[
-                               PAD(compptr->width_in_blocks*DCTSIZE, 16) * row];
+                               PAD(compptr->width_in_blocks*DCTSIZE, 32) * row];
                }
                pw[i]=pw0*compptr->h_samp_factor/dinfo->max_h_samp_factor;
                ph[i]=ph0*compptr->v_samp_factor/dinfo->max_v_samp_factor;