~ubuntu-branches/ubuntu/saucy/libjpeg-turbo/saucy-security

« back to all changes in this revision

Viewing changes to simd/jsimdcfg.inc.h

  • Committer: Package Import Robot
  • Author(s): Matthias Klose, Tom Gall, Matthias Klose
  • Date: 2012-09-20 00:18:15 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120920001815-eijk7v63d1nv0vbo
Tags: 1.2.1-0ubuntu1
[ Tom Gall ]
* Update to stable 1.2.1. LP: #1012861.
  * Addresses CVE-2012-2806. LP: #1025537.
    A Heap-based buffer overflow was found in the way libjpeg-turbo
    decompressed certain corrupt JPEG images in which the component count
    was erroneously set to a large value. An attacker could create a
    specially-crafted JPEG image that, when opened, could cause an
    application using libpng to crash or, possibly, execute arbitrary code
    with the privileges of the user running the application.
  * Cosmetic fixes to argument lists
  * Added flags to the TurboJPEG API that allow the caller to force
    the use of either the fast or the accurate DCT/IDCT algorithms
    in the underlying codec.
  * More recent versions of autoconf add -traditional-cpp to the CPP
    flags, which causes jsimdcfg.inc.h to not preprocess correctly
    unless we expand all of the instances of the #definev macro.
  * Fixed regression caused by a bug in the 32-bit strict memory access
    code in jdmrgss2.asm (contributed by Chromium to stop valgrind from
    whining whenever the output buffer size was not evenly divisible by
    16 bytes.)  On Linux/x86, this regression generated incorrect
    pixels on the right-hand side of images whose rows were not 16-byte
    aligned, whenever fancy upsampling was used.  This patch also
    enables the strict memory access code on all platforms, not just
    Linux (it does no harm on other platforms) and removes a couple of
    pcmpeqb instructions that were rendered unnecessary by r835.
  * Accelerated 4:2:2 upsampling routine for ARM (improves
    performance ~20-30% when decompressing 4:2:2 JPEGs using
    fancy upsampling)
  * Eliminate the use of the MASKMOVDQU instruction, to speed
    up decompression performance by 10x on AMD Bobcat embedded
    processors (and ~5% on AMD desktop processors.)
  * add tjbench to libjpeg-turbo-test packages
  * Guard against num_components being a ridiculous
    value due to a corrupt header
  * Preserve all 128 bits of xmm6 and xmm7

[ Matthias Klose ]
* Prepare the package for quantal, basing on the 1.2.1 release tarball.
* d/patches/branch-updates.diff: Update to 20120919 of the 1.2.x branch,
  but don't bump the version to 1.2.2.
* d/patches/guard-inline-define: Remove, integrated upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#include "../jmorecfg.h"
16
16
#include "jsimd.h"
17
17
 
18
 
#define define(var) %define _cpp_protection_##var
19
 
#define definev(var) %define _cpp_protection_##var var
20
 
 
21
18
;
22
19
; -- jpeglib.h
23
20
;
24
21
 
25
 
definev(DCTSIZE)
26
 
definev(DCTSIZE2)
 
22
%define _cpp_protection_DCTSIZE DCTSIZE
 
23
%define _cpp_protection_DCTSIZE2 DCTSIZE2
27
24
 
28
25
;
29
26
; -- jmorecfg.h
30
27
;
31
28
 
32
 
definev(RGB_RED)
33
 
definev(RGB_GREEN)
34
 
definev(RGB_BLUE)
35
 
definev(RGB_PIXELSIZE)
36
 
 
37
 
definev(EXT_RGB_RED)
38
 
definev(EXT_RGB_GREEN)
39
 
definev(EXT_RGB_BLUE)
40
 
definev(EXT_RGB_PIXELSIZE)
41
 
 
42
 
definev(EXT_RGBX_RED)
43
 
definev(EXT_RGBX_GREEN)
44
 
definev(EXT_RGBX_BLUE)
45
 
definev(EXT_RGBX_PIXELSIZE)
46
 
 
47
 
definev(EXT_BGR_RED)
48
 
definev(EXT_BGR_GREEN)
49
 
definev(EXT_BGR_BLUE)
50
 
definev(EXT_BGR_PIXELSIZE)
51
 
 
52
 
definev(EXT_BGRX_RED)
53
 
definev(EXT_BGRX_GREEN)
54
 
definev(EXT_BGRX_BLUE)
55
 
definev(EXT_BGRX_PIXELSIZE)
56
 
 
57
 
definev(EXT_XBGR_RED)
58
 
definev(EXT_XBGR_GREEN)
59
 
definev(EXT_XBGR_BLUE)
60
 
definev(EXT_XBGR_PIXELSIZE)
61
 
 
62
 
definev(EXT_XRGB_RED)
63
 
definev(EXT_XRGB_GREEN)
64
 
definev(EXT_XRGB_BLUE)
65
 
definev(EXT_XRGB_PIXELSIZE)
 
29
%define _cpp_protection_RGB_RED RGB_RED
 
30
%define _cpp_protection_RGB_GREEN RGB_GREEN
 
31
%define _cpp_protection_RGB_BLUE RGB_BLUE
 
32
%define _cpp_protection_RGB_PIXELSIZE RGB_PIXELSIZE
 
33
 
 
34
%define _cpp_protection_EXT_RGB_RED EXT_RGB_RED
 
35
%define _cpp_protection_EXT_RGB_GREEN EXT_RGB_GREEN
 
36
%define _cpp_protection_EXT_RGB_BLUE EXT_RGB_BLUE
 
37
%define _cpp_protection_EXT_RGB_PIXELSIZE EXT_RGB_PIXELSIZE
 
38
 
 
39
%define _cpp_protection_EXT_RGBX_RED EXT_RGBX_RED
 
40
%define _cpp_protection_EXT_RGBX_GREEN EXT_RGBX_GREEN
 
41
%define _cpp_protection_EXT_RGBX_BLUE EXT_RGBX_BLUE
 
42
%define _cpp_protection_EXT_RGBX_PIXELSIZE EXT_RGBX_PIXELSIZE
 
43
 
 
44
%define _cpp_protection_EXT_BGR_RED EXT_BGR_RED
 
45
%define _cpp_protection_EXT_BGR_GREEN EXT_BGR_GREEN
 
46
%define _cpp_protection_EXT_BGR_BLUE EXT_BGR_BLUE
 
47
%define _cpp_protection_EXT_BGR_PIXELSIZE EXT_BGR_PIXELSIZE
 
48
 
 
49
%define _cpp_protection_EXT_BGRX_RED EXT_BGRX_RED
 
50
%define _cpp_protection_EXT_BGRX_GREEN EXT_BGRX_GREEN
 
51
%define _cpp_protection_EXT_BGRX_BLUE EXT_BGRX_BLUE
 
52
%define _cpp_protection_EXT_BGRX_PIXELSIZE EXT_BGRX_PIXELSIZE
 
53
 
 
54
%define _cpp_protection_EXT_XBGR_RED EXT_XBGR_RED
 
55
%define _cpp_protection_EXT_XBGR_GREEN EXT_XBGR_GREEN
 
56
%define _cpp_protection_EXT_XBGR_BLUE EXT_XBGR_BLUE
 
57
%define _cpp_protection_EXT_XBGR_PIXELSIZE EXT_XBGR_PIXELSIZE
 
58
 
 
59
%define _cpp_protection_EXT_XRGB_RED EXT_XRGB_RED
 
60
%define _cpp_protection_EXT_XRGB_GREEN EXT_XRGB_GREEN
 
61
%define _cpp_protection_EXT_XRGB_BLUE EXT_XRGB_BLUE
 
62
%define _cpp_protection_EXT_XRGB_PIXELSIZE EXT_XRGB_PIXELSIZE
66
63
 
67
64
%define RGBX_FILLER_0XFF        1
68
65
 
73
70
%define JSAMPLE                 byte          ; unsigned char
74
71
%define SIZEOF_JSAMPLE          SIZEOF_BYTE   ; sizeof(JSAMPLE)
75
72
 
76
 
definev(CENTERJSAMPLE)
 
73
%define _cpp_protection_CENTERJSAMPLE CENTERJSAMPLE
77
74
 
78
75
; Representation of a DCT frequency coefficient.
79
76
; On this SIMD implementation, this must be 'short'.
126
123
; -- jsimd.h
127
124
;
128
125
 
129
 
definev(JSIMD_NONE)
130
 
definev(JSIMD_MMX)
131
 
definev(JSIMD_3DNOW)
132
 
definev(JSIMD_SSE)
133
 
definev(JSIMD_SSE2)
 
126
%define _cpp_protection_JSIMD_NONE JSIMD_NONE
 
127
%define _cpp_protection_JSIMD_MMX JSIMD_MMX
 
128
%define _cpp_protection_JSIMD_3DNOW JSIMD_3DNOW
 
129
%define _cpp_protection_JSIMD_SSE JSIMD_SSE
 
130
%define _cpp_protection_JSIMD_SSE2 JSIMD_SSE2
134
131
 
135
132
; Short forms of external names for systems with brain-damaged linkers.
136
133
;
137
134
#ifdef NEED_SHORT_EXTERNAL_NAMES
138
 
definev(jpeg_simd_cpu_support)
139
 
definev(jsimd_rgb_ycc_convert_mmx)
140
 
definev(jsimd_ycc_rgb_convert_mmx)
141
 
definev(jconst_rgb_ycc_convert_sse2)
142
 
definev(jsimd_rgb_ycc_convert_sse2)
143
 
definev(jconst_ycc_rgb_convert_sse2)
144
 
definev(jsimd_ycc_rgb_convert_sse2)
145
 
definev(jsimd_h2v2_downsample_mmx)
146
 
definev(jsimd_h2v1_downsample_mmx)
147
 
definev(jsimd_h2v2_downsample_sse2)
148
 
definev(jsimd_h2v1_downsample_sse2)
149
 
definev(jsimd_h2v2_upsample_mmx)
150
 
definev(jsimd_h2v1_upsample_mmx)
151
 
definev(jsimd_h2v1_fancy_upsample_mmx)
152
 
definev(jsimd_h2v2_fancy_upsample_mmx)
153
 
definev(jsimd_h2v1_merged_upsample_mmx)
154
 
definev(jsimd_h2v2_merged_upsample_mmx)
155
 
definev(jsimd_h2v2_upsample_sse2)
156
 
definev(jsimd_h2v1_upsample_sse2)
157
 
definev(jconst_fancy_upsample_sse2)
158
 
definev(jsimd_h2v1_fancy_upsample_sse2)
159
 
definev(jsimd_h2v2_fancy_upsample_sse2)
160
 
definev(jconst_merged_upsample_sse2)
161
 
definev(jsimd_h2v1_merged_upsample_sse2)
162
 
definev(jsimd_h2v2_merged_upsample_sse2)
163
 
definev(jsimd_convsamp_mmx)
164
 
definev(jsimd_convsamp_sse2)
165
 
definev(jsimd_convsamp_float_3dnow)
166
 
definev(jsimd_convsamp_float_sse)
167
 
definev(jsimd_convsamp_float_sse2)
168
 
definev(jsimd_fdct_islow_mmx)
169
 
definev(jsimd_fdct_ifast_mmx)
170
 
definev(jconst_fdct_islow_sse2)
171
 
definev(jsimd_fdct_islow_sse2)
172
 
definev(jconst_fdct_ifast_sse2)
173
 
definev(jsimd_fdct_ifast_sse2)
174
 
definev(jsimd_fdct_float_3dnow)
175
 
definev(jconst_fdct_float_sse)
176
 
definev(jsimd_fdct_float_sse)
177
 
definev(jsimd_quantize_mmx)
178
 
definev(jsimd_quantize_sse2)
179
 
definev(jsimd_quantize_float_3dnow)
180
 
definev(jsimd_quantize_float_sse)
181
 
definev(jsimd_quantize_float_sse2)
182
 
definev(jsimd_idct_2x2_mmx)
183
 
definev(jsimd_idct_4x4_mmx)
184
 
definev(jconst_idct_red_sse2)
185
 
definev(jsimd_idct_2x2_sse2)
186
 
definev(jsimd_idct_4x4_sse2)
187
 
definev(jsimd_idct_islow_mmx)
188
 
definev(jsimd_idct_ifast_mmx)
189
 
definev(jconst_idct_islow_sse2)
190
 
definev(jsimd_idct_islow_sse2)
191
 
definev(jconst_idct_ifast_sse2)
192
 
definev(jsimd_idct_ifast_sse2)
193
 
definev(jsimd_idct_float_3dnow)
194
 
definev(jconst_idct_float_sse)
195
 
definev(jsimd_idct_float_sse)
196
 
definev(jconst_idct_float_sse2)
197
 
definev(jsimd_idct_float_sse2)
 
135
%define _cpp_protection_jpeg_simd_cpu_support jpeg_simd_cpu_support
 
136
%define _cpp_protection_jsimd_rgb_ycc_convert_mmx jsimd_rgb_ycc_convert_mmx
 
137
%define _cpp_protection_jsimd_ycc_rgb_convert_mmx jsimd_ycc_rgb_convert_mmx
 
138
%define _cpp_protection_jconst_rgb_ycc_convert_sse2 jconst_rgb_ycc_convert_sse2
 
139
%define _cpp_protection_jsimd_rgb_ycc_convert_sse2 jsimd_rgb_ycc_convert_sse2
 
140
%define _cpp_protection_jconst_ycc_rgb_convert_sse2 jconst_ycc_rgb_convert_sse2
 
141
%define _cpp_protection_jsimd_ycc_rgb_convert_sse2 jsimd_ycc_rgb_convert_sse2
 
142
%define _cpp_protection_jsimd_h2v2_downsample_mmx jsimd_h2v2_downsample_mmx
 
143
%define _cpp_protection_jsimd_h2v1_downsample_mmx jsimd_h2v1_downsample_mmx
 
144
%define _cpp_protection_jsimd_h2v2_downsample_sse2 jsimd_h2v2_downsample_sse2
 
145
%define _cpp_protection_jsimd_h2v1_downsample_sse2 jsimd_h2v1_downsample_sse2
 
146
%define _cpp_protection_jsimd_h2v2_upsample_mmx jsimd_h2v2_upsample_mmx
 
147
%define _cpp_protection_jsimd_h2v1_upsample_mmx jsimd_h2v1_upsample_mmx
 
148
%define _cpp_protection_jsimd_h2v1_fancy_upsample_mmx jsimd_h2v1_fancy_upsample_mmx
 
149
%define _cpp_protection_jsimd_h2v2_fancy_upsample_mmx jsimd_h2v2_fancy_upsample_mmx
 
150
%define _cpp_protection_jsimd_h2v1_merged_upsample_mmx jsimd_h2v1_merged_upsample_mmx
 
151
%define _cpp_protection_jsimd_h2v2_merged_upsample_mmx jsimd_h2v2_merged_upsample_mmx
 
152
%define _cpp_protection_jsimd_h2v2_upsample_sse2 jsimd_h2v2_upsample_sse2
 
153
%define _cpp_protection_jsimd_h2v1_upsample_sse2 jsimd_h2v1_upsample_sse2
 
154
%define _cpp_protection_jconst_fancy_upsample_sse2 jconst_fancy_upsample_sse2
 
155
%define _cpp_protection_jsimd_h2v1_fancy_upsample_sse2 jsimd_h2v1_fancy_upsample_sse2
 
156
%define _cpp_protection_jsimd_h2v2_fancy_upsample_sse2 jsimd_h2v2_fancy_upsample_sse2
 
157
%define _cpp_protection_jconst_merged_upsample_sse2 jconst_merged_upsample_sse2
 
158
%define _cpp_protection_jsimd_h2v1_merged_upsample_sse2 jsimd_h2v1_merged_upsample_sse2
 
159
%define _cpp_protection_jsimd_h2v2_merged_upsample_sse2 jsimd_h2v2_merged_upsample_sse2
 
160
%define _cpp_protection_jsimd_convsamp_mmx jsimd_convsamp_mmx
 
161
%define _cpp_protection_jsimd_convsamp_sse2 jsimd_convsamp_sse2
 
162
%define _cpp_protection_jsimd_convsamp_float_3dnow jsimd_convsamp_float_3dnow
 
163
%define _cpp_protection_jsimd_convsamp_float_sse jsimd_convsamp_float_sse
 
164
%define _cpp_protection_jsimd_convsamp_float_sse2 jsimd_convsamp_float_sse2
 
165
%define _cpp_protection_jsimd_fdct_islow_mmx jsimd_fdct_islow_mmx
 
166
%define _cpp_protection_jsimd_fdct_ifast_mmx jsimd_fdct_ifast_mmx
 
167
%define _cpp_protection_jconst_fdct_islow_sse2 jconst_fdct_islow_sse2
 
168
%define _cpp_protection_jsimd_fdct_islow_sse2 jsimd_fdct_islow_sse2
 
169
%define _cpp_protection_jconst_fdct_ifast_sse2 jconst_fdct_ifast_sse2
 
170
%define _cpp_protection_jsimd_fdct_ifast_sse2 jsimd_fdct_ifast_sse2
 
171
%define _cpp_protection_jsimd_fdct_float_3dnow jsimd_fdct_float_3dnow
 
172
%define _cpp_protection_jconst_fdct_float_sse jconst_fdct_float_sse
 
173
%define _cpp_protection_jsimd_fdct_float_sse jsimd_fdct_float_sse
 
174
%define _cpp_protection_jsimd_quantize_mmx jsimd_quantize_mmx
 
175
%define _cpp_protection_jsimd_quantize_sse2 jsimd_quantize_sse2
 
176
%define _cpp_protection_jsimd_quantize_float_3dnow jsimd_quantize_float_3dnow
 
177
%define _cpp_protection_jsimd_quantize_float_sse jsimd_quantize_float_sse
 
178
%define _cpp_protection_jsimd_quantize_float_sse2 jsimd_quantize_float_sse2
 
179
%define _cpp_protection_jsimd_idct_2x2_mmx jsimd_idct_2x2_mmx
 
180
%define _cpp_protection_jsimd_idct_4x4_mmx jsimd_idct_4x4_mmx
 
181
%define _cpp_protection_jconst_idct_red_sse2 jconst_idct_red_sse2
 
182
%define _cpp_protection_jsimd_idct_2x2_sse2 jsimd_idct_2x2_sse2
 
183
%define _cpp_protection_jsimd_idct_4x4_sse2 jsimd_idct_4x4_sse2
 
184
%define _cpp_protection_jsimd_idct_islow_mmx jsimd_idct_islow_mmx
 
185
%define _cpp_protection_jsimd_idct_ifast_mmx jsimd_idct_ifast_mmx
 
186
%define _cpp_protection_jconst_idct_islow_sse2 jconst_idct_islow_sse2
 
187
%define _cpp_protection_jsimd_idct_islow_sse2 jsimd_idct_islow_sse2
 
188
%define _cpp_protection_jconst_idct_ifast_sse2 jconst_idct_ifast_sse2
 
189
%define _cpp_protection_jsimd_idct_ifast_sse2 jsimd_idct_ifast_sse2
 
190
%define _cpp_protection_jsimd_idct_float_3dnow jsimd_idct_float_3dnow
 
191
%define _cpp_protection_jconst_idct_float_sse jconst_idct_float_sse
 
192
%define _cpp_protection_jsimd_idct_float_sse jsimd_idct_float_sse
 
193
%define _cpp_protection_jconst_idct_float_sse2 jconst_idct_float_sse2
 
194
%define _cpp_protection_jsimd_idct_float_sse2 jsimd_idct_float_sse2
198
195
#endif /* NEED_SHORT_EXTERNAL_NAMES */
199
196