Compare commits

...

4643 Commits

Author SHA1 Message Date
Kornel
0826579077 Fix PNG detection in CMake 2025-06-23 18:05:19 +01:00
Kornel
9b8d11f05e Fix -revert in tests 2025-01-04 02:11:32 +00:00
Kornel
1d3b119320 Fix djpeg tests 2025-01-04 00:52:39 +00:00
Kornel
38869c2d5d Use BUILD_SHARED_LIBS in cmake 2025-01-04 00:48:50 +00:00
Attila Repka
b6e0d504f7 fix(build): link to libmath on unix 2025-01-04 00:38:01 +00:00
Brendan Polin
3611168b5a Update BUILDING.md
Edited the vcpkg instructions for windows so they just work if you copy and paste
2025-01-04 00:37:38 +00:00
Kornel
97e2e1df43 Allow disabling fopen in SIMD 2025-01-03 10:04:01 +00:00
Kornel
ed667d4bfd Merge remote-tracking branch 'libjpeg-turbo/3.0.x' into mozjpeg
* libjpeg-turbo/3.0.x: (135 commits)
  Ensure methods called by global funcs are init'd
  Build: Generate 32-bit supplementary ppc64 .deb
  Build: Fix float test errors with Xcode 14.2/Arm
  AltiVec: Disable/Fix some strict compiler warnings
  Neon: Disable some strict compiler warnings
  Build: Make Mac packaging architecture-agnostic
  Exclude more code if !(C|D)_LOSSLESS_SUPPORTED
  Fix OSS-Fuzz decompress_yuv fuzzer MSan failure
  TJ doc: Density params require YCbCr or grayscale
  Allow disabling prog/opt/lossless if prev. enabled
  GitHub: Use macos-13 runner image w/ Xcode 14.2
  LICENSE.md: Update copyright year
  ChangeLog: Document accidental fix from 9983840e
  tj3Set(): Allow TJPARAM_LOSSLESSPT vals from 0..15
  Build: Support LLVM/Windows
  tj3Transform: Don't calc dst subsamp unless needed
  Fuzz: Calc. xformed buf size based on dst. subsamp
  TJ: Calc. xformed buf sizes based on dst. subsamp
  Minor TurboJPEG doc tweaks
  turbojpeg.c: Fix -Wsign-compare compiler warning
  ...
2025-01-03 09:57:35 +00:00
Kornel
c6d33b6d69 Merge commit '15274b901acb75d6d2433e8578f3cfbc6f4f5fd9' into mozjpeg
* commit '15274b901acb75d6d2433e8578f3cfbc6f4f5fd9': (98 commits)
  AppVeyor: Use SignPath release cert/only sign tags
  xform fuzz: Use only xform opts to set entropy alg
  jchuff.c: Test for out-of-range coefficients
  turbojpeg.h: Make customFilter() proto match doc
  ChangeLog.md: Fix typo
  djpeg: Fix -map option with 12-bit data precision
  Disallow color quantization with lossless decomp
  tj3Transform: Calc dst buf size from xformed dims
  README.md: Include link to project home page
  AppVeyor: Only add installers to zip file
  AppVeyor: Integrate with SignPath.io
  Fix build warnings/errs w/ -DNO_GETENV/-DNO_PUTENV
  GitHub: Fix x32 build
  Bump version to 3.0.0
  tjexample.c: Prevent integer overflow
  Disallow merged upsampling with lossless decomp
  SECURITY.md: Wordsmithing and clarifications
  GitHub: Add security policy
  ChangeLog.md: List CVE ID fixed by 9f756bc6
  jpeg_crop_scanline: Fix calc w/sclg + 2x4,4x2 samp
  ...
2024-12-23 01:25:43 +00:00
Kornel
15274b901a Merge tag '3.0.0' into '2.1.5.1'
# By DRC (96) and others
# Via DRC
* tag '3.0.0': (98 commits)
  AppVeyor: Use SignPath release cert/only sign tags
  xform fuzz: Use only xform opts to set entropy alg
  jchuff.c: Test for out-of-range coefficients
  turbojpeg.h: Make customFilter() proto match doc
  ChangeLog.md: Fix typo
  djpeg: Fix -map option with 12-bit data precision
  Disallow color quantization with lossless decomp
  tj3Transform: Calc dst buf size from xformed dims
  README.md: Include link to project home page
  AppVeyor: Only add installers to zip file
  AppVeyor: Integrate with SignPath.io
  Fix build warnings/errs w/ -DNO_GETENV/-DNO_PUTENV
  GitHub: Fix x32 build
  Bump version to 3.0.0
  tjexample.c: Prevent integer overflow
  Disallow merged upsampling with lossless decomp
  SECURITY.md: Wordsmithing and clarifications
  GitHub: Add security policy
  ChangeLog.md: List CVE ID fixed by 9f756bc6
  jpeg_crop_scanline: Fix calc w/sclg + 2x4,4x2 samp
  ...

# Conflicts:
#	CMakeLists.txt
#	ChangeLog.md
#	fuzz/decompress.cc
#	fuzz/decompress_yuv.cc
2024-12-23 00:23:06 +00:00
Kornel
d04cff3d6c Normalize whitespace and other merge details 2024-12-23 00:18:20 +00:00
DRC
e81cb16e0f Ensure methods called by global funcs are init'd
If a hypothetical calling application does something really stupid and
changes cinfo->data_precision after calling jpeg_start_*compress(), then
the precision-specific methods called by jpeg_write_scanlines(),
jpeg_write_raw_data(), jpeg_finish_compress(), jpeg_read_scanlines(),
jpeg_read_raw_data(), or jpeg_start_output() may not be initialized.

Ensure that the first precision-specific method (which will always be
cinfo->main->process_data*(), cinfo->coef->compress_data*(), or
cinfo->coef->decompress_data()) called by any global function that may
be called after jpeg_start_*compress() is initialized and non-NULL.
This increases the likelihood (but does not guarantee) that a
hypothetical stupid calling application will fail gracefully rather than
segfault if it changes cinfo->data_precision after calling
jpeg_start_*compress().  A hypothetical stupid calling application can
still bork itself by changing cinfo->data_precision after initializing
the source manager but before calling jpeg_start_compress(), or after
initializing the destination manager but before calling
jpeg_start_decompress().
2024-12-18 16:37:02 -05:00
DRC
3e703af408 Build: Generate 32-bit supplementary ppc64 .deb
As with x86-64, the Power ISA basically implements 64-bit instructions
as extensions of their 32-bit counterparts.  Thus, 64-bit Power ISA CPUs
can natively execute legacy 32-bit PowerPC instructions when running in
big-endian mode.  Most Power ISA support has shifted (pun intended) to
little-endian mode, so there are few remaining operating systems that
support big-endian mode.  Debian is one of them, however (albeit
unofficially.)
2024-12-18 10:15:24 -05:00
DRC
b4ca1ba192 Build: Fix float test errors with Xcode 14.2/Arm
Unlike other versions of Clang 14.0.0, AppleClang 14.0.0 in Xcode 14.2
retains the old -ffp-contract=off default.  Apple didn't adopt
-ffp-contract=on as the default until Xcode 14.3 (AppleClang 14.0.3.)
This has been confirmed in the Xcode 14.3 release notes.
2024-12-12 16:02:05 -05:00
DRC
1c864a9d15 AltiVec: Disable/Fix some strict compiler warnings
We use a standard set of strict compiler warnings with Clang and GCC to
continuously test and maintain C89 conformance in the libjpeg API code.
However, SIMD extensions need not comply with that.  The AltiVec code
specifically uses some C99isms, so disable -Wc99-extensions and
-Wpedantic in the scope of that code.  Also disable -Wshadow, because
I'm too lazy to fix the TRANSPOSE() macro.  Also
use #ifdef __BIG_ENDIAN__ and #if defined(__BIG_ENDIAN__) instead
of #if __BIG_ENDIAN__
2024-12-12 10:48:26 -05:00
DRC
ab56b9841c Neon: Disable some strict compiler warnings
We use a standard set of strict compiler warnings with Clang and GCC to
continuously test and maintain C89 conformance in the libjpeg API code.
However, SIMD extensions need not comply with that.  The Neon code
specifically uses some C99isms, so disable
-Wdeclaration-after-statement, -Wc99-extensions, and -Wpedantic in the
scope of that code.  Also modify the Neon feature tests so that they
will succeed if any of the aforementioned compiler warnings are enabled.
2024-12-11 17:19:02 -05:00
DRC
f23981b0aa Build: Make Mac packaging architecture-agnostic
Rename the ARMV8_BUILD CMake variable to SECONDARY_BUILD, and modify the
makemacpkg script so that it allows any architecture in a primary or
secondary build.  The idea is that Apple Silicon users can package an
arm64 primary build and a secondary x86_64 build, and Intel users can
package an x86_64 primary build and a secondary arm64 build, using the
same procedure.

Also simplify the iOS build instructions, using the
CMAKE_OSX_ARCHITECTURES variable rather than a toolchain.
2024-12-11 17:19:01 -05:00
DRC
3358df7da4 Exclude more code if !(C|D)_LOSSLESS_SUPPORTED 2024-11-18 16:20:00 -05:00
DRC
4e55d44658 Fix OSS-Fuzz decompress_yuv fuzzer MSan failure 2024-11-15 08:32:08 -05:00
DRC
3be781679c TJ doc: Density params require YCbCr or grayscale
Since libjpeg-turbo does not support Exif, the only way it can embed
density information in a JPEG image is by using the JFIF marker, which
is only written if the JPEG colorspace is YCbCr or grayscale.
(Referring to the conversation under #793, we may need to further
restrict that to 8-bit-per-sample JPEG images, because the JFIF spec
requires 8-bit data precision.)
2024-10-30 12:27:02 -04:00
DRC
45fa88190f Allow disabling prog/opt/lossless if prev. enabled
- Due to an oversight, a113506d17
  (libjpeg-turbo 1.4 beta1) effectively made the call to
  std_huff_tables() in jpeg_set_defaults() a no-op if the Huffman tables
  were previously defined, which made it impossible to disable Huffman
  table optimization or progressive mode if they were previously enabled
  in the same API instance.  std_huff_tables() retains its previous
  behavior for decompression instances, but it now force-enables the
  standard (baseline) Huffman tables for compression instances.

- Due to another oversight, there was no way to disable lossless mode
  if it was previously enabled in a particular API instance.
  jpeg_set_defaults() now accomplishes this, which makes
  TJ*PARAM_LOSSLESS behave as intended/documented.

- Due to yet another oversight, setCompDefaults() in the TurboJPEG API
  library permanently modified the value of TJ*PARAM_SUBSAMP when
  generating a lossless JPEG image, which affected subsequent lossy
  compression operations.  This issue was hidden by the issue above and
  thus does not need to be publicly documented.

Fixes #792
2024-10-24 19:06:02 -04:00
DRC
00e71d4c07 GitHub: Use macos-13 runner image w/ Xcode 14.2
(macos-12 is deprecated.)
2024-10-23 18:06:42 -04:00
DRC
b20e7f17dd LICENSE.md: Update copyright year 2024-09-24 10:46:56 -04:00
DRC
60a75c8a47 ChangeLog: Document accidental fix from 9983840e
Closes #789
2024-09-23 15:50:04 -04:00
DRC
63f4cf4222 tj3Set(): Allow TJPARAM_LOSSLESSPT vals from 0..15
The target data precision isn't known at the time that the calling
program sets TJPARAM_LOSSLESSPT, so tj3Set() needs to allow all possible
values (from 0 to 15.)  jpeg_enable_lossless(), which is called within
the body of tj3Compress*(), will throw an error if the point transform
value is greater than {data precision} - 1.
2024-09-23 13:31:20 -04:00
DRC
7f200a2acc Build: Support LLVM/Windows
Since LLVM/Windows emulates Visual Studio, CMake sets
CMAKE_C_SIMULATE_ID="MSVC" but does not set MSVC.  Thus, our build
system needs to enable most (but not all) of the Visual Studio features
when CMAKE_C_SIMLUATE_ID="MSVC".  Support for LLVM/Windows is currently
undocumented because it isn't a standalone build environment.  (It
requires the Visual Studio and Windows SDK headers and link libraries.)

Closes #786
2024-09-16 14:20:46 -04:00
DRC
f29eda6485 tj3Transform: Don't calc dst subsamp unless needed
This just improves code readability by emphasizing that we don't care
about the destination image's level of subsampling unless
TJPARAM_NOREALLOC is set or lossless cropping will be performed.
2024-09-14 11:10:59 -04:00
DRC
bcbca8b9bc Fuzz: Calc. xformed buf size based on dst. subsamp
(oversight from b3f0abe377)
2024-09-12 21:07:51 -04:00
DRC
b3f0abe377 TJ: Calc. xformed buf sizes based on dst. subsamp
With respect to tj3Transform(), this addresses an oversight from
bb1d540a80.

Note to self: A convenience function/method for computing the worst-case
transformed JPEG size for a particular transform would be nice.
2024-09-06 19:04:28 -04:00
DRC
6d9591703f Minor TurboJPEG doc tweaks
- When transforming, the worst-case JPEG buffer size depends on the
  subsampling level used in the destination image, since a grayscale
  transform might have been applied.

- Parentheses Police
2024-09-05 22:31:40 -04:00
DRC
2e40a6875d turbojpeg.c: Fix -Wsign-compare compiler warning
(introduced by previous commit)
2024-09-05 16:49:44 -04:00
DRC
758e8a8e9f Java: Use Java-style method nomenclature
:: is a C++ thing.
2024-09-05 14:57:15 -04:00
DRC
fe1e555a73 tjbenchtest.in: Grammar Police 2024-09-05 14:46:04 -04:00
DRC
bb1d540a80 TJ: Explicitly reject OOB lossless crop regions
tj*Transform() relied upon the underlying transupp API to check the
cropping region.  However, transupp uses unsigned integers for the
cropping region, whereas the tjregion structure uses signed integers.
Thus, casting negative values from a tjregion structure produced very
large unsigned values.  In the case of the left and upper boundary, this
was innocuous, because jtransform_request_workspace() rejected the
values as being out of bounds.  However, jtransform_request_workspace()
did not always reject very large width and height values, because it
supports expanding the destination image by specifying a cropping region
larger than the source image.  In certain cases, it allowed those
values, and the libjpeg memory manager subsequently ran out of memory.

NOTE: Prior to this commit, image expansion technically worked with
tj*Transform() as long as the cropping width and height were valid and
automatic JPEG buffer (re)allocation was used.  However, that behavior
is not a documented feature of the TurboJPEG API, nor do we have any way
of testing it at the moment.  Official support for image expansion can
be added later, if there is sufficient demand for it.

Similarly, this commit modifies tj3SetCroppingRegion() so that it
explicitly checks for left boundary values exactly equal to the scaled
image width and upper boundary values exactly equal to the scaled image
height.  If the specified cropping width or height was 0 (which is
interpreted as {scaled image width} - {left boundary} or
{scaled image height} - {upper boundary}), then such values caused a
cropping width or height of 0 to be passed to the libjpeg API.  In the
case of the width, this was innocuous, because jpeg_crop_scanline()
rejected the value.  In the case of the height, however, this caused
unexpected and hard-to-diagnose errors farther down the pipeline.
2024-09-05 14:37:12 -04:00
DRC
dd8b15ee82 tjbenchtest.in: Formatting tweak
(oversight from a5689cd45b)
2024-09-04 07:52:51 -04:00
DRC
e7e9344db1 TJ: Honor TJ*OPT_COPYNONE for individual xforms
jcopy_markers_execute() has historically ignored its option argument,
which is OK for jpegtran, but tj*Transform() needs to be able to save a
set of markers from the source image and write a subset of those markers
to each destination image.  Without that ability, the function
effectively behaved as if TJ*OPT_COPYNONE was not specified unless all
transforms specified it.
2024-09-04 07:34:42 -04:00
DRC
5550c80fdc Doc: "compress operation"="compression operation"
(consistification)
2024-09-03 17:20:10 -04:00
DRC
939f3814ab Test: Replace test2.icc with test3.icc
test3.icc is smaller, and it is also an RGB profile rather than a CMYK
profile.  (test1.icc is a CMYK profile.)
2024-09-03 15:47:57 -04:00
DRC
a5689cd45b Test: Replace big_tree8.bmp and big_building16.ppm
These images were only used with tjbenchtest and tjexampletest, but I
was concerned about introducing additional licensing provisions into the
libjpeg-turbo source tree.  Thus, this commit replaces them with images
that I own and can thus make available under the libjpeg-turbo licenses
with no additional provisions.
2024-09-03 15:47:37 -04:00
DRC
f5f8f5aadc TJ: Reorder functions to improve readability
Put all general functions at the top of the list, and ensure that all
functions are defined before they are mentioned.  Also consistify the
function ordering between turbojpeg.h and turbojpeg.c
2024-09-03 09:02:55 -04:00
DRC
843d04d9d4 CI: Run regression tests in parallel 2024-09-01 11:52:01 -04:00
DRC
797c6ccd98 Doc: Further clarify MCU definition 2024-09-01 11:25:29 -04:00
DRC
7ec70ee891 testclean.cmake: Remove croptest.log 2024-09-01 09:59:10 -04:00
DRC
174672af4e jquant1.c: Formatting tweak
Extending the Bayer matrix past Column 80 seems like a lesser
readability sin than not putting a space after each comma, especially
since we had to explicitly whitelist the file in checkstyle.
2024-09-01 09:55:52 -04:00
DRC
eb75363004 Update URLs
- Eliminate unnecessary "www."
- Use HTTPS.
- Update Java, MSYS, tdm-gcc, and NSIS URLs.
- Update URL and title of Agner Fog's assembly language optimization
  manual.
- Remove extraneous information about MASM and Borland Turbo Assembler
  and outdated NASM URLs from the x86 assembly headers, and mention
  Yasm.
2024-08-31 16:50:08 -04:00
DRC
0fb8fbe158 CMakeLists.txt: libjpeg-turbo "2.2.x" = "3.0.x" 2024-08-31 15:39:34 -04:00
DRC
8d76e4e550 Doc: "EXIF" = "Exif" 2024-08-31 15:33:55 -04:00
DRC
9983840eb6 TJ/xform: Check crop region against dest. image
Lossless cropping is performed after other lossless transform
operations, so the cropping region must be specified relative to the
destination image dimensions and level of chrominance subsampling, not
the source image dimensions and level of chrominance subsampling.

More specifically, if the lossless transform operation swaps the X and Y
axes, or if the image is converted to grayscale, then that changes the
cropping region requirements.
2024-08-31 15:04:30 -04:00
DRC
8456d2b98c Doc: "MCU block" = "iMCU" or "MCU"
The JPEG-1 spec never uses the term "MCU block".  That term is rarely
used in other literature to describe the equivalent of an MCU in an
interleaved JPEG image, but the libjpeg documentation uses "iMCU" to
describe the same thing.  "iMCU" is a better term, since the equivalent
of an interleaved MCU can contain multiple DCT blocks (or samples in
lossless mode) that are only grouped together if the image is
interleaved.

In the case of restart markers, "MCU block" was used in the libjpeg
documentation instead of "MCU", but "MCU" is more accurate and less
confusing.  (The restart interval is literally in MCUs, where one MCU
is one data unit in a non-interleaved JPEG image and multiple data units
in a multi-component interleaved JPEG image.)

In the case of 9b704f96b2, the issue was
actually with progressive JPEG images exactly two DCT blocks wide, not
two MCU blocks wide.

This commit also defines "MCU" and "MCU row" in the description of the
various restart marker options/parameters.  Although an MCU row is
technically always a row of samples in lossless mode, "sample row" was
confusing, since it is used in other places to describe a row of samples
for a single component (whereas an MCU row in a typical lossless JPEG
image consists of a row of interleaved samples for all components.)
2024-08-30 14:16:09 -04:00
DRC
5cf7960678 Undocument TJ*PARAM_RESTARTBLOCKS for lossless
TJ*PARAM_RESTARTBLOCKS technically works with lossless compression, but
it is not useful, since the value must be equal to the number of samples
in a row.  (In other words, it is no different than
TJ*PARAM_RESTARTINROWS, except that it requires the user to do more
math.)
2024-08-28 18:36:37 -04:00
DRC
d62079717c TJBench: Don't override subsamp until args parsed
Otherwise, passing -subsamp after -lossless might cause the worst-case
JPEG buffer size to be too small.
2024-08-28 18:21:55 -04:00
DRC
c72bbd9c06 tjbench.c: (Re)allow unreduced scaling factors
For reasons I can't recall, fc01f4673b
(the TurboJPEG 3 API overhaul) changed the C version of TJBench, but not
the Java version, so that it requires an exact scaling factor match (as
opposed to allowing unreduced scaling factors, as djpeg does and prior
versions of TJBench did.)  That might have been temporary testing code
that was accidentally committed.
2024-08-26 18:14:12 -04:00
DRC
35199878f6 TurboJPEG doc: Fix incorrect/confusing parentheses 2024-08-26 16:35:30 -04:00
DRC
00a261c473 tjbench.c: Code formatting tweak 2024-08-26 16:31:02 -04:00
DRC
4851cbe406 djpeg/jpeg_crop_scanline(): Disallow crop vals < 0
Because the crop spec was parsed using unsigned 32-bit integers,
negative numbers were interpreted as values ~= UINT_MAX (4,294,967,295).
This had the following ramifications:

- If the cropping region width was negative and the adjusted width + the
  adjusted left boundary was greater than 0, then the 32-bit unsigned
  integer bounds checks in djpeg and jpeg_crop_scanline() overflowed and
  failed to detect the out-of-bounds width, jpeg_crop_scanline() set
  cinfo->output_width to a value ~= UINT_MAX, and a buffer overrun and
  subsequent segfault occurred in the upsampling or color conversion
  routine.  The segfault occurred in the body of
  jpeg_skip_scanlines() --> read_and_discard_scanlines() if the cropping
  region upper boundary was greater than 0 and the JPEG image used
  chrominance subsampling and in the body of jpeg_read_scanlines()
  otherwise.

- If the cropping region width was negative and the adjusted width + the
  adjusted left boundary was 0, then a zero-width output image was
  generated.

- If the cropping region left boundary was negative, then an output
  image with bogus data was generated.

This commit modifies djpeg and jpeg_crop_scanline() so that the
aforementioned bounds checks use 64-bit unsigned integers, thus guarding
against overflow.  It similarly modifies jpeg_skip_scanlines().  In the
case of jpeg_skip_scanlines(), the issue was not reproducible with
djpeg, but passing a negative number of lines to jpeg_skip_scanlines()
caused a similar overflow if the number of lines +
cinfo->output_scanline was greater than 0.  That caused
jpeg_skip_scanlines() to read past the end of the JPEG image, throw a
warning ("Corrupt JPEG data: premature end of data segment"), and fail
to return unless warnings were treated as fatal.  Also, djpeg now parses
the crop spec using signed integers and checks for negative values.
2024-08-26 16:24:33 -04:00
DRC
548f732432 TJBench: Usage screen tweak
Indicate that -maxmemory and -maxpixels take an integer argument.
2024-08-26 10:14:11 -04:00
DRC
de4bbac55e TJCompressor.compress(): Fix lossls buf size calc 2024-08-23 12:48:34 -04:00
DRC
0acb084464 JNI: Fix *Image() array size issues w/ align != 1
+ check for mismatch between C and Java APIs in *saveImage().
2024-08-22 16:58:50 -04:00
DRC
d44fc54f94 Java: Unset srcBuf12/16 with BufferedImage/YUV src
Due to an oversight in the multi-precision feature,
TJCompressor.srcBuf12 and TJCompressor.srcBuf16 were not set to null
in TJCompressor.setSourceImage(YUVImage) or
TJCompressor.setSourceImage(BufferedImage, ...).  Thus, if an
application set a 12-bit or 16-bit packed-pixel buffer as the source
image then set a BufferedImage with integer pixels as the source image,
TJCompress.compress() would compress from the 12-bit or 16-bit
packed-pixel buffer instead of the BufferedImage.  The odds of an
application actually doing that are very slim, however.
2024-08-21 16:44:46 -04:00
DRC
8c2e7306cf Java doc: Minor formatting tweak 2024-08-21 13:03:41 -04:00
DRC
49f1b5807d TJBench.java: Explicitly set restartIntervalBlocks
This is just a readability thing.  Java initializes integer fields to 0
by default.
2024-08-20 15:11:20 -04:00
DRC
a9723f8a98 cjpeg/djpeg/jpegtran: Restore jpeg-6b arg abbrevs
There are two approaches to handling abbreviated command-line options:

1. If a new option is introduced that begins with the same letters as an
existing option, require a longer abbreviation for the existing option
in order to ensure that abbreviations are always unique.

2. Require a unique abbreviation only for new options, and match all
non-unique abbreviations with existing options, thus maintaining
backward compatibility.

keymatch() supports either approach, and Tom Lane historically seemed to
prefer Approach 2, whereas both approaches have been applied
inconsistently in the years since.  This commit consistently applies
Approach 2.

More specific notes:

We unnecessarily required 'cjpeg -progressive' to be abbreviated as
'cjpeg -pro' rather than 'cjpeg -p' when the -precision option was
introduced in libjpeg-turbo 3.0 beta.

The IJG unnecessarily required 'cjpeg -scans' to be abbreviated as
'cjpeg -scan' rather than 'cjpeg -sc' when the -scale option was
introduced in jpeg-7.  We even more unnecessarily adopted that
requirement, even though we never adopted the -scale option.

We unnecessarily required 'djpeg -scale' to be abbreviated as
'djpeg -sc' rather than 'djpeg -s' when the -skip option was introduced
in libjpeg-turbo 1.5 beta.

The IJG unnecessarily required 'jpegtran -copy' to be abbreviated as
'jpegtran -co' rather than 'jpegtran -c' when the -crop option was
introduced in jpeg-7.

The IJG unnecessarily required 'jpegtran -progressive' to be abbreviated
as 'jpegtran -pr' rather than 'jpegtran -p' when the -perfect option was
introduced in jpeg-7.
2024-08-19 17:12:33 -04:00
DRC
562ad7612e OSS-Fuzz: More MSan fixes
We need to use tj3Alloc() (which, when ZERO_BUFFERS is defined, calls
calloc() instead of malloc()) to allocate all destination buffers.
Otherwise, if the compression/decompression/transform operation fails,
then the buffer checksum (which is computed to prevent the compiler from
optimizing out the whole test, since the destination buffer is never
used otherwise) will depend upon values in the destination buffer that
were never written, and MSan will complain.
2024-08-19 10:06:59 -04:00
DRC
488d42a8a5 OSS-Fuzz: Define ZERO_BUFFERS for MSan build
... and use tj3Alloc() to allocate compression/transformation
destination buffers.
2024-08-16 12:17:17 -04:00
DRC
0c23b0ad60 Various doc tweaks
- "Optimized baseline entropy coding" = "Huffman table optimization"

  "Optimized baseline entropy coding" was meant to emphasize that the
  feature is only useful when generating baseline (single-scan lossy
  8-bit-per-sample Huffman-coded) JPEG images, because it is
  automatically enabled when generating Huffman-coded progressive
  (multi-scan), 12-bit-per-sample, and lossless JPEG images.  However,
  Huffman table optimization isn't actually an integral part of those
  non-baseline modes.  You can forego Huffman table optimization with
  12-bit data precision if you supply your own Huffman tables.  The spec
  doesn't require it with progressive or lossless mode, either, although
  our implementation does.  Furthermore, "baseline" describes more than
  just the type of entropy coding used.  It was incorrect to say that
  optimized "baseline" entropy coding is automatically enabled for
  Huffman-coded progressive, 12-bit-per-sample, and lossless JPEG
  images, since those are clearly not baseline images.

- "Progressive entropy coding" = "Progressive JPEG"

  "Progressive" describes more than just the type of entropy coding
  used.  (In fact, both Huffman-coded and arithmetic-coded images can be
  progressive.)

- Mention that TJPARAM_OPTIMIZE/TJ.PARAM_OPTIMIZE can be used with
  lossless transformation as well.

- General wordsmithing

- Formatting tweaks
2024-08-16 11:49:00 -04:00
DRC
b4336c3afb Work around valgrind/MSan SIMD false positives
Referring to
https://sourceforge.net/p/libjpeg-turbo/bugs/48,
https://sourceforge.net/p/libjpeg-turbo/bugs/82,
 #15, #238, #253, and #619,
valgrind and MSan have failed to properly detect data initialization by
libjpeg-turbo's x86 SIMD extensions for the entire 14 years that
libjpeg-turbo has been a project, resulting in false positives unless
libjpeg-turbo is built with WITH_SIMD=0 or run with JSIMD_FORCENONE=1.
This commit introduces a new C preprocessor macro (ZERO_BUFFERS) that,
if set, causes libjpeg-turbo to zero certain buffers in order to work
around the specific valgrind/MSan test failures caused by the
aforementioned false positives.  This allows us to more closely
approximate the production configuration of libjpeg-turbo when testing
with valgrind or MSan.

Closes #781
2024-08-13 16:23:40 -04:00
DRC
8db0312668 example.c: Write correct dimensions to PPM header
The dimensions in the PPM header of the output file generated by
'example decompress' were always 640 x 480, regardless of the size of
the JPEG image being decompressed.  Our regression tests (which this
commit also fixes) missed the bug because they decompressed the
640 x 480 image generated by 'example compress'.

Fixes #778
2024-08-02 09:06:40 -04:00
DRC
0566d51e09 GitHub Actions: Specify Monterey for macOS build
The Big Sur hosted runner is no longer available.
2024-07-09 17:18:53 -04:00
DRC
e287a35762 Build: Put gastest.o in ${CMAKE_BINARY_DIR}/simd
Closes #776
2024-07-04 10:03:50 -04:00
DRC
51d021bf01 TurboJPEG: Fix 12-bit-per-sample arith-coded compr
(Regression introduced by 7bb958b732)

Because of 7bb958b732, the TurboJPEG
compression and encoding functions no longer transfer the value of
TJPARAM_OPTIMIZE into cinfo->data_precision unless the data precision
is 8.  The intent of that was to prevent using_std_huff_tables() from
being called more than once when reusing the same compressor object to
generate multiple 12-bit-per-sample JPEG images.  However, because
cinfo->optimize_coding is always set to TRUE by jpeg_set_defaults() if
the data precision is 12, calling applications that use 12-bit data
precision had to unset cinfo->optimize_coding if they set
cinfo->arith_code after calling jpeg_set_defaults().  Because of
7bb958b732, the TurboJPEG API stopped
doing that except with 8-bit data precision.  Thus, attempting to
generate a 12-bit-per-sample arithmetic-coded lossy JPEG image using
the TurboJPEG API failed with "Requested features are incompatible."

Since the compressor will always fail if cinfo->arith_code and
cinfo->optimize_coding are both set, and since cinfo->optimize_coding
has no relevance for arithmetic coding, the most robust and user-proof
solution is for jinit_c_master_control() to set cinfo->optimize_coding
to FALSE if cinfo->arith_code is TRUE.

This commit also:
- modifies TJBench so that it no longer reports that it is using
  optimized baseline entropy coding in modes where that setting
  is irrelevant,
- amends the cjpeg documentation to clarify that -optimize is implied
  when specifying -progressive or '-precision 12' without -arithmetic,
  and
- prevents jpeg_set_defaults() from uselessly checking the value of
  cinfo->arith_code immediately after it has been set to FALSE.
2024-06-24 22:15:55 -04:00
DRC
bb3ab53157 cjpeg: Don't enable lossless until precision known
jpeg_enable_lossless() checks the point transform value against the data
precision, so we need to defer calling jpeg_enable_lossless() until
after all command-line options have been parsed.
2024-06-24 22:15:55 -04:00
DRC
a8aaaf5d5b cjpeg -verbose: Print PBMPLUS input file precision
This gives the user a hint as to whether converting the input file into
a JPEG file with a particular data precision will result in a loss of
precision.  Also modify usage.txt and the cjpeg man page to warn the
user about that possibility.
2024-06-24 22:15:55 -04:00
DRC
94c64ead85 Various doc tweaks
- "bits per component" = "bits per sample"

  Describing the data precision of a JPEG image using "bits per
  component" is technically correct, but "bits per sample" is the
  terminology that the JPEG-1 spec uses.  Also, "bits per component" is
  more commonly used to describe the precision of packed-pixel formats
  (as opposed to "bits per pixel") rather than planar formats, in which
  all components are grouped together.

- Unmention legacy display technologies.  Colormapped and monochrome
  displays aren't a thing anymore, and even when they were still a
  thing, it was possible to display full-color images to them.  In 1991,
  when JPEG decompression time was measured in minutes per megapixel, it
  made sense to keep a decompressed copy of JPEG images on disk, in a
  format that could be displayed without further color conversion (since
  color conversion was slow and memory-intensive.)  In 2024, JPEG
  decompression time is measured in milliseconds per megapixel, and
  color conversion is even faster.  Thus, JPEG images can be
  decompressed, displayed, and color-converted (if necessary) "on the
  fly" at speeds too fast for human vision to perceive.  (In fact, your
  TV performs much more complicated decompression algorithms at least 60
  times per second.)

- Document that color quantization (and associated features), GIF
  input/output, Targa input/output, and OS/2 BMP input/output are legacy
  features.  Legacy status doesn't necessarily mean that the features
  are deprecated.  Rather, it is meant to discourage users from using
  features that may be of little or no benefit on modern machines (such
  as low-quality modes that had significant performance advantages in
  the early 1990s but no longer do) and that are maintained on a
  break/fix basis only.

- General wordsmithing, grammar/punctuation policing, and formatting
  tweaks

- Clarify which data precisions each cjpeg input format and each djpeg
  output format supports.

- cjpeg.1: Remove unnecessary and impolitic statement about the -targa
  switch.

- Adjust or remove performance claims to reflect the fact that:
  * On modern machines, the djpeg "-fast" switch has a negligible effect
    on performance.
  * There is a measurable difference between the performance of Floyd-
    Steinberg dithering and no dithering, but it is not likely
    perceptible to most users.
  * There is a measurable difference between the performance of 1-pass
    and 2-pass color quantization, but it is not likely perceptible to
    most users.
  * There is a measurable difference between the performance of
    full-color and grayscale output when decompressing a full-color JPEG
    image, but it is not likely perceptible to most users.
  * IDCT scaling does not necessarily improve performance.  (It
    generally does if the scaling factor is <= 1/2 and generally doesn't
    if the scaling factor is > 1/2, at least on my machine.  The
    performance claim made in jpeg-6b was probably invalidated when we
    merged the additional scaling factors from jpeg-7.)

- Clarify which djpeg switches/output formats cannot be used when
  decompressing lossless JPEG images.

- Remove djpeg hints, since those involve quality vs. speed tradeoffs
  that are no longer relevant for modern machines.

- Remove documentation regarding using color quantization with 16-bit
  data precision.  (Color quantization requires lossy mode.)

- Java: Fix typos in TJDecompressor.decompress12() and
  TJDecompressor.decompress16() documentation.

- jpegtran.1: Fix truncated paragraph

  In a man page, a single quote at the start of a line is interpreted as
  a macro.

  Closes #775

- libjpeg.txt:
  * Mention J16SAMPLE data type (oversight.)
  * Remove statement about extending jdcolor.c.  (libjpeg-turbo is not
    quite as DIY as libjpeg once was.)
  * Remove paragraph about tweaking the various typedefs in jmorecfg.h.
    It is no longer relevant for modern machines.
  * Remove caveat regarding systems with ints less than 16 bits wide.
    (ANSI/ISO C requires an int to be at least 16 bits wide, and
    libjpeg-turbo has never supported non-ANSI compilers.)

- usage.txt:
  * Add copyright header.
  * Document cjpeg -icc, -memdst, -report, -strict, and -version
    switches.
  * Document djpeg -icc, -maxscans, -memsrc, -report, -skip, -crop,
    -strict, and -version switches.
  * Document jpegtran -icc, -maxscans, -report, -strict, and -version
    switches.
2024-06-24 22:11:43 -04:00
DRC
2c5312fd12 cderror.h: Always include all img I/O err messages
The 8-bit-per-sample image I/O modules have always been built with BMP,
GIF, PBMPLUS, and Targa support, and the 12-bit-per-sample image I/O
modules have always been built with only GIF and PBMPLUS support.  In
libjpeg-turbo 2.1.x and prior, cjpeg and djpeg were built with the same
image format support as the image I/O modules.  However, because of the
multi-precision feature introduced in libjpeg-turbo 3.0.x, cjpeg and
djpeg are now always built with support for all image formats.  Thus,
the error message table compiled into cjpeg and djpeg was a superset of
the error message table compiled into the 12-bit-per-sample and
16-bit-per-sample image I/O modules.  If, for example, the
12-bit-per-sample PPM writer threw JERR_PPM_COLORSPACE (== 15, because
it was built with only GIF and PBMPLUS support), then djpeg interpreted
that as JERR_GIF_COLORSPACE (== 15, because it was built with support
for all image formats.)  There was no chance of a buffer overrun, since
the error message table lookup was performed against the table compiled
into cjpeg and djpeg, which contained all possible entries.  However,
this issue caused an incorrect error message to be displayed by cjpeg or
djpeg if a 12-bit-per-sample or 16-bit-per-sample image I/O module threw
an error.  This commit simply removes the *_SUPPORTED #ifdefs from
cderror.h so that all image I/O error messages are always included in
every instance of the image I/O error message table.

Note that a similar issue could have also occurred with the
12-bit-per-sample and 16-bit-per-sample TurboJPEG image I/O functions,
since the 12-bit-per-sample and 16-bit-per-sample image I/O modules
supporting those functions are built with only PBMPLUS support whereas
the library as a whole is built with BMP and PBMPLUS support.
2024-06-13 22:34:23 -04:00
DRC
3c17063ef1 Guard against dupe SOF w/ incorrect source manager
Referring to https://bugzilla.mozilla.org/show_bug.cgi?id=1898606,
attempting to decompress a specially-crafted malformed JPEG image
(specifically an image with a complete 12-bit Start Of Frame segment
followed by an incomplete 8-bit Start Of Frame segment) using the
default marker processor, buffered-image mode, and input prefetching
triggered the following sequence of events:

- When the 12-bit SOF segment was encountered (in the body of
  jpeg_read_header()), the marker processor's read_markers() method
  called the get_sof() function, which processed the 12-bit SOF segment
  and set cinfo->data_precision to 12.

- If the application subsequently called jpeg_consume_input() in a loop
  to prefetch input data, and it didn't stop calling
  jpeg_consume_input() when the function returned JPEG_REACHED_SOS, then
  the 8-bit SOF segment was encountered in the body of
  jpeg_consume_input().  As a result, the marker processor's
  read_markers() method called get_sof(), which started to process the
  8-bit SOF segment and set cinfo->data_precision to 8.

- Since the 8-bit SOF segment was incomplete, the end of the JPEG data
  stream was encountered when get_sof() attempted to read the image
  height, width, and number of components.

- If the fill_input_buffer() method in the application's custom source
  manager incorrectly returned FALSE in response to a prematurely-
  terminated JPEG data stream, then get_sof() returned FALSE while
  attempting to read the image height, width, and number of components
  (before the duplicate SOF check was reached.)  That caused the default
  marker processor's read_markers() method, and subsequently
  jpeg_consume_input(), to return JPEG_SUSPENDED.

- If the application failed to respond to the JPEG_SUSPENDED return
  value and subsequently attempted to call jpeg_read_scanlines(),
  then the data precision check in jpeg_read_scanlines() succeeded
  (because cinfo->data_precision was now 8.)  However, because
  cinfo->data_precision had been 12 during the previous call to
  jpeg_start_decompress(), only the 12-bit version of the main
  controller was initialized, and the cinfo->main->process_data() method
  was undefined.  Thus, a segfault occurred when jpeg_read_scanlines()
  attempted to invoke that method.

Scenarios in which the issue was thwarted:

1. The default source managers handle a prematurely-terminated JPEG data
stream by inserting a fake EOI marker into the data stream.  Thus, when
using one of those source managers, the INPUT_2BYTES() and INPUT_BYTE()
macros (which get_sof() invokes to read the image height, width, and
number of components) succeeded-- albeit with bogus data, since the fake
EOI marker was read into those fields.  The duplicate SOF check in
get_sof() then failed, generating a fatal libjpeg error.

2. When using a custom source manager that correctly returns TRUE in
response to a prematurely-terminated JPEG data stream, the
aforementioned INPUT_2BYTES() and INPUT_BYTE() macros also succeeded
(albeit with bogus data read from the previous bytes of the data
stream), and the duplicate SOF check failed.

3. If the application did not prefetch input data, or if it stopped
invoking jpeg_consume_input() when the function returned
JPEG_REACHED_SOS, then the duplicate SOF segment was not read prior to
the first call to jpeg_read_scanlines().  Thus, the data precision check
in jpeg_read_scanlines() failed.  If the application instead called
jpeg12_read_scanlines() (that is, if it properly supported multiple data
precisions), then the duplicate SOF segment was not read until the body
of jpeg_finish_decompress().  At that point, its only negative effect
was to cause jpeg_finish_decompress() to return FALSE before the
duplicate SOF check was reached.

In other words, this issue depended not only upon an incorrectly-written
source manager but also upon a very specific sequence of API calls.  It
also depended upon the multi-precision feature introduced in
libjpeg-turbo 3.0.x.  When using an 8-bit-per-sample build of
libjpeg-turbo 2.1.x, jpeg_read_header() failed with "Unsupported JPEG
data precision 12" after the 12-bit SOF segment was processed.  When
using a 12-bit-per-sample build of libjpeg-turbo 2.1.x, the behavior
was the same as if the application called jpeg12_read_scanlines() in
Scenario 3 above.

This commit simply moves the duplicate SOF check to the top of
get_sof() so the check will fail before the marker processor attempts to
read the duplicate SOF.  It should be noted that this issue isn't a
libjpeg-turbo bug per se, because it occurs only when the calling
application does something it shouldn't.  It is, rather, an issue of API
hardening/caller-proofing.
2024-05-29 10:08:24 -04:00
DRC
46173635be Remove jpeg_std_message_table[] extern sym comment
jpeg_std_message_table[] was never a documented part of the libjpeg API,
nor was it exposed in jpegint.h or the Windows libjpeg API DLL.  Thus,
it was never a good idea (nor was it even remotely necessary) for
applications to use it.  However, referring to #763 and #767, one
application (RawTherapee) did use it.
34c055851e hid the symbol, which broke the
Un*x builds of RawTherapee.  (RawTherapee already did the right thing on
Windows, because jpeg_std_message_table[] was not exposed in the
Windows libjpeg API DLL.  Referring to
https://github.com/Beep6581/RawTherapee/issues/7074, RawTherapee now
does the right thing on Un*x platforms as well.)

The comment in jerror.c indicated that Tom Lane intended the symbol to
be external "just in case any applications want to refer to it
directly."  However, with respect to libjpeg-turbo, the comment was
effectively already a lie on Windows.  My choices at this point are:

1. Revert 34c055851e and start exposing
   the symbol on Windows, thus making the comment true again.
2. Remove the comment.

Option 1 would have created whiplash, since 3.0.3 has already been
released with the symbol hidden, and that option would have further
encouraged ill-advised behavior on the part of applications.  Since the
issue has already been fixed in RawTherapee, and since it is known to
affect only that application, I chose Option 2.

In my professional opinion, a code comment does not rise to the level
of a contract between a library and a calling application.  In other
words, the comment did not make the symbol part of the API, even though
the symbol was exposed on some platforms.  Applications that use
internal symbols (even the symbols defined in jpegint.h) do so at their
own risk.  There is no guarantee that those symbols will remain
unchanged from release to release, as it is sometimes necessary to
modify the internal (opaque) structures and methods in order to
implement new features or even fix bugs.  Some implementations of the
libjpeg API (such as the one in Jpegli, for instance), do not provide
those internal symbols at all.  Best practices are for applications that
use the internal libjpeg-turbo symbols to provide their own copy of
libjpeg-turbo (for instance, via static linking), so they can manage any
unexpected changes in those symbols.  (In fact, that is how libjpeg was
originally used.  Application developers built it from source with
compile-time options to exclude unneeded functionality.  Thus, no two
builds of libjpeg were guaranteed to be API/ABI-compatible.  The idea of
a libjpeg shared library that exposes a pseudo-standard ABI came later,
and that has always been an awkward fit for an API that was intended to
be modified at compile time to suit specific application needs.
libjpeg-turbo's colorspace extensions are but one example, among many,
of our attempts to reconcile that awkwardness while preserving backward
compatibility with the aforementioned pseudo-standard ABI.)
2024-05-29 00:18:05 -04:00
DRC
9ddcae4a8f jpeglib.h: Document the need to include stdio.h
libjpeg.txt documents the need to "include system headers that define at
least the typedefs FILE and size_t" before including jpeglib.h.
However, some software developers unfortunately assume that any
downstream build failure is due to an upstream oversight (as if such an
oversight would have gone unnoticed for 14 years in a library as
ubiquitous as libjpeg-turbo) and "come in hot" with a proposal and
arguments that have already been carefully considered and rejected
multiple times (as opposed to grepping the documentation or searching
existing issues and PRs to find out whether the upstream behavior is
intentional.)

Multiple issues and PRs (including #17, #18, #116, #737, and #766) have
been filed regarding this, so this commit adds a comment to jpeglib.h in
the hope of heading off future issues and PRs.  I suspect that some
people will still choose to waste my time by arguing about it, even
though the decision was made by Tom Lane nearly 20 years before
libjpeg-turbo even existed, the decision was supportable based on the
needs of early 1990s computing systems, and reversing that decision
would break backward API compatibility (which is one of the reasons that
many downstream projects adopted libjpeg-turbo in the first place.)  At
least now, if someone posts an issue or PR about this again, I can just
link to this commit and close the issue/PR without comment.
2024-05-20 13:03:49 -04:00
DRC
bc491b16e2 ChangeLog.md: Document previous commit 2024-05-16 17:32:02 -04:00
DRC
0fc7313e54 Don't traverse linked list when saving a marker
If the calling application invokes jpeg_save_markers() to save a
particular type of marker, then the save_marker() function will be
invoked for every marker of that type that is encountered.  Previously,
only the head of the marker linked list was stored (in
jpeg_decompress_struct), so save_marker() had to traverse the entire
linked list before it could add a new marker to the tail of the list.
That caused CPU usage to grow exponentially with the number of markers.
Referring to #764, it is possible to create a JPEG image that contains
an excessive number of markers.  The specific reproducer that uncovered
this issue is a specially-crafted 1-megabyte malformed JPEG image with
tens of thousands of APP1 markers, which required approximately 30
seconds of CPU time (on a modern Intel processor) to process.  However,
it should also be possible to create a legitimate JPEG image that
reproduces the issue (such as an image with tens of thousands of
duplicate EXIF tags.)

This commit introduces a new pointer (in jpeg_decomp_master, in order to
preserve backward ABI compatibility) that is used to store the tail of
the marker linked list whenever a marker is added to it.  Thus, it is no
longer necessary to traverse the list when adding a marker, and CPU
usage will grow linearly rather than exponentially with the number of
markers.

Fixes #764
2024-05-14 14:46:33 -04:00
DRC
7fa4b5b762 jerror.c: Silence MSan uninitialized value warning
If an error manager instance is passed to jpeg_std_error(), then its
format_message() method will point to the format_message() function in
jerror.c.  The format_message() function passes all eight values from
the jpeg_error_mgr::msg_parm.i[] array as arguments to
snprintf()/_snprintf_s(), even if the format string doesn't use all of
those values.  Subsequently invoking one of the ERREXIT[1-6]() macros
will leave the unused values uninitialized, and if the
-fsanitize-memory-param-retval option (introduced in Clang 14) is
enabled (which it is by default in Clang 16 and later), then MSan will
complain when the format_message() function tries to pass the
uninitialized-but-unused values as function arguments.

This commit modifies jpeg_std_error() so that it zeroes out the error
manager instance passed to it, thus working around the warning as well
as simplifying the code.

Closes #761
2024-05-06 18:24:15 -04:00
DRC
3f43bb3320 Build: Don't use COMPONENT w/install(INCLUDES ...)
(Regression introduced by 24e09baaf0)

The install() INCLUDES option is not an artifact option.  It specifies
a list of directories that will be added to the
INTERFACE_INCLUDE_DIRECTORIES target property when the target is
exported using the install() EXPORT option, which occurs when CMake
package config files are generated.  Specifying 'COMPONENT include' with
the install() INCLUDES option caused the INTERFACE_INCLUDE_DIRECTORIES
properties in our CMake package config files to contain
'${_IMPORT_PREFIX}/COMPONENT', which caused errors of the form 'Imported
target "libjpeg-turbo::XXXX" includes non-existent path' when downstream
build systems attempted to include libjpeg-turbo using find_package().

Fixes #759
Closes #760
2024-05-06 13:38:59 -04:00
Kleis Auke Wolthuizen
24e09baaf0 Build: Add COMPONENT to all install() commands
This makes it possible for downstream packagers and other integrators of
libjpeg-turbo to include only specific directories from the
libjpeg-turbo installation (or to install specific directories under a
different prefix, etc.)  The names of the components correspond to the
directories into which they will be installed.

Refer to libvips/libvips#3931, #265, #338

Closes #756
2024-05-04 14:36:14 -04:00
DRC
6a522fcda4 jpegtran -drop: Ensure all quant tables defined
It is possible to craft a malformed JPEG image in which all of the
scans contain fewer components than the number of components specified
in the Start Of Frame (SOF) segment.  Attempting to use such an image as
either an input image or a drop image with 'jpegtran -drop' caused a
NULL dereference and subsequent segfault in transupp.c:adjust_quant(),
so this commit adds appropriate checks to guard against that.

Since the issue involved an interface that is only exposed on the
jpegtran command line, it did not represent a security risk.
'jpegtran -drop' could not ever be used successfully with images such as
the ones described above.  This commit simply makes jpegtran fail
gracefully rather than crash.

Fixes #758
2024-05-02 14:54:36 -04:00
DRC
2dfe6c0fe9 CI: Work around segfaults in ASan/MSan jobs
Referring to actions/runner-images#9491, the sanitizers in LLVM 14 that
ships with Ubuntu 22.04 are incompatible with high-entropy address space
layout randomization (ASLR), which is enabled in the GitHub runners via
their use of a newer kernel than ubuntu 22.04 uses.
2024-03-18 14:51:04 -04:00
DRC
710865cf0e Build: Don't explicitly set CMP0065 to NEW
This is no longer necessary, because of
1644bdb7d2.
2024-03-18 12:56:42 -04:00
DRC
fe218ca19c Build: Handle CMAKE_C_COMPILER_ID=AppleClang
Because of 1644bdb7d2, we are now
effectively using the NEW behavior for all CMake policies introduced in
all CMake versions up to and including CMake 3.28.  The NEW behavior for
CMP0025, introduced in CMake 3.0, sets CMAKE_C_COMPILER_ID to
"AppleClang" instead of "Clang" when using Apple's variant of Clang (in
Xcode), so we need to match all values of CMAKE_C_COMPILER_ID that
contain "Clang".

This fixes three issues:

- -O2 was not replaced with -O3 in CMAKE_C_FLAGS_RELWITHDEBINFO.  This
  was a minor issue, since -O3 is now the default in
  CMAKE_C_FLAGS_RELEASE, and we use CMAKE_BUILD_TYPE=Release in our
  official builds.

- The build system erroneously set the default value of FLOATTEST8 and
  FLOATTEST12 to no-fp-contract when compiling for PowerPC or Arm using
  Apple Clang 14+ (effectively reverting
  5b2beb4bc4f41dd9dd2a905cb931b8d5054d909b.)  Because Clang 14+ now
  enables -ffp-contract=on by default, this issue caused floating point
  test failures unless FLOATTEST8 and FLOATTEST12 were overridden.

- The build system set MD5_PPM_3x2_FLOAT_FP_CONTRACT as appropriate for
  GCC, not as appropriate for Clang (effectively reverting
  47656a082091f9c9efda054674522513f4768c6c.)  This also caused floating
  point test failures.

Fixes #753
Closes #755
2024-03-18 12:46:11 -04:00
DRC
dfde1f857d Fix (and test) more Clang 14 compiler warnings
-Woverlength-strings, -Wshift-negative-value, -Wsign-compare
2024-03-08 12:50:32 -05:00
DRC
905ec0fa01 Avoid tautological comparisons
Several TurboJPEG functions store their return value in an unsigned
long long intermediate and compare it against the maximum value of
unsigned long or size_t in order to avoid integer overflow.  However,
such comparisons are tautological (always true, i.e. redundant) unless
the size of unsigned long or size_t is less than the size of unsigned
long long.  Explicitly guarding the comparisons with #if avoids compiler
warnings with -Wtautological-constant-in-range-compare in Clang and also
makes it clear to the reader that the comparisons are only intended for
32-bit code.

Refer to #752
2024-03-08 11:52:38 -05:00
DRC
34c055851e Fix warnings with -Wmissing-variable-declarations 2024-03-06 15:17:08 -05:00
DRC
7bb958b732 12-bit: Don't gen opt Huff tbls if tbls supplied
(regression introduced by e8b40f3c2b)

The documented behavior of the libjpeg API is to compute optimal Huffman
tables when generating 12-bit lossy Huffman-coded JPEG images, unless
the calling application supplies its own Huffman tables.  However,
e8b40f3c2b and
96bc40c1b3 modified
jinit_c_master_control() so that it always set cinfo->optimize_coding to
TRUE when generarating 12-bit lossy Huffman-coded JPEG images, which
prevented calling applications from supplying custom Huffman tables for
such images.

This commit modifies jinit_c_master_control() so that it only overrides
cinfo->optimize_coding when generating 12-bit lossy Huffman-coded JPEG
images if all Huffman table slots are empty or all slots contain default
Huffman tables.  Determining whether the latter is true requires using
memcmp() to compare the allocated Huffman tables with the default
Huffman tables, because:

- The documented behavior of jpeg_set_defaults() is to initialize any
  empty Huffman table slot with the default Huffman table corresponding
  to that slot, regardless of the data precision.  There is also no
  requirement that the data precision be specified prior to calling
  jpeg_set_defaults().  Thus, there is no reliable way to prevent
  jpeg_set_defaults() from initializing empty Huffman table slots with
  default Huffman tables, which are useless for 12-bit data precision.

- There is no requirement that custom Huffman tables be defined prior to
  calling jpeg_set_defaults().  A calling application could call
  jpeg_set_defaults() and modify the values in the default Huffman
  tables rather than allocating new tables.  Thus, there is no reliable
  way to detect whether the allocated Huffman tables contain default
  values without comparing the tables with the default Huffman tables.

Fortunately, comparing the allocated Huffman tables with the default
Huffman tables is the last stop on the logic train, so it won't happen
unless cinfo->data_precision == 12, cinfo->arith_code == FALSE,
cinfo->optimize_coding == FALSE, and one or more Huffman tables are
allocated.  (If the compressor object is reused, this ensures that the
full comparison will be performed at most once.)  Custom Huffman tables
will be flagged as non-default when the first non-default value is
encountered, and the worst case (comparing 400 bytes) is very fast on
modern CPUs anyhow.

Fixes #751
2024-03-04 17:45:40 -05:00
DRC
3202feb08a x86-64 SIMD: Support CET if C compiler enables it
- Detect at configure time, via the __CET__ C preprocessor macro,
  whether the C compiler will include either indirect branch tracking
  (IBT) or shadow stack support, and define a NASM macro (__CET__) if
  so.

- Modify the x86-64 SIMD code so that it includes appropriate endbr64
  instructions (to support IBT) and an appropriate .note.gnu.property
  section (to support both IBT and shadow stack) when __CET__ is
  defined.

Closes #350
2024-02-29 16:37:30 -05:00
DRC
1335547558 x86 SIMD: Capitalize all instruction-like macros
(to improve code readability)
2024-02-29 12:18:49 -05:00
DRC
26fc07c8d1 Build: Set MSVC run-time lib based on IDE config 2024-02-08 12:03:37 -05:00
Alyssa Ross
b6ee1016ab Build: Fix tests w/ emulators that don't check CWD
While QEMU will run executables from the current working directory,
other emulators may not.  It is more reliable to pass the full
executable path to the emulator.  The add_test(NAME ... COMMAND ...)
syntax automatically invokes the emulator (e.g. the command specified
in CMAKE_CROSSCOMPILING_EMULATOR) and passes the full executable path to
it, as long as the first COMMAND argument is the name of a target.  This
cleans up the CMake code somewhat as well, since it is no longer
necessary to manually invoke CMAKE_CROSSCOMPILING_EMULATOR.

Closes #747
2024-01-30 18:26:21 -05:00
DRC
d59b1a3bce Build: Reformat lines longer than 80 columns ...
... to ensure that no function argument starts beyond the 80th column.
2024-01-30 15:40:51 -05:00
DRC
36c51dd3eb GitHub: Update checkout, AWS credentials actions
... to silence deprecation warning regarding Node.js 12 and 16 actions.
2024-01-26 15:55:19 -05:00
DRC
9ef0d03e1e LICENSE.md: zlib License clarifications
Disclaimer: I am not a lawyer, nor do I play one on TV.

Referring to #744, mentioning the zlib License as a license that applies
to libjpeg-turbo is confusing, and it isn't actually necessary, since
the IJG License subsumes the terms of the zlib License in the context of
the libjpeg API library and associated programs.  This was presumably
understood to be the case by Miyasaka-san when he chose the zlib License
for the first libjpeg SIMD extensions.  The libjpeg/SIMD web site
(https://cetus.sakura.ne.jp/softlab/jpeg-x86simd/jpegsimd.html) states
(translated from Japanese): "The terms of use of this SIMD enhanced
version of IJG JPEG software are subject to the terms of use of the
original version of IJG JPEG software."

Detailed analysis of the zlib License terms:

    This software is provided 'as-is', without any express or implied
    warranty.  In no event will the authors be held liable for any
    damages arising from the use of this software.

This text is an almost literal subset of the warranty disclaimer text in
the IJG License.  The IJG License states everything above with only
slight differences in wording, and it further clarifies that the user
assumes all risk as to the software's quality and accuracy and that
vendors of commercial products based on the software must assume all
warranty and liability claims.

    Permission is granted to anyone to use this software for any
    purpose, including commercial applications, and to alter it and
    redistribute it freely, subject to the following restrictions:

This is semantically the same as the permission text in the IJG License,
since "use, copy, modify, and distribute this software (or portions
thereof) for any purpose, without fee" covers "use" for "any purpose,
including commercial applications" as well as alteration and
redistribution.

    1. The origin of this software must not be misrepresented; you must
       not claim that you wrote the original software. If you use this
       software in a product, an acknowledgment in the product
       documentation would be appreciated but is not required.

The IJG License requirement that "If any part of the source code for
this software is distributed, then this README file must be included,
with this copyright and no-warranty notice unaltered; and any additions,
deletions, or changes to the original files must be clearly indicated in
accompanying documentation" (Clause 1), as well as the requirement that
"If only executable code is distributed, then the accompanying
documentation must state that 'this software is based in part on the
work of the Independent JPEG Group'" (Clause 2), satisfies the
requirement of Clause 1 of the zlib License.

    2. Altered source versions must be plainly marked as such, and must
       not be misrepresented as being the original software.

Since Clause 1 of the IJG License applies only to the distribution of
source code, the copyright headers in the source code are effectively
"accompanying documentation" in that case.  This is why we ensure that
the copyright headers of individual source files indicate the year(s) in
which modifications were made by each contributor.  Doing so satisfies
the requirements of both Clause 2 of the zlib License and Clause 1 of
the IJG License.

    3. This notice may not be removed or altered from any source
       distribution.

Clauses 2 and 3 of the zlib License apply only to the source code that
bears that license.  Thus, as applied to the software as a whole, those
requirements of the inbound zlib License are compatible with the
outbound IJG License as long as the IJG License does not contradict
them (which it doesn't.)

NOTE: To be clear, existing source code that bears the zlib License
cannot literally be re-licensed under the IJG License, since that would
violate Clause 3 of the zlib License.  However, when considering the
terms under which the overall library is made available, the IJG License
effectively subsumes the terms of the zlib License.
https://www.gnu.org/licenses/license-compatibility.en.html is a
thorough, albeit somewhat GPL-biased, discussion of license
compatibility.
2024-01-26 15:48:17 -05:00
DRC
7d67c3495f Build/Win: Report CMAKE_MSVC_RUNTIME_LIBRARY value
... when using CMake 3.15+
2024-01-26 10:34:04 -05:00
DRC
17df25f92c Build/Win: Eliminate MSVC run-time DLL dependency
(regression introduced by 1644bdb7d2)

Setting a maximum version in cmake_minimum_required() effectively sets
the behavior to NEW for all policies introduced in all CMake versions up
to and including that maximum version.  The NEW behavior for CMP0091,
introduced in CMake 3.15, uses CMake variables to specify the MSVC
runtime library against which to link, rather than placing the relevant
flags in CMAKE_C_FLAGS*.  Thus, replacing /MD with /MT in CMAKE_C_FLAGS*
no longer has any effect when using CMake 3.15+.
2024-01-26 09:43:58 -05:00
DRC
289df647c0 Build: Add tjdoc target for building TurboJPEG dox 2024-01-23 17:35:53 -05:00
DRC
0ef07927c3 Bump copyright year to 2024 2024-01-23 10:47:40 -05:00
DRC
1644bdb7d2 BUILD: Silence CMake 3.28.x deprecation warning
Closes #740
2024-01-22 14:33:31 -05:00
DRC
5a2353c2da GNUInstallDirs.cmake: Various improvements
- Integrate
  c07bba2730 (diff-1e2deb5301e9481203102fcddd1b2d0d2bf0ddc1cbb445c7f4b6414a3b869ce8)
  so that the default man directory is <CMAKE_INSTALL_PREFIX>/share/man
  on FreeBSD systems.

- For good measure, integrate
  f835f189ae
  so that the default info directory is
  <CMAKE_INSTALL_PREFIX>/share/info on FreeBSD systems, even though we
  don't use that directory.

- Automatically set the CMake variable type to PATH for any
  user-specified CMAKE_INSTALL_*DIR variables.

Addresses concerns raised in #326, #346, #648

Closes #648
2024-01-22 14:15:02 -05:00
DRC
335ed793f9 Assume 3-comp lossls JPEG w/o Adobe marker is RGB
libjpeg-turbo always includes Adobe APP14 markers in the lossless JPEG
images that it generates, but some compressors (e.g. accusoft PICTools
Medical) do not.

Fixes #743
2024-01-19 13:14:21 -05:00
DRC
fa2b6ea092 Eliminate duplicate copies of jpeg_nbits_table
ef9a4e05ba (libjpeg-turbo 1.4.x), which
was based on
https://bug815473.bmoattachments.org/attachment.cgi?id=692126
(https://bugzilla.mozilla.org/show_bug.cgi?id=815473), modified the C
baseline Huffman encoder so that it precomputes jpeg_nbits_table, in
order to facilitate sharing the table among multiple processes.
However, libjpeg-turbo never shared the table, and because the table was
implemented as a static array, f3a8684cd1
(libjpeg-turbo 1.5.x) and 37bae1a0e9
(libjpeg-turbo 2.0.x) each introduced a duplicate copy of the table for
(respectively) the SSE2 baseline Huffman encoder and the C progressive
Huffman encoder.

This commit does the following:
- Move the duplicated code in jchuff.c and jcphuff.c, originally
  introduced in 0cfc4c17b7 and
  37bae1a0e9, into a header
  (jpeg_nbits.h).
- Credit the co-author of 0cfc4c17b7.
  (Refer to https://sourceforge.net/p/libjpeg-turbo/patches/57).
- Modify the SSE2 baseline Huffman encoder so that the C Huffman
  encoders can share its definition of jpeg_nbits_table.
- Move the definition of jpeg_nbits_table into a C source file
  (jpeg_nbits.c) rather than a header, and define the table only if
  USE_CLZ_INTRINSIC is undefined and the SSE2 baseline Huffman encoder
  will not be built.
- Apply hidden symbol visibility to the shared definition of
  jpeg_nbits_table, if the compiler supports the necessary attribute.
  (In practice, only Visual C++ doesn't.)

Closes #114

See also:
https://bugzilla.mozilla.org/show_bug.cgi?id=1501523
2024-01-16 17:33:30 -05:00
DRC
be96fa0a40 Doc: Lossless JPEG clarifications
- Clarify that lossless JPEG is slower than and doesn't compress as well
  as lossy JPEG.  (That should be obvious, because "lossy" literally
  means that data is thrown away.)
- Re-generate TurboJPEG C API documentation using Doxygen 1.9.8.
- Clarify that setting the data_precision field in jpeg_compress_struct
  to 16 requires lossless mode.
- Explain what the predictor selection value actually does.  (Refer to
  Recommendation ITU-T T.81 (1992) | ISO/IEC 10918-1:1994, Section
  H.1.2.1.)
2023-12-14 13:33:46 -05:00
DRC
abeca1f0cc Move official releases to GitHub 2023-11-30 09:36:05 -05:00
DRC
3eee0dd747 ChangeLog.md: "since" = "relative to" 2023-11-29 10:03:49 -05:00
DRC
55d342c788 TurboJPEG: Expose/extend hidden "max pixels" param
TJPARAM_MAXPIXELS was previously hidden and used only for fuzz testing,
but it is potentially useful for calling applications as well,
particularly if they want to guard against excessive memory consumption
by the tj3LoadImage*() functions.  The parameter has also been extended
to decompression and lossless transformation functions/methods, mainly
as a convenience.  (It was already possible for calling applications to
impose their own JPEG image size limits by reading the JPEG header prior
to decompressing or transforming the image.)
2023-11-16 15:36:47 -05:00
DRC
6136a9e285 Java doc: Terminology tweaks
- "function" = "method"
- "decompression and transform functions" = "decompression and transform
  operations" (for consistency with the 2.1.x documentation)
- "return an error" = "throw an error"
- "ceil()" = "Math.ceil()"
2023-11-16 14:23:39 -05:00
DRC
40419472fa SECURITY.md: Further clarify security adv. policy
Security advisories should only be filed against official releases.
2023-11-15 13:42:34 -05:00
DRC
45f018cb22 SECURITY.md: Clarify security advisories policy
Unfortunately, most of the GitHub security advisories filed against
libjpeg-turbo thus far have been the result of non-exploitable API
abuses triggered by randomly-generated test programs and accompanied by
wild claims of denials of service with no demonstrable or even probable
exploit that might cause such a DoS (assuming a service even existed
that used the API in question.)  Security advisories remain private
unless accepted, and I cannot accept them if they do not describe an
actual security issue.  Thus, it's best to steer most users toward
regular bug reports.
2023-11-15 13:20:27 -05:00
DRC
d51830473a tjexampletest.in: Fix code formatting issue
(introduced by 837e471a90)
2023-11-15 11:06:23 -05:00
DRC
8a4ce73c92 tj3Transform(): Range check transform operations 2023-11-15 11:02:42 -05:00
DRC
a27bad6552 tj3Transform(): Ensure JPEG hdr successfully read
Because of the TurboJPEG 3 API overhaul, the legacy decompression and
lossless transformation functions now wrap the new TurboJPEG 3
functions.  For performance reasons, we don't want to read the JPEG
header more than once during the same operation, so the wrapped
functions do not read the header if it has already been read by a
wrapper function.  Initially the TurboJPEG 3 functions used a state
variable to track whether the header had already been read, but
b94041390c made this more robust by using
the libjpeg global decompression state instead.  If a wrapper function
has already read the JPEG header successfully, then the global
decompression state will be DSTATE_READY, and the logic introduced in
b94041390c will prevent the header from
being read again.

A subtle issue arises because tj3DecompressHeader() does not call
jpeg_abort_decompress() if jpeg_read_header() fails.  (That is arguably
a bug, but it has existed since the very first implementation of the
function.)  Depending on the nature of the failure, this can cause
tj3DecompressHeader() to return an error code and leave the libjpeg
global decompression state set to DSTATE_INHEADER.  If a misbehaved
application ignored the error and subsequently called a TurboJPEG
decompression or lossless transformation function, then the function
would fail to read the JPEG header because the global decompression
state was greater than DSTATE_START.  In the case of the decompression
functions, this was innocuous, because jpeg_calc_output_dimensions()
and jpeg_start_decompress() both sanity check the global decompression
state.  However, it was possible for a misbehaved application to call
tj3DecompressHeader() with junk data, ignore the return value, and pass
the same junk data into tj3Transform().  Because tj3DecompressHeader()
left the global decompression state set to DSTATE_INHEADER,
tj3Transform() failed to detect the junk data (because it didn't try to
read the JPEG header), and it called jtransform_request_workspace() with
dinfo->image_width and dinfo->image_height still initialized to 0.
Because jtransform_request_workspace() does not sanity check the
decompression state, a division-by-zero error occurred with certain
combinations of transform options in which TJXOPT_TRIM or TJXOPT_CROP
was specified.  However, it should be noted that TJXOPT_TRIM and
TJXOPT_CROP cannot be expected to work properly without foreknowledge of
the JPEG source image dimensions, which cannot be gained except by
calling tj3DecompressHeader() successfully.  Thus, a calling application
is inviting trouble if it does not check the return value of
tj3DecompressHeader() and sanity check the JPEG source image dimensions
before calling tj3Transform().  This commit softens the failure, but the
failure is still due to improper API usage.
2023-11-14 19:22:43 -05:00
DRC
837e471a90 tjexample.c: Fix error when decompressing
(regression introduced by 300a344d65)

300a344d65 fixed the recompression code
path but also broke the pure decompression code path, because the fix
caused the TurboJPEG decompression instance to be destroyed before
tj3SaveImage() could use it.  Furthermore, the fix in
300a344d65 prevented pixel density
information from being transferred from the input image to the output
image when recompressing.  This commit does the following:

- Modify tjexample.c so that a single TurboJPEG instance is initialized
  for lossless transformation and shared by all code paths.  In addition
  to fixing both of the aforementioned issues, this makes the code more
  readable.

- Extend tjexampletest to test the recompression code path, thus
  ensuring that the issues fixed by this commit and
  300a344d65 are not reintroduced.

- Modify tjexample.c to remove redundant fclose(), tj3Destroy(), and
  tj3Free() calls.
2023-11-14 12:08:02 -05:00
DRC
df9dbff830 TurboJPEG: New param to limit virt array mem usage
This corresponds to max_memory_to_use in the jpeg_memory_mgr struct in
the libjpeg API, except that the TurboJPEG parameter is specified in
megabytes.  Because this is 2023 and computers with less than 1 MB of
memory are not a thing (at least not within the scope of libjpeg-turbo
support), it isn't useful to allow a limit less than 1 MB to be
specified.  Furthermore, because TurboJPEG parameters are signed
integers, if we allowed the memory limit to be specified in bytes, then
it would be impossible to specify a limit larger than 2 GB on 64-bit
machines.  Because max_memory_to_use is a long signed integer,
effectively we can specify a limit of up to 2 petabytes on 64-bit
machines if the TurboJPEG parameter is specified in megabytes.  (2 PB
should be enough for anybody, right?)

This commit also bumps the TurboJPEG API version to 3.0.1.  Since the
TurboJPEG API version no longer tracks the libjpeg-turbo version, it
makes sense to increment the API revision number when adding constants,
to increment the minor version number when adding functions, and to
increment the major version number for a complete overhaul.

This commit also removes the vestigial TJ_NUMPARAM macro, which was
never defined because it proved unnecessary.

Partially implements #735
2023-11-14 10:19:06 -05:00
DRC
bf248a5093 tj3Compress*(): Free virt arrays if mem limit hit
This is very subtle, but if a user specifies a libjpeg virtual array
memory limit via the JPEGMEM environment variable and one of the
tj3Compress*() functions hits that limit, the libjpeg error handler
will be invoked in jpeg_start_compress() (more specifically in
realize_virt_arrays() in jinit_compress_master()) before the libjpeg
global compression state can be incremented.  Thus,
jpeg_abort_compress() will not be called before the tj3Compress*()
function exits, the unrealized virtual arrays will not be freed, and if
the TurboJPEG compression instance is reused, those unrealized virtual
arrays will count against the specified memory limit.  This could cause
subsequent compression operations that require smaller virtual arrays
(or even no virtual arrays at all) to fail when they would otherwise
succeed.  In reality, the vast majority of calling programs would abort
and free the TurboJPEG compression instance if one of the tj3Compress*()
functions failed, but TJBench is a rare exception.  This issue does not
bear documenting because of its subtlety and rarity and because JPEGMEM
is not a documented feature of the TurboJPEG API.

Note that the issue does not exist in the tj3Encode*() and tj3Decode*()
functions, because realize_virt_arrays() is never called in the body of
those functions.  The issue also does not exist in the tj3Decompress*()
and tj3Transform() functions, because those functions ensure that the
JPEG header is read (and thus the libjpeg global decompression state is
incremented) prior to calling a function that calls
realize_virt_arrays() (i.e. jpeg_start_decompress() or
jpeg_read_coefficients().)  If realize_virt_arrays() failed in the body
of jpeg_write_coefficients(), then tj3Transform() would abort without
calling jpeg_abort_compress().  However, since jpeg_start_compress() is
never called in the body of tj3Transform(), no virtual arrays are ever
requested from the compression object, so failing to call
jpeg_abort_compress() would be innocuous.
2023-11-11 15:59:09 -05:00
DRC
220bd76188 turbojpeg.h: Fix broken refs in API documentation
"TJPARAM_DENSITYUNIT" should be "TJPARAM_DENSITYUNITS" (oops.)
2023-11-10 11:08:22 -05:00
DRC
cbdc20fbf4 example.c: Remove comments regarding temp files
Those comments could be confusing to new libjpeg-turbo users, and the
same information already exists in libjpeg.txt and structure.txt.
2023-11-08 11:43:58 -05:00
DRC
7c61794faf jmemsys.h: Remove unused MS-DOS/Mac mem. mgr. code
Those obsolete memory managers have never been included in
libjpeg-turbo, nor has libjpeg-turbo ever claimed to support MS-DOS
or Mac operating systems prior to OS X 10.4 "Tiger."  Note that we
retain the ability to use temp files, even though libjpeg-turbo does
not use them.  This allows downstream implementations to write their own
memory managers that use temp files, if necessary.
2023-11-08 11:16:14 -05:00
DRC
78eaf0d46d tj3*YUV8(): Fix int overflow w/ huge row alignment
If the align parameter was set to an unreasonably large value, such as
0x2000000, strides[0] * ph0 and strides[1] * ph1 could have overflowed
the int datatype and wrapped around when computing (src|dst)Planes[1]
and (src|dst)Planes[2] (respectively.)  This would have caused
(src|dst)Planes[1] and (src|dst)Planes[2] to point to lower addresses in
the YUV buffer than expected, so the worst case would have been a
visually incorrect output image, not a buffer overrun or other
exploitable issue.
2023-11-07 15:39:16 -05:00
DRC
0e2d289fab Bump version to 3.0.2 to prepare for new commits 2023-11-07 12:38:05 -05:00
Kornel
6c9f0897af MozJPEG 4.1.5 2023-10-12 17:52:31 +01:00
DRC
ec32420f6b example.c: Fix 12-bit PPM write w/ big endian CPUs 2023-10-11 16:11:45 -04:00
DRC
5b2beb4bc4 Build: Set FLOATTEST* by default for AArch64, PPC
Because of 47656a0820, we can now
reliably determine the correct default values for FLOATTEST8 and
FLOATTEST12 when using Clang or GCC to build for AArch64 or PowerPC
platforms.  (Testing confirms that this is the case with GCC 5-13 and
Clang 5-14 on Ubuntu/AArch64, GCC 4 on CentOS 7/PPC, and GCC 8-10 and
Clang 6-12 on Ubuntu/PPCLE.)  Other CPU architectures and compilers can
be added on a case-by-case basis as they are tested.
2023-10-11 16:11:36 -04:00
DRC
da48edfc49 jchuff.c: Fix uninit read w/ AArch64, WITH_SIMD=0
Because of bf01ed2fbc, the simd field in
huff_entropy_encoder (and, by extension, the simd field in
savable_state) is only initialized if WITH_SIMD is defined.  Due to an
oversight, the simd field in savable_state was queried in flush_bits()
regardless of whether WITH_SIMD was defined.  In most cases, both
branches of the query have identical code, and the optimizer removes the
branch.  However, because the legacy Neon GAS Huffman encoder uses the
older bit buffer logic from libjpeg-turbo 2.0.x and prior (refer to
087c29e07f), the branches do not have
identical code when building for AArch64 with NEON_INTRINSICS undefined
(which will be the case if WITH_SIMD is undefined.)  Thus, if
libjpeg-turbo was built for AArch64 with the SIMD extensions disabled
at build time, it was possible for the Neon GAS branch in flush_bits()
to be taken, which would have set put_bits to a value that is incorrect
for the C Huffman encoder.  Referring to #728, a user reported that this
issue sometimes caused libjpeg-turbo to generate bogus JPEG images if it
was built for AArch64 without SIMD extensions and subsequently used
through the Qt framework.  (It should be noted, however, that disabling
the SIMD extensions in AArch64 builds of libjpeg-turbo is inadvisable
for performance reasons.)

I was unable to reproduce the issue on Linux/AArch64 using libjpeg-turbo
alone, despite testing various versions of GCC and Clang and various
optimization levels.  However, the issue is reproducible using MSan with
-O0, so this commit also modifies the GitHub Actions workflow so that
compiler optimization is disabled in the linux-msan job.  That should
prevent the issue or similar issues from re-emerging.

Fixes #728
2023-10-10 14:58:34 -04:00
DRC
3d1d68cf96 README.md: Mention 4:4:0 math. incomp. vs. jpeg-6b
libjpeg-turbo implements 4:4:0 "fancy" (smooth) upsampling, which is
enabled by default when decompressing JPEG images that use 4:4:0
chrominance subsampling.  libjpeg did not and does not implement fancy
4:4:0 upsampling.
2023-10-04 13:20:38 -04:00
DRC
2c97a1ff07 GitHub: Use Ubuntu 20.04 runner for x32 build/test
The Ubuntu 22.04 kernel no longer supports the x32 ABI.
2023-10-03 12:08:31 -04:00
DRC
47656a0820 Test: Fix float test errors w/ Clang & fp-contract
The MD5 sums associated with FLOATTEST8=fp-contract and
FLOATTEST12=fp-contract are appropriate for GCC (tested v5 through v13)
with -ffp-contract=fast, which is the default when compiling for an
architecture that has fused multiply-add (FMA) instructions.  However,
different MD5 sums are needed for Clang (tested v5 through v14) with
-ffp-contract=on, which is now the default in Clang 14 when compiling
for an architecture that has FMA instructions.

Refer to #705, #709, #710
2023-10-03 11:28:21 -04:00
Kornel
0c6302e086 Merge remote-tracking branch 'libjpeg-turbo/2.1.x' into HEAD
* libjpeg-turbo/2.1.x:
  ChangeLog.md: List CVE ID fixed by ccaba5d7
  jpeglib.h: Document that JCS_RGB565 is decomp-only
  Fix block smoothing w/vert.-subsampled prog. JPEGs
2023-09-23 22:31:18 +01:00
DRC
4ae5d3dac5 ChangeLog.md: List CVE ID fixed by ccaba5d7
Closes #724
2023-09-14 17:23:13 -04:00
DRC
c0412b56d6 ChangeLog.md: List CVE ID fixed by ccaba5d7
Closes #724
2023-09-14 17:20:37 -04:00
DRC
7722c54c63 jpeglib.h: Document that JCS_RGB565 is decomp-only
Closes #723
2023-09-11 12:47:39 -04:00
DRC
f3c7116eaf jpeglib.h: Document that JCS_RGB565 is decomp-only
Closes #723
2023-09-11 12:46:13 -04:00
Kornel
61e03cc6b2 Fix #220 2023-09-04 15:58:41 +01:00
Kornel
3a691f41f9 Merge commit 'eadd243'
# By DRC
# Via DRC
* commit 'eadd243':
  Fix interblock smoothing with narrow prog. JPEGs
  jchuff.c/flush_bits(): Guard against free_bits < 0
  jchuff.c/flush_bits(): Guard against put_bits < 0
  Restore xform fuzzer behavior from before 19f9d8f0
  xform fuzz: Use src subsamp to calc dst buf size
  Doc: Mention that we are a JPEG ref implementation
  jchuff.c: Test for out-of-range coefficients
  turbojpeg.h: Make customFilter() proto match doc
  ChangeLog.md: Fix typo
  tjTransform(): Calc dst buf size from xformed dims
  Fix build warnings/errs w/ -DNO_GETENV/-DNO_PUTENV
  GitHub: Fix x32 build
  tjexample.c: Prevent integer overflow
  jpeg_crop_scanline: Fix calc w/sclg + 2x4,4x2 samp
  Decomp: Don't enable 2-pass color quant w/ RGB565
  TJBench: w/JPEG input imgs, set min tile= MCU size
  Bump version to 2.1.6 to prepare for new commits
  GitHub: Add pull request template
  Build: Clarify CMAKE_OSX_ARCHITECTURES error
  Build: Fail if included with add_subdirectory()

# Conflicts:
#	.github/workflows/build.yml
#	CMakeLists.txt
#	README.md
#	release/deb-control.in
2023-08-26 21:52:39 +01:00
Kornel
3bd754ee68 Merge tag '2.1.5.1'
# By DRC
# Via DRC
* tag '2.1.5.1':
  ChangeLog.md: Document d743a2c1
  OSS-Fuzz: Bail out immediately on decomp failure
  SIMD/x86: Initialize simd_support before every use
  Build: Define THREAD_LOCAL even if !WITH_TURBOJPEG

# Conflicts:
#	CMakeLists.txt
2023-08-26 21:49:51 +01:00
DRC
a9d87361c8 Fix block smoothing w/vert.-subsampled prog. JPEGs
The 5x5 interblock smoothing implementation, introduced in libjpeg-turbo
2.1, improperly extended the logic from the traditional 3x3 smoothing
implementation.  Both implementations point prev_block_row and
next_block_row to the current block row when processing, respectively,
the first and the last block row in the image:

  if (block_row > 0 || cinfo->output_iMCU_row > 0)
    prev_block_row =
      buffer[block_row - 1] + cinfo->master->first_MCU_col[ci];
  else
    prev_block_row = buffer_ptr;

  if (block_row < block_rows - 1 ||
      cinfo->output_iMCU_row < last_iMCU_row)
    next_block_row =
      buffer[block_row + 1] + cinfo->master->first_MCU_col[ci];
  else
    next_block_row = buffer_ptr;

6d91e950c8 naively extended that logic to
accommodate a 5x5 smoothing window:

  if (block_row > 1 || cinfo->output_iMCU_row > 1)
    prev_prev_block_row =
      buffer[block_row - 2] + cinfo->master->first_MCU_col[ci];
  else
    prev_prev_block_row = prev_block_row;

  if (block_row < block_rows - 2 ||
      cinfo->output_iMCU_row + 1 < last_iMCU_row)
    next_next_block_row =
      buffer[block_row + 2] + cinfo->master->first_MCU_col[ci];
  else
    next_next_block_row = next_block_row;

However, this new logic was only correct if block_rows == 1, so the
values of prev_prev_block_row and next_next_block_row were incorrect
when processing, respectively, the second and second to last iMCU rows
in a vertically-subsampled progressive JPEG image.

The intent was to:
- point prev_block_row to the current block row when processing the
  first block row in the image,
- point prev_prev_block_row to prev_block_row when processing the first
  two block rows in the image,
- point next_block_row to the current block row when processing the
  last block row in the image, and
- point next_next_block_row to next_block_row when processing the last
  two block rows in the image.

This commit modifies decompress_smooth_data() so that it computes the
current block row's position relative to the whole image and sets
the block row pointers based on that value.

This commit also restores a line of code that was accidentally deleted
by 6d91e950c8:

  access_rows += compptr->v_samp_factor; /* prior iMCU row too */

access_rows is merely a sanity check that tells the access_virt_barray()
method to generate an error if accessing the specified number of rows
would cause a buffer overrun.  Essentially, it is a belt-and-suspenders
measure to ensure that j*init_d_coef_controller() allocated enough rows
for the full-image virtual array.  Thus, excluding that line of code did
not cause an observable issue.

This commit also documents eadd2436ee in
the change log.

Fixes #721
2023-08-15 15:40:37 -04:00
DRC
9b704f96b2 Fix block smoothing w/vert.-subsampled prog. JPEGs
The 5x5 interblock smoothing implementation, introduced in libjpeg-turbo
2.1, improperly extended the logic from the traditional 3x3 smoothing
implementation.  Both implementations point prev_block_row and
next_block_row to the current block row when processing, respectively,
the first and the last block row in the image:

  if (block_row > 0 || cinfo->output_iMCU_row > 0)
    prev_block_row =
      buffer[block_row - 1] + cinfo->master->first_MCU_col[ci];
  else
    prev_block_row = buffer_ptr;

  if (block_row < block_rows - 1 ||
      cinfo->output_iMCU_row < last_iMCU_row)
    next_block_row =
      buffer[block_row + 1] + cinfo->master->first_MCU_col[ci];
  else
    next_block_row = buffer_ptr;

6d91e950c8 naively extended that logic to
accommodate a 5x5 smoothing window:

  if (block_row > 1 || cinfo->output_iMCU_row > 1)
    prev_prev_block_row =
      buffer[block_row - 2] + cinfo->master->first_MCU_col[ci];
  else
    prev_prev_block_row = prev_block_row;

  if (block_row < block_rows - 2 ||
      cinfo->output_iMCU_row + 1 < last_iMCU_row)
    next_next_block_row =
      buffer[block_row + 2] + cinfo->master->first_MCU_col[ci];
  else
    next_next_block_row = next_block_row;

However, this new logic was only correct if block_rows == 1, so the
values of prev_prev_block_row and next_next_block_row were incorrect
when processing, respectively, the second and second to last iMCU rows
in a vertically-subsampled progressive JPEG image.

The intent was to:
- point prev_block_row to the current block row when processing the
  first block row in the image,
- point prev_prev_block_row to prev_block_row when processing the first
  two block rows in the image,
- point next_block_row to the current block row when processing the
  last block row in the image, and
- point next_next_block_row to next_block_row when processing the last
  two block rows in the image.

This commit modifies decompress_smooth_data() so that it computes the
current block row's position relative to the whole image and sets
the block row pointers based on that value.

This commit also restores a line of code that was accidentally deleted
by 6d91e950c8:

  access_rows += compptr->v_samp_factor; /* prior iMCU row too */

access_rows is merely a sanity check that tells the access_virt_barray()
method to generate an error if accessing the specified number of rows
would cause a buffer overrun.  Essentially, it is a belt-and-suspenders
measure to ensure that j*init_d_coef_controller() allocated enough rows
for the full-image virtual array.  Thus, excluding that line of code did
not cause an observable issue.

This commit also documents dbae59281f in
the change log.

Fixes #721
2023-08-15 15:21:29 -04:00
DRC
7b844bfda6 x86-64 SIMD: Use std stack frame/prologue/epilogue
This allows debuggers and profilers to reliably capture backtraces from
within the x86-64 SIMD functions.

In places where rbp was previously used to access temporary variables
(after stack alignment), we now use r15 and save/restore it accordingly.
The total amount of work is approximately the same, because the previous
code pushed the pre-alignment stack pointer to the aligned stack.  The
new prologue and epilogue actually have fewer instructions.

Also note that the {un}collect_args macros now use rbp instead of rax to
access arguments passed on the stack, so we save a few instructions
there as well.

Based on:
debcc7c3b4

Closes #707
Closes #708
2023-08-08 12:33:06 -04:00
DRC
e17fa3a271 Bump version to 3.0.1 to prepare for new commits 2023-08-08 11:28:12 -04:00
DRC
eadd2436ee Fix interblock smoothing with narrow prog. JPEGs
Due to an oversight, the assignment of DC05, DC10, DC15, DC20, and DC25
(the right edge coefficients in the 5x5 interblock smoothing window) in
decompress_smooth_data() was incorrect for images exactly two MCU blocks
wide.  For such images, DC04, DC09, DC14, DC19, and DC24 were assigned
values based on the last MCU column, but DC05, DC10, DC15, DC20, and
DC25 were assigned values based on the first MCU column (because
block_num + 1 was never less than last_block_column.)  This commit
modifies jdcoefct.c so that, for images at least two MCU blocks wide,
DC05, DC10, DC15, DC20, and DC25 are assigned the same values as DC04,
DC09, DC14, DC19, and DC24 (respectively.)  DC05, DC10, DC15, DC20, and
DC25 are then immediately overwritten for images more than two MCU
blocks wide.

Since this issue was minor and not likely obvious to an end user, the
fix is undocumented.

Fixes #700
2023-08-03 16:07:54 -04:00
DRC
dbae59281f Fix interblock smoothing with narrow prog. JPEGs
Due to an oversight, the assignment of DC05, DC10, DC15, DC20, and DC25
(the right edge coefficients in the 5x5 interblock smoothing window) in
decompress_smooth_data() was incorrect for images exactly two MCU blocks
wide.  For such images, DC04, DC09, DC14, DC19, and DC24 were assigned
values based on the last MCU column, but DC05, DC10, DC15, DC20, and
DC25 were assigned values based on the first MCU column (because
block_num + 1 was never less than last_block_column.)  This commit
modifies jdcoefct.c so that, for images at least two MCU blocks wide,
DC05, DC10, DC15, DC20, and DC25 are assigned the same values as DC04,
DC09, DC14, DC19, and DC24 (respectively.)  DC05, DC10, DC15, DC20, and
DC25 are then immediately overwritten for images more than two MCU
blocks wide.

Since this issue was minor and not likely obvious to an end user, the
fix is undocumented.

Fixes #700
2023-08-03 15:43:46 -04:00
DRC
300a344d65 tjexample.c: Fix error when recompressing
(regression introduced by fc01f4673b)

Because of the TurboJPEG 3 API overhaul, the pure compression code path
in tjexample.c now creates a TurboJPEG compression instance prior to
calling tj3LoadImage().  However, due to an oversight, a compression
instance was no longer created in the recompression code path.  Thus,
that code path attempted to reuse the TurboJPEG decompression instance,
which caused an error ("tj3Set(): TJPARAM_QUALITY is not applicable to
decompression instances.")  This commit modifies tjexample.c so that the
recompression code path creates a new TurboJPEG compression instance if
one has not already been created.

Fixes #716
2023-07-30 11:20:39 -04:00
DRC
21f5688aa4 jchuff.c/flush_bits(): Guard against free_bits < 0
This fixes a buffer overrun, reported by OSS-Fuzz, that occurred when
attempting to transform a specially-crafted malformed arithmetic-coded
JPEG image into a baseline Huffman-coded JPEG destination image with
default Huffman tables.  This issue probably had a similar root cause to
the issue fixed in 31a301389b, but in this
case, the issue only occurred with the SIMD baseline Huffman encoder in
libjpeg-turbo 2.1.x and 2.0.x.  It was not reproducible in 3.0.x or when
using the C baseline Huffman encoder.  (NOTE: In order to reproduce the
issue with 2.1.x, it was necessary to revert
58cee6d90cd616c86fae142891b987c289ea055a.)
2023-07-25 17:40:35 -04:00
DRC
ebca79d508 xform fuzz: Test optimized baseline entropy coding
Because of d011622f4b, optimized baseline
entropy coding wasn't actually being tested.
2023-07-25 16:47:44 -04:00
DRC
63bd71885f Build: Unset FLOATTEST* by default for non-x86
Because libjpeg-turbo 3.0.x now supports multiple data precisions in the
same build, the regression test system can test the 8-bit and 12-bit
floating point DCT/IDCT algorithms separately.  The expected MD5 sums
for those tests are communicated to the test system using the FLOATTEST8
and FLOATTEST12 CMake variables.  Whereas it is possible to
intelligently set a default value for FLOATTEST8 when building for
x86[-64] and a default value for FLOATTEST12 when building for x86-64,
it is not possible with other architectures.  (Refer to #705, #709,
and #710.)  Clang 14, for example, now enables FMA (fused multiply-add)
instructions by default on architectures that support them, but with
AArch64 builds, the results are not the same as when using GCC/AArch64
with FMA instructions enabled.  Thus, setting FLOATTEST12=fp-contract
doesn't make the tests pass.  It was already impossible to intelligently
set a default for FLOATTEST8 with i386 builds, but referring to #710,
that appears to be the case with other non-x86-64 builds as well.

Back in 1991, when Tom Lane first released libjpeg, some CPUs had
floating point units and some didn't.  It could take minutes to compress
or decompress a 1-megapixel JPEG image using the "slow" integer DCT/IDCT
algorithms, and the floating point algorithms were significantly faster
on systems that had an FPU.  On systems without FPUs, floating point
math was emulated and really slow, so Tom also developed "fast" integer
DCT/IDCT algorithms to speed up JPEG performance, at the expense of
accuracy, on those systems.  Because of libjpeg-turbo's SIMD extensions,
the floating point algorithms are now significantly slower than the
"slow" integer algorithms without being significantly more accurate, and
the "fast" integer algorithms fail the ISO/ITU-T conformance tests
without being any faster than the "slow" integer algorithms on x86
systems.  Thus, the floating point and "fast" integer algorithms are
considered legacy features.

In order for the floating point regression tests to be useful, the
results of the tests must be validated against an independent metric.
(In other words, it wouldn't be useful to use the floating point
DCT/IDCT algorithms to determine the expected results of the floating
point DCT/IDCT algorithms.)  In the past, I attempted without success to
develop a low-level floating point test that would run at configure time
and determine the appropriate default value of FLOATTEST*.  Barring that
approach, the only other possibilities would be:

1. Develop a test framework that compares the floating point results
with a margin of error, as TJUnitTest does.  However, that effort isn't
justified unless it could also benefit non-legacy features.

2. Compare the floating point results against an expected MD5 sum, as we
currently do.  However, as previously described, it isn't possible in
most cases to determine an appropriate default value for the expected
MD5 sum.

For the moment, it makes the most sense to disable the 8-bit floating
point tests by default except with x86[-64] builds and to disable the
12-bit floating point tests by default except with x86-64 builds.  That
means that the floating point algorithms will still be regression tested
when performing x86[-64] builds, but other types of builds will have to
opt in to the same regression tests.  Since the floating point DCT/IDCT
algorithms are unlikely to change ever again (the only reason they still
exist at all is to maintain backward compatibility with libjpeg), this
seems like a reasonable tradeoff.
2023-07-25 13:38:52 -04:00
DRC
d6914b6b1e CMakeLists.txt: Fix comment buglet 2023-07-24 16:41:18 -04:00
DRC
041c80a42e jchuff.c/flush_bits(): Guard against put_bits < 0
This fixes a UBSan negative shift warning, reported by OSS-Fuzz, that
occurred when attempting to transform a specially-crafted malformed
arithmetic-coded JPEG image into a baseline Huffman-coded JPEG
destination image with default Huffman tables.  This issue probably
had a similar root cause to the issue fixed in
31a301389b, but in this case, the issue
only occurred with the SIMD baseline Huffman encoder in libjpeg-turbo
2.1.x.  It was not reproducible in 2.0.x or 3.0.x or when using the
C baseline Huffman encoder.
2023-07-12 14:16:13 -04:00
DRC
e429e379b0 tjunittest.c: Use _getpid() on Windows 2023-07-06 16:58:20 -04:00
DRC
035ea386d1 Build: Fix regression test concurrency issues
- The example-*bit-*-decompress test must run after the
  example-*bit-*-compress test, since the latter generates
  testout*-example.jpg.

- Add -static to the filenames of all output files generated by the
  "static" regression tests, to avoid conflicts with the "shared"
  regression tests.

- Add the PID to the filenames of all files generated by the tjunittest
  packed-pixel image I/O tests.

- Check the return value of MD5File() in tjunittest to avoid a segfault
  if the file doesn't exist.  (Prior to the fix described above, that
  could occur if two instances of tjunittest ran concurrently from the
  same directory with the same -bmp and -precision arguments.)

Fixes #705
2023-07-06 14:08:07 -04:00
DRC
d011622f4b Restore xform fuzzer behavior from before c8d52f1c
The intent was for the final transform operation to be the same as the
first transform operation but without TJXOPT_COPYNONE or
TJPARAM_NOREALLOC.  Unrolling the transform operations in
c8d52f1c4c accidentally changed that.
2023-07-06 10:56:34 -04:00
DRC
58cee6d90c Restore xform fuzzer behavior from before 19f9d8f0
The intent was for the final transform operation to be the same as the
first transform operation but without TJXOPT_COPYNONE or
TJFLAG_NOREALLOC.  Unrolling the transform operations in
19f9d8f0fd accidentally changed that.
2023-07-06 10:29:27 -04:00
DRC
f48f73d4ec xform fuzz: Use src subsamp to calc dst buf size
Referring to
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60379
there are some specially-crafted malformed JPEG images that, when
transformed to grayscale, will exceed the worst-case transformed
grayscale JPEG image size.  This is similar in nature to the issue fixed
by 19f9d8f0fd, except that in this case,
the issue occurs regardless of the amount of metadata in the source
image.  Also, the tjTransform() function, the
Java_org_libjpegturbo_turbojpeg_TJTransformer_transform() JNI function,
and TJBench were behaving correctly in this case, because the TurboJPEG
API documentation specifies that the source image's subsampling type
should be used when computing the worst-case transformed JPEG image
size.  (However, only the Java API documentation specified that.  Oops.
The C API documentation now does as well.)  The documented usage
mitigates the issue, and only the transform fuzzer did not adhere to
that.  Thus, this was an issue with the fuzzer itself rather than an
issue with the library.
2023-07-06 09:10:30 -04:00
DRC
895287572d xform fuzz: Use src subsamp to calc dst buf size
Referring to
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60379
there are some specially-crafted malformed JPEG images that, when
transformed to grayscale, will exceed the worst-case transformed
grayscale JPEG image size.  This is similar in nature to the issue fixed
by c8d52f1c4c, except that in this case,
the issue occurs regardless of the amount of metadata in the source
image.  Also, the tj3Transform() function, the
Java_org_libjpegturbo_turbojpeg_TJTransformer_transform() JNI function,
and TJBench were behaving correctly in this case, because the TurboJPEG
API documentation specifies that the source image's subsampling type
should be used when computing the worst-case transformed JPEG image
size.  (However, only the Java API documentation specified that.  Oops.
The C API documentation now does as well.)  The documented usage
mitigates the issue, and only the transform fuzzer did not adhere to
that.  Thus, this was an issue with the fuzzer itself rather than an
issue with the library.
2023-07-06 08:48:40 -04:00
DRC
30c21e559d OSS-Fuzz: Ignore tj3DecompressHeader() return val
Unlike its predecessors, tj3DecompressHeader() does not fail if passed
a JPEG image with an unknown subsampling type.  This led me to believe
that it was OK for the fuzzers to abort if tj3DecompressHeader()
returned an error.  However, there are apparently some malformed JPEG
images that can expose issues in libjpeg-turbo while also causing
tj3DecompressHeader() to complain about header errors.  Thus, it is best
to ignore the return value of tj3DecompressHeader(), as the fuzzers in
libjpeg-turbo 2.1.x and prior did.
2023-07-05 16:13:34 -04:00
DRC
926f1f3daf README.md: Include GitHub Sponsors link/button
Closes #706
2023-07-05 12:43:22 -04:00
DRC
383286702c Doc: Mention that we are a JPEG ref implementation 2023-07-05 10:57:48 -04:00
DRC
762f8b4f21 Doc: Mention that we are a JPEG ref implementation 2023-07-05 10:56:42 -04:00
DRC
6c87537f60 AppVeyor: Use SignPath release cert/only sign tags
The SignPath release certificate for our project is not yet available as
of this writing, but this commit prepares the CI system to use the
release certificate whenever it becomes available.  It also restricts
signing only to tags, which correspond to official releases.  (That
mimics our traditional policy of not signing pre-release builds.)
2023-07-03 10:31:35 -04:00
DRC
31a301389b jchuff.c: Test for out-of-range coefficients
Restore two coefficient range checks from libjpeg to the C baseline
Huffman encoder.  This fixes an issue
(https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60253) whereby
the encoder could read from uninitialized memory when attempting to
transform a specially-crafted malformed arithmetic-coded JPEG source
image into a baseline Huffman-coded JPEG destination image with default
Huffman tables.  More specifically, the out-of-range coefficients caused
r to equal 256, which overflowed the actbl->ehufsi[] array.  Because the
overflow was contained within the huff_entropy_encoder structure, this
issue was not exploitable (nor was it observable at all on x86 or Arm
CPUs unless JSIMD_NOHUFFENC=1 or JSIMD_FORCENONE=1 was set in the
environment or unless libjpeg-turbo was built with WITH_SIMD=0.)

The fix is performance-neutral (+/- 1-2%) for x86-64 code and causes a
0-4% (avg. 1-2%, +/- 1-2%) compression regression for i386 code on Intel
CPUs when the C baseline Huffman encoder is used (JSIMD_NOHUFFENC=1).
The fix is performance-neutral (+/- 1-2%) on Intel CPUs when all of the
libjpeg-turbo SIMD extensions are disabled (JSIMD_FORCENONE=1).  The fix
causes a 0-2% (avg. <1%, +/- 1%) compression regression for PowerPC
code.
2023-07-01 08:20:38 -04:00
DRC
02b074fd90 xform fuzz: Use only xform opts to set entropy alg
This is subtle, but the tj3DecompressHeader() function sets the values
of TJPARAM_ARITHMETIC, TJPARAM_OPTIMIZE, and TJPARAM_PROGRESSIVE.
Unless we unset those values, the entropy algorithm used in the
transformed JPEG image will be determined by the union of the parameter
values and the transform options, which isn't what we want.
2023-07-01 08:14:44 -04:00
DRC
e0c53aa38f jchuff.c: Test for out-of-range coefficients
Restore two coefficient range checks from libjpeg to the C baseline
Huffman encoder.  This fixes an issue
(https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60253) whereby
the encoder could read from uninitialized memory when attempting to
transform a specially-crafted malformed arithmetic-coded JPEG source
image into a baseline Huffman-coded JPEG destination image with default
Huffman tables.  More specifically, the out-of-range coefficients caused
r to equal 256, which overflowed the actbl->ehufsi[] array.  Because the
overflow was contained within the huff_entropy_encoder structure, this
issue was not exploitable (nor was it observable at all on x86 or Arm
CPUs unless JSIMD_NOHUFFENC=1 or JSIMD_FORCENONE=1 was set in the
environment or unless libjpeg-turbo was built with WITH_SIMD=0.)

The fix is performance-neutral (+/- 1-2%) for x86-64 code and causes a
0-4% (avg. 1-2%, +/- 1-2%) compression regression for i386 code on Intel
CPUs when the C baseline Huffman encoder is used (JSIMD_NOHUFFENC=1).
The fix is performance-neutral (+/- 1-2%) on Intel CPUs when all of the
libjpeg-turbo SIMD extensions are disabled (JSIMD_FORCENONE=1).  The fix
causes a 0-2% (avg. <1%, +/- 1%) compression regression for PowerPC
code.
2023-07-01 07:56:50 -04:00
DRC
369b84a4ee turbojpeg.h: Make customFilter() proto match doc 2023-06-30 10:20:20 -04:00
DRC
4a831d6e48 turbojpeg.h: Make customFilter() proto match doc
Closes #704
2023-06-30 10:15:40 -04:00
DRC
53aafa949a ChangeLog.md: Fix typo 2023-06-29 17:45:21 -04:00
DRC
240a5a5cbb ChangeLog.md: Fix typo 2023-06-29 17:45:07 -04:00
DRC
7173889223 djpeg: Fix -map option with 12-bit data precision 2023-06-29 16:36:43 -04:00
DRC
bf9f319cb4 Disallow color quantization with lossless decomp
Color quantization is a legacy feature that serves little or no purpose
with lossless JPEG images.  9f756bc67a
eliminated interaction issues between the lossless decompressor and the
color quantizers related to out-of-range 12-bit samples, but referring
to #701, other interaction issues apparently still exist.  Such issues
are likely, given the fact that the color quantizers were not designed
with lossless decompression in mind.

This commit reverts 9f756bc67a, since the
issues it fixed are no longer relevant because of this commit and
2192560d74.

Fixed #672
Fixes #673
Fixes #674
Fixes #676
Fixes #677
Fixes #678
Fixes #679
Fixes #681
Fixes #683
Fixes #701
2023-06-29 16:36:29 -04:00
DRC
19f9d8f0fd tjTransform(): Calc dst buf size from xformed dims
When used with TJFLAG_NOREALLOC and with TJXOP_TRANSPOSE,
TJXOP_TRANSVERSE, TJXOP_ROT90, or TJXOP_ROT270, tjTransform()
incorrectly based the destination buffer size for a transform on the
source image dimensions rather than the transformed image dimensions.
This was apparently a long-standing bug that had existed in the
tjTransform() function since its inception.  As initially implemented in
the evolving libjpeg-turbo v1.2 code base, tjTransform() required
dstSizes[i] to be set regardless of whether TJFLAG_NOREALLOC was set.
ff78e37595, which was introduced later in
the evolving libjpeg-turbo v1.2 code base, removed that requirement and
planted the seed for the bug.  However, the bug was not activated until
9b49f0e4c7 was introduced still later in
the evolving libjpeg-turbo v1.2 code base, adding a subsampling type
argument to the (new at the time) tjBufSize() function and thus making
the width and height arguments no longer commutative.

The bug opened up the possibility that a JPEG source image could cause
tjTransform() to overflow the destination buffer for a transform if all
of the following were true:
- The JPEG source image used 4:2:2, 4:4:0, or 4:1:1 subsampling.  (These
  are the only supported subsampling types for which the width and
  height arguments to tjBufSize() are not commutative.)
- The width and height of the JPEG source image were such that
  tjBufSize(height, width, subsamplingType) returned a smaller value
  than tjBufSize(width, height, subsamplingType).
- The JPEG source image contained enough metadata that the size of the
  transformed image was larger than
  tjBufSize(height, width, subsamplingType).
- TJFLAG_NOREALLOC was set.
- TJXOP_TRANSPOSE, TJXOP_TRANSVERSE, TJXOP_ROT90, or TJXOP_ROT270 was
  used.
- TJXOPT_COPYNONE was not set.
- TJXOPT_CROP was not set.
- The calling program allocated
  tjBufSize(height, width, subsamplingType) bytes for the
  destination buffer, as the API documentation instructs.

The API documentation cautions that JPEG source images containing a
large amount of extraneous metadata (EXIF, IPTC, ICC, etc.) cannot
reliably be transformed if TJFLAG_NOREALLOC is set and TJXOPT_COPYNONE
is not set.  Irrespective of the bug, there are still cases in which a
JPEG source image with a large amount of metadata can, when transformed,
exceed the worst-case transformed JPEG image size.  For instance, if you
try to losslessly crop a JPEG image with 3 kB of EXIF data to 16x16
pixels, then you are guaranteed to exceed the worst-case 16x16 JPEG
image size unless you discard the EXIF data.

Even without the bug, tjTransform() will still fail with "Buffer passed
to JPEG library is too small" when attempting to transform JPEG source
images that meet the aforementioned criteria.  The bug is that the
function segfaults rather than failing gracefully, but the chances of
that occurring in a real-world application are very slim.  Any
real-world application developers who attempted to transform arbitrary
JPEG source images with TJFLAG_NOREALLOC set would very quickly realize
that they cannot reliably do that without also setting TJXOPT_COPYNONE.
Thus, I posit that the actual risk posed by this bug is low.
Applications such as web browsers that are the most exposed to security
risks from arbitrary JPEG source images do not use the TurboJPEG
lossless transform feature.  (None of those applications even use the
TurboJPEG API, to the best of my knowledge, and the public libjpeg API
has no equivalent transform function.)  Our only command-line interface
to the tjTransform() function, TJBench, was not exposed to the bug
because it had a compatible bug whereby it allocated the JPEG
destination buffer to the same size that tjTransform() erroneously
expected.  The TurboJPEG Java API was also not exposed to the bug
because of a similar compatible bug in the
Java_org_libjpegturbo_turbojpeg_TJTransformer_transform() JNI function.
(This commit fixes both compatible bugs.)

In short, best practices for tjTransform() are to use TJFLAG_NOREALLOC
only with JPEG source images that are known to be free of metadata (such
as images generated by tjCompress*()) or to use TJXOPT_COPYNONE along
with TJFLAG_NOREALLOC.  Still, however, the function shouldn't segfault
as long as the calling program allocates the suggested amount of space
for the JPEG destination buffer.

Usability notes:
tjTransform() could hypothetically require dstSizes[i] to be set
regardless of whether TJFLAG_NOREALLOC is set, but there are usability
pitfalls either way.  The main pitfall I sought to avoid with
ff78e37595 was a calling program failing
to set dstSizes[i] at all, thus leaving its value undefined.  It could
be argued that requiring dstSizes[i] to be set in all cases is more
consistent, but it could also be argued that not requiring it to be set
when TJFLAG_NOREALLOC is set is more user-proof.  tjTransform() could
also hypothetically set TJXOPT_COPYNONE automatically when
TJFLAG_NOREALLOC is set, but that could lead to user confusion.
2023-06-28 11:37:53 -04:00
DRC
c8d52f1c4c tj3Transform: Calc dst buf size from xformed dims
When used with TJPARAM_NOREALLOC and with TJXOP_TRANSPOSE,
TJXOP_TRANSVERSE, TJXOP_ROT90, or TJXOP_ROT270, tj3Transform()
incorrectly based the destination buffer size for a transform on the
source image dimensions rather than the transformed image dimensions.
This was apparently a long-standing bug that had existed in the
tj*Transform() function since its inception.  As initially implemented
in the evolving libjpeg-turbo v1.2 code base, tjTransform() required
dstSizes[i] to be set regardless of whether TJFLAG_NOREALLOC (the
predecessor to TJPARAM_NOREALLOC) was set.
ff78e37595, which was introduced later in
the evolving libjpeg-turbo v1.2 code base, removed that requirement and
planted the seed for the bug.  However, the bug was not activated until
9b49f0e4c7 was introduced still later in
the evolving libjpeg-turbo v1.2 code base, adding a subsampling type
argument to the (new at the time) tjBufSize() function and thus making
the width and height arguments no longer commutative.

The bug opened up the possibility that a JPEG source image could cause
tj3Transform() to overflow the destination buffer for a transform if all
of the following were true:
- The JPEG source image used 4:2:2, 4:4:0, 4:1:1, or 4:4:1 subsampling.
  (These are the only subsampling types for which the width and height
  arguments to tj3JPEGBufSize() are not commutative.)
- The width and height of the JPEG source image were such that
  tj3JPEGBufSize(height, width, subsamplingType) returned a smaller
  value than tj3JPEGBufSize(width, height, subsamplingType).
- The JPEG source image contained enough metadata that the size of the
  transformed image was larger than
  tj3JPEGBufSize(height, width, subsamplingType).
- TJPARAM_NOREALLOC was set.
- TJXOP_TRANSPOSE, TJXOP_TRANSVERSE, TJXOP_ROT90, or TJXOP_ROT270 was
  used.
- TJXOPT_COPYNONE was not set.
- TJXOPT_CROP was not set.
- The calling program allocated
  tj3JPEGBufSize(height, width, subsamplingType) bytes for the
  destination buffer, as the API documentation instructs.

The API documentation cautions that JPEG source images containing a
large amount of extraneous metadata (EXIF, IPTC, ICC, etc.) cannot
reliably be transformed if TJPARAM_NOREALLOC is set and TJXOPT_COPYNONE
is not set.  Irrespective of the bug, there are still cases in which a
JPEG source image with a large amount of metadata can, when transformed,
exceed the worst-case transformed JPEG image size.  For instance, if you
try to losslessly crop a JPEG image with 3 kB of EXIF data to 16x16
pixels, then you are guaranteed to exceed the worst-case 16x16 JPEG
image size unless you discard the EXIF data.

Even without the bug, tj3Transform() will still fail with "Buffer passed
to JPEG library is too small" when attempting to transform JPEG source
images that meet the aforementioned criteria.  The bug is that the
function segfaults rather than failing gracefully, but the chances of
that occurring in a real-world application are very slim.  Any
real-world application developers who attempted to transform arbitrary
JPEG source images with TJPARAM_NOREALLOC set would very quickly realize
that they cannot reliably do that without also setting TJXOPT_COPYNONE.
Thus, I posit that the actual risk posed by this bug is low.
Applications such as web browsers that are the most exposed to security
risks from arbitrary JPEG source images do not use the TurboJPEG
lossless transform feature.  (None of those applications even use the
TurboJPEG API, to the best of my knowledge, and the public libjpeg API
has no equivalent transform function.)  Our only command-line interface
to the tj3Transform() function, TJBench, was not exposed to the bug
because it had a compatible bug whereby it allocated the JPEG
destination buffer to the same size that tj3Transform() erroneously
expected.  The TurboJPEG Java API was also not exposed to the bug
because of a similar compatible bug in the
Java_org_libjpegturbo_turbojpeg_TJTransformer_transform() JNI function.
(This commit fixes both compatible bugs.)

In short, best practices for tj3Transform() are to use TJPARAM_NOREALLOC
only with JPEG source images that are known to be free of metadata (such
as images generated by tj3Compress*()) or to use TJXOPT_COPYNONE along
with TJPARAM_NOREALLOC.  Still, however, the function shouldn't segfault
as long as the calling program allocates the suggested amount of space
for the JPEG destination buffer.

Usability notes:
tj3Transform() could hypothetically require dstSizes[i] to be set
regardless of the value of TJPARAM_NOREALLOC, but there are usability
pitfalls either way.  The main pitfall I sought to avoid with
ff78e37595 was a calling program failing
to set dstSizes[i] at all, thus leaving its value undefined.  It could
be argued that requiring dstSizes[i] to be set in all cases is more
consistent, but it could also be argued that not requiring it to be set
when TJPARAM_NOREALLOC is set is more user-proof.  tj3Transform() could
also hypothetically set TJXOPT_COPYNONE automatically when
TJPARAM_NOREALLOC is set, but that could lead to user confusion.
Ultimately, I would like to address these issues in TurboJPEG v4 by
using managed buffer objects, but that would be an extensive overhaul.
2023-06-27 18:36:01 -04:00
DRC
6b9e3b0400 README.md: Include link to project home page
(for compliance with SignPath's Code of Conduct for Open Source
projects)
2023-06-19 11:11:16 -04:00
DRC
41b18e8d61 AppVeyor: Only add installers to zip file
Oops
2023-06-18 12:50:47 -04:00
DRC
a403ad5b52 AppVeyor: Integrate with SignPath.io 2023-06-16 16:16:42 -04:00
DRC
fcfd2ada75 Fix build warnings/errs w/ -DNO_GETENV/-DNO_PUTENV
- strtest.c: Fix unused variable warnings if both -DNO_GETENV and
  -DNO_PUTENV are specified or if only -DNO_GETENV is specified.

- jinclude.h: Fix build error if only -DNO_GETENV is specified.

Fixes #697
2023-06-16 11:55:01 -04:00
DRC
58cbda3e37 GitHub: Fix x32 build
1f55ae7b0f accidentally overrode the value
of CMAKE_C_FLAGS, thus eliminating the -mx32 flag that was necessary to
enable x32.
2023-06-16 11:54:34 -04:00
DRC
c27695a193 Fix build warnings/errs w/ -DNO_GETENV/-DNO_PUTENV
- strtest.c: Fix unused variable warnings if both -DNO_GETENV and
  -DNO_PUTENV are specified or if only -DNO_GETENV is specified.

- jinclude.h: Fix build error if only -DNO_GETENV is specified.

Fixes #697
2023-06-16 11:39:10 -04:00
DRC
65a85ce34e GitHub: Fix x32 build
1f55ae7b0f accidentally overrode the value
of CMAKE_C_FLAGS, thus eliminating the -mx32 flag that was necessary to
enable x32.
2023-06-16 11:19:33 -04:00
DRC
0e9683c4c6 Bump version to 3.0.0 2023-06-12 14:36:18 -04:00
DRC
be678e5a1b tjexample.c: Prevent integer overflow
Because width, height, and tjPixelSize[] are signed integers, signed
integer overflow will occur if width * height *
tjPixelSize[pixelFormat] > INT_MAX or jpegSize > INT_MAX, which would
cause an incorrect value to be passed to tjAlloc().  This commit
modifies tjexample.c in the following ways:

- Use malloc() rather than tjAlloc() to allocate the uncompressed image
  buffer.  (tjAlloc() is only necessary for JPEG buffers that will
  potentially be reallocated by the TurboJPEG API library.)

- Implicitly promote width, height, and tjPixelSize[pixelFormat] to
  size_t before multiplying them.

- If size_t is 32-bit, throw an error if width * height *
  tjPixelSize[pixelFormat] would overflow the data type.

- Throw an error if jpegSize would overflow a signed integer (which
  could only happen on a 64-bit machine.)

Since tjexample is not installed or packaged, the worst case for this
issue was that a downstream application might interpret tjexample.c
literally and introduce a similar overflow issue into its own code.
However, it's worth noting that such issues could also be introduced
when using malloc().
2023-06-02 11:02:11 -04:00
DRC
6b506ed397 tjexample.c: Prevent integer overflow
Because width, height, and tjPixelSize[] are signed integers, signed
integer overflow will occur if width * height *
tjPixelSize[pixelFormat] > INT_MAX, which would cause an incorrect value
to be passed to tj3Alloc().  This commit modifies tjexample.c in the
following ways:

- Implicitly promote width, height, and tjPixelSize[pixelFormat] to
  size_t before multiplying them.

- Use malloc() rather than tj3Alloc() to allocate the uncompressed image
  buffer.  (tj3Alloc() is only necessary for JPEG buffers that will
  potentially be reallocated by the TurboJPEG API library.)

- If size_t is 32-bit, throw an error if width * height *
  tjPixelSize[pixelFormat] would overflow the data type.

Since tjexample is not installed or packaged, the worst case for this
issue was that a downstream application might interpret tjexample.c
literally and introduce a similar overflow issue into its own code.
However, it's worth noting that such issues could also be introduced
when using malloc().
2023-06-01 14:22:13 -04:00
DRC
2192560d74 Disallow merged upsampling with lossless decomp
Colorspace conversion is explicitly not supported with lossless JPEG
images.  Merged upsampling implies YCbCr-to-RGB colorspace conversion,
so allowing it with lossless decompression was an oversight.
9f756bc67a eliminated interaction issues
between the lossless decompressor and the merged upsampler related to
out-of-range 12-bit samples, but referring to #690, other interaction
issues apparently still exist.  Such issues are likely, given the fact
that the merged upsampler was never designed with lossless decompression
in mind.

This commit also extends the decompress fuzzer so that it catches the
issue reported in #690.

Fixes #690
Redundantly fixes #670
Redundantly fixes #675
2023-05-31 14:42:49 -04:00
DRC
4e7ff7b922 SECURITY.md: Wordsmithing and clarifications
- Clarify that encrypted e-mail is optional.
- Mention the new GitHub security advisory system.
- Clarify that vulnerabilities against new features that are not yet in
  a Stable release series need not be reported securely.
2023-05-31 10:28:38 -04:00
DRC
10693e6441 GitHub: Add security policy 2023-05-30 18:22:50 -04:00
DRC
36aaeebb55 ChangeLog.md: List CVE ID fixed by 9f756bc6 2023-05-30 17:46:58 -04:00
DRC
2e1b8a462f jpeg_crop_scanline: Fix calc w/sclg + 2x4,4x2 samp
When computing the downsampled width for a particular component,
jpeg_crop_scanline() needs to take into account the fact that the
libjpeg code uses a combination of IDCT scaling and upsampling to
implement 4x2 and 2x4 upsampling with certain decompression scaling
factors.  Failing to account for that led to incomplete upsampling of
4x2- or 2x4-subsampled components, which caused the color converter to
read from uninitialized memory.  With 12-bit data precision, this caused
a buffer overrun or underrun and subsequent segfault if the
uninitialized memory contained a value that was outside of the valid
sample range (because the color converter uses the value as an array
index.)

Fixes #669
2023-04-06 22:05:10 -05:00
DRC
3a53627306 jpeg_crop_scanline: Fix calc w/sclg + 2x4,4x2 samp
When computing the downsampled width for a particular component,
jpeg_crop_scanline() needs to take into account the fact that the
libjpeg code uses a combination of IDCT scaling and upsampling to
implement 4x2 and 2x4 upsampling with certain decompression scaling
factors.  Failing to account for that led to incomplete upsampling of
4x2- or 2x4-subsampled components, which caused the color converter to
read from uninitialized memory.  With 12-bit data precision, this caused
a buffer overrun or underrun and subsequent segfault if the
uninitialized memory contained a value that was outside of the valid
sample range (because the color converter uses the value as an array
index.)

Fixes #669
2023-04-06 22:00:43 -05:00
DRC
42ce199c9c Decomp: Don't enable 2-pass color quant w/ RGB565
The 2-pass color quantization algorithm assumes 3-sample pixels.  RGB565
is the only 3-component colorspace that doesn't have 3-sample pixels, so
we need to treat it as a special case when determining whether to enable
2-pass color quantization.  Otherwise, attempting to initialize 2-pass
color quantization with an RGB565 output buffer could cause
prescan_quantize() to read from uninitialized memory and subsequently
underflow/overflow the histogram array.

djpeg is supposed to fail gracefully if both -rgb565 and -colors are
specified, because none of its destination managers (image writers)
support color quantization with RGB565.  However, prescan_quantize() was
called before that could occur.  It is possible but very unlikely that
these issues could have been reproduced in applications other than
djpeg.  The issues involve the use of two features (12-bit precision and
RGB565) that are incompatible, and they also involve the use of two
rarely-used legacy features (RGB565 and color quantization) that don't
make much sense when combined.

Fixes #668
Fixes #671
Fixes #680
2023-04-04 20:45:16 -05:00
DRC
62590d428b Decomp: Don't enable 2-pass color quant w/ RGB565
The 2-pass color quantization algorithm assumes 3-sample pixels.  RGB565
is the only 3-component colorspace that doesn't have 3-sample pixels, so
we need to treat it as a special case when determining whether to enable
2-pass color quantization.  Otherwise, attempting to initialize 2-pass
color quantization with an RGB565 output buffer could cause
prescan_quantize() to read from uninitialized memory and subsequently
underflow/overflow the histogram array.

djpeg is supposed to fail gracefully if both -rgb565 and -colors are
specified, because none of its destination managers (image writers)
support color quantization with RGB565.  However, prescan_quantize() was
called before that could occur.  It is possible but very unlikely that
these issues could have been reproduced in applications other than
djpeg.  The issues involve the use of two features (12-bit precision and
RGB565) that are incompatible, and they also involve the use of two
rarely-used legacy features (RGB565 and color quantization) that don't
make much sense when combined.

Fixes #668
Fixes #671
Fixes #680
2023-04-04 20:38:00 -05:00
DRC
9f756bc67a Lossless decomp: Range-limit 12-bit samples
12-bit is the only data precision for which the range of the sample data
type exceeds the valid sample range, so it is possible to craft a 12-bit
lossless JPEG image that contains out-of-range 12-bit samples.
Attempting to decompress such an image using color quantization or merged
upsampling (NOTE: libjpeg-turbo cannot generate YCbCr or subsampled
lossless JPEG images, but it can decompress them) caused segfaults or
buffer overruns when those algorithms attempted to use the out-of-range
sample values as array indices.  This commit modifies the lossless
decompressor so that it range-limits the output of the scaler when using
12-bit samples.

Fixes #670
Fixes #672
Fixes #673
Fixes #674
Fixes #675
Fixes #676
Fixes #677
Fixes #678
Fixes #679
Fixes #681
Fixes #683
2023-04-04 20:37:54 -05:00
DRC
3f43c6a310 jdlossls.c: Code formatting tweak 2023-04-04 13:27:11 -05:00
DRC
d491094b41 Build separate static/shared jpeg12/16 obj libs
If PIC isn't enabled for the entire build (using
CMAKE_POSITION_INDEPENDENT_CODE), then we need to enable it for any of
the objects in the libjpeg-turbo shared libraries.  Ideally, however, we
don't want to enable PIC for any of the objects in the libjpeg-turbo
static libraries, unless CMAKE_POSITION_INDEPENDENT_CODE is set.  Thus,
we need to build separate static and shared jpeg12 and jpeg16 object
libraries.

Fixes #684
2023-04-03 17:44:01 -05:00
DRC
0d20aa15ce TJBench: Require known subsamp type w/tiled decomp
(oversight from 386ec0abc7)

Tiled decompression will ultimately fail if the subsampling type of the
JPEG input image is unknown, but the C version of TJBench needs to fail
earlier in order to avoid using -1 (TJSAMP_UNKNOWN) as an array index
for tjMCUWidth[]/tjMCUHeight[].  The Java version now fails earlier as
well, although there is no benefit to that other than making the error
message less cryptic.
2023-03-31 11:06:52 -05:00
DRC
bc087d6aa9 TJBench: w/JPEG input imgs, set min tile= MCU size
When -tile is used with a JPEG input image, TJBench generates the tiles
using lossless cropping, which will fail if the cropping region doesn't
align with an MCU boundary.  Furthermore, there is no reason to avoid
8x8 tiles when decompressing 4:4:4 or grayscale JPEG images.
2023-03-13 17:50:38 -05:00
DRC
7313fe5aea Bump version to 2.1.6 to prepare for new commits 2023-03-13 17:49:43 -05:00
DRC
cc8c6d3667 tjbenchtest: Test all subsampling types 2023-03-13 17:36:59 -05:00
DRC
9d2f189c29 TJBench: Change subsamp for transposed 4:*:1 img
If we have transformed a 4:1:1 or 4:4:1 JPEG input image in such a way
that the horizontal and vertical dimensions are transposed, then we need
to change the subsampling type that is passed to the decomp() function.
Otherwise, tj3YUVBufSize() may return an incorrect value.

(oversight from fc881ebb21)
2023-03-13 17:36:53 -05:00
DRC
386ec0abc7 TJBench: w/JPEG input imgs, set min tile= MCU size
When -tile is used with a JPEG input image, TJBench generates the tiles
using lossless cropping, which will fail if the cropping region doesn't
align with an MCU boundary.  Furthermore, there is no reason to avoid
8x8 tiles when decompressing 4:4:4 or grayscale JPEG images.
2023-03-13 13:27:10 -05:00
DRC
fc881ebb21 TurboJPEG: Implement 4:4:1 chrominance subsampling
This allows losslessly transposed or rotated 4:1:1 JPEG images to be
losslessly cropped, partially decompressed, or decompressed to planar
YUV images.

Because tj3Transform() allows multiple lossless transformations to be
chained together, all subsampling options need to have a corresponding
transposed subsampling option.  (This is why 4:4:0 was originally
implemented as well.)  Otherwise, the documentation would be technically
incorrect.  It says that images with unknown subsampling types cannot be
losslessly cropped, partially decompressed, or decompressed to planar
YUV images, but it doesn't say anything about images with known
subsampling types whose subsampling type becomes unknown if the image is
rotated or transposed.  This is one of those situations in which it is
easier to implement a feature that works around the problem than to
document the problem.

Closes #659
2023-03-10 10:46:14 -06:00
DRC
58a3427ffc Bump version to 2.1.92 to prepare for new commits 2023-03-10 09:31:00 -06:00
DRC
0827eaff11 ChangeLog.md: Add literal vers # to 3.0 beta2 hdr
(per our convention)
2023-03-10 09:30:05 -06:00
DRC
9c432a4d40 GitHub: Add pull request template 2023-02-23 12:03:27 -06:00
DRC
c8a20e0c2f Build: Clarify CMAKE_OSX_ARCHITECTURES error
It's not that the build system doesn't support multiple values in
CMAKE_OSX_ARCHITECTURES.  It's that libjpeg-turbo, because of its SIMD
extensions, *cannot* support multiple values in CMAKE_OSX_ARCHITECTURES.
2023-02-23 12:03:06 -06:00
DRC
97df8ea9ed GitHub: Add pull request template 2023-02-23 11:57:25 -06:00
DRC
c13fe15955 Build: Clarify CMAKE_OSX_ARCHITECTURES error
It's not that the build system doesn't support multiple values in
CMAKE_OSX_ARCHITECTURES.  It's that libjpeg-turbo, because of its SIMD
extensions, *cannot* support multiple values in CMAKE_OSX_ARCHITECTURES.
2023-02-23 09:40:25 -06:00
DRC
33eaf17e5b Build: Fail if included with add_subdirectory()
Even though BUILDING.md and CONTRIBUTING.md explicitly state that the
libjpeg-turbo build system does not and will not support being
integrated into downstream build systems using add_subdirectory() (see
0565548191), people continue to file bug
reports, feature requests, and pull requests regarding that (see #265,
 #637, and #653 in addition to the issues listed in
05655481917a2d2761cf2fe19b76f639b7f159ef.)  Responding to those
issues wastes our project's limited resources.  Hopefully people will
get the hint if the build system explicitly tells them that it can't be
included using add_subdirectory(), which will prompt them to read the
comments in CMakeLists.txt explaining why.  To anyone stumbling upon
this commit message, please refer to the discussions under the issues
listed above, as well as the issues listed in
0565548191.  Our project's position on
this has been stated, explained, and defended numerous times.
2023-02-10 10:49:30 -06:00
DRC
d67edaff83 Ignore 2.1.5.1 ChangeLog header w/git diff --check
(Otherwise, checkstyle flags it as a leftover conflict marker.)
2023-02-10 10:49:10 -06:00
DRC
2af984fdae Build: Fail if included with add_subdirectory()
Even though BUILDING.md and CONTRIBUTING.md explicitly state that the
libjpeg-turbo build system does not and will not support being
integrated into downstream build systems using add_subdirectory() (see
0565548191), people continue to file bug
reports, feature requests, and pull requests regarding that (see #265,
 #637, and #653 in addition to the issues listed in
05655481917a2d2761cf2fe19b76f639b7f159ef.)  Responding to those
issues wastes our project's limited resources.  Hopefully people will
get the hint if the build system explicitly tells them that it can't be
included using add_subdirectory(), which will prompt them to read the
comments in CMakeLists.txt explaining why.  To anyone stumbling upon
this commit message, please refer to the discussions under the issues
listed above, as well as the issues listed in
0565548191.  Our project's position on
this has been stated, explained, and defended numerous times.
2023-02-10 10:48:35 -06:00
DRC
6c61033349 ChangeLog.md: Document 4e028ecd
+ bump version to 3.0 beta2
2023-02-08 10:14:04 -06:00
DRC
8ecba3647e ChangeLog.md: Document d743a2c1
+ bump version to 2.1.5.1
2023-02-08 09:29:21 -06:00
DRC
6316d4d752 OSS-Fuzz: Bail out immediately on decomp failure
Don't keep trying to decompress the same image if tj3Decompress*() has
already thrown an error.  Otherwise, if the image has an excessive
number of scans, then each iteration of the loop will try to decompress
up to the scan limit, which may cause the overall test to time out even
if one iteration doesn't time out.
2023-02-07 13:34:34 -06:00
DRC
2a5a3c6f0a OSS-Fuzz: Bail out immediately on decomp failure
Don't keep trying to decompress the same image if tj3Decompress*() has
already thrown an error.  Otherwise, if the image has an excessive
number of scans, then each iteration of the loop will try to decompress
up to the scan limit, which may cause the overall test to time out even
if one iteration doesn't time out.
2023-02-07 13:21:08 -06:00
Kornel
af265e7562 Merge tag '2.1.5'
* tag '2.1.5': (41 commits)
  BUILDING.md: Specify install prefix for MinGW/Un*x
  Java: Guard against int overflow in size methods
  turbojpeg.c: Fix UBSan warning
  tjPlane*(): Guard against int overflow
  Java doc: TJ.pixelSize --> TJ.getPixelSize()
  TJBench: Unset TJ*OPT_CROP when disabling tiling
  TJExample: Remove "underlying codec" references
  GitHub: Update to actions/checkout@v3
  TJBench: Set TJ*OPT_PROGRESSIVE with -progressive
  TJBench/Java: Fix parsing of quality ranges
  TJBench: Strictly check all non-boolean arguments
  TurboJPEG: More documentation improvements
  TJDecompressor.java: Exception message tweak
  12-bit: Set alpha channel to 4095 rather than 255
  TJDecompressor.java: "YUV" = "planar YUV"
  Java: Don't allow int overflow in buf size methods
  tjDecompressToYUV2: Use scaled dims for plane calc
  TurboJPEG: Numerous documentation improvements
  TurboJPEG: Don't use backward compatibility macros
  TurboJPEG: Ensure 'pad' arg is a power of 2
  ...
2023-02-03 20:54:24 +00:00
DRC
d743a2c12e SIMD/x86: Initialize simd_support before every use
As long as a libjpeg instance is only used by one thread at a time, a
program is technically within its rights to call jpeg_start_*compress()
in one thread and jpeg_(read|write)_*(), with the same libjpeg instance,
in a second thread.  However, because the various jsimd_can*() functions
are called within the body of jpeg_start_*compress() and simd_support is
now thread-local (due to f579cc11b3), that
led to a situation in which simd_support was initialized in the first
thread but not the second.  The uninitialized value of simd_support is
0xFFFFFFFF, which the second thread interpreted to mean that it could
use any instruction set, and when it attempted to use AVX2 instructions
on a CPU that didn't support them, an illegal instruction error
occurred.

This issue was known to affect libvips.

This commit modifies the i386 and x86-64 SIMD dispatchers so that the
various jsimd_*() functions always call init_simd(), if simd_support is
uninitialized, prior to dispatching based on the value of simd_support.
Note that the other SIMD dispatchers don't need this, because only the
x86 SIMD extensions currently support multiple instruction sets.

This patch has been verified to be performance-neutral to within
+/- 0.4% with 32-bit and 64-bit code running on a 2.8 GHz Intel Xeon
W3530 and a 3.6 GHz Intel Xeon W2123.

Fixes #649
2023-02-02 10:46:57 -06:00
DRC
4e028ecd63 SIMD/x86: Initialize simd_support before every use
As long as a libjpeg instance is only used by one thread at a time, a
program is technically within its rights to call jpeg_start_*compress()
in one thread and jpeg_(read|write)_*(), with the same libjpeg instance,
in a second thread.  However, because the various jsimd_can*() functions
are called within the body of jpeg_start_*compress() and simd_support is
now thread-local (due to f579cc11b3), that
led to a situation in which simd_support was initialized in the first
thread but not the second.  The uninitialized value of simd_support is
0xFFFFFFFF, which the second thread interpreted to mean that it could
use any instruction set, and when it attempted to use AVX2 instructions
on a CPU that didn't support them, an illegal instruction error
occurred.

This issue was known to affect libvips.

This commit modifies the i386 and x86-64 SIMD dispatchers so that the
various jsimd_*() functions always call init_simd(), if simd_support is
uninitialized, prior to dispatching based on the value of simd_support.
Note that the other SIMD dispatchers don't need this, because only the
x86 SIMD extensions currently support multiple instruction sets.

This patch has been verified to be performance-neutral to within
+/- 0.4% with 32-bit and 64-bit code running on a 2.8 GHz Intel Xeon
W3530 and a 3.6 GHz Intel Xeon W2123.

Fixes #649
2023-02-02 10:23:41 -06:00
DRC
89ceac8c85 Decompress fuzzer: Fix uninitialized memory access
(regression introduced by fc01f4673b)

Oops.  In the process of migrating the fuzzers to the TurboJPEG 3 API,
I accidentally left out the code in decompress.cc that updates the width
and height based on the scaling factor (but I apparently included that
code in decompress_yuv.cc.)

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55573
2023-02-01 12:31:58 -06:00
DRC
a93f6a7a63 Build: Define THREAD_LOCAL even if !WITH_TURBOJPEG
The SIMD dispatchers use thread-local storage now as well, because of
f579cc11b3.
2023-02-01 11:58:30 -06:00
DRC
dd89ce6cd6 Build: Define THREAD_LOCAL even if !WITH_TURBOJPEG
The SIMD dispatchers use thread-local storage now as well, because of
f579cc11b3.
2023-02-01 11:54:09 -06:00
DRC
fd93d98a95 Fix i386 transform fuzzer build
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55447
2023-01-28 12:13:32 -06:00
DRC
0205c6e04c tjbench.c: Remove vestigial int overflow checks
Since tj3Alloc() now accepts a size_t argument rather than an int
argument, it is no longer necessary to check for signed integer overflow
in the C version of TJBench.
2023-01-28 12:10:48 -06:00
DRC
6c5caf30e2 Merge branch 'main' into dev 2023-01-27 18:30:11 -06:00
DRC
3b19db4e6e BUILDING.md: Specify install prefix for MinGW/Un*x
The default install prefix when building under MinGW is chosen based on
the needs of the official build system, which uses MSYS2 to generate
Windows installer packages that install under c:\libjpeg-turbo-gcc[64].
However, attempting to configure the build with that install prefix on
a Un*x machine causes a CMake error.

Fixes #641
2023-01-27 18:24:41 -06:00
DRC
427c304595 tjbench.c: Fix Windows build error
(regression introduced by d7790789a6)
2023-01-27 14:31:48 -06:00
DRC
fd8c4da0ac Bump revision to 2.1.90 to prepare for beta
+ acknowledge upcoming 2.1.5 release
2023-01-27 14:05:07 -06:00
DRC
9b3a8f3641 jcapimin.c: Revert changes made in fc01f467
Those changes worked around an innocuous UBSan warning that was
exposed by the new TurboJPEG 3 transform fuzz target, due to the fact
that tj3Transform() no longer rejects images with unknown subsampling
configurations.  That UBSan warning was a false positive, and attempting
to fix it introduced a buffer overrun triggered by a malformed input
image that causes jpeg_write_marker() to be called with datalen == 0.  I
suspect that the UBSan false positive was only reproducible on my local
machine, but I guess we'll see.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55413
2023-01-27 13:52:26 -06:00
DRC
d0015876ec Fix build if [CD]_LOSSLESS_SUPPORTED undefined
(regression introduced by fc01f4673b)
2023-01-27 13:38:00 -06:00
DRC
d7790789a6 tjbench.c: Clean up THROW_TJ*() macro usage
- Don't report which function was being called when a TurboJPEG error
  occurred, because the TurboJPEG error message already contains that
  information.

- Use THROW_TJG() for functions that report errors globally instead of
  through an instance handle.

- Use THROW_TJ() for the image I/O functions.

- Formatting tweaks
2023-01-27 13:37:55 -06:00
DRC
54f571f8fb TurboJPEG: Clean up/repurpose THROWI() macro
We already had a use case for two integer arguments, and the new use
cases benefit from two integer arguments as well.
2023-01-27 12:31:44 -06:00
DRC
8c57aad0a3 turbojpeg.c: Use THROWG() macro whenever possible 2023-01-27 12:19:16 -06:00
DRC
b94041390c TurboJPEG: Robustify JPEG header prefetching
In decompression and transform functions, use the libjpeg API state
rather than a TurboJPEG instance variable to determine whether
jpeg_mem_src_tj() and jpeg_read_header() have already been called by a
wrapper function.
2023-01-27 11:58:01 -06:00
DRC
db9f297f1c ChangeLog.md: Document TurboJPEG 3 API overhaul 2023-01-27 07:10:49 -06:00
DRC
96bc40c1b3 Implement arithmetic coding with 12-bit precision
This actually works and apparently always has worked.  It only failed
because the libjpeg code, which did not originally support arithmetic
coding, assumed that optimize_coding should always be TRUE for 12-bit
data precision.
2023-01-26 13:11:58 -06:00
DRC
fc01f4673b TurboJPEG 3 API overhaul
(ChangeLog update forthcoming)

- Prefix all function names with "tj3" and remove version suffixes from
  function names.  (Future API overhauls will increment the prefix to
  "tj4", etc., thus retaining backward API/ABI compatibility without
  versioning each individual function.)

- Replace stateless boolean flags (including TJ*FLAG_ARITHMETIC and
  TJ*FLAG_LOSSLESS, which were never released) with stateful integer
  parameters, the value of which persists between function calls.
  * Use parameters for the JPEG quality and subsampling as well, in
    order to eliminate the awkwardness of specifying function arguments
    that weren't relevant for lossless compression.
  * tj3DecompressHeader() now stores all relevant information about the
    JPEG image, including the width, height, subsampling type, entropy
    coding type, etc. in parameters rather than returning that
    information in its arguments.
  * TJ*FLAG_LIMITSCANS has been reimplemented as an integer parameter
    (TJ*PARAM_SCANLIMIT) that allows the number of scans to be
    specified.

- Use the const keyword for all pointer arguments to unmodified
  buffers, as well as for both dimensions of 2D pointers.  Addresses
  #395.

- Use size_t rather than unsigned long to represent buffer sizes, since
  unsigned long is a 32-bit type on Windows.  Addresses #24.

- Return 0 from all buffer size functions if an error occurs, rather
  than awkwardly trying to return -1 in an unsigned data type.

- Implement 12-bit and 16-bit data precision using dedicated
  compression, decompression, and image I/O functions/methods.
  * Suffix the names of all data-precision-specific functions with 8,
    12, or 16.
  * Because the YUV functions are intended to be used for video, they
    are currently only implemented with 8-bit data precision, but they
    can be expanded to 12-bit data precision in the future, if
    necessary.
  * Extend TJUnitTest and TJBench to test 12-bit and 16-bit data
    precision, using a new -precision option.
  * Add appropriate regression tests for all of the above to the 'test'
    target.
  * Extend tjbenchtest to test 12-bit and 16-bit data precision, and
    add separate 'tjtest12' and 'tjtest16' targets.
  * BufferedImage I/O in the Java API is currently limited to 8-bit
    data precision, since the BufferedImage class does not
    straightforwardly support higher data precisions.
  * Extend the PPM reader to convert 12-bit and 16-bit PBMPLUS files
    to grayscale or CMYK pixels, as it already does for 8-bit files.

- Properly accommodate lossless JPEG using dedicated parameters
  (TJ*PARAM_LOSSLESS, TJ*PARAM_LOSSLESSPSV, and TJ*PARAM_LOSSLESSPT),
  rather than using a flag and awkwardly repurposing the JPEG quality.
  Update TJBench to properly reflect whether a JPEG image is lossless.

- Re-organize the TJBench usage screen.

- Update the Java docs using Java 11, to improve the formatting and
  eliminate HTML frames.

- Use the accurate integer DCT algorithm by default for both
  compression and decompression, since the "fast" algorithm is a legacy
  feature, it does not pass the ISO compliance tests, and it is not
  actually faster on modern x86 CPUs.
  * Remove the -accuratedct option from TJBench and TJExample.

- Re-implement the 'tjtest' target using a CMake script that enables
  the appropriate tests, depending on the data precision and whether or
  not the Java API is part of the build.

- Consolidate the C and Java versions of tjbenchtest into one script.

- Consolidate the C and Java versions of tjexampletest into one script.

- Combine all initialization functions into a single function
  (tj3Init()) that accepts an integer parameter specifying the
  subsystems to initialize.

- Enable decompression scaling explicitly, using a new function/method
  (tj3SetScalingFactor()/TJDecompressor.setScalingFactor()), rather
  than implicitly using awkward "desired width"/"desired height"
  parameters.

- Introduce a new macro/constant (TJUNSCALED/TJ.UNSCALED) that maps to
  a scaling factor of 1/1.

- Implement partial image decompression, using a new function/method
  (tj3SetCroppingRegion()/TJDecompressor.setCroppingRegion()) and
  TJBench option (-crop).  Extend tjbenchtest to test the new feature.
  Addresses #1.

- Allow the JPEG colorspace to be specified explicitly when
  compressing, using a new parameter (TJ*PARAM_COLORSPACE).  This
  allows JPEG images with the RGB and CMYK colorspaces to be created.

- Remove the error/difference image feature from TJBench.  Identical
  images to the ones that TJBench created can be generated using
  ImageMagick with
  'magick composite <original_image> <output_image> -compose difference <diff_image>'

- Handle JPEG images with unknown subsampling types.  TJ*PARAM_SUBSAMP
  is set to TJ*SAMP_UNKNOWN (== -1) for such images, but they can still
  be decompressed fully into packed-pixel images or losslessly
  transformed (with the exception of lossless cropping.)  They cannot
  be partially decompressed or decompressed into planar YUV images.
  Note also that TJBench, due to its lack of support for imperfect
  transforms, requires that the subsampling type be known when
  rotating, flipping, or transversely transposing an image.  Addresses
  #436

- The Java version of TJBench now has identical functionality to the C
  version.  This was accomplished by (somewhat hackishly) calling the
  TurboJPEG C image I/O functions through JNI and copying the pixels
  between the C heap and the Java heap.

- Add parameters (TJ*PARAM_RESTARTROWS and TJ*PARAM_RESTARTBLOCKS) and
  a TJBench option (-restart) to allow the restart marker interval to
  be specified when compressing.  Eliminate the undocumented TJ_RESTART
  environment variable.

- Add a parameter (TJ*PARAM_OPTIMIZE), a transform option
  (TJ*OPT_OPTIMIZE), and a TJBench option (-optimize) to allow
  optimized baseline Huffman coding to be specified when compressing.
  Eliminate the undocumented TJ_OPTIMIZE environment variable.

- Add parameters (TJ*PARAM_XDENSITY, TJ*PARAM_DENSITY, and
  TJ*DENSITYUNITS) to allow the pixel density to be specified when
  compressing or saving a Windows BMP image and to be queried when
  decompressing or loading a Windows BMP image.  Addresses #77.

- Refactor the fuzz targets to use the new API.
  * Extend decompression coverage to 12-bit and 16-bit data precision.
  * Replace the awkward cjpeg12 and cjpeg16 targets with proper
    TurboJPEG-based compress12, compress12-lossless, and
    compress16-lossless targets

- Fix innocuous UBSan warnings uncovered by the new fuzzers.

- Implement previous versions of the TurboJPEG API by wrapping the new
  functions (tested by running the 2.1.x versions of TJBench, via
  tjbenchtest, and TJUnitTest against the new implementation.)
  * Remove all JNI functions for deprecated Java methods and implement
    the deprecated methods using pure Java wrappers.  It should be
    understood that backward API compatibility in Java applies only to
    the Java classes and that one cannot mix and match a JAR file from
    one version of libjpeg-turbo with a JNI library from another
    version.

- tj3Destroy() now silently accepts a NULL handle.

- tj3Alloc() and tj3Free() now return/accept void pointers, as malloc()
  and free() do.

- The image I/O functions now accept a TurboJPEG instance handle, which
  is used to transmit/receive parameters and to receive error
  information.

Closes #517
2023-01-25 19:09:34 -06:00
DRC
1a1ea4eeba Merge branch 'main' into dev 2023-01-25 12:28:42 -06:00
DRC
27f4ff80ce Java: Guard against int overflow in size methods
Because Java array sizes are ints, the various size methods in the TJ
class have int return values.  Thus, we have to guard against signed
int overflow at the JNI level, because the C functions can return sizes
greater than INT_MAX.

This also adds a test for TJ.planeWidth() and TJ.planeHeight(), in order
to validate 8a1526a442 in Java.
2023-01-25 12:21:35 -06:00
DRC
1485beaa49 turbojpeg.c: Fix UBSan warning
(introduced by previous commit)
2023-01-25 12:14:14 -06:00
DRC
8a1526a442 tjPlane*(): Guard against int overflow
tjPlaneWidth() and tjPlaneHeight() could overflow a signed int and
return a negative value if passed a width/height argument of INT_MAX and
a subsampling type for which the MCU block size is larger than 8x8.
2023-01-25 10:00:07 -06:00
DRC
52659f4f47 Merge branch 'main' into dev 2023-01-23 09:55:13 -06:00
DRC
edbb7e6d43 Java doc: TJ.pixelSize --> TJ.getPixelSize()
TJ.pixelSize isn't actually a thing.  Oops.
2023-01-23 09:50:29 -06:00
DRC
af1b4c8df4 TJBench: Unset TJ*OPT_CROP when disabling tiling
Otherwise, if the input image is a JPEG image, then an unnecessary
lossless transformation will be performed.
2023-01-21 18:31:20 -06:00
DRC
2aac545899 TJExample: Remove "underlying codec" references
(Oversight from 9a146f0f23)
2023-01-20 16:06:57 -06:00
DRC
7ab6222cff Merge branch 'main' into dev 2023-01-20 14:09:25 -06:00
DRC
0738305ec5 GitHub: Update to actions/checkout@v3
... to silence deprecation warning regarding Node.js 12 actions.
2023-01-20 13:41:25 -06:00
DRC
98a6455875 TJBench: Set TJ*OPT_PROGRESSIVE with -progressive
The documented behavior of the -progressive option is to use progressive
entropy coding in JPEG images generated by compression and transform
operations.  However, setting TJFLAG_PROGRESSIVE was insufficient to
accomplish that, because TJBench doesn't enable lossless transformation
if xformOpt == 0.
2023-01-20 13:23:00 -06:00
DRC
b99e7590b0 TJBench/Java: Fix parsing of quality ranges 2023-01-20 13:02:38 -06:00
DRC
28c2e60770 TJBench: Strictly check all non-boolean arguments
+ document that the value of -yuvpad must be a power of 2 (refer to
d260858395)
2023-01-20 13:02:38 -06:00
DRC
fb15efe94f TurboJPEG: More documentation improvements
- TJBench/TJUnitTest: Wordsmith command-line output

- Java: "decompress operations"="decompression operations"

- tjLoadImage(): Error message tweak

- Don't mention compression performance in the description of
  TJXOPT_PROGRESSIVE/TJTransform.OPT_PROGRESSIVE, because the image has
  already been compressed at that point.

(Oversights from 9a146f0f23)
2023-01-20 12:50:21 -06:00
DRC
6a060d8c95 TJCompressor.java: (C) header formatting tweak
(apparently borked by one of the previous merge commits)
2023-01-17 18:32:15 -06:00
DRC
c7c02d9288 Merge branch 'main' into dev 2023-01-17 18:31:31 -06:00
DRC
7ed186ed79 TJDecompressor.java: Exception message tweak
NO_ASSOC_ERROR is specific to JPEG source images, but the decompress()
methods can handle YUV source images as well.
2023-01-17 18:18:27 -06:00
DRC
08cbc23334 12-bit: Set alpha channel to 4095 rather than 255 2023-01-17 15:29:02 -06:00
DRC
155a8b0321 Merge branch 'main' into dev 2023-01-16 17:02:01 -06:00
DRC
0c0df2d0c7 TJDecompressor.java: "YUV" = "planar YUV"
(Oversight from 9a146f0f23)
2023-01-16 16:54:08 -06:00
DRC
22a6636852 Java: Don't allow int overflow in buf size methods
This is similar to the fix that 2a9e3bd743
applied to the C API.  We have to apply it separately at the JNI level
because the Java API always stores buffer sizes in 32-bit integers, and
the C buffer size functions could overflow an int when using 64-bit
code.  (NOTE: The Java API stores buffer sizes in 32-bit integers
because Java itself always uses 32-bit integers for array sizes.)  Since
Java don't allow no buffer overruns 'round here, this commit doesn't
change the ultimate outcome.  It just makes the inevitable exception
easier to diagnose.
2023-01-16 16:48:40 -06:00
DRC
d859232da3 TurboJPEG: Use 4:4:4 for lossless JPEG buf calcs 2023-01-14 18:27:37 -06:00
DRC
d4589f4f1c Merge branch 'main' into dev 2023-01-14 18:07:53 -06:00
DRC
94a2b95342 tjDecompressToYUV2: Use scaled dims for plane calc
The documented behavior of the function is to use decompression scaling
to generate the largest possible image that will fit within the desired
image dimensions.  Thus, if the desired image dimensions are larger than
the scaled image dimensions, then tjDecompressToYUV2() should use the
scaled image dimensions when computing the plane pointers and strides to
pass to tjDecompressToYUVPlanes().

Note that this bug was not previously detected, because tjunittest and
tjbench always passed the scaled image dimensions to
tjDecompressToYUV2().
2023-01-14 17:26:17 -06:00
DRC
9a146f0f23 TurboJPEG: Numerous documentation improvements
- Wordsmithing, formatting, and grammar tweaks

- Various clarifications and corrections, including specifying whether
  a particular buffer or image is used as a source or destination

- Accommodate/mention features that were introduced since the API
  documentation was created.

- For clarity, use "packed-pixel" to describe uncompressed
  source/destination images that are not planar YUV.

- Use "row" rather than "line" to refer to a single horizontal group of
  pixels or component values, for consistency with the libjpeg API
  documentation.  (libjpeg also uses "scanline", which is a more archaic
  term.)

- Use "alignment" rather than "padding" to refer to the number of bytes
  by which a row's width is evenly divisible.  This consistifies the
  documention of the YUV functions and tjLoadImage().  ("Padding"
  typically refers to the number of bytes added to each row, which is
  not the same thing.)

- Remove all references to "the underlying codec."  Although the
  TurboJPEG API originated as a cross-platform wrapper for the Intel
  Integrated Performance Primitives, Sun mediaLib, QuickTime, and
  libjpeg, none of those TurboJPEG implementations has been maintained
  since 2009.  Nothing would prevent someone from implementing the
  TurboJPEG API without libjpeg-turbo, but such an implementation would
  not necessarily have an "underlying codec."  (It could be fully
  self-contained.)

- Use "destination image" rather than "output image", for consistency,
  or describe the type of image that will be output.

- Avoid the term "image buffer" and instead use "byte buffer" to
  refer to buffers that will hold JPEG images, or describe the type of
  image that will be contained in the buffer.  (The Java documentation
  doesn't use "byte buffer", because the buffer arrays literally have
  "byte" in front of them, and since Java doesn't have pointers, it is
  not possible for mere mortals to store any other type of data in those
  arrays.)

- C: Use "unified" to describe YUV images stored in a single buffer, for
  consistency with the Java documentation.

- Use "planar YUV" rather than "YUV planar".  Is is our convention to
  describe images using {component layout} {colorspace/pixel format}
  {image function}, e.g. "packed-pixel RGB source image" or "planar YUV
  destination image."

- C: Document the TurboJPEG API version in which a particular function
  or macro was introduced, and reorder the backward compatibility
  function stubs in turbojpeg.h alphabetically by API version.

- C: Use Markdown rather than HTML tags, where possible, in the Doxygen
  comments.
2023-01-14 17:10:31 -06:00
DRC
b03ee8b835 TurboJPEG: Don't use backward compatibility macros
Macros from older versions of the TurboJPEG API are supported but not
documented, so using the current version of those macros makes the code
more readable.
2023-01-05 14:26:36 -06:00
DRC
d260858395 TurboJPEG: Ensure 'pad' arg is a power of 2
Because the PAD() macro can only handle powers of 2, this is a necessary
restriction (and a documented one, except in the case of
tjCompressFromYUV()-- oops.)  Failing to check the 'pad' argument
caused tjBufSizeYUV2() to return bogus results if 'pad' was less than 1
or otherwise not a power of 2.  tjEncodeYUV3() and tjDecodeYUV()
effectively treated a 'pad' value of 0 as unpadded, but that was subtle
and undocumented behavior.  tjCompressFromYUV() did not check whether
'pad' was a power of 2, so the strides passed to
tjCompressFromYUVPlanes() would have been incorrect if 'pad' was not a
power of 2.  That would not have caused tjCompressFromYUV() to overrun
the source buffer, as long as the calling application allocated the
buffer based on the return value of tjBufSizeYUV2() (which computes the
strides in the same manner as tjCompressFromYUV().)  However, if the
calling application attempted to initialize the source buffer using
correctly-computed strides, then it could have overrun its own
buffer in certain cases or produced incorrect JPEG images in others.

Realistically, there is no reason why an application would want to pass
a non-power-of-2 'pad' value to a TurboJPEG API function, so this commit
is about user-proofing the API rather than fixing any known issue.
2023-01-05 14:22:17 -06:00
DRC
0e63514214 Decomp: Fix color quant w/ 16-bit lossless JPEGs
(oversight from 2241434eb9)

This fixes segfaults and other issues that occurred when attempting to
decompress a 16-bit lossless JPEG image using color quantization
(which is used when decompressing to a GIF image.)
2022-12-21 16:51:22 -06:00
DRC
d6d6ac739f Win: Add jpeg16* functions to DLL module def files
(oversight from previous commit)
2022-12-16 14:15:02 -06:00
DRC
2241434eb9 16-bit lossless JPEG support 2022-12-16 13:57:03 -06:00
DRC
ad4e2ad86f CONTRIBUTING.md: Include lossless JPEG in policy 2022-12-07 16:01:55 -06:00
DRC
803523402f Merge branch 'main' into dev 2022-12-07 14:11:37 -06:00
DRC
dc4a93fab3 jpegtran: Fix FPE w/ -drop & -trim on corrupt JPEG
requant_comp() in transupp.c, a function that supports the jpegtran
-drop option, borrows code from the C quantization function in order to
re-quantize the coefficients from the dropped image.  However, the
function does not guard against the possibility that a corrupt source
image could inject quantization table values equal to 0, thus causing a
divide-by-zero error.  Since this error affected only jpegtran and not
any of the libraries (the tjTransform() function in the TurboJPEG API
does not expose the image drop feature), it did not represent a security
risk.  In fact, this commit does not change the output of jpegtran when
attempting to transform the aforementioned corrupt source image.  It
merely eliminates the floating point exception.  Like most issues of
this type, however, eliminating the error prevents it from hiding
legitimate security issues that may later be introduced.

Fixes #635
Fixes #636
2022-12-07 14:01:40 -06:00
DRC
5da86f7430 ChangeLog.md: List CVE ID fixed by 9120a247 2022-12-07 09:45:57 -06:00
DRC
7bb5cb560e ChangeLog.md: List CVE ID fixed by f35fd27e 2022-12-07 09:39:03 -06:00
DRC
0f047a5747 Merge branch 'main' into dev 2022-11-30 18:45:50 -06:00
DRC
7f2eb09d6e BUILDING.md: Add Arm64 iOS sim build instructions
Unfortunately, iOS builds cannot be used with the iOS simulator on Macs
with Apple silicon CPUs.  Even more unfortunately, universal binaries
can only have one slice for each CPU architecture, so it would not be
possible to add a dedicated Arm64 iOS simulator slice to the existing
libjpeg-turbo iOS binaries.  (It would be necessary to release a
separate package solely for the iOS simulator.)  Because the Arm Neon
SIMD extensions for libjpeg-turbo now use compiler intrinsics when
building with Xcode, it is easy to build libjpeg-turbo from source when
targeting Arm64-based Apple platforms.  Thus, for the moment, I have
chosen to document how to avoid the pothole rather than to fill it in.
2022-11-30 18:44:45 -06:00
DRC
e2a98701e4 turbojpeg.c: Fix build if !C_LOSSLESS_SUPPORTED 2022-11-30 11:06:37 -06:00
DRC
73ca9712e3 Merge branch 'main' into dev 2022-11-30 11:03:43 -06:00
DRC
403cfad611 djpeg.c: Fix build if !SAVE_MARKERS_SUPPORTED 2022-11-30 10:43:29 -06:00
DRC
c4105ba7ef turbojpeg.c: Fix build if !C_PROGRESSIVE_SUPPORTED 2022-11-30 10:41:32 -06:00
DRC
e7a248ebb7 Merge branch 'main' into dev 2022-11-29 01:08:27 -06:00
DRC
45cd2ded88 12-bit: Prevent RGB-to-YCC table overrun/underrun
cjpeg relies on the various file I/O modules to range-limit the input
samples, but no range limiting is performed by the
jpeg_write_scanlines() function itself.  With 8-bit samples, that isn't
a problem, because sample values > MAXJSAMPLE will overflow the data
type and wrap around to 0.  With 12-bit samples, however, it is possible
to pass sample values < 0 or > 4095 to jpeg_write_scanlines(), which
would cause the RGB-to-YCbCr color converter to underflow or overflow
the RGB-to-YCbCr conversion tables.  That issue has existed in libjpeg
all along.  This commit mitigates the issue by masking off all but the
lowest 12 bits of each 12-bit input sample prior to using the input
sample value to index the RGB-to-YCbCr conversion tables.

Fixes #633
2022-11-29 00:53:55 -06:00
DRC
8b9bc4b963 jconfig.h: Restore BITS_IN_JSAMPLE macro
Because of e8b40f3c2b, we now support
multiple data precisions in the same libjpeg API library, so
BITS_IN_JSAMPLE is no longer used to specify the data precision at build
time.  However, some downstream software expects the macro to be
defined.  Since 12-bit data precision is an opt-in feature that requires
explicitly calling 12-bit-specific libjpeg API functions and using
12-bit-specific data types, the unmodified portion of the libjpeg API
still behaves as if it were built for 8-bit precision, and JSAMPLE is
still literally an 8-bit data type.  Thus, it is correct to externally
define BITS_IN_JSAMPLE to 8 in jconfig.h.  Since the build system also
uses BITS_IN_JSAMPLE internally to build both 8-bit and 12-bit versions
of relevant modules, the definition of BITS_IN_JSAMPLE in jconfig.h is
now guarded by #ifndef BITS_IN_JSAMPLE.  (Hopefully that doesn't cause
any problems.)

Fixes #632
2022-11-23 16:35:58 -06:00
DRC
4afa4d3ee8 jconfig.h: Restore MEM_SRCDST_SUPPORTED macro
That macro has been defined in jconfig.h since libjpeg-turbo 1.3.x, so
it is possible that some downstream software conditions the use of the
jpeg_mem_*() functions on whether MEM_SRCDST_SUPPORTED is defined or
JPEG_LIB_VERSION >= 80 (as libjpeg-turbo 2.1.x and prior did
internally.)
2022-11-23 16:35:54 -06:00
DRC
140a1ea315 tjEncodeYUVPlanes(): Ignore TJFLAG_LOSSLESS
TJFLAG_LOSSLESS is irrelevant to planar YUV encoding, and setting the
flag caused tjEncode*() to fail with "Invalid lossless parameters"
because tjEncodeYUVPlanes() passes a JPEG quality value of -1 to
setCompDefaults().  This commit modifies setCompDefaults() so that it
takes no action related to the jpegQual parameter unless jpegQual >= 0.
2022-11-22 10:47:44 -06:00
DRC
382563a58c Build: Add missing tjbenchtest -arithmetic tests
... if WITH_JAVA=0.

(Oversight from 6002720c37)
2022-11-21 22:46:30 -06:00
DRC
98ff1fd103 TurboJPEG: Add lossless JPEG detection capability
Add a new TurboJPEG C API function (tjDecompressHeader4()) and Java API
method (TJDecompressor.getFlags()) that return the bitwise OR of any
flags that are relevant to the JPEG image being decompressed (currently
TJFLAG_PROGRESSIVE, TJFLAG_ARITHMETIC, TJFLAG_LOSSLESS, and their Java
equivalents.)  This allows a calling program to determine whether the
image being decompressed is a lossless JPEG image, which means that the
decompression scaling feature will not be available and that a
full-sized destination buffer should be allocated.

More specifically, this fixes a buffer overrun in TJBench, TJExample,
and the decompress* fuzz targets that occurred when attempting (in vain)
to decompress a lossless JPEG image with decompression scaling enabled.
2022-11-21 22:46:12 -06:00
DRC
b85b028d2b OSS-Fuzz: Fix argument error in cjpeg12 target
Smoothing can only be used with 4:2:0 subsampling.
2022-11-21 22:42:59 -06:00
DRC
db9dd93da4 Lossless: Fix innocuous UBSan warnings 2022-11-21 22:42:59 -06:00
DRC
07129256e0 OSS-Fuzz: Add fuzz target for lossless JPEG 2022-11-21 22:42:59 -06:00
DRC
1a31176e0c Merge branch 'main' into dev 2022-11-21 22:42:46 -06:00
DRC
74d5b168f7 Build: Update tjtest target dependencies 2022-11-21 22:41:46 -06:00
DRC
25ccad99a0 TurboJPEG: 8-bit lossless JPEG support 2022-11-16 15:57:25 -06:00
DRC
3fb10c35d8 Merge branch 'ijg.lossless' into dev
Lossless: Accommodate LJT colorspace/SIMD exts

In libjpeg-turbo, grayscale_convert() and null_convert() aren't the only
lossless color conversion algorithms.  We can also losslessly convert
RGB to and from any of the extended RGB colorspaces, and some platforms
have SIMD-accelerated null color conversion.

This commit also disallows RGB565 output in lossless mode, and it moves
the IsExtRGB() macro from cdjpeg.h to jpegint.h and repurposes it to
make jinit_color_converter() and jinit_color_deconverter() more
readable.
2022-11-16 12:35:40 -06:00
DRC
af618ffe09 Clean up the lossless JPEG feature
- Rename jpeg_simple_lossless() to jpeg_enable_lossless() and modify the
  function so that it stores the lossless parameters directly in the Ss
  and Al fields of jpeg_compress_struct rather than using a scan script.

- Move the cjpeg -lossless switch into "Switches for advanced users".

- Document the libjpeg API and run-time features that are unavailable in
  lossless mode, and ensure that all parameters, functions, and switches
  related to unavailable features are ignored or generate errors in
  lossless mode.

- Defer any action that depends on whether lossless mode is enabled
  until jpeg_start_compress()/jpeg_start_decompress() is called.

- Document the purpose of the point transform value.

- "Codec" stands for coder/decoder, so it is a bit awkward to say
  "lossless compression codec" and "lossless decompression codec".
  Use "lossless compressor" and "lossless decompressor" instead.

- Restore backward API/ABI compatibility with libjpeg v6b:

  * Move the new 'lossless' field from the exposed jpeg_compress_struct
    and jpeg_decompress_struct structures into the opaque
    jpeg_comp_master and jpeg_decomp_master structures, and allocate the
    master structures in the body of jpeg_create_compress() and
    jpeg_create_decompress().

  * Remove the new 'process' field from jpeg_compress_struct and
    jpeg_decompress_struct and replace it with the old
    'progressive_mode' field and the new 'lossless' field.

  * Remove the new 'data_unit' field from jpeg_compress_struct and
    jpeg_decompress_struct and replace it with a locally-computed
    data unit variable.

  * Restore the names of macros and fields that refer to DCT blocks, and
    document that they have a different meaning in lossless mode.  (Most
    of them aren't very meaningful in lossless mode anyhow.)

  * Remove the new alloc_darray() method from jpeg_memory_mgr and
    replace it with an internal macro that wraps the alloc_sarray()
    method.

  * Move the JDIFF* data types from jpeglib.h and jmorecfg.h into
    jpegint.h.

  * Remove the new 'codec' field from jpeg_compress_struct and
    jpeg_decompress_struct and instead reuse the existing internal
    coefficient control, forward/inverse DCT, and entropy
    encoding/decoding structures for lossless compression/decompression.

  * Repurpose existing error codes rather than introducing new ones.
    (The new JERR_BAD_RESTART and JWRN_MUST_DOWNSCALE codes remain,
    although JWRN_MUST_DOWNSCALE will probably be removed in
    libjpeg-turbo, since we have a different way of handling multiple
    data precisions.)

- Automatically enable lossless mode when a scan script with parameters
  that are only valid for lossless mode is detected, and document the
  use of scan scripts to generate lossless JPEG images.

- Move the sequential and shared Huffman routines back into jchuff.c and
  jdhuff.c, and document that those routines are shared with jclhuff.c
  and jdlhuff.c as well as with jcphuff.c and jdphuff.c.

- Move MAX_DIFF_BITS from jchuff.h into jclhuff.c, the only place where
  it is used.

- Move the predictor and scaler code into jclossls.c and jdlossls.c.

- Streamline register usage in the [un]differencers (inspired by similar
  optimizations in the color [de]converters.)

- Restructure the logic in a few places to reduce duplicated code.

- Ensure that all lossless-specific code is guarded by
  C_LOSSLESS_SUPPORTED or D_LOSSLESS_SUPPORTED and that the library can
  be built successfully if either or both of those macros is undefined.

- Remove all short forms of external names introduced by the lossless
  JPEG patch.  (These will not be needed by libjpeg-turbo, so there is
  no use cleaning them up.)

- Various wordsmithing, formatting, and punctuation tweaks

- Eliminate various compiler warnings.
2022-11-16 11:27:18 -06:00
DRC
918ace631e example.c: Fix compiler warning 2022-11-16 10:36:57 -06:00
DRC
766910e8b2 Merge branch 'ijg.lossless' into dev
Fix segfault when decomp lossless JPEG w/ restarts

The predict_process_restart() method in jpeg_lossless_decompressor was
unset, because we now use the start_pass() method in jpeg_inverse_dct
instead.  Thus, a segfault occurred when attempting to decompress a
lossless JPEG that contained restart markers.
2022-11-16 01:03:15 -06:00
DRC
b56e8b28ba Clean up the lossless JPEG feature
- Rename jpeg_simple_lossless() to jpeg_enable_lossless() and modify the
  function so that it stores the lossless parameters directly in the Ss
  and Al fields of jpeg_compress_struct rather than using a scan script.

- Move the cjpeg -lossless switch into "Switches for advanced users".

- Document the libjpeg API and run-time features that are unavailable in
  lossless mode, and ensure that all parameters, functions, and switches
  related to unavailable features are ignored or generate errors in
  lossless mode.

- Defer any action that depends on whether lossless mode is enabled
  until jpeg_start_compress()/jpeg_start_decompress() is called.

- Document the purpose of the point transform value.

- "Codec" stands for coder/decoder, so it is a bit awkward to say
  "lossless compression codec" and "lossless decompression codec".
  Use "lossless compressor" and "lossless decompressor" instead.

- Restore backward API/ABI compatibility with libjpeg v6b:

  * Move the new 'lossless' field from the exposed jpeg_compress_struct
    and jpeg_decompress_struct structures into the opaque
    jpeg_comp_master and jpeg_decomp_master structures, and allocate the
    master structures in the body of jpeg_create_compress() and
    jpeg_create_decompress().

  * Remove the new 'process' field from jpeg_compress_struct and
    jpeg_decompress_struct and replace it with the old
    'progressive_mode' field and the new 'lossless' field.

  * Remove the new 'data_unit' field from jpeg_compress_struct and
    jpeg_decompress_struct and replace it with a locally-computed
    data unit variable.

  * Restore the names of macros and fields that refer to DCT blocks, and
    document that they have a different meaning in lossless mode.  (Most
    of them aren't very meaningful in lossless mode anyhow.)

  * Remove the new alloc_darray() method from jpeg_memory_mgr and
    replace it with an internal macro that wraps the alloc_sarray()
    method.

  * Move the JDIFF* data types from jpeglib.h and jmorecfg.h into
    jpegint.h.

  * Remove the new 'codec' field from jpeg_compress_struct and
    jpeg_decompress_struct and instead reuse the existing internal
    coefficient control, forward/inverse DCT, and entropy
    encoding/decoding structures for lossless compression/decompression.

  * Repurpose existing error codes rather than introducing new ones.
    (The new JERR_BAD_RESTART and JWRN_MUST_DOWNSCALE codes remain,
    although JWRN_MUST_DOWNSCALE will probably be removed in
    libjpeg-turbo, since we have a different way of handling multiple
    data precisions.)

- Automatically enable lossless mode when a scan script with parameters
  that are only valid for lossless mode is detected, and document the
  use of scan scripts to generate lossless JPEG images.

- Move the sequential and shared Huffman routines back into jchuff.c and
  jdhuff.c, and document that those routines are shared with jclhuff.c
  and jdlhuff.c as well as with jcphuff.c and jdphuff.c.

- Move MAX_DIFF_BITS from jchuff.h into jclhuff.c, the only place where
  it is used.

- Move the predictor and scaler code into jclossls.c and jdlossls.c.

- Streamline register usage in the [un]differencers (inspired by similar
  optimizations in the color [de]converters.)

- Restructure the logic in a few places to reduce duplicated code.

- Ensure that all lossless-specific code is guarded by
  C_LOSSLESS_SUPPORTED or D_LOSSLESS_SUPPORTED and that the library can
  be built successfully if either or both of those macros is undefined.

- Remove all short forms of external names introduced by the lossless
  JPEG patch.  (These will not be needed by libjpeg-turbo, so there is
  no use cleaning them up.)

- Various wordsmithing, formatting, and punctuation tweaks

- Eliminate various compiler warnings.
2022-11-16 00:49:15 -06:00
DRC
6002720c37 TurboJPEG: Opt. enable arithmetic entropy coding 2022-11-15 23:38:55 -06:00
DRC
bc086c4427 Merge branch 'main' into dev 2022-11-15 23:38:47 -06:00
DRC
eb1fd4ad34 Build: Fix typo in tjtest target 2022-11-15 23:38:19 -06:00
DRC
ed73fdc9be Merge branch 'main' into dev 2022-11-15 21:28:01 -06:00
Erin Melucci
37dd973bef Win: Use wchar_t for copyright string in RC files
llvm-rc doesn't like the copyright symbol in the LegalCopyright string.

Possible solutions:
1. Replace the copyright symbol with "(C)".
2. Prefix the string literal with L, thus making it a wide character
   string.
3. Pass -c65001 to the resource compiler to enable the UTF-8 code page.

Option 2 is the least disruptive, since it doesn't change the behavior
of the official builds or require any build system modifications.

Closes #627
2022-11-15 21:12:54 -06:00
DRC
78a36f6dc3 Fix buffer overrun in 12-bit prog Huffman encoder
Regression introduced by 16bd984557 and
5b177b3cab

The pre-computed absolute values used in encode_mcu_AC_first() and
encode_mcu_AC_refine() were stored in a JCOEF (signed short) array.
When attempting to losslessly transform a specially-crafted malformed
12-bit JPEG image with a coefficient value of -32768 into a progressive
12-bit JPEG image, the progressive Huffman encoder attempted to store
the absolute value of -32768 in the JCOEF array, thus overflowing the
16-bit signed data type.  Therefore, at this point in the code:
8c5e78ce29/jcphuff.c (L889)
the absolute value was read as -32768, which caused the test at
8c5e78ce29/jcphuff.c (L896)
to fail, falling through to
8c5e78ce29/jcphuff.c (L908)
with an overly large value of r (46) that, when shifted left four
places, incremented, and passed to emit_symbol(), exceeded the maximum
index (255) for the derived code tables.  Fortunately, the buffer
overrun was fully contained within phuff_entropy_encoder, so the issue
did not generate a segfault or other user-visible errant behavior, but
it did cause a UBSan failure that was detected by OSS-Fuzz.

This commit introduces an unsigned JCOEF (UJCOEF) data type and uses it
to store the absolute values of DCT coefficients computed by the
AC_first_prepare() and AC_refine_prepare() methods.

Note that the changes to the Arm Neon progressive Huffman encoder
extensions cause signed 16-bit instructions to be replaced with
equivalent unsigned 16-bit instructions, so the changes should be
performance-neutral.

Based on:
bbf61c0382

Closes #628
2022-11-15 19:07:50 -06:00
DRC
aa3dd0bd29 TurboJPEG: Nix unneeded setDecodeDefaults ret val
The return value was inherited from setDecompDefaults() in
34dca05227, but it was never needed.
2022-11-15 15:41:07 -06:00
DRC
1926ab4186 ChangeLog.md: Multi-precision feature wordsmithing
- Because of b5a9ef64ea, "by default" is
  no longer applicable.  (12-bit-per-component JPEG support is now part
  of the core libjpeg-turbo functionality and cannot be disabled.)

- Change awkward "can be used to enable the creation of" to less awkward
  "can be used to create".
2022-11-14 16:31:41 -06:00
DRC
99866007c6 jclhuff.c: Fix innocuous UBSan left shift warning
This applies the progressive Huffman encoder fixes from
aa769febf2 and
d65e768b2e to the new lossless mode
Huffman encoder.
2022-11-14 16:26:41 -06:00
DRC
8fc9356581 usage.txt: Move -precision into advanced switches
(to match cjpeg man page and usage screen)
2022-11-14 16:11:30 -06:00
DRC
97772cba65 Merge branch 'ijg.lossless' into dev
Refer to #402
2022-11-14 15:36:25 -06:00
DRC
217d1a75f5 Clean up the lossless JPEG feature
- Rename jpeg_simple_lossless() to jpeg_enable_lossless() and modify the
  function so that it stores the lossless parameters directly in the Ss
  and Al fields of jpeg_compress_struct rather than using a scan script.

- Move the cjpeg -lossless switch into "Switches for advanced users".

- Document the libjpeg API and run-time features that are unavailable in
  lossless mode, and ensure that all parameters, functions, and switches
  related to unavailable features are ignored or generate errors in
  lossless mode.

- Defer any action that depends on whether lossless mode is enabled
  until jpeg_start_compress()/jpeg_start_decompress() is called.

- Document the purpose of the point transform value.

- "Codec" stands for coder/decoder, so it is a bit awkward to say
  "lossless compression codec" and "lossless decompression codec".
  Use "lossless compressor" and "lossless decompressor" instead.

- Restore backward API/ABI compatibility with libjpeg v6b:

  * Move the new 'lossless' field from the exposed jpeg_compress_struct
    and jpeg_decompress_struct structures into the opaque
    jpeg_comp_master and jpeg_decomp_master structures, and allocate the
    master structures in the body of jpeg_create_compress() and
    jpeg_create_decompress().

  * Remove the new 'process' field from jpeg_compress_struct and
    jpeg_decompress_struct and replace it with the old
    'progressive_mode' field and the new 'lossless' field.

  * Remove the new 'data_unit' field from jpeg_compress_struct and
    jpeg_decompress_struct and replace it with a locally-computed
    data unit variable.

  * Restore the names of macros and fields that refer to DCT blocks, and
    document that they have a different meaning in lossless mode.  (Most
    of them aren't very meaningful in lossless mode anyhow.)

  * Remove the new alloc_darray() method from jpeg_memory_mgr and
    replace it with an internal macro that wraps the alloc_sarray()
    method.

  * Move the JDIFF* data types from jpeglib.h and jmorecfg.h into
    jpegint.h.

  * Remove the new 'codec' field from jpeg_compress_struct and
    jpeg_decompress_struct and instead reuse the existing internal
    coefficient control, forward/inverse DCT, and entropy
    encoding/decoding structures for lossless compression/decompression.

  * Repurpose existing error codes rather than introducing new ones.
    (The new JERR_BAD_RESTART and JWRN_MUST_DOWNSCALE codes remain,
    although JWRN_MUST_DOWNSCALE will probably be removed in
    libjpeg-turbo, since we have a different way of handling multiple
    data precisions.)

- Automatically enable lossless mode when a scan script with parameters
  that are only valid for lossless mode is detected, and document the
  use of scan scripts to generate lossless JPEG images.

- Move the sequential and shared Huffman routines back into jchuff.c and
  jdhuff.c, and document that those routines are shared with jclhuff.c
  and jdlhuff.c as well as with jcphuff.c and jdphuff.c.

- Move MAX_DIFF_BITS from jchuff.h into jclhuff.c, the only place where
  it is used.

- Move the predictor and scaler code into jclossls.c and jdlossls.c.

- Streamline register usage in the [un]differencers (inspired by similar
  optimizations in the color [de]converters.)

- Restructure the logic in a few places to reduce duplicated code.

- Ensure that all lossless-specific code is guarded by
  C_LOSSLESS_SUPPORTED or D_LOSSLESS_SUPPORTED and that the library can
  be built successfully if either or both of those macros is undefined.

- Remove all short forms of external names introduced by the lossless
  JPEG patch.  (These will not be needed by libjpeg-turbo, so there is
  no use cleaning them up.)

- Various wordsmithing, formatting, and punctuation tweaks

- Eliminate various compiler warnings.
2022-11-14 14:55:04 -06:00
DRC
b5a9ef64ea Don't allow 12-bit JPEG support to be disabled
In libjpeg-turbo 2.1.x and prior, the WITH_12BIT CMake variable was used
to enable 12-bit JPEG support at compile time, because the libjpeg API
library could not handle multiple JPEG data precisions at run time.  The
initial approach to handling multiple JPEG data precisions at run time
(7fec5074f9) created a whole new API,
library, and applications for 12-bit data precision, so it made sense to
repurpose WITH_12BIT to allow 12-bit data precision to be disabled.
e8b40f3c2b made it so that the libjpeg API
library can handle multiple JPEG data precisions at run time via a
handful of straightforward API extensions.  Referring to
6c2bc901e2, it hasn't been possible to
build libjpeg-turbo with both forward and backward libjpeg API/ABI
compatibility since libjpeg-turbo 1.4.x.  Thus, whereas we retain full
backward API/ABI compatibility with libjpeg v6b-v8, forward libjpeg
API/ABI compatibility ceased being realistic years ago, so it no longer
makes sense to provide compile-time options that give a false sense of
forward API/ABI compatibility by allowing some (but not all) of our
libjpeg API extensions to be disabled.  Such options are difficult to
maintain and clutter the code with #ifdefs.
2022-11-13 13:38:48 -06:00
DRC
9ca7919a40 OSS-Fuzz: Fix bug in the new cjpeg12 fuzzer
cjpeg doesn't accept image format arguments other than -targa (it
auto-detects the others), and since Targa images aren't supported with
12-bit precision, we don't need a second pass.
2022-11-07 10:39:03 -06:00
DRC
bf01ed2fbc Fix build when SIMD extensions are disabled
(Broken by previous commit)
2022-11-04 13:35:03 -05:00
DRC
e8b40f3c2b Vastly improve 12-bit JPEG integration
The Gordian knot that 7fec5074f9 attempted
to unravel was caused by the fact that there are several
data-precision-dependent (JSAMPLE-dependent) fields and methods in the
exposed libjpeg API structures, and if you change the exposed libjpeg
API structures, then you have to change the whole API.  If you change
the whole API, then you have to provide a whole new library to support
the new API, and that makes it difficult to support multiple data
precisions in the same application.  (It is not impossible, as example.c
demonstrated, but using data-precision-dependent libjpeg API structures
would have made the cjpeg, djpeg, and jpegtran source code hard to read,
so it made more sense to build, install, and package 12-bit-specific
versions of those applications.)

Unfortunately, the result of that initial integration effort was an
unreadable and unmaintainable mess, which is a problem for a library
that is an ISO/ITU-T reference implementation.  Also, as I dug into the
problem of lossless JPEG support, I realized that 16-bit lossless JPEG
images are a thing, and supporting yet another version of the libjpeg
API just for those images is untenable.

In fact, however, the touch points for JSAMPLE in the exposed libjpeg
API structures are minimal:

  - The colormap and sample_range_limit fields in jpeg_decompress_struct
  - The alloc_sarray() and access_virt_sarray() methods in
    jpeg_memory_mgr
  - jpeg_write_scanlines() and jpeg_write_raw_data()
  - jpeg_read_scanlines() and jpeg_read_raw_data()
  - jpeg_skip_scanlines() and jpeg_crop_scanline()
    (This is subtle, but both of those functions use JSAMPLE-dependent
    opaque structures behind the scenes.)

It is much more readable and maintainable to provide 12-bit-specific
versions of those six top-level API functions and to document that the
aforementioned methods and fields must be type-cast when using 12-bit
samples.  Since that eliminates the need to provide a 12-bit-specific
version of the exposed libjpeg API structures, we can:

  - Compile only the precision-dependent libjpeg modules (the
    coefficient buffer controllers, the colorspace converters, the
    DCT/IDCT managers, the main buffer controllers, the preprocessing
    and postprocessing controller, the downsampler and upsamplers, the
    quantizers, the integer DCT methods, and the IDCT methods) for
    multiple data precisions.
  - Introduce 12-bit-specific methods into the various internal
    structures defined in jpegint.h.
  - Create precision-independent data type, macro, method, field, and
    function names that are prefixed by an underscore, and use an
    internal header to convert those into precision-dependent data
    type, macro, method, field, and function names, based on the value
    of BITS_IN_JSAMPLE, when compiling the precision-dependent libjpeg
    modules.
  - Expose precision-dependent jinit*() functions for each of the
    precision-dependent libjpeg modules.
  - Abstract the precision-dependent libjpeg modules by calling the
    appropriate precision-dependent jinit*() function, based on the
    value of cinfo->data_precision, from top-level libjpeg API
    functions.
2022-11-04 12:30:33 -05:00
DRC
6c2bc901e2 Don't allow disabling in-memory src/dest managers
By default, libjpeg-turbo 1.3.x and later have enabled the in-memory
source/destination manager functions from libjpeg v8 when emulating the
libjpeg v6b or v7 API/ABI, which has allowed operating system
distributors to provide those functions without adopting the
backward-incompatible libjpeg v8 API/ABI.

Prior to libjpeg-turbo 1.5.x, it made sense to allow users to disable
the in-memory source/destination manager functions at build time and
thus retain both backward and forward API/ABI compatibility relative to
libjpeg v6b or v7.  Since then, however, we have introduced several new
libjpeg API functions that break forward API/ABI compatibility, so it no
longer makes sense to allow the in-memory source/destination managers to
be disabled.  libjpeg-turbo only claims to be
backward-API/ABI-compatible, i.e. to allow applications built against
libjpeg or an older version of libjpeg-turbo to work properly with the
current version of libjpeg-turbo.
2022-11-03 15:22:19 -05:00
DRC
664b64a9ac Merge branch 'main' into dev 2022-11-03 14:25:35 -05:00
DRC
4f7a8afbb7 Build: Fix issues w/ Ninja Multi-Config generator
- Fix an issue whereby a build with ENABLE_SHARED=0 could not be
  installed when using the Ninja Multi-Config CMake generator.

- Fix an issue whereby a Windows installer could not be built when using
  the Ninja Multi-Config CMake generator.

- Fix an issue whereby the Java regression tests failed when using the
  Ninja Multi-Config CMake generator.

Based on:
4f169deeb0

Closes #626
2022-11-03 14:23:55 -05:00
DRC
8c5e78ce29 Build: Document SO_AGE and TURBOJPEG_SO_AGE vars 2022-11-03 14:23:03 -05:00
DRC
8917c54877 ChangeLog.md: Add colons to sub-headers
For some reason, I failed to add a colon to the "Significant changes
relative to 2.1 beta1" sub-header, and the mistake propagated from
there.
2022-11-03 14:20:22 -05:00
DRC
cb3642cb0b Bump version to 2.1.5 to prepare for new commits 2022-11-03 12:23:11 -05:00
DRC
ec6e451d05 Lossless JPEG support: Add copyright attributions
Referring to
https://github.com/libjpeg-turbo/libjpeg-turbo/issues/402#issuecomment-768348440
and
https://github.com/libjpeg-turbo/libjpeg-turbo/issues/402#issuecomment-770221584

Ken Murchison clarified that it was his intent to release the lossless
JPEG patch under the IJG License and that adding his name to the
copyright headers would be sufficient to acknowledge that any
derivatives are based on his work.
2022-10-21 16:53:53 -05:00
DRC
2df43f51f1 Lossless JPEG support: Fix build
(Modern compilers require function prototypes.)
2022-10-21 16:32:34 -05:00
Ken Murchison
2e8360e061 IJG's JPEG software v6b with lossless JPEG support
Patch obtained from:
https://sourceforge.net/projects/jpeg/files/ftp.oceana.com

Author date taken from original announcement and timestamp of patch
tarball:
https://groups.google.com/g/comp.protocols.dicom/c/rrkP8BxoMRk/m/Ij4dfprggp8J
2022-10-21 13:42:59 -05:00
DRC
4d269d7cd5 Merge branch 'main' into dev 2022-10-21 12:22:28 -05:00
DRC
51f1924e77 wizard.txt: Clarify scan script restrictions
The Wallace paper is not entirely clear on these restrictions, and the
spec itself requires some digging.

Closes #624
2022-10-21 12:20:41 -05:00
DRC
5acd9f2061 Merge branch 'main' into dev 2022-10-04 12:58:11 -05:00
DRC
eb0a024af2 Remove redundant jconfigint.h #includes
Because of 607b668ff9, jconfigint.h is
included by jinclude.h.
2022-10-04 12:51:52 -05:00
DRC
543bfc25f5 Merge branch 'main' into dev 2022-10-03 21:38:15 -05:00
DRC
f579cc11b3 Make SIMD capability variables thread-local ...
... on platforms that support TLS, which should include all
currently-supported platforms
(https://libjpeg-turbo.org/Documentation/OfficialBinaries)

Addresses a concern raised in #87

Although it is still my opinion that the data race in init_simd() was
innocuous, we can now fix it for free thanks to
ae87a95861, so why not?
2022-10-03 21:36:21 -05:00
DRC
2fd634b833 Merge branch 'main' into dev 2022-09-12 23:36:34 -05:00
DRC
2cad2169ae BUILDING.md: Acknowledge RHEL 9 2022-09-12 21:54:35 -05:00
DRC
b3d3cbf43d JNI: Remove deprecated methods
(oversight from 931884e78d)
2022-09-12 14:41:34 -05:00
DRC
fdfba4957c Merge branch 'main' into dev 2022-09-02 15:11:25 -05:00
DRC
c5db99e1aa GitHub Actions: Specify Big Sur for macOS build
The Catalina hosted runner is now fully deprecated.
2022-09-02 14:48:58 -05:00
Kornel
fd56921259 Merge commit '8162eddf041e0be26f5c671bb6528723c55fed9d'
* commit '8162eddf041e0be26f5c671bb6528723c55fed9d': (24 commits)
  Fix issues w/ partial img decompr + buf img mode
  Re-fix buf img mode decompr err w/short prog JPEGs
  jdcoefct.c: Fix signed/unsigned mismatch VC++ wrng
  Fix buf image mode decompr err w/ short prog JPEGs
  PowerPC: Detect AltiVec support on OS X
  tjDecompressHeader3(): Accept tables-only streams
  Fix build if UPSAMPLE_MERGING_SUPPORTED undefined
  Build: Don't enable Loongson MMI with MIPS R6+
  MinGW: Fix str*casecmp() macro redef. warning
  OSS-Fuzz: '.' --> '_' in fuzzer suffix
  Don't install libturbojpeg.pc if WITH_TURBOJPEG=0
  Fix non-SIMD alignment if void* bigger than double
  OSS-Fuzz: Allow fuzzer suffix to be specified
  CI: Un-integrate CIFuzz
  BUILDING.md: Generify PowerTools repo advice
  Build: Don't set DEFAULT_FLOATTEST for x86 MSVC
  Build/Win: Fix CMake warning when WITH_TURBOJPEG=0
  Win: Fix build with Visual Studio 2010
  Link Sponsor button to GitHub Sponsors ...
  example.txt: Fix a typo
  ...
2022-08-15 02:46:09 +01:00
Kornel
a2d2907ff0 Fix env var name typo 2022-08-15 02:13:17 +01:00
DRC
513f9e6628 Merge branch 'main' into dev 2022-08-09 04:27:33 -05:00
DRC
8162eddf04 Fix issues w/ partial img decompr + buf img mode
Fixes #611
2022-08-08 16:03:55 -05:00
DRC
931884e78d Java: Remove deprecated fields, ctors, and methods
Most of these have been deprecated since libjpeg-turbo 1.4.x.
It's time.
2022-08-08 15:41:01 -05:00
DRC
280784f7ab Merge branch 'main' into dev 2022-08-08 15:07:45 -05:00
DRC
2e136a7190 Re-fix buf img mode decompr err w/short prog JPEGs
This commit reverts 4dbc293125 and
9f8f683e74 (the previous two commits) and
fixes #613 the correct way.  The crux of the issue wasn't the size of
the whole_image virtual array but rather that, since last_iMCU_row is
unsigned, (last_iMCU_row - 1) wrapped around to 0xFFFFFFFF when
last_iMCU_row was 0.  This caused the interblock smoothing algorithm
introduced in 6d91e950c8 to erroneously
try to access the next two iMCU rows, neither of which existed.  The
first attempt at a fix (4dbc293125)
exposed a NULL dereference, detected by OSS-Fuzz, that occurred when
attempting to decompress a specially-crafted malformed JPEG image to a
YUV buffer using tjDecompressToYUV*() with 1/4 IDCT scaling.

Fixes #613 (again)
Also fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49898
2022-08-08 15:06:56 -05:00
DRC
f627319258 Merge branch 'main' into dev 2022-08-07 14:16:28 -05:00
DRC
9f8f683e74 jdcoefct.c: Fix signed/unsigned mismatch VC++ wrng
(introduced by previous commit)
2022-08-07 14:15:03 -05:00
DRC
9a60181b3d Merge branch 'main' into dev 2022-08-07 13:48:31 -05:00
DRC
4dbc293125 Fix buf image mode decompr err w/ short prog JPEGs
Regression introduced by 6d91e950c8

Because we're now using a 5x5 smoothing window when decompressing
progressive JPEG images, we need to ensure that the whole_image virtual
array contains at least five rows.  Previously that was not always the
case unless the progressive JPEG image being decompressed had at least
five iMCU rows.  Since an iMCU has a height of (8 * the vertical
sampling factor), attempting to decompress 4:2:2 and 4:4:4 images <= 32
pixels in height or 4:2:0 images <= 64 pixels in height triggered a
JERR_BAD_VIRTUAL_ACCESS error in decompress_smooth_data(), because
access_rows exceeded the number of rows in the virtual array.

Fixes #613
2022-08-07 13:38:47 -05:00
DRC
fc224c4889 Merge branch 'main' into dev 2022-07-07 13:11:05 -05:00
Donovan Watteau
59337a67b1 PowerPC: Detect AltiVec support on OS X
libjpeg-turbo's AltiVec SIMD extensions previously assumed that AltiVec
instructions were available on all Power Macs that supported OS X 10.4
"Tiger" (the earliest version of OS X that libjpeg-turbo has ever
supported), but Tiger can actually run on PowerPC G3 processors, which
lack AltiVec instructions.  This commit enables run-time detection of
AltiVec instructions on OS X/PowerPC systems if AltiVec instructions are
not force-enabled at compile time (using -maltivec).  This allows the
same build of libjpeg-turbo to support G3, G4, and G5 Power Macs.

Closes #609
2022-07-07 13:01:11 -05:00
DRC
8a3b0f70d2 Implement 12-bit-specific error/warn/trace macros
The macros in jerror.h refer to j_common_ptr, so it is unfortunately
necessary to introduce a 12-bit-specific version of that header file
(j12error.h) with 12-bit specific ERREXIT*(), WARNMS*(), and
TRACEMS*() macros.  (The message table is still shared between 8-bit and
12-bit implementations.)

Fixes #607
2022-06-24 15:36:28 -05:00
Jon Craton
08978e58db Update quant-table help
Update cjpeg -help for quant-table entry to include 3 additional tables listed in README-mozilla.txt and indicate the default table.
2022-06-24 21:20:21 +01:00
DRC
aa5a359945 Merge branch 'main' into dev 2022-06-24 14:21:33 -05:00
DRC
ba22c0f76d tjDecompressHeader3(): Accept tables-only streams
Inspired by:
b3b15cfe74

Closes #604
Closes #605
2022-06-24 14:10:44 -05:00
DRC
225781aff9 jchuff.c: Clean up aadd60ae + add code comments
Based on:
4d73f52032
184f10703e

Refer to #602
2022-06-14 15:15:34 -05:00
DRC
faa7c74aef ChangeLog.md: Acknowledge 2.1.4 release 2022-05-31 13:37:05 -05:00
Felix Hanau
aadd60ae49 Speed up computation of optimal Huffman tables
Closes #602
2022-05-31 13:37:00 -05:00
DRC
0000dadf17 Merge branch 'main' into dev 2022-05-27 12:15:04 -05:00
DRC
a405519e96 Fix build if UPSAMPLE_MERGING_SUPPORTED undefined
Although it is uncommon, some downstream implementations undefine one or
more of the *_SUPPORTED macros in jmorecfg.h in order to reduce the size
of the library.  In the interest of maintaining backward compatibility
with libjpeg, this is still a supported use case.

Regression introduced by 9120a24743

Based on:
74c4d032f0

Closes #601
2022-05-27 11:59:56 -05:00
Jiaxun Yang
fac8381441 Build: Don't enable Loongson MMI with MIPS R6+
MIPS R6 removed some instructions, so Loongson MMI cannot be built with
MIPS R6+ toolchains.

Closes #598
2022-05-24 09:25:55 -05:00
Kornel
5c6a0f0971 Update to libjpeg-turbo 2.1.3 2022-05-23 16:06:07 +01:00
Kornel
5e797fa699 Merge tag '2.1.3' into master-moz
* tag '2.1.3': (56 commits)
  Neon/AArch64: Explicitly unroll quant loop w/Clang
  Neon/AArch64: Fix/suppress UBSan warnings
  Neon/AArch64: Accelerate Huffman encoding
  AppVeyor: Test strict MSVC compiler warnings
  Eliminate incompatible pointer type warnings
  MSVC: Eliminate int conversion warnings (C4244)
  MSVC: Eliminate C4996 warnings in API libs
  BUILDING.md: Clarify that Ninja works with Windows
  BUILDING.md: Remove NASM RPM rebuild instructions
  BUILDING.md: Document NASM/Yasm path variables
  "YASM" = "Yasm"
  Build: Fix Neon capability detection w/ MSVC
  Ensure that strncpy() dest strings are terminated
  Eliminate unnecessary JFREAD()/JFWRITE() macros
  Build: Embed version/API/(C) info in MSVC DLLs
  Fix segv w/ h2v2 merged upsamp, jpeg_crop_scanline
  TJBench: Remove innocuous always-true condition
  GitHub Actions: Specify Catalina for macOS build
  Fix -Wpedantic compiler warnings
  Eliminate non-ANSI C compatibility macros
  ...
2022-05-23 16:04:06 +01:00
DRC
0f5d31e62f Merge branch 'main' into dev 2022-04-28 20:04:53 -05:00
modbw
290ddbf71a MinGW: Fix str*casecmp() macro redef. warning
MinGW defines strcasecmp() and strncasecmp() as macros in string.h if
__CRT__NO_INLINE is defined, which will be the case when including any
of the Win32 API headers.

Closes #594
2022-04-28 20:02:28 -05:00
DRC
b98dabac24 Merge branch 'main' into dev 2022-04-27 12:38:58 -05:00
DRC
9171fd4bde OSS-Fuzz: '.' --> '_' in fuzzer suffix
Referring to https://github.com/google/oss-fuzz/issues/7575, if the
fuzzer suffix contains periods, it can cause ClusterFuzz to misinterpret
the file extension of the fuzzer executables and thus misidentify them.
2022-04-27 12:34:28 -05:00
DRC
d0e7c4548a Don't install libturbojpeg.pc if WITH_TURBOJPEG=0
Fixes #593
2022-04-18 11:34:57 -05:00
Alex Richardson
dfc63d42ee Fix non-SIMD alignment if void* bigger than double
When building without the SIMD extensions, memory allocations are
currently aligned to sizeof(double).  However, this may be insufficient
on architectures such as Arm Morello or 64-bit CHERI-RISC-V where
pointers require 16-byte rather than 8-byte alignment.  This patch
causes memory allocations to be aligned to
MAX(sizeof(void *), sizeof(double)) when building without the SIMD
extensions.

(NOTE: With C11 we could instead use alignof(max_align_t), but C89
compatibility is still necessary in libjpeg-turbo.)

Closes #587
2022-04-12 13:53:56 -05:00
DRC
82081337a0 Merge branch 'main' into dev 2022-04-06 11:16:09 -05:00
DRC
67cb059046 OSS-Fuzz: Allow fuzzer suffix to be specified
This facilitates fuzzing multiple branches of the code.
2022-04-06 11:15:54 -05:00
DRC
5c8cac97c0 CI: Un-integrate CIFuzz
Referring to the conversation in
https://github.com/google/oss-fuzz/issues/7479 and #559, there was a
misunderstanding regarding how CIFuzz works.  It cannot be used to fuzz
arbitrary PRs or code branches, and it has a 90-day delay in downloading
corpora from OSS-Fuzz.  That makes it unsuitable for libjpeg-turbo.
2022-04-06 10:58:53 -05:00
DRC
89a369dec1 Merge branch 'main' into dev 2022-03-31 10:33:26 -05:00
DRC
df3c3dcb9b BUILDING.md: Generify PowerTools repo advice
This advice applies to CentOS Stream as well as to popular CentOS 8
replacements, such as Rocky Linux and AlmaLinux.
2022-03-31 10:28:17 -05:00
DRC
1b9edb5caf Build: Fix 12-bit FP tests w/ 32-bit builds
With x86-64 builds, the default value of FLOATTEST works with both the
8-bit-per-sample and 12-bit-per-sample flavors of the libjpeg API
library.  However, that is not the case with x86 builds.  Thus, we need
separate 8-bit-per-sample and 12-bit-per-sample FLOATTEST variables.
2022-03-11 17:41:18 -06:00
DRC
cb715fe1ae example.c: Fix compiler warning with GCC 4.4.7 2022-03-11 17:36:05 -06:00
DRC
ebd1930207 GitHub Actions: "linux-12bit" --> "linux-no12bit"
This job tests the non-default value of WITH_12BIT, which is now 0
instead of 1.
2022-03-11 17:36:05 -06:00
DRC
263386c23a Merge branch 'main' into dev 2022-03-11 17:35:59 -06:00
DRC
2ee7264d40 Build: Don't set DEFAULT_FLOATTEST for x86 MSVC
Newer versions of the 32-bit x86 Visual Studio compiler produce results
compatible with FLOATTEST=no-fp-contract, so we can no longer
intelligently set a default FLOATTEST value for that platform.
2022-03-11 17:32:58 -06:00
DRC
30cba2a2f8 Build/Win: Fix CMake warning when WITH_TURBOJPEG=0
When 12-bit-per-component JPEG support is enabled (WITH_12BIT=1) or the
TurboJPEG API library and associated test programs are disabled
(WITH_TURBOJPEG=0), the Windows installer target should not depend on
the turbojpeg, turbojpeg-static, and tjbench targets.
2022-03-11 11:55:50 -06:00
DRC
a014845403 Win: Fix build with Visual Studio 2010
(broken by 607b668ff9)

- Visual Studio 2010 apparently doesn't have the snprintf() inline
  function, so restore the macro that emulates that function using
  _snprintf_s().

- Explicitly include errno.h in strtest.c, since jinclude.h doesn't
  include it when building with Visual Studio.
2022-03-11 11:19:40 -06:00
DRC
b3ae777964 Fix in-tree builds
(oops)
2022-03-10 23:13:43 -06:00
DRC
a32038e3b3 Fix formatting issues detected by checkstyle 2022-03-10 23:10:12 -06:00
DRC
7fec5074f9 Support 8-bit & 12-bit JPEGs using the same build
Partially implements #199

This commit also implements a request from #178 (the ability to compile
the libjpeg example as a standalone program.)
2022-03-10 22:56:17 -06:00
DRC
fc562d11f0 Bump version to 2.2 alpha1 ...
... to prepare for new features
2022-03-10 22:56:17 -06:00
DRC
f3c716a2bc Link Sponsor button to GitHub Sponsors ...
... instead of PayPal.
2022-03-10 22:31:20 -06:00
DRC
6f1534d618 example.txt: Fix a typo 2022-03-09 12:58:55 -06:00
DRC
9abeff46d8 Remove extraneous #include directives
jinclude.h already includes stdio.h, stdlib.h, and string.h.
2022-03-09 11:49:27 -06:00
DRC
932b5bb0d5 IJG dox: Wordsmithing and formatting tweaks
- Remove the section in libjpeg.txt that advised against building
  libjpeg as a shared library.  We obviously do not follow that advice,
  and libjpeg-turbo does guarantee backward ABI compatibility in our
  libjpeg API library, even though libjpeg did not and does not.
  (Future expansion of our libjpeg API library, if necessary, will be
  accomplished using get/set functions that store the new parameters
  in the opaque master structs.  Refer to
  db2986c96f.)

- Unmention install.txt, which was never relevant to libjpeg-turbo and
  was removed in v1.3 (6f96153c67).

- Remove extraneous spaces.

- Document the fact that TWO_FILE_COMMANDLINE must be defined in order
  to use the two-file interface with cjpeg, djpeg, jpegtran, and
  wrjpgcom.  libjpeg-turbo never enables that interface by default.
2022-03-09 11:49:27 -06:00
Adam Fontenot
e8df8a2d63 Fix broken test jpegtran-*-420-islow-ari 2022-03-09 12:03:31 +00:00
DRC
fdab4a7af4 Progs: Eliminate obsolete Mac ccommand() interface
ccommand() was a 1990s-vintage hack for running console applications
without a console.  It doesn't exist in any modern macOS compiler.
2022-03-08 17:31:11 -06:00
DRC
0565548191 BUILDING.md: Mention sub-project best practices
People keep trying to include libjpeg-turbo into downstream CMake-based
build systems by way of the add_subdirectory() function and requesting
upstream support when something inevitably breaks.

(Refer to: #122, #173, #176, #202, #241, #349, #353, #412, #504,
a3d4aadd0d (commitcomment-67575889)).

libjpeg-turbo has never supported that method of sub-project
integration, because doing so would require that we (minimally):

1. avoid using certain CMake variables, such as CMAKE_SOURCE_DIR,
   CMAKE_BINARY_DIR, and CMAKE_PROJECT_NAME;
2. avoid using implicit include directories and relative paths;
3. provide a way to optionally skip the installation of libjpeg-turbo
   components in response to 'make install';
4. provide a way to optionally postfix target names, to avoid namespace
   conflicts;
5. restructure the top-level CMakeLists.txt so that it properly sets
   the PROJECT_VERSION variable; and
6. design automated CI tests to ensure that new commits don't break
   any of the above.

Even if we did all of that, issues would still arise, because it is
impossible for one upstream build system to anticipate the widely
varying needs of every downstream build system.  That's why the CMake
ExternalProject_Add() function exists, and it is my sincere hope that
adding a blurb to BUILDING.md mentioning the need to use that function
will head off future GitHub issues on this topic.  If not, then I can at
least post a link to this commit and the blurb and avoid doing the same
song and dance over and over again.
2022-02-28 22:27:58 -06:00
Jonathan Wright
c5f269eb96 Neon/AArch64: Explicitly unroll quant loop w/Clang
The loop in jsimd_quantize_neon() is only executed twice and should be
unrolled for AArch64 targets.  GCC does that by default, but Clang 11
and later versions available at the time of this writing do not.  This
patch adds an unroll pragma when targetting AArch64 with Clang.  We do
not use the unroll pragma for AArch32 targets, because it causes the
Clang-generated assembly code to exhaust the available Neon registers
(32 x 64-bit) and spill to the stack.  (DRC: Referring to the discussion
in #570, this is likely due to compiler confusion that results in poor
register allocation.  It is possible to eliminate the spillage and
reduce the instruction count by loading the data on a just-in-time
basis, thus explicitly interleaving compute and I/O, but the performance
implications of that are currently unknown.)

The effects of unrolling the quantization loop are:
1) elimination of the loop control flow overhead and
2) enabling the use of LDP/STP instructions that work from a single
   base pointer, instead of using double the number of LDR/STR
   instructions, each requiring an address calculation.

Closes #570
2022-02-25 12:53:05 -06:00
DRC
98bc3eeb3a Neon/AArch64: Fix/suppress UBSan warnings
- Suppress a UBSan warning regarding storing a 64-bit value to a
  non-64-bit-aligned address.  That behavior is technically undefined
  per the C spec but is supported in the context of the AArch64
  architecture and compilers.

- Explicitly promote block_diff[i] to unsigned int prior to left
  shifting it, in order to avoid a UBSan warning.  This warning also
  described behavior that is technically undefined per the C spec but is
  supported in the context of the AArch64 architecture and compilers.
  Changing the type cast order eliminated the warning without changing
  the generated assembly code.

Closes #582
2022-02-25 00:02:14 -06:00
Jonathan Wright
147548c055 Neon/AArch64: Accelerate Huffman encoding
- Make better use of 128-bit vector registers, thus reducing the number
  of Neon instructions required to construct the AC coefficient bitmap.

- Refactor the Neon computations of 'nbits' and 'diff' to use shorter
  and higher-throughput instruction sequences.

DRC's notes:

This commit partially integrates #570.  Arm reported a 1-4% speedup on
Cortex-A55 and Neoverse-N1 cores when using recent compilers but little
or no speedup with Clang 10.  I observed no speedup with Clang 10 on my
Cortex-A53 and Cortex-A72 cores.  Thus, referring to #582, the primary
purpose of this commit is to fix UBSan warnings regarding the shift
operations previously located at Line 253:

d640a45730/simd/arm/aarch64/jchuff-neon.c (L253)
2022-02-24 23:31:32 -06:00
DRC
d640a45730 AppVeyor: Test strict MSVC compiler warnings 2022-02-23 17:02:24 -06:00
DRC
eb21c023ab Eliminate incompatible pointer type warnings
(C4057 in MSVC and -Wincompatible-pointer-types in GCC/Clang)
2022-02-23 15:57:05 -06:00
DRC
13377e6b38 MSVC: Eliminate int conversion warnings (C4244) 2022-02-23 15:57:05 -06:00
DRC
607b668ff9 MSVC: Eliminate C4996 warnings in API libs
The primary purpose of this is to encourage adoption of libjpeg-turbo in
downstream Windows projects that forbid the use of "deprecated"
functions.  libjpeg-turbo's usage of those functions was not actually
unsafe, because:

- libjpeg-turbo always checks the return value of fopen() and ensures
  that a NULL filename can never be passed to it.

- libjpeg-turbo always checks the return value of getenv() and never
  passes a NULL argument to it.

- The sprintf() calls in format_message() (jerror.c) could never
  overflow the destination string buffer or leave it unterminated as
  long as the buffer was at least JMSG_LENGTH_MAX bytes in length, as
  instructed. (Regardless, this commit replaces those calls with
  snprintf() calls.)

- libjpeg-turbo never uses sscanf() to read strings or multi-byte
  character arrays.

- Because of b7d6e84d6a, wrjpgcom
  explicitly checks the bounds of the source and destination strings
  before calling strcat() and strcpy().

- libjpeg-turbo always ensures that the destination string is
  terminated when using strncpy().
  (548490fe5e made this explicit.)

Regarding thread safety:

Technically speaking, getenv() is not thread-safe, because the returned
pointer may be invalidated if another thread sets the same environment
variable between the time that the first thread calls getenv() and the
time that that thread uses the return value.  In practice, however, this
could only occur with libjpeg-turbo if:

(1) A multithreaded calling application used the deprecated and
undocumented TJFLAG_FORCEMMX/TJFLAG_FORCESSE/TJFLAG_FORCESSE2 flags in
the TurboJPEG API or set one of the corresponding environment variables
(which are only intended for testing purposes.)  Since the TurboJPEG API
library only ever passed string constants to putenv(), the only inherent
risk (i.e. the only risk introduced by the library and not the calling
application) was that the SIMD extensions may have read an incorrect
value from one of the aforementioned environment variables.

or

(2) A multithreaded calling application modified the value of the
JPEGMEM environment variable in one thread while another thread was
reading the value of that environment variable (in the body of
jpeg_create_compress() or jpeg_create_decompress().)  Given that the
libjpeg API provides a thread-safe way for applications to modify the
default memory limit without using the JPEGMEM environment variable,
direct modification of that environment variable by calling applications
is not supported.

Microsoft's implementation of getenv_s() does not claim to be
thread-safe either, so this commit uses getenv_s() solely to mollify
Visual Studio.  New inline functions and macros (GETENV_S() and
PUTENV_S) wrap getenv_s()/_putenv_s() when building for Visual Studio
and getenv()/setenv() otherwise, but GETENV_S()/PUTENV_S() provide no
advantages over getenv()/setenv() other than parameter validation.  They
are implemented solely for convenience.

Technically speaking, strerror() is not thread-safe, because the
returned pointer may be invalidated if another thread changes the locale
and/or calls strerror() between the time that the first thread calls
strerror() and the time that that thread uses the return value.  In
practice, however, this could only occur with libjpeg-turbo if a
multithreaded calling application encountered a file I/O error in
tjLoadImage() or tjSaveImage().  Since both of those functions
immediately copy the string returned from strerror() into a thread-local
buffer, the risk is minimal, and the worst case would involve an
incorrect error string being reported to the calling application.
Regardless, this commit uses strerror_s() in the TurboJPEG API library
when building for Visual Studio.  Note that strerror_r() could have been
used on Un*x systems, but it would have been necessary to handle both
the POSIX and GNU implementations of that function and perform
widespread compatibility testing.  Such is left as an exercise for
another day.

Fixes #568
2022-02-23 15:57:01 -06:00
DRC
ab6cae6f3b BUILDING.md: Clarify that Ninja works with Windows 2022-02-22 10:23:19 -06:00
DRC
3ccb6ead23 BUILDING.md: Remove NASM RPM rebuild instructions
All currently supported Linux platforms now provide a recent enough
version of either NASM or Yasm.
2022-02-11 10:05:18 -06:00
DRC
6441ad0f83 BUILDING.md: Document NASM/Yasm path variables
This was an oversight from the CMake build system overhaul in
libjpeg-turbo 2.0 (6abd39160c).

Closes #580
2022-02-11 10:02:28 -06:00
DRC
6d2d6d3baf "YASM" = "Yasm"
The assembler name was initially spelled "YASM", but it has been "Yasm"
for the entirety of libjpeg-turbo's existence.
2022-02-11 09:34:01 -06:00
DRC
e1588a2a7b Build: Fix Neon capability detection w/ MSVC
(broken by 57ba02a408)

Refer to #547
2022-02-10 22:24:19 -06:00
DRC
548490fe5e Ensure that strncpy() dest strings are terminated
- Since the ERREXITS() and TRACEMSS() macros are never used internally
  (they are a relic of the legacy memory managers that libjpeg
  provided), the only risk was that an external program might have
  invoked one of those macros with a string longer than 79 characters
  (JMSG_STR_PARM_MAX - 1).

- TJBench never invokes the THROW_TJ() macro with a string longer than
  199 (JMSG_LENGTH_MAX - 1) characters, so there was no risk.  However,
  it's a good idea to explicitly terminate the destination strings so
  that anyone looking at the code can immediately tell that it is safe.
2022-02-10 11:52:48 -06:00
DRC
b579fc114d Eliminate unnecessary JFREAD()/JFWRITE() macros 2022-02-09 16:07:18 -06:00
DRC
a3d4aadd0d Build: Embed version/API/(C) info in MSVC DLLs
Based on:
da7a18801a

Closes #576
2022-02-01 13:00:42 -06:00
DRC
d7d16df646 Fix segv w/ h2v2 merged upsamp, jpeg_crop_scanline
The h2v2 (4:2:0) merged upsampler uses a spare row buffer so that it can
upsample two rows at a time but return only one row to the application,
if necessary.  merged_2v_upsample() copies from this spare row buffer
into the application-supplied output buffer, using the out_row_width
field in the my_merged_upsampler struct to determine how many samples to
copy.  out_row_width is set in jinit_merged_upsampler(), which is called
within the body of jpeg_start_decompress().  Since jpeg_crop_scanline()
must be called after jpeg_start_decompress(), jpeg_crop_scanline() must
modify the value of out_row_width if the h2v2 merged upsampler will be
used.  Otherwise, merged_2v_upsample() can overflow the output buffer if
the number of bytes between the current output buffer position and the
end of the buffer is less than the number of bytes required to represent
an uncropped scanline of the output image.  All of the destination
managers used by djpeg allocate either a whole image buffer or a
scanline buffer based on the uncropped output image width, so this issue
is not reproducible using djpeg.

Fixes #574
2022-02-01 10:52:08 -06:00
DRC
14ce28a92d TJBench: Remove innocuous always-true condition
This was accidentally introduced into tjbench.c in
890f1e0413 and ported into the Java
version from there.

Based on
4be6d4e7bd

Refer to #571
2022-01-29 12:37:15 -06:00
DRC
da41ab94e7 GitHub Actions: Specify Catalina for macOS build
macos-latest now maps to the Big Sur image, which doesn't have Xcode
12.2 installed.
2022-01-06 12:57:26 -06:00
DRC
1f55ae7b0f Fix -Wpedantic compiler warnings
... and test for those warnings (and others) when performing CI builds.
2022-01-06 12:33:22 -06:00
DRC
172972394a Eliminate non-ANSI C compatibility macros
libjpeg-turbo has never supported non-ANSI C compilers.  Per the spec,
ANSI C compilers must have locale.h, stddef.h, stdlib.h, memset(),
memcpy(), unsigned char, and unsigned short.  They must also handle
undefined structures.
2022-01-06 11:50:26 -06:00
Dmitry Tsarevich
a7f0244e9b turbojpeg.h: Parenthesize TJSCALED() dimension arg
This ensures that, for example,
TJSCALED(dim0 + dim1, sf)

will evaluate to
(((dim0 + dim1) * sf.num + sf.denom - 1) / sf.denom)

rather than
((dim0 + (dim1 * sf.num) + sf.denom - 1) / sf.denom)
2022-01-06 05:26:02 -06:00
DRC
a01857cff6 Build: Disallow NEON_INTRINSICS=0 if GAS is broken
If NEON_INTRINSICS=0, then run the GAS sanity check from libjpeg-turbo
2.0.x and force-enable NEON_INTRINSICS if the test fails.  This fixes
the AArch32 build when using Clang 6.0 on Linux or the Clang toolchain
in the Android NDK r15*-r16*.  It also prevents users from manually
disabling NEON_INTRINSICS if doing so would break the build (such as
with Xcode 5.)
2021-12-01 19:10:14 -06:00
DRC
57ba02a408 Build: Improve Neon capability detection
- Use check_c_source_compiles() rather than check_symbol_exists() to
  detect the presence of vld1_s16_x3(), vld1_u16_x2(), and
  vld1q_u8_x4().  check_symbol_exists() is unreliable for detecting
  intrinsics, and in practice, it did not detect the presence of the
  aforementioned intrinsics in versions of GCC that support them.

- Set DEFAULT_NEON_INTRINSICS=0 for GCC < 12, even if the aforementioned
  intrinsics are available.  The AArch64 back end in GCC 10 and 11
  supports the necessary intrinsics, but the GAS implementation is still
  faster when using those compilers.

Fixes #547
2021-12-01 11:26:57 -06:00
DRC
8a9a6dd15a Make incompatible feature errs more user-friendly
- Use JERR_NOTIMPL ("Not implemented yet") rather than JERR_NOT_COMPILED
  ("Requested feature was omitted at compile time") to indicate that
  arithmetic coding is incompatible with Huffman table optimization.
  This is more consistent with other parts of the libjpeg API code.
  JERR_NOT_COMPILED is typically used to indicate that a major feature
  was not compiled in, whereas JERR_NOTIMPL is typically used to
  indicate that two features were compiled in but are incompatible with
  each other (such as, for instance, two-pass color quantization and
  partial image decompression.)

- Change the text of JERR_NOTIMPL to "Requested features are
  incompatible".  This is a more accurate description of the situation.
  "Not implemented yet" implies that it may be possible to support the
  requested combination of features in the future, but that is not true
  in most of the cases where JERR_NOTIMPL is used.

Fixes #567
2021-12-01 09:43:15 -06:00
DRC
73eff6effe cjpeg: auto. compr. gray BMP/GIF-->grayscale JPEG
aa7459050d was supposed to enable this for
BMP input images but didn't, due to a similar oversight to the one fixed
in the previous commit.
2021-11-30 16:10:23 -06:00
DRC
2ce32e0fe5 cjpeg: automatically compress PGM-->grayscale JPEG
(regression introduced by aa7459050d)

cjpeg sets cinfo.in_color_space to JCS_RGB as an "arbitrary guess."
Since tjLoadImage() never uses JCS_RGB, the PGM reader should treat
JCS_RGB the same as JCS_UNKNOWN.

Fixes #566
2021-11-30 16:09:21 -06:00
DRC
e869a81a7a jdarith.c: Require cinfo->Se == DCTSIZE2 - 1
This fixes an oversight from the integration of the arithmetic entropy
codec from libjpeg (66f97e6820).  I chose
to integrate the latest implementation available at the time, which was
from jpeg-8b.  However, I naively replaced cinfo->lim_Se with
DCTSIZE2 - 1, not realizing that-- because of SmartScale-- jpeg-8b
contains additional code
(https://github.com/libjpeg-turbo/libjpeg-turbo/blob/jpeg-8b/jdinput.c#L249-L334)
that guards against illegal values of cinfo->Se >= DCTSIZE2.  Thus,
libjpeg-turbo's implementation of arithmetic decoding has never guarded
against such illegal values.  This commit restores the relevant check
from the original jpeg-6b arithmetic entropy codec patch ("jpeg-ari",
1e247ac854).

Fixes #564
2021-11-23 10:41:29 -06:00
DRC
5446ff88d6 CI: CIFuzz integration
CIFuzz runs the project's fuzzers for a limited period of time any time
a commit is pushed or a PR is submitted.  This is not intended to
replace OSS-Fuzz but rather to allow us to more quickly catch some
fuzzing failures, including fuzzer build regressions like the one
introduced in ecf021bc0d.

Closes #559
2021-11-19 13:54:07 -06:00
DRC
0f88060b0f cjpeg.c: Fix fuzzer build failure
(caused by previous commit)
2021-11-19 13:36:42 -06:00
DRC
ecf021bc0d cjpeg: Add -strict arg to treat warnings as fatal
This adds fault tolerance to the LZW-compressed GIF reader, which is
the only compression-side code that can throw warnings.
2021-11-18 21:04:35 -06:00
DRC
4c5fa566b3 CI: Halt immediately on all sanitizer errors 2021-11-17 16:09:50 -06:00
Piotr Kubaj
d401d62514 PowerPC: Detect AltiVec support on FreeBSD
Recent FreeBSD/PowerPC compilers, such as Clang 11.0.x on FreeBSD 13, do
the equivalent of passing -maltivec to the compiler by default, so
run-time AltiVec detection is unnecessary.  However, it becomes
necessary when using other compilers or when passing -mno-altivec to the
compiler.

Closes #552
2021-10-30 16:53:51 -05:00
DRC
2fd4ae7b2c JNI: Fix warnings/errors reported by -Xcheck:jni
- Don't check for exceptions immediately after invoking the
  GetPrimitiveArrayCritical() method.  That method does not throw
  exceptions, and checking for them caused -Xcheck:jni to warn about
  calling other JNI functions in the scope of
  Get/ReleasePrimitiveArrayCritical().

- Check for exceptions immediately after invoking the
  CallStaticObjectMethod() method in the PROP2ENV() macro.

- Don't use the Get/ReleasePrimitiveArrayCritical() methods for small
  arrays.  -Xcheck:jni didn't complain about that, but there is no
  performance advantage to using those methods rather than the
  Get*ArrayRegion() methods for small arrays, and using
  Get*ArrayRegion() makes the code less error-prone.

- Don't release the source/destination planes arrays in the YUV methods
  until after the corresponding C TurboJPEG functions have returned.
2021-10-27 14:50:22 -05:00
Ash Kyd
5552483db9 Fix typo in readme 2021-10-14 11:40:48 +01:00
Alex Xu (Hello71)
18edeff4e8 Build: Set CMP0065 NEW (respect ENABLE_EXPORTS)
Referring to https://cmake.org/cmake/help/latest/policy/CMP0065.html,
CMake 3.3 and earlier automatically added compiler/linker flags such as
-rdynamic/-export-dynamic, which caused symbols to be exported from
executables.  The primary purpose of this is to allow plugins loaded via
dlopen() to access symbols from the calling program.  libjpeg-turbo
does not need this functionality, and enabling it needlessly increases
the size of the libjpeg-turbo executables.

Setting CMP0065 to NEW when using CMake 3.4 and later prevents CMake
from automatically adding the aforementioned compiler/linker flags
unless the ENABLE_EXPORTS property is set for a target (or the
CMAKE_ENABLE_EXPORTS variable is set, which causes ENABLE_EXPORTS to be
set for all targets.)

Closes #554
2021-10-03 13:39:38 -05:00
DRC
a9c41fbc4f Build: Don't enable Neon SIMD exts with Armv6-
When building for 32-bit Arm platforms, test whether basic Neon
intrinsics will compile with the specified compiler and C flags.  This
prevents the build system from enabling the Neon SIMD extensions when
targetting Armv6 and other legacy architectures that do not support Neon
instructions.

Regression introduced by bbd8089297.
(Checking whether gas-preprocessor.pl was needed for 32-bit Arm builds
had the effect of checking whether Neon instructions were supported.)

Fixes #553
2021-10-03 13:10:35 -05:00
DRC
739ecbc5ec ChangeLog.md: List CVE ID fixed by 2849d86a 2021-09-30 16:28:51 -05:00
DRC
4c313544e2 AppVeyor: Deploy artifacts to Amazon S3
We would have been perfectly happy for AppVeyor to delete all artifacts
other than those from the latest builds in each branch.  Instead, they
chose to change the global artifact retention policy to 1 month.  In
addition to being unworkable, that new policy uses more storage than the
policy we requested.  Lose/lose, so we'll just deploy to S3 like we do
with other platforms.
2021-09-20 17:12:02 -05:00
DRC
173900b1ca tjTrans: Allow 8x8 crop alignmnt w/odd 4:4:4 JPEGs
Fixes #549
2021-09-02 13:31:11 -05:00
DRC
5d2430f4da ChangeLog.md: Add missing sub-header for 2.1.2 2021-09-02 13:18:10 -05:00
DRC
129f0cb763 Neon/AArch64: Don't put GAS functions in .rodata
Regression introduced by 240ba417aa

Closes #546
2021-08-25 12:54:24 -05:00
DRC
0a9b972178 jmemmgr.c: Pass correct size arg to jpeg_free_*()
This issue was introduced in 5557fd2217
due to an oversight, so it has existed in libjpeg-turbo since the
project's inception.  However, the issue is effectively a non-issue.
Although #325 proposes allowing programs to override jpeg_get_*() and
jpeg_free_*() externally, there is currently no way to override those
functions without modifying the libjpeg-turbo source code.
libjpeg-turbo only includes the malloc()/free() memory manager from
libjpeg, and the implementation of jpeg_free_*() in that memory manager
ignores the size argument.  libjpeg had several additional memory
managers for legacy systems (MS-DOS, System 7, etc.), but those memory
managers ignored the size argument to jpeg_free_*() as well.  Thus, this
issue would have only potentially affected custom memory managers in
downstream libjpeg-turbo forks, and since no one has complained until
now, apparently those are rare.

Fixes #542
2021-08-09 18:16:57 -05:00
DRC
2849d86aaa SSE2/64-bit: Fix trans. segfault w/ malformed JPEG
Attempting to losslessly transform certain malformed JPEG images can
cause the nbits table index in the Huffman encoder to exceed 32768, so
we need to pad the SSE2 implementation of that table to 65536 entries as
we do with the C implementation.

Regression introduced by 087c29e07f

Fixes #543
2021-08-06 14:04:34 -05:00
DRC
84d6306f64 Fix build w/CMake 3.14+ when CMAKE_SYSTEM_NAME=iOS
Closes #539
2021-07-27 11:26:51 -05:00
Kornel
512a7c3a51 Merge tag '2.1.0'
* tag '2.1.0': (39 commits)
  TurboJPEG: Update JPEG buf ptrs on comp/xform err
  Include TJ.FLAG_LIMITSCANS in JNI header
  OSS-Fuzz: Code comment tweaks for compr. targets
  jdhuff.h: Fix ASan regression caused by 8fa70367
  cjpeg_fuzzer: Add cov for h2v2 smooth downsampling
  Huff decs: Fix/suppress more innocuous UBSan errs
  Huff dec: Fix non-deterministic output w/bad input
  OSS-Fuzz: Check img size b4 readers allocate mem
  OSS-Fuzz: More code coverage improvements
  jchuff.c: Fix MSan error
  compress_yuv_fuzzer: Minor code coverage tweak
  cjpeg.c: Code formatting tweak
  rdbmp.c: Fix more innocuous UBSan errors
  rdbmp.c/rdppm.c: Fix more innocuous UBSan errors
  OSS-Fuzz: cjpeg fuzz target
  compress_yuv_fuzzer: Use unique filename template
  OSS-Fuzz: Fix UBSan err caused by TJFLAG_FUZZING
  OSS-Fuzz: YUV encoding/compression fuzz target
  ...
2021-07-21 22:39:01 +01:00
y-guyon
e6e952d5d5 Suppress UBSan error in decode_mcu_fast()
This is the same error that d147be83e9
suppressed in decode_mcu_slow().  The image that reproduces this error
in decode_mcu_fast() has been added to the libjpeg-turbo seed corpora.

Closes #537
2021-07-16 12:58:00 -05:00
Alex Richardson
a72816ed07 Use uintptr_t, if avail, for pointer-to-int casts
Although sizeof(void *) == sizeof(size_t) for all architectures that are
currently supported by libjpeg-turbo, such is not guaranteed by the C
standard.  Specifically, CHERI-enabled architectures (e.g. CHERI-RISC-V
or Arm's Morello) use capability pointers that are twice the size of
size_t (128 bits for Morello and RV64), so casting to size_t strips the
upper bits of the pointer (including the validity bit) and makes it
non-deferenceable, as indicated by the following compiler warning:

  warning: cast from provenance-free integer type to pointer type will
  give pointer that can not be dereferenced
  [-Werror,-Wcheri-capability-misuse]
    cvalue = values = (JCOEF *)PAD((size_t)values_unaligned, 16);

Ignoring this warning results in a run-time crash.  Casting pointers to
uintptr_t, if it is available, avoids this problem, since uintptr_t is
defined as an unsigned integer type that can hold a pointer value.

Since C89 compatibility is still necessary in libjpeg-turbo, this commit
introduces a new typedef for pointer-to-integer casts that uses a
GNU-specific extension available in GCC 4.6+ and Clang 3.0+ and falls
back to using size_t if the extension is unavailable.  The only other
options would require C99 or Clang-specific builtins.

Closes #538
2021-07-16 12:23:29 -05:00
DRC
4d9f256b01 jpegtran: Add option to copy only ICC markers
Closes #533
2021-07-13 11:54:31 -05:00
Peter Kasting
b201838d8b Neon: Silence -Wimplicit-fallthrough warnings
Refer to https://bugs.chromium.org/p/chromium/issues/detail?id=995993

Closes #534
2021-07-13 10:21:38 -05:00
DRC
a1bfc05854 Neon/AArch32: Mark inline asm output as read/write
'buffer' is both passed into the inline assembly code and modified by
it.  See https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html, 6.47.2.3.

With GCC 4, this commit does not change the generated assembly code at
all.

With GCC 8, this commit fixes an assembly error:

  /tmp/{foo}.s: Assembler messages:
  /tmp/{foo}.s:775: Error: registers may not be the same --
                    `str r9,[r9],#4'

I'm not sure why that error went unnoticed, since I definitely
benchmarked the previous commit with GCC 8.  Anyhow, this commit changes
the generated assembly code slightly but does not alter performance.

With Clang 10, this commit changes the generated assembly code slightly
but does not alter performance.

Refer to #529
2021-07-12 15:22:24 -05:00
DRC
2a2970af67 Neon/AArch32: Work around Clang T32 miscompilation
Referring to the C standard
(http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf,
J.2 Undefined behavior), the behavior of the compiler is undefined if
"conversion between two pointer types produces a result that is
incorrectly aligned."  Thus, the behavior of this code

  *((uint32_t *)buffer) = BUILTIN_BSWAP32(put_buffer);

in the AArch32 version of the FLUSH() macro is undefined unless 'buffer'
is 32-bit-aligned.  Referring to
https://bugs.llvm.org/show_bug.cgi?id=50785, certain versions of Clang,
when generating Thumb (T32) instructions, miscompile that code into an
assembly instruction (stm) that requires the destination to be
32-bit-aligned.  Since such alignment cannot be guaranteed within the
Huffman encoder, this reportedly led to crashes (SIGBUS: illegal
alignment) with AArch32/Thumb builds of libjpeg-turbo running on Android
devices, although thus far I have been unable to reproduce those crashes
with a plain Linux/Arm system.

The miscompilation is visible with the Compiler Explorer:
https://godbolt.org/z/rv1ccx1Pb
However, it goes away when removing the return statement from the
function.  Thus, it seems that Clang's behavior in this regard is
somewhat variable, which may explain why the crashes are only
reproducible on certain platforms.

The suggested workaround is to use memcpy(), but whereas Clang and
recent GCC releases are smart enough to compile a 4-byte memcpy() call
into a str instruction, GCC < 6 is not.  Referring to
https://godbolt.org/z/ae7Wje3P6, the only way to consistently produce
the desired str instruction across all supported compilers is to use
inline assembly.  Visual C++ presumably does not miscompile the code in
question, since no issues have been reported with it, but since the code
relies on undefined compiler behavior, prudence dictates that
e4ec23d7ae should be reverted for Visual
C++, which this commit does.  The performance impact of
e4ec23d7ae for Visual C++/Arm builds is
unknown (I have no ability to test such builds), but regardless, this
commit reverts the Visual C++/Arm performance to that of libjpeg-turbo
2.1 beta1.

Closes #529
2021-07-09 19:37:58 -05:00
DRC
97a1575cb8 RPM: Don't include system lib dir in file list
This resolves a conflict between the RPM generated by the libjpeg-turbo
build system and the Red Hat 'filesystem' RPM if
CMAKE_INSTALL_LIBDIR=/usr/lib[64].  This code was largely borrowed from
the VirtualGL RPM spec.  (I can legally do that because I hold the
copyright on VirtualGL's implementation.)

Fixes #532
2021-07-07 14:51:09 -05:00
DRC
0081c2de20 Neon/AArch32: Fix build if 'soft' float ABI used
Arm compilers have three floating point ABI options:

'soft' compiles floating point operations as function calls into a
software floating point library, which emulates floating point
operations using integer operations.  Floating point function arguments
are passed using integer registers.

'softfp' also compiles floating point operations as function calls into
a floating point library and passes floating point function arguments
using integer registers, but the floating point library functions can
use FPU instructions if the CPU supports them.

'hard' compiles floating point operations into inline FPU instructions,
similarly to x86 and other architectures, and passes floating point
function arguments using FPU registers.

Not all AArch32 CPUs have FPUs or support Neon instructions, so on Linux
and Android platforms, the AArch32 SIMD dispatcher in libjpeg-turbo only
enables the Neon SIMD extensions at run time if /proc/cpuinfo indicates
that the CPU supports Neon instructions or if Neon instructions are
explicitly enabled (e.g. by passing -mfpu=neon to the compiler.)  In
order to support all AArch32 CPUs using the same code base, i.e. to
support run-time FPU and Neon auto-detection, it is necessary to compile
the scalar C source code using -mfloat-abi=soft.  However, the 'soft'
floating point ABI cannot be used when compiling Neon intrinsics, so the
intrinsics implementation of the Neon SIMD extensions must be compiled
using -mfloat-abi=softfp if the scalar C source code is compiled using
-mfloat-abi=soft.

This commit modifies the build system so that it detects whether
-mfloat-abi=softfp must be explicitly added to the compiler flags when
building the intrinsics implementation of the Neon SIMD extensions.
This will be necessary if the build is using the 'soft' floating
point ABI along with run-time auto-detection of Neon instructions.

Fixes #523
2021-07-07 14:10:05 -05:00
Peter Kasting
9df5786f05 Fix -Wimplicit-fallthrough warnings with Clang
The existing /*FALLTHROUGH*/ comments work with GCC but not Clang, so
this commit adds a FALLTHROUGH macro that uses the 'fallthrough'
attribute if the compiler supports it.

Refer to https://bugs.chromium.org/p/chromium/issues/detail?id=995993

NOTE: All versions of GCC that support -Wimplicit-fallthrough also
support the 'fallthrough' attribute, but certain other compilers (Oracle
Solaris Studio, for instance) support /*FALLTHROUGH*/ but not the
'fallthrough' attribute.  Thus, this commit retains the /*FALLTHROUGH*/
comments, which have existed in the libjpeg code base in some form since
1994 (libjpeg v5.)

Closes #531
2021-07-06 12:37:34 -05:00
tasty0tomato
323469818c Add building libpng in Windows 2021-06-22 15:47:29 +01:00
DRC
1a1fb615db ChangeLog.md: List CVE ID fixed by c76f4a08
Referring to #527, the security community did not assign this CVE ID
until more than 8 months after the fix for the issue was released.  By
the time they assigned the ID, libjpeg-turbo already had two production
releases containing the fix.  This calls into question the usefulness of
assigning a CVE ID to the issue, particularly given that the buffer
overrun in question was fully contained in the stack, not detectable
with valgrind, and confined to lossless transformation (it did not
affect JPEG compression or decompression.)

https://vuldb.com/?id.176175
says that "the exploitability is told to be easy" but provides no
clarification, and given that the author of that page does not seem to
be aware that a fix for the issue has been available since early
December of 2019, it calls into question the accuracy of everything else
on the page.

It would really be nice if the security community approached me about
these things before wasting my time, but I guess it's my lot in life to
modify a change log entry from 2019 to include a CVE ID from 2020.

So it goes...
2021-06-18 10:29:12 -05:00
DRC
5135c2e25d Build: Use PIC for jsimd_none.o in shared libs
In theory, all objects that will be included in a Un*x shared library
must be built using PIC.  In practice, most compilers don't require PIC
to be explicitly specified for jsimd_none.o, either because the compiler
automatically enables PIC in all cases (Ubuntu) or because the size of
the generated object is too small.  But some rare compilers do require
PIC to be explicitly specified for jsimd_none.o.

Fixes #520
2021-05-28 13:09:43 -05:00
DRC
3932190c2e Fix build w/ non-GCC-compatible Un*x/Arm compilers
Regression introduced by d2c4079959

Closes #519
2021-05-17 13:09:37 -05:00
DRC
a219fd13b0 GitHub bug-report.md: "master" branch --> "main" 2021-05-12 10:58:59 -05:00
DRC
c23672ce52 GitHub Actions: Don't build tags
Our workflow script does not currently work with tags, and there is no
point to building tags anyhow, since we do not use the CI system to spin
official builds.
2021-04-23 13:29:40 -05:00
DRC
4f51f36eb3 Bump version to 2.1.0 to prepare for final release 2021-04-23 11:42:40 -05:00
DRC
e0606dafff TurboJPEG: Update JPEG buf ptrs on comp/xform err
When using the in-memory destination manager, it is necessary to
explicitly call the destination manager's term_destination() method if
an error occurs.  That method is called by jpeg_finish_compress() but
not by jpeg_abort_compress().

This fixes a potential double free() that could occur if tjCompress*()
or tjTransform() returned an error and the calling application tried to
clean up a JPEG buffer that was dynamically re-allocated by one of those
functions.
2021-04-21 15:42:00 -05:00
DRC
ffc1aa9674 Include TJ.FLAG_LIMITSCANS in JNI header
(oversight from c81e91e8ca)

This is purely cosmetic, since the JNI wrapper doesn't actually use that
flag.
2021-04-21 12:33:00 -05:00
DRC
55ec9b3b89 OSS-Fuzz: Code comment tweaks for compr. targets
(oversight from 171b875b27)
2021-04-21 12:33:00 -05:00
DRC
4de8f6922a jdhuff.h: Fix ASan regression caused by 8fa70367
The 0xFF is, in fact, necessary.
2021-04-16 16:34:12 -05:00
DRC
785ec30eb4 cjpeg_fuzzer: Add cov for h2v2 smooth downsampling 2021-04-16 15:59:38 -05:00
DRC
d147be83e9 Huff decs: Fix/suppress more innocuous UBSan errs
- UBSan complained that entropy->restarts_to_go was underflowing an
  unsigned integer when it was decremented while
  cinfo->restart_interval == 0.  That was, of course, completely
  innocuous behavior, since the result of the underflowing computation
  was never used.

- d3a3a73f64 and
  7bc9fca430 silenced a UBSan signed
  integer overflow error, but unfortunately other malformed JPEG images
  have been discovered that cause unsigned integer overflow in the same
  computation.  Since, to the best of our understanding, this behavior
  is innocuous, this commit reverts the commits listed above, suppresses
  the UBSan errors, and adds code comments to document the issue.
2021-04-15 23:46:15 -05:00
DRC
8fa70367ed Huff dec: Fix non-deterministic output w/bad input
Referring to https://bugzilla.mozilla.org/show_bug.cgi?id=1050342,
there are certain very rare circumstances under which a malformed JPEG
image can cause different Huffman decoder output to be produced,
depending on the size of the source manager's I/O buffer.  (More
specifically, the fast Huffman decoder didn't handle invalid codes in
the same manner as the slow decoder, and since the fast decoder requires
all data to be memory-resident, the buffering strategy determines
whether or not the fast decoder can be used on a particular MCU block.)

After extensive experimentation, the Mozilla and Chrome developers and I
determined that this truly was an innocuous issue.  The patch that both
browsers adopted as a workaround caused a performance regression with
32-bit code, which is why it was not accepted into libjpeg-turbo.  This
commit fixes the problem in a less disruptive way with no performance
regression.
2021-04-15 22:55:50 -05:00
DRC
171b875b27 OSS-Fuzz: Check img size b4 readers allocate mem
After the completion of the start_input() method, it's too late to check
the image size, because the image readers may have already tried to
allocate memory for the image.  If the width and height are excessively
large, then attempting to allocate memory for the image could slow
performance or lead to out-of-memory errors prior to the fuzz target
checking the image size.

NOTE: Specifically, the aforementioned OOM errors and slow units were
observed with the compression fuzz targets when using MSan.
2021-04-15 21:20:33 -05:00
DRC
3ab3234875 OSS-Fuzz: More code coverage improvements 2021-04-13 11:58:20 -05:00
DRC
3e68a5ee20 jchuff.c: Fix MSan error
Certain rare malformed input images can cause the Huffman encoder to
generate a value for nbits that corresponds to an uninitialized member
of the DC code table.  The ramifications of this are minimal and would
basically amount to a different bogus JPEG image being generated from a
particular bogus input image.
2021-04-12 14:37:43 -05:00
DRC
4e45161654 compress_yuv_fuzzer: Minor code coverage tweak 2021-04-12 11:53:29 -05:00
DRC
629e96eedc cjpeg.c: Code formatting tweak 2021-04-12 11:52:55 -05:00
DRC
ebaa67ea32 rdbmp.c: Fix more innocuous UBSan errors
- Referring to 3311fc0001, we need to use
  unsigned intermediate math in order to make UBSan happy, even though
  (JDIMENSION)(A * B) is effectively the same as
  (JDIMENSION)A *(JDIMENSION)B, regardless of intermediate overflow.

- Because of the previous commit, it is now possible for bfOffBits to be
  INT_MIN, which would cause the initial computation of bPad to
  underflow a signed integer.  Thus, we need to check for that
  possibility as soon as we know the values of bfOffBits and headerSize.
  The worst case from this regression is that bPad could wrap around to
  a large positive value, which would cause a "Premature end of input
  file" error in the subsequent read_byte() loop.  Thus, this issue was
  effectively innocuous as well, since it resulted in catching the same
  error later and in a different way.  Also, the issue was very
  well-contained, since it was both introduced and fixed as part of the
  ongoing OSS-Fuzz integration project.
2021-04-12 11:48:14 -05:00
DRC
dd830b3ffe rdbmp.c/rdppm.c: Fix more innocuous UBSan errors
- rdbmp.c: Because of 8fb37b8171,
  bfOffBits, biClrUsed, and headerSize were made into unsigned ints.
  Thus, if bPad would eventually be negative due to a malformed header,
  UBSan complained about unsigned math being used in the intermediate
  computations.  It was unnecessary to make those variables unsigned,
  since they are only meant to hold small values, so this commit makes
  them signed again.  The UBSan error was innocuous, because it is
  effectively (if not officially) the case that
  (int)((unsigned int)a - (unsigned int)b) == (int)a - (int)b.

- rdbmp.c: If (biWidth * source->bits_per_pixel / 8) would overflow an
  unsigned int, then UBSan complained at the point at which row_width
  was set in start_input_bmp(), even though the overflow would have been
  detected later in the function.  This commit adds overflow checks
  prior to setting row_width.

- rdppm.c: read_pbm_integer() now bounds-checks the intermediate
  value computations in order to catch integer overflow caused by a
  malformed text PPM.  It's possible, though extremely unlikely, that
  the intermediate value computations could have wrapped around to a
  value smaller than maxval, but the worst case is that this would have
  generated a bogus pixel in the uncompressed image rather than throwing
  an error.
2021-04-09 20:09:04 -05:00
DRC
4ede2ef523 OSS-Fuzz: cjpeg fuzz target 2021-04-09 19:27:22 -05:00
DRC
5cda8c5e31 compress_yuv_fuzzer: Use unique filename template 2021-04-09 13:12:32 -05:00
DRC
47b66d1d1e OSS-Fuzz: Fix UBSan err caused by TJFLAG_FUZZING 2021-04-09 11:26:34 -05:00
DRC
55ab0d396c OSS-Fuzz: YUV encoding/compression fuzz target 2021-04-08 16:13:06 -05:00
DRC
18bc4c6114 compress.cc: Code formatting tweak 2021-04-07 16:08:59 -05:00
DRC
b1079002ad rdppm.c: Fix innocuous MSan error
A fuzzing test case that was effectively a 1-pixel PGM file with a
maximum value of 1 and an actual value of 8 caused an uninitialized
member of the rescale[] array to be accessed in get_gray_rgb_row() or
get_gray_cmyk_row().  Since, for performance reasons, those functions do
not perform bounds checking on the PPM values, we need to ensure that
unused members of the rescale[] array are initialized.
2021-04-07 16:08:48 -05:00
DRC
3311fc0001 rdbmp.c: Fix innocuous UBSan error
A fuzzing test case with an image width of 838860946 triggered a UBSan
error:

rdbmp.c:633:34: runtime error: signed integer overflow:
838860946 * 3 cannot be represented in type 'int'

Because the result is cast to an unsigned int (JDIMENSION), this error
is irrelevant, because

(unsigned int)((int)838860946 * (int)3) ==
(unsigned int)838860946 * (unsigned int)3
2021-04-07 15:23:32 -05:00
DRC
34d264d64e OSS-Fuzz: Private TurboJPEG API flag for fuzzing
This limits the tjLoadImage() behavioral changes to the scope of the
compress_fuzzer target.  Otherwise, TJBench in fuzzer builds would
refuse to load images larger than 1 Mpixel.
2021-04-07 15:09:29 -05:00
DRC
f35fd27ec6 tjLoadImage: Fix issues w/loading 16-bit PPMs/PGMs
- The PPM reader now throws an error rather than segfaulting (due to a
  buffer overrun) if an application attempts to load a 16-bit PPM file
  into a grayscale uncompressed image buffer.  No known applications
  allowed that (not even the test applications in libjpeg-turbo),
  because that mode of operation was never expected to work and did not
  work under any circumstances.  (In fact, it was necessary to modify
  TJBench in order to reproduce the issue outside of a fuzzing
  environment.)  This was purely a matter of making the library bow out
  gracefully rather than crash if an application tries to do something
  really stupid.

- The PPM reader now throws an error rather than generating incorrect
  pixels if an application attempts to load a 16-bit PGM file into an
  RGB uncompressed image buffer.

- The PPM reader now correctly loads 16-bit PPM files into extended
  RGB uncompressed image buffers.  (Previously it generated incorrect
  pixels unless the input colorspace was JCS_RGB or JCS_EXT_RGB.)

The only way that users could have potentially encountered these issues
was through the tjLoadImage() function.  cjpeg and TJBench were
unaffected.
2021-04-06 16:12:29 -05:00
DRC
df17d398ec jcphuff.c: -Wjump-misses-init warning w/GCC 9 -m32
(verified that this commit does not change the generated 64-bit or
32-bit assembly code)
2021-04-06 14:11:32 -05:00
DRC
cd9a318502 Bump TurboJPEG C API version to 2.1
(because of TJFLAG_LIMITSCANS)
2021-04-05 22:20:52 -05:00
DRC
d2d4465548 OSS-Fuzz: Compression fuzz target 2021-04-05 21:59:11 -05:00
DRC
5536ace198 OSS-Fuzz: Fix C++11 compiler warnings in targets 2021-04-05 21:12:29 -05:00
DRC
5dd906beff OSS-Fuzz: Test non-default opts w/ decompress_yuv
The non-default options were not being tested because of a pixel format
comparison buglet.  This commit also changes the code in both
decompression fuzz targets such that non-default options are tested
based on the pixel format index rather than the pixel format value,
which is a bit more idiot-proof.
2021-04-05 17:53:15 -05:00
DRC
c81e91e8ca TurboJPEG: New flag for limiting prog JPEG scans
This also fixes timeouts reported by OSS-Fuzz.
2021-04-05 16:33:44 -05:00
DRC
bff7959e34 OSS-Fuzz: Require static libraries
Refer to
https://google.github.io/oss-fuzz/further-reading/fuzzer-environment/#runtime-dependencies
for the reasons why this is necessary.
2021-04-02 14:58:55 -05:00
DRC
6ad658be17 OSS-Fuzz: Build fuzz targets using C++ compiler
Otherwise, the targets will require libstdc++, the i386 version of which
is not available in the OSS-Fuzz runtime environment.  The OSS-Fuzz
build environment passes -stdlib:libc++ in the CXXFLAGS environment
variable in order to mitigate this issue, since the runtime environment
has the i386 version of libc++, but using that compiler flag requires
using the C++ compiler.
2021-04-02 14:58:31 -05:00
DRC
7b57cba6b4 OSS-Fuzz: Fix uninitialized reads detected by MSan 2021-04-01 11:30:24 -05:00
DRC
2f9e8a1172 OSS-Fuzz integration
This commit integrates OSS-Fuzz targets directly into the libjpeg-turbo
source tree, thus obsoleting and improving code coverage relative to
Google's OSS-Fuzz target for libjpeg-turbo (previously available here:
https://github.com/google/oss-fuzz).

I hope to eventually create fuzz targets for the BMP, GIF, and PPM
readers as well, which would allow for fuzz-testing compression, but
since those readers all require an input file, it is unclear how to
build an efficient fuzzer around them.  It doesn't make sense to
fuzz-test compression in isolation, because compression can't accept
arbitrary input data.
2021-03-30 20:59:41 -05:00
Jonathan Wright
e4ec23d7ae Neon: Use byte-swap builtins instead of inline asm
Define compiler-independent byte-swap macros and use them instead of
executing 'rev' via inline assembly code with GCC-compatible compilers
or a slow shift-store sequence with Visual C++.

* This produces identical assembly code with:

  - 64-bit GCC 8.4.0 (Linux)
  - 64-bit GCC 9.3.0 (Linux)
  - 64-bit Clang 10.0.0 (Linux)
  - 64-bit Clang 10.0.0 (MinGW)
  - 64-bit Clang 12.0.0 (Xcode 12.2, macOS)
  - 64-bit Clang 12.0.0 (Xcode 12.2, iOS)

* This produces different assembly code with:

  - 64-bit GCC 4.9.1 (Linux)
  - 32-bit GCC 4.8.2 (Linux)
  - 32-bit GCC 8.4.0 (Linux)
  - 32-bit GCC 9.3.0 (Linux)
    Since the intrinsics implementation of Huffman encoding is not used
    by default with these compilers, this is not a concern.

  - 32-bit Clang 10.0.0 (Linux)
    Verified performance neutrality

Closes #507
2021-03-26 14:09:10 -05:00
DRC
e795afc330 SSE2: Fix prog Huff enc err if Sl%32==0 && Al!=0
(regression introduced by 16bd984557)

This implements the same fix for
jsimd_encode_mcu_AC_refine_prepare_sse2() that
a81a8c137b implemented for
jsimd_encode_mcu_AC_first_prepare_sse2().

Based on:
1a59587397
eb176a91d8

Fixes #509
Closes #510
2021-03-25 22:46:14 -05:00
Adrian Bunk
2c01200c5d Build: Fix incorrect regexes w/ if(...MATCHES...)
"arm*" as a regex means 'ar' followed by zero or more 'm' characters,
which matches 'parisc' and 'sparc64' as well.
2021-03-15 12:56:53 -05:00
DRC
ed70101da2 ChangeLog.md: List CVE ID fixed by 1719d12e
Referring to https://bugzilla.redhat.com/show_bug.cgi?id=1937385#c2,
it is my opinion that the severity of this bug was grossly overstated
and that a CVE never should have been assigned to it, but since one was
assigned, users need to know which version of libjpeg-turbo contains
the fix.

Dear security community, please learn what "DoS" actually means and stop
misusing that term for dramatic effect.  Thanks.
2021-03-15 12:36:55 -05:00
Kornel
c78b82bbb1 Merge error 2021-03-01 11:31:05 +00:00
Kornel
886ddb1786 Merge commit '8a2cad020171184a49fa8696df0b9e267f1cf2f6'
* commit '8a2cad020171184a49fa8696df0b9e267f1cf2f6': (99 commits)
  Build: Handle CMAKE_OSX_ARCHITECTURES=(i386|ppc)
  Add Sponsor button for GitHub repository
  Build: Support CMAKE_OSX_ARCHITECTURES
  cjpeg: Fix FPE when compressing 0-width GIF
  Fix build with Visual C++ and /std:c11 or /std:c17
  Neon: Fix Huffman enc. error w/Visual Studio+Clang
  Use CLZ compiler intrinsic for Windows/Arm builds
  Build: Use correct SIMD exts w/VStudio IDE + Arm64
  jcphuff.c: Fix compiler warning with clang-cl
  Migrate from Travis CI to GitHub Actions
  tjexample.c: Fix mem leak if tjTransform() fails
  Build: Officially support Ninja
  decompress_smooth_data(): Fix another uninit. read
  LICENSE.md: Remove trailing whitespace
  Build: Test for correct AArch32 RPM/DEBARCH value
  LICENSE.md: Formatting tweak
  Fix uninitialized read in decompress_smooth_data()
  Fix buffer overrun with certain narrow prog JPEGs
  Bump revision to 2.0.91 for post-beta fixes
  Travis: Use Docker tag that matches Git branch
  ...
2021-02-26 21:30:09 +00:00
Ewout ter Hoeven
69bd7ed953 AppVeyor: Update to Visual Studio 2019 image
Updates the AppVeyor build environment, see https://www.appveyor.com/docs/build-environment/#build-worker-images for more information
2021-02-25 23:50:41 +00:00
Kornel
ed21c3ba6f Bump 2021-02-25 22:09:13 +00:00
Kornel
9f01177f72 Default to single-scan DC
People don't like green faces
2021-02-25 21:44:09 +00:00
Kornel
ceb4f8e97c Microsoft's C stdlib continues to be a disappointment 2021-01-24 23:08:26 +00:00
Kornel
44f3f8a544 Fudge incompatible turbo tests 2021-01-22 18:44:39 +00:00
Kornel
fe0e3c7e88 Merge commit '10ba6ed3365615ed5c2995fe2d240cb2d5000173'
* commit '10ba6ed3365615ed5c2995fe2d240cb2d5000173': (32 commits)
  Travis: Install MacPorts without using macports-ci
  Build: Set FLOATTEST more intelligently
  BUILDING.md: Use min. iOS v8 in iOS Armv8 example
  Fix build if WITH_12BIT==1 && WITH_JPEG(7|8)==1
  Travis: Combine PPC/Arm tests with jpeg-7/8 tests
  Build: Fix test failures w/ Arm Neon SIMD exts
  Travis: Regression-test Armv8 and PPC SIMD exts
  Demote "fast" [I]DCT algorithms to legacy status
  jpegtran.c: "subarea" = "region"
  jpegtran.1: Minor formatting tweak
  transupp.c: Code formatting tweaks
  cdjpeg.h: Remove unused function stub
  Consistify formatting to simplify checkstyle
  README.ijg: Update URLs; remove Usenet info
  jversion.h: Update copyrights
  Build: Improve Arm 32-bit cross-comp./packaging
  "ARM"="Arm", "NEON"="Neon"
  Build: Fix permissions
  ChangeLog: Fix minor formatting issue
  ChangeLog.md: jpeg_crop_scanline(), not scanlines
  ...
2021-01-22 16:03:54 +00:00
DRC
8a2cad0201 Build: Handle CMAKE_OSX_ARCHITECTURES=(i386|ppc)
We don't officially support i386 or PowerPC Mac builds of libjpeg-turbo
anymore, but they still work (bearing in mind that PowerPC builds
require GCC v4.0 in Xcode 3.2.6, and i386 builds require Xcode 9.x or
earlier.)  Referring to #495, apparently MacPorts needs this
functionality.
2021-01-21 10:51:49 -06:00
DRC
b6772910d3 Add Sponsor button for GitHub repository 2021-01-19 15:32:32 -06:00
DRC
399aa374bd Build: Support CMAKE_OSX_ARCHITECTURES
... as long as it contains only a singular value, which must equal
"x86_64" or "arm64".

Refer to #495
2021-01-19 12:25:11 -06:00
DRC
1719d12e51 cjpeg: Fix FPE when compressing 0-width GIF
Fixes #493
2021-01-14 18:38:06 -06:00
DRC
486cdcfb9d Fix build with Visual C++ and /std:c11 or /std:c17
Fixes #481
Closes #482
2021-01-12 17:45:55 -06:00
Richard Townsend
74e6ea45e3 Neon: Fix Huffman enc. error w/Visual Studio+Clang
The GNU builtin function __builtin_clzl() accepts an unsigned long
argument, which is 8 bytes wide on LP64 systems (most Un*x systems,
including Mac) but 4 bytes wide on LLP64 systems (Windows.)  This caused
the Neon intrinsics implementation of Huffman encoding to produce
mathematically incorrect results when compiled using Visual Studio with
Clang.

This commit changes all invocations of __builtin_clzl() in the Neon SIMD
extensions to __builtin_clzll(), which accepts an unsigned long long
argument that is guaranteed to be 8 bytes wide on all systems.

Fixes #480
Closes #490
2021-01-11 22:29:11 -06:00
Jonathan Wright
d2c4079959 Use CLZ compiler intrinsic for Windows/Arm builds
The __builtin_clz() compiler intrinsic was already used in the C Huffman
encoders when building libjpeg-turbo for Arm CPUs using a GCC-compatible
compiler.  This commit modifies the C Huffman encoders so that they also
use__builtin_clz() when building for Arm CPUs using Visual Studio +
Clang, as well as the equivalent _CountLeadingZeros() compiler intrinsic
when building for Arm CPUs using Visual C++.

In addition to making the C Huffman encoders faster on Windows/Arm, this
also prevents jpeg_nbits_table from being included in Windows/Arm builds,
thus saving 128 KB of memory.
2021-01-11 17:10:38 -06:00
DRC
3e8911aad5 Build: Use correct SIMD exts w/VStudio IDE + Arm64
When configuring a Visual Studio IDE build and passing -A arm64 to
CMake, CMAKE_SYSTEM_PROCESSOR will be amd64, so we should set CPU_TYPE
based on the value of CMAKE_GENERATOR_PLATFORM rather than the value of
CMAKE_SYSTEM_PROCESSOR.
2021-01-11 14:03:42 -06:00
DRC
4b838c38f9 jcphuff.c: Fix compiler warning with clang-cl
Fixes #492
2021-01-11 13:45:25 -06:00
DRC
944f5915cd Migrate from Travis CI to GitHub Actions
Note that this removes our ability to regression test the Armv8 and
PowerPC SIMD extensions, effectively reverting
a524b9b06b and
02227e48a9, but at the moment, there is no
other way.
2021-01-08 14:20:44 -06:00
DRC
3179f330b2 tjexample.c: Fix mem leak if tjTransform() fails
Fixes #479
2021-01-04 15:39:35 -06:00
DRC
1388ad6757 Build: Officially support Ninja 2020-12-08 21:25:47 -06:00
DRC
110d8d6dca decompress_smooth_data(): Fix another uninit. read
Regression introduced by 42825b68d5

The test case
https://user-images.githubusercontent.com/3491627/101376530-fde56180-38b0-11eb-938d-734119a5b5ba.jpg
is a malformed progressive JPEG image containing an interleaved Y/Cb/Cr
DC scan followed by two non-interleaved Y DC scans.  Thus, the
prev_coef_bits[] array was initialized for the Y component but not the
other components, the uninitialized values for Cb and Cr were
transferred to the prev_coef_bits_latch[] array in smoothing_ok(), and
because cinfo->master->last_good_iMCU_row was 0,
decompress_smooth_data() read those uninitialized values when attempting
to smooth the second iMCU row.

Possibly fixes #478
2020-12-07 12:51:26 -06:00
DRC
7b68764905 LICENSE.md: Remove trailing whitespace
Use <br> to indicate a line break, as we do in README.md, in order to
make checkstyle happy.
2020-12-03 21:20:42 -06:00
DRC
21d056847b Build: Test for correct AArch32 RPM/DEBARCH value
... based on the floating point ABI being used by the compiler (which
do you choose, a hard or soft option?)
2020-12-03 21:20:08 -06:00
DRC
6e4509a3f1 LICENSE.md: Formatting tweak 2020-12-01 09:04:27 -06:00
DRC
c7ca521bc8 Fix uninitialized read in decompress_smooth_data()
Regression introduced by 42825b68d5

Referring to the discussion in #459, the OSS-Fuzz test case
https://github.com/libjpeg-turbo/libjpeg-turbo/files/5597075/clusterfuzz-testcase-minimized-pngsave_buffer_fuzzer-5728375846731776.txt
created a situation in which
  cinfo->output_iMCU_row > cinfo->master->last_good_iMCU_row
but
  cinfo->input_scan_number == 1
thus causing decompress_smooth_data() to read from
prev_coef_bits_latch[], which was uninitialized.  I was unable to create
the same situation with a real JPEG image.
2020-11-28 07:06:08 -06:00
DRC
ccaba5d789 Fix buffer overrun with certain narrow prog JPEGs
Regression introduced by 6d91e950c8

last_block_column in decompress_smooth_data() can be 0 if, for instance,
decompressing a 4:4:4 image of width 8 or less or a 4:2:2 or 4:2:0 image
of width 16 or less.  Since last_block_column is an unsigned int,
subtracting 1 from it produced 0xFFFFFFFF, the test in line 590 passed,
and we attempted to access blocks from a second block column that didn't
actually exist.

Closes #476
2020-11-25 15:08:28 -06:00
DRC
cfc7e6e58e Bump revision to 2.0.91 for post-beta fixes 2020-11-25 14:10:55 -06:00
DRC
4e52b66f34 Travis: Use Docker tag that matches Git branch 2020-11-24 21:56:19 -06:00
DRC
8cf6f716bc Bump revision to 2.0.90 to prepare for beta 2020-11-24 21:32:48 -06:00
Jonathan Wright
eb14189caa Fix Neon SIMD build issues with Visual Studio
- Use the _M_ARM and _M_ARM64 macros provided by Visual Studio for
  compile-time detection of Arm builds, since __arm__ and __aarch64__
  are only present in GNU-compatible compilers.
- Neon/intrinsics: Use the _CountLeadingZeros() and
  _CountLeadingZeros64() intrinsics provided by Visual Studio, since
  __builtin_clz() and __builtin_clzl() are only present in
  GNU-compatible compilers.
- Neon/intrinsics: Since Visual Studio does not support static vector
  initialization, replace static initialization of Neon vectors with the
  appropriate intrinsics.  Compared to the static initialization
  approach, this produces identical assembly code with both GCC and
  Clang.
- Neon/intrinsics: Since Visual Studio does not support inline assembly
  code, provide alternative code paths for Visual Studio whenever inline
  assembly is used.
- Build: Set FLOATTEST appropriately for AArch64 Visual Studio builds
  (Visual Studio does not emit fused multiply-add [FMA] instructions by
  default for such builds.)
- Neon/intrinsics: Move temporary buffer allocation outside of nested
  loops.  Since Visual Studio configures Arm builds with a relatively
  small amount of stack memory, attempting to allocate those buffers
  within the inner loops caused a stack overflow.

Closes #461
Closes #475
2020-11-24 21:13:16 -06:00
DRC
91dd3b23ad ChangeLog: macOS Armv8/x86-64 univ. binary support 2020-11-24 20:31:59 -06:00
DRC
7e0d94d3a7 Merge branch 'master' into dev 2020-11-24 20:31:51 -06:00
DRC
1c839761cf Force Git to treat testorig.ppm as a binary file
Otherwise, because the file begins with an ASCII header, Git will
erroneously treat is as an ASCII file, and if Git for Windows is
configured with default options (specifically, "Checkout windows-style,
commit Unix-style line endings"), it will add carriage return characters
to all of the "linefeed" characters in the PPM file, thus corrupting it
and causing libjpeg-turbo's regression tests to fail.
2020-11-24 18:54:44 -06:00
DRC
6d91e950c8 Use 5x5 win & 9 AC coeffs when smoothing DC scans
... of progressive images.

Based on:
be8d36d13b
9d528f278e
85f36f0765
63a4d39e38
51336a6ad5

Closes #459
Closes #474
2020-11-24 18:21:42 -06:00
Kornel
1a7384c790 Run turbo's tests with turbo's settings
Fixes #384
2020-11-22 20:58:59 +00:00
Kornel
c302c77d17 Mark mozjpeg's output as acceptable 2020-11-22 20:58:59 +00:00
DRC
d523435e18 Travis: Use Xcode 12.2 for all iOS & macOS builds
There doesn't seem to be any performance or compatibility downside to
this, and it has the advantages of simplicity and consistency between
the PR and official builds.
2020-11-19 19:30:51 -06:00
Kornel
3940a92fa8 Readme refresh 2020-11-19 18:30:55 +00:00
DRC
1ac83cd636 Travis: The Mac build log is now log-macos.txt
(oversight from f7a10a61e3)
2020-11-18 18:16:12 -06:00
DRC
0ba70b6a13 Build: Support macOS Armv8/x86-64 univ. binaries
- Rename IOS_ARMV8_BUILD to ARMV8_BUILD.
- Rename install_ios() to install_subbuild() in makemacpkg.
- Wordsmith the build instructions accordingly.
- Use xcode12.2 image in Travis CI.
2020-11-18 17:40:44 -06:00
DRC
e417033d84 Merge branch 'master' into dev 2020-11-18 14:13:54 -06:00
DRC
6d2e8837b4 jpeg_skip_scanlines(): Avoid NULL + 0 UBSan error
This error occurs at the call to (*cinfo->cconvert->color_convert)() in
sep_upsample() whenever cinfo->upsample->need_context_rows == TRUE
(i.e. whenever h2v2 or h1v2 fancy upsampling is used.)  The error is
innocuous, since (*cinfo->cconvert->color_convert)() points to a dummy
function (noop_convert()) in that case.

Fixes #470
2020-11-18 13:33:47 -06:00
DRC
f7c5489244 Travis: Add /opt/local/bin to PATH for Mac build
(oversight from previous commit)

macports-ci does this, and it's necessary in order for the build script
to find md5sum.
2020-11-18 10:11:21 -06:00
DRC
f7a10a61e3 Build: "OS X"/"OSX" = "macOS"/"MACOS"
There are no supported versions of "OS X" anymore.  The operating system
has been named "macOS" since 10.12 Sierra, which was released four years
ago.
2020-11-17 13:53:33 -06:00
DRC
d111d9ff7a Merge branch 'master' into dev 2020-11-17 11:54:20 -06:00
DRC
10ba6ed336 Travis: Install MacPorts without using macports-ci 2020-11-16 17:38:06 -06:00
DRC
292d78e786 Merge branch 'master' into dev 2020-11-16 15:28:02 -06:00
DRC
88bf1d1678 Build: Set FLOATTEST more intelligently
The "32bit" vs. "64bit" floating point test results actually have
nothing to do with the FPU.  That was a fallacious assumption based on
the observation that, with multiple CPU types, 32-bit and 64-bit builds
produce different floating point test results.  It seems that this is,
in fact, due to differing compiler behavior-- more specifically, whether
fused multiply-add (FMA) instructions are used to combine multiple
floating point operations into a single instruction ("floating point
expression contraction".)  GCC does this by default if the target
supports FMA instructions, which PowerPC and AArch64 targets both do.

Fixes #468
2020-11-16 15:19:42 -06:00
DRC
8f8305981b Merge branch 'master' into dev 2020-11-13 15:21:26 -06:00
DRC
42f7c78fe3 BUILDING.md: Use min. iOS v8 in iOS Armv8 example
This is necessary in order to enable thread-local storage.
2020-11-13 15:18:35 -06:00
DRC
33859880e9 Neon: Auto-detect compiler intrinsics completeness
This allows the Neon intrinsics code to be built successfully (albeit
likely with reduced run-time performance) with Xcode 5.0-6.2
(iOS/AArch64) and Android NDK < r19 (AArch32).  Note that Xcode 5.0-6.2
will not build the Armv8 GAS code without gas-preprocessor.pl, and no
version of Xcode will build the Armv7 GAS code without
gas-preprocessor.pl, so we always use the full Neon intrinsics
implementation by default with macOS and iOS builds.

Auto-detecting the completeness of the compiler's set of Neon intrinsics
also allows us to more intelligently set the default value of
NEON_INTRINSICS, based on the values of HAVE_VLD1*.  This is a
reasonable, albeit imperfect, proxy for whether a compiler has a full
and optimal set of Neon intrinsics.  Specific notes:

  - 64-bit RGB-to-YCbCr color conversion
    does not use any of the intrinsics in question, regresses with GCC
  - 64-bit accurate integer forward DCT
    uses vld1_s16_x3(), regresses with GCC
  - 64-bit Huffman encoding
    uses vld1q_u8_x4(), regresses with GCC
  - 64-bit YCbCr-to-RGB color conversion
    does not use any of the intrinsics in question, regresses with GCC
  - 64-bit accurate integer inverse DCT
    uses vld1_s16_x3(), regresses with GCC
  - 64-bit 4x4 inverse DCT
    uses vld1_s16_x3().  I did not test this algorithm in isolation, so
    it may in fact regress with GCC, but the regression may be hidden by
    the speedup from the new SIMD-accelerated upsampling algorithms.

  - 32-bit RGB-to-YCbCr color conversion:
    uses vld1_u16_x2(), regresses with GCC
  - 32-bit accurate integer forward DCT
    uses vld1_s16_x3(), regression irrelevant because there was no
    previous implementation
  - 32-bit accurate integer inverse DCT
    uses vld1_s16_x3(), regresses with GCC
  - 32-bit fast integer inverse DCT
    does not use any of the intrinsics in question, regresses with GCC
  - 32-bit 4x4 inverse DCT
    uses vld1_s16_x3().  I did not test this algorithm in isolation, so
    it may in fact regress with GCC, but the regression may be hidden by
    the speedup from the new SIMD-accelerated upsampling algorithms.

Presumably when GCC includes a full and optimal set of Neon intrinsics,
the HAVE_VLD1* tests will pass, and the full Neon intrinsics
implementation will be enabled automatically.
2020-11-13 15:16:34 -06:00
DRC
3e9e7c7055 Fix build if WITH_12BIT==1 && WITH_JPEG(7|8)==1
Fixes #466
2020-11-11 17:54:06 -06:00
DRC
bbd8089297 Neon: Finalize intrinsics implementation
- Remove gas-preprocessor.pl.  None of the compilers that can build the
  new intrinsics implementation require gas-preprocessor.pl (tested
  with Xcode and with Clang 3.9+ for Linux.)
- Document that Xcode 6.3.x or later is now required for iOS builds
  (older versions of Xcode do not have a full set of Neon intrinsics.)
- Add a change log entry.
- Do not enable the ASM CMake language unless NEON_INTRINSICS is false.
- Add a Clang/Arm64 test to .travis.yml in order to test the new
  intrinsics implementation.

Closes #455
2020-11-10 19:58:28 -06:00
Martyn Jacques
141f26ff6d Neon: Intrinsics impl. of 2x2 and 4x4 scaled IDCTs
The previous AArch32 and AArch64 GAS implementations have been removed,
since the intrinsics implementations provide the same or better
performance.
2020-11-10 19:09:09 -06:00
Jonathan Wright
4574f01f43 Neon: Intrinsics impl. of h2v1 & h2v2 plain upsamp
There was no previous GAS implementation.

NOTE: This doesn't produce much of a speedup when using -O3, because -O3
already enables Neon autovectorization, which works well for the scalar
C implementation of plain upsampling.  However, the Neon SIMD
implementation will benefit other optimization levels.
2020-11-10 19:09:09 -06:00
Jonathan Wright
ba52a3de32 Neon: Intrinsics impl of h2v1 & h2v2 merged upsamp
There was no previous GAS implementation.

This commit also reverts 40557b2301 and
7723d7f7d0.
7723d7f7d0 was only necessary because
there was no Neon implementation of merged upsampling/color conversion,
and 40557b2301 was only necessary because
of 7723d7f7d0.
2020-11-10 19:09:09 -06:00
Jonathan Wright
240ba417aa Neon: Intrinsics impl. of prog. Huffman encoding
The previous AArch64 GAS implementation has been removed, since the
intrinsics implementation provides the same or better performance.
There was no previous AArch32 GAS implementation.
2020-11-10 19:09:09 -06:00
Jonathan Wright
ed581cd935 Neon: Intrinsics impl. of accurate int inverse DCT
The previous AArch32 and AArch64 GAS implementations are retained by
default when using GCC, in order to avoid a performance regression.  The
intrinsics implementation can be forced on or off using the new
NEON_INTRINSICS CMake variable.
2020-11-10 19:09:09 -06:00
Jonathan Wright
2c6b68e283 Neon: Intrinsics impl. of fast integer Inverse DCT
The previous AArch32 GAS implementation is retained by default when
using GCC, in order to avoid a performance regression.  The intrinsics
implementation can be forced on or off using the new NEON_INTRINSICS
CMake variable.  The previous AArch64 GAS implementation has been
removed, since the intrinsics implementation provides the same or better
performance.
2020-11-10 19:09:09 -06:00
Jonathan Wright
2acfb93c94 Neon: Intrinsics impl. of h1v2 fancy upsamling
There was no previous GAS implementation.
2020-11-10 19:09:09 -06:00
Jonathan Wright
975307775c Neon: Intrinsics impl. of h2v1 & h2v2 fancy upsamp
The previous AArch32 GAS implementation of h2v1 fancy upsampling has
been removed, since the intrinsics implementation provides the same or
better performance.  There was no previous GAS implementation of h2v2
fancy upsampling, and there was no previous AArch64 GAS implementation
of h2v1 fancy upsampling.
2020-11-10 19:09:09 -06:00
Jonathan Wright
5dbd39323c Neon: Intrinsics implementation of YCbCr->RGB565
The previous AArch64 GAS implementation is retained by default when
using GCC, in order to avoid a performance regression.  The intrinsics
implementation can be forced on or off using the new NEON_INTRINSICS
CMake variable.  The previous AArch32 GAS implementation has been
removed, since the intrinsics implementation provides the same or better
performance.
2020-11-10 19:09:09 -06:00
Jonathan Wright
0f35cd68f2 Neon: Intrinsics implementation of YCbCr->RGB
The previous AArch64 GAS implementation is retained by default when
using GCC, in order to avoid a performance regression.  The intrinsics
implementation can be forced on or off using the new NEON_INTRINSICS
CMake variable.  The previous AArch32 GAS implementation has been
removed, since the intrinsics implementation provides the same or better
performance.
2020-11-10 19:09:09 -06:00
Jonathan Wright
f3c3f01d23 Neon: Intrinsics impl. of Huffman encoding
The previous AArch64 GAS implementation is retained by default when
using GCC, in order to avoid a performance regression.  The intrinsics
implementation can be forced on or off using the new NEON_INTRINSICS
CMake variable.  The previous AArch32 GAS implementation has been
removed, since the intrinsics implementation provides the same or better
performance.
2020-11-10 19:09:09 -06:00
Jonathan Wright
d0004de5dd Neon: Intrinsics impl. of accurate int forward DCT
The previous AArch64 GAS implementation is retained by default when
using GCC, in order to avoid a performance regression.  The intrinsics
implementation can be forced on or off using the new NEON_INTRINSICS
CMake variable.  There was no previous AArch32 GAS implementation.
2020-11-10 19:09:09 -06:00
Jonathan Wright
3d84668d42 Neon: Intrinsics impl. of fast integer forward DCT
The previous AArch32 and AArch64 GAS implementations have been removed,
since the intrinsics implementation provides the same or better
performance.
2020-11-10 19:09:09 -06:00
Jonathan Wright
951d3677eb Neon: Intrinsics impl. of int sample conv./quant.
The previous AArch32 and AArch64 GAS implementations have been removed,
since the intrinsics implementation provides the same or better
performance.
2020-11-10 19:09:09 -06:00
Jonathan Wright
366168aa7d Neon: Intrinsics impl. of h2v1 & h2v2 downsampling
The previous AArch64 GAS implementation has been removed, since the
intrinsics implementation provides the same or better performance.
There was no previous AArch32 GAS implementation.
2020-11-10 19:09:09 -06:00
Jonathan Wright
f73b1dbc60 Neon: Intrinsics implementation of RGB->Grayscale
There was no previous GAS implementation.
2020-11-10 19:09:09 -06:00
Jonathan Wright
4f2216b435 Neon: Intrinsics implementation of RGB->YCbCr
The previous AArch32 and AArch64 GAS implementations are retained by
default when using GCC, in order to avoid a performance regression.  The
intrinsics implementation can be forced on or off using a new
NEON_INTRINSICS CMake variable.
2020-11-10 19:09:05 -06:00
DRC
0efc4858d4 Merge branch 'master' into dev 2020-11-09 19:02:28 -06:00
DRC
02227e48a9 Travis: Combine PPC/Arm tests with jpeg-7/8 tests
There is no reason not to, since the jpeg-7 and jpeg-8 API/ABI tests do
not exercise the SIMD extensions any differently than the other tests.
2020-11-09 18:20:41 -06:00
DRC
c7dd191271 Merge branch 'master' into dev 2020-11-08 15:15:02 -06:00
DRC
40557b2301 Build: Fix test failures w/ Arm Neon SIMD exts
Regression caused by
a46c111d9f

Because of 7723d7f7d0, which was
introduced in libjpeg-turbo 1.5.1 in response to #81, merged upsampling/
color conversion is disabled on platforms that have SIMD-accelerated
YCbCr -> RGB color conversion but not SIMD-accelerated merged
upsampling/color conversion.  This was intended to improve performance
with the Neon SIMD extensions, since those are the only SIMD extensions
for which those circumstances apply.  Under normal circumstances, the
separate "plain" (non-fancy) upsampling and color conversion routines
will produce bitwise-identical output to the merged upsampling/color
conversion routines, but that is not the case when skipping scanlines
starting at an odd-numbered scanline.  The modified test introduced in
a46c111d9f does precisely that in order to
validate the fixes introduced in
9120a24743 and
a46c111d9f.

Because of 7723d7f7d0, the segfault fixed
in 9120a24743 and
a46c111d9f didn't affect the Neon SIMD
extensions, so this commit effectively reverts the test modifications in
a46c111d9f when using those SIMD
extensions.  We can get rid of this hack, as well as
7723d7f7d0, once a Neon implementation of
merged upsampling/color conversion is available.
2020-11-08 14:57:01 -06:00
DRC
a524b9b06b Travis: Regression-test Armv8 and PPC SIMD exts
Currently this only tests the 64-bit code paths, but it's better than
nothing.
2020-11-06 17:24:16 -06:00
DRC
7c1a1789d2 Merge branch 'master' into dev 2020-11-05 16:04:55 -06:00
DRC
6e632af9f6 Demote "fast" [I]DCT algorithms to legacy status
- Refer to the "slow" [I]DCT algorithms as "accurate" instead, since
  they are not slow under libjpeg-turbo.
- Adjust documentation claims to reflect the fact that the "slow" and
  "fast" algorithms produce about the same performance on AVX2-equipped
  CPUs (because of the dual-lane nature of AVX2, it was not possible to
  accelerate the "fast" algorithm beyond what was achievable with SSE2.)
  Also adjust the claims to reflect the fact that the "fast" algorithm
  tends to be ~5-15% faster than the "slow" algorithm on
  non-AVX2-equipped CPUs, regardless of the use of the libjpeg-turbo
  SIMD extensions.
- Indicate the legacy status of the "fast" and float algorithms in the
  documentation and cjpeg/djpeg usage info.
- Remove obsolete paragraph in the djpeg man page that suggested that
  the float algorithm could be faster than the "fast" algorithm on some
  CPUs.
2020-11-05 15:59:31 -06:00
DRC
cd342acf7f Merge branch 'master' into dev 2020-10-27 16:45:23 -05:00
DRC
c3bfbde21d jpegtran.c: "subarea" = "region"
It is our convention to use the term "region" when referring to crop
specs, since this is more consistent with the terminology used by the
rest of the image processing community.
2020-10-27 15:45:24 -05:00
DRC
a8656d703d jpegtran.1: Minor formatting tweak 2020-10-27 15:45:24 -05:00
DRC
9ecb67c219 transupp.c: Code formatting tweaks 2020-10-27 15:45:24 -05:00
DRC
53c685b7f4 cdjpeg.h: Remove unused function stub
enable_signal_catcher() was only needed with libjpeg's temp. file memory
manager (jmemname.c), which libjpeg-turbo has never supported.
2020-10-27 15:45:24 -05:00
DRC
d27b935a88 Consistify formatting to simplify checkstyle
The checkstyle script was hastily developed prior to libjpeg-turbo 2.0
beta1, so it has a lot of exceptions and is thus prone to false
negatives.  This commit eliminates some of those exceptions.
2020-10-27 15:45:09 -05:00
DRC
88ae60986e Merge branch 'ijg' into dev
- Restore GIF read/compressed GIF write support from jpeg-6a and
  jpeg-9d.
- Integrate jpegtran -wipe and -drop options from jpeg-9a and jpeg-9d.
- Integrate jpegtran -crop extension (for expanding the image size) from
  jpeg-9a and jpeg-9d.
- Integrate other minor code tweaks from jpeg-9*
2020-10-27 13:32:13 -05:00
DRC
7e4eac7021 Merge branch 'master' into dev 2020-10-26 09:41:32 -05:00
Guido Vollbeding
9fc018fd1a The Independent JPEG Group's JPEG software v9d 2020-10-23 10:00:48 -05:00
Guido Vollbeding
96e4e7eb60 The Independent JPEG Group's JPEG software v9c 2020-10-23 09:56:39 -05:00
DRC
26e3aedbe5 README.ijg: Update URLs; remove Usenet info 2020-10-22 23:06:22 -05:00
DRC
b4525f9f16 jversion.h: Update copyrights 2020-10-19 22:05:09 -05:00
DRC
59352195b2 Merge branch 'master' into dev 2020-10-19 21:17:46 -05:00
DRC
f7ca3c5a3d Build: Improve Arm 32-bit cross-comp./packaging
- Set CPU_TYPE=arm if performing a 32-bit build on an AArch64 system.
  This eliminates the need to use a CMake toolchain file.
- Set RPMARCH=armv7hl if building on a 32-bit Arm system with an FPU.
- Set RPMARCH=armv7hl and DEBARCH=armhf if performing a 32-bit build
  using a gnueabihf toolchain.
- If performing a 32-bit Arm build, generate a 32-bit supplementary DEB
  package for AArch64 systems.
2020-10-19 16:25:11 -05:00
DRC
1ed312eab6 "ARM"="Arm", "NEON"="Neon"
Refer to:
https://www.arm.com/company/policies/trademarks/arm-trademark-list/arm-trademark
https://www.arm.com/company/policies/trademarks/arm-trademark-list/neon-trademark

NOTE: These changes are only applied to change log entries for 2.0.x and
later, since the change log is a historical record and Arm's new
trademark policy did not go into effect until late 2017.
2020-10-15 17:47:31 -05:00
DRC
b8200c6601 Build: Add CMake package config files
Based on:
d34b89b411

Closes #339
Closes #342
2020-10-15 10:26:54 -05:00
DRC
ea8f643c16 Build: Remove lib32 symlink from official Mac pkg
(oversight from 4c5a15c362)
2020-10-15 10:26:17 -05:00
DRC
460dfe40e1 ChangeLog: Acknowledge 2.0.6 release 2020-10-15 10:26:17 -05:00
DRC
ae08115d4d Merge branch 'master' into dev 2020-10-15 10:25:46 -05:00
DRC
b5a1472781 Build: Fix permissions 2020-10-15 10:22:51 -05:00
DRC
190382b75f ChangeLog: Fix minor formatting issue 2020-10-14 15:14:26 -05:00
DRC
8789a5e255 Merge branch 'master' into dev 2020-10-01 21:27:47 -05:00
DRC
89c88c2509 ChangeLog.md: jpeg_crop_scanline(), not scanlines 2020-10-01 21:26:04 -05:00
DRC
2ec4a5ebe3 Fix dec artifacts w/cropped+smoothed prog DC scans
This commit modifies decompress_smooth_data(), adding missing MCU column
offsets to the prev_block_row and next_block_row indices that are used
for block rows other than the first and last.  Effectively, this
eliminates unexpected visual artifacts when using jpeg_crop_scanline()
along with interblock smoothing while decompressing the DC scan of a
progressive JPEG image.

Based on:
0227d4fb48

Fixes #456
Closes #457
2020-10-01 21:22:58 -05:00
DRC
1d7faf84a0 Merge branch 'master' into dev 2020-10-01 18:17:46 -05:00
DRC
8e895c79e1 Java dox: Fix errors w/ javadoc in Java 8 or later 2020-10-01 18:14:21 -05:00
DRC
2b121d39e7 Merge branch 'master' into dev 2020-10-01 16:20:14 -05:00
DRC
2d14fc2e3b Dox: Re-generate using Doxygen 1.8.20
This fixes a GitHub Dependabot alert regarding jquery.js.

Fixes #421
2020-10-01 14:36:30 -05:00
Kornel
d23e3fc586 Update release token 2020-09-29 11:41:33 +01:00
Kornel Lesiński
f1d512de2f Make test output match turbojpeg tests 2020-09-29 11:41:14 +01:00
dofuuz
751ce7d9f3 Automate Windows build and deploy (with PNG support) (#379) 2020-09-29 11:40:16 +01:00
Kornel
ffea183e55 Response to the rumor mill 2020-09-29 10:32:19 +01:00
dofuuz
3fed7e016b Add PNG support to cjpeg shared build 2020-09-20 23:11:41 +01:00
DRC
6ab61fa1d1 Merge branch 'master' into dev 2020-09-13 17:02:27 -05:00
DRC
fe5b6a1c7c TJPEG: Remove unnecessary setCompDefaults() retval
setCompDefaults() hasn't thrown an error since
aa7459050d was introduced in 2.0.x.
2020-09-13 16:58:08 -05:00
Kornel Lesiński
8fb32c0a39 Work around fussy zlib on macOS 2020-08-15 19:36:42 +01:00
Kornel Lesiński
b3e739028a Merge libjpeg-turbo 2.0.5
* tag '2.0.5':
  TurboJPEG: Make global error handling thread-safe
  ChangeLog.md: Add missing sub-header for 2.0.5
  ChangeLog.md: List CVE ID fixed by previous commit
  rdppm.c: Fix buf overrun caused by bad binary PPM
  Build: Add missing jpegtran-icc test dependency
  rdswitch.c: Eliminate spaces before semicolons
  TJCompressor.compress(int): Fix YUV-to-JPEG error
  Bump version to 2.0.5; Document previous commit
  MIPS DSPr2: Work around various 'make test' errors
  MIPS DSPr2: Fix compiler warning with -mdspr2
  MIPS SIMD: Always honor JSIMD_FORCE* env vars
  Test: Honor CMAKE_CROSSCOMPILING_EMULATOR variable
2020-08-15 19:36:31 +01:00
DRC
6ee5d5f568 ARMv8 NEON: Support Windows builds w/AArch64 MinGW
Based on:
c5ef665928

Closes #438
2020-07-28 18:24:41 -05:00
DRC
fe79f56b77 Merge branch 'master' into dev 2020-07-28 15:09:00 -05:00
DRC
c1037f4380 Fix bad return val when skipping past end of image
Fixes #439
2020-07-28 14:59:41 -05:00
DRC
30282a878c README.md, jquant2.c: Use gender-neutral pronouns
Closes #444
2020-07-28 13:08:35 -05:00
DRC
a46c111d9f Further jpeg_skip_scanlines() fixes
- Introduce a partial image decompression regression test script that
  validates the correctness of jpeg_skip_scanlines() and
  jpeg_crop_scanlines() for a variety of cropping regions and libjpeg
  settings.

  This regression test catches the following issues:
  #182, fixed in 5bc43c7821
  #237, fixed in 6e95c08649794f5018608f37250026a45ead2db8
  #244, fixed in 398c1e9acc
  #441, fully fixed in this commit

  It does not catch the following issues:
  #194, fixed in 773040f9d9
  #244 (additional segfault), fixed in
       9120a24743

- Modify the libjpeg-turbo regression test suite (make test) so that it
  checks for the issue reported in #441 (segfault in
  jpeg_skip_scanlines() when used with 4:2:0 merged upsampling/color
  conversion.)

- Fix issues in jpeg_skip_scanlines() that caused incorrect output with
  h2v2 (4:2:0) merged upsampling/color conversion.  The previous commit
  fixed the segfault reported in #441, but that was a symptom of a
  larger problem.  Because merged 4:2:0 upsampling uses a "spare row"
  buffer, it is necessary to allow the upsampler to run when skipping
  rows (fancy 4:2:0 upsampling, which uses context rows, also requires
  this.)  Otherwise, if skipping starts at an odd-numbered row, the
  output image will be incorrect.

- Throw an error if jpeg_skip_scanlines() is called with two-pass color
  quantization enabled.  With two-pass color quantization, the first
  pass occurs within jpeg_start_decompress(), so subsequent calls to
  jpeg_skip_scanlines() interfere with the multipass state and prevent
  the second pass from occurring during subsequent calls to
  jpeg_read_scanlines().
2020-07-28 12:47:53 -05:00
DRC
9120a24743 Fix jpeg_skip_scanlines() segfault w/merged upsamp
The additional segfault mentioned in #244 was due to the fact that
the merged upsamplers use a different private structure than the
non-merged upsamplers.  jpeg_skip_scanlines() was assuming the latter, so
when merged upsampling was enabled, jpeg_skip_scanlines() clobbered one
of the IDCT method pointers in the merged upsampler's private structure.

For reasons unknown, the test image in #441 did not encounter this
segfault (too small?), but it encountered an issue similar to the one
fixed in 5bc43c7821, whereby it was
necessary to set up a dummy postprocessing function in
read_and_discard_scanlines() when merged upsampling was enabled.
Failing to do so caused either a segfault in merged_2v_upsample() (due
to a NULL pointer being passed to jcopy_sample_rows()) or an error
("Corrupt JPEG data: premature end of data segment"), depending on the
number of scanlines skipped and whether the first scanline skipped was
an odd- or even-numbered row.

Fixes #441
Fixes #244 (for real this time)
2020-07-23 23:19:13 -05:00
DRC
c965dc7a79 ChangeLog.md: Add missing sub-header for 2.0.6 2020-07-22 13:59:27 -05:00
DRC
b9142b21f8 Android: Fix "using JNI after critical get" errors
(again.)

Fixes #300
2020-07-22 13:53:21 -05:00
DRC
7d829bfa30 Bump version to 2.0.6 to prepare for new commits 2020-07-07 10:16:29 -05:00
DRC
fb6f5e8b01 Java/Mac:Remove obsolete libturbojpeg.jnilib alias
IIRC, this was only necessary with the version of Java 1.5 that shipped
with OS X 10.4 "Tiger".  Apple's implementation of Java 6 ("Java for
OS X Systems") supported both .jnilib and .dylib extensions for JNI
libraries, but Oracle's implementation of Java has only ever supported
the .dylib extension.
2020-06-25 21:41:30 -05:00
DRC
c77783ed41 BUILDING.md: Undocument 32-bit Mac build/packaging
(oversight from previous commit)
2020-06-25 21:28:33 -05:00
DRC
4c5a15c362 Eliminate 32-bit Mac build/packaging support
The scales have now tilted overwhelmingly in favor of eliminating
support for 32-bit Macs:

- 32-bit applications are only necessary in order to support OS X 10.5
  "Leopard" and OS X 10.6 "Snow Leopard".  OS X 10.7 "Lion" requires a
  64-bit Mac and supports all 64-bit Macs.
- 32-bit applications are no longer allowed in the macOS App Store.
- 32-bit applications no longer run in macOS 10.15 "Catalina".
- 32-bit applications do not support thread-local storage, so the
  TurboJPEG API library's global error handler is not thread-safe with
  such applications.
- libjpeg-turbo 2.1.x no longer supports 32-bit iOS apps, so it makes
  sense to also eliminate support for 32-bit macOS applications.

It's time.
2020-06-25 19:48:18 -05:00
DRC
b797f70012 Build: Eliminate Cygwin packaging support
We haven't provided official Cygwin builds since 1.4.x, since Cygwin
now supplies its own libjpeg-turbo packages (although they apparently
haven't been updated past 1.5.3.)
2020-06-25 19:05:45 -05:00
DRC
80d77720c3 AppVeyor: We no longer build/package JNI JARs
This was done solely to support Java Web Start, which is now obsolete.
2020-06-19 00:22:49 -05:00
DRC
aecee25695 Merge branch 'master' into dev 2020-06-19 00:03:51 -05:00
DRC
ae87a95861 TurboJPEG: Make global error handling thread-safe
... on platforms that support thread-local storage.  This currently
includes all supported platforms except 32-bit macOS.

Fixes #396
2020-06-18 23:40:20 -05:00
DRC
b443c541b9 ChangeLog.md: Add missing sub-header for 2.0.5 2020-06-03 16:08:08 -05:00
DRC
cf483eee49 ChangeLog.md: List CVE ID fixed by previous commit 2020-06-03 16:04:06 -05:00
DRC
70040cb7ee Merge branch 'master' into dev 2020-06-02 15:05:43 -05:00
DRC
3de15e0c34 rdppm.c: Fix buf overrun caused by bad binary PPM
This extends the fix in 1e81b0c3ea to
include binary PPM files with maximum values < 255, thus preventing a
malformed binary PPM input file with those specifications from
triggering an overrun of the rescale array and potentially crashing
cjpeg, TJBench, or any program that uses the tjLoadImage() function.

Fixes #433
2020-06-02 14:51:17 -05:00
Andrew Childs
a2291b252d Build: Add missing jpegtran-icc test dependency
The jpegtran-icc test must run after the cjpeg-rgb-islow test, since
the latter generates testout_rgb_islow.jpg.
2020-05-05 00:38:39 -05:00
DRC
219e8e8f65 Merge branch 'master' into dev 2020-04-02 22:26:19 -05:00
DRC
a36deef563 rdswitch.c: Eliminate spaces before semicolons
(detected with a modified version of checkstyle)
2020-04-02 22:25:44 -05:00
Chan, Danny
6d95c51adf Fix markdown format 2020-03-11 14:31:37 +00:00
DRC
b0f92a1d6c Merge branch 'master' into dev 2020-03-04 11:09:41 -06:00
NancyLi1013
5ea5482872 Add vcpkg installation instructions (#353)
* Add vcpkg installation instructions
2020-02-26 10:51:25 +00:00
DRC
8cc1277b69 TJCompressor.compress(int): Fix YUV-to-JPEG error
Due to an oversight, the TJCompressor.compress(int) method did not
handle YUV source images.

Fixes #413
2020-02-24 13:35:30 -06:00
DRC
77ff3bd66d Merge branch 'master' into dev 2020-02-18 12:56:01 -06:00
DRC
ecf5f9a96a Bump version to 2.0.5; Document previous commit 2020-02-18 10:43:48 -06:00
DRC
00d48d7e8c Merge branch 'master' into dev 2020-02-17 18:14:10 -06:00
DRC
035262a18d MIPS DSPr2: Work around various 'make test' errors
Referring to #408, this commit #ifdefs DSPr2 SIMD functions that only
work on little endian processors, and it completely excludes
jsimd_h2v1_downsample_dspr2() and jsimd_h2v2_downsample_dspr2().  The
latter two functions fail with the TJBench tiling regression tests, most
likely because the implementation of the functions predates those tests.
2020-02-17 18:13:31 -06:00
DRC
ed7cab47d9 MIPS DSPr2: Fix compiler warning with -mdspr2
If -mdspr2 is passed to the compiler, __mips_dsp will be defined, and
__mips_dsp_rev will be >= 2, so parse_proc_cpuinfo() will not be used.
2020-02-17 16:35:00 -06:00
DRC
42d679b9fc MIPS SIMD: Always honor JSIMD_FORCE* env vars
Previously, these environment variables were not honored unless a 74K
CPU was detected, but this detection doesn't work properly with QEMU's
user mode emulation.  With all other CPU types, libjpeg-turbo honors
JSIMD_FORCE* regardless of CPU detection.
2020-02-17 15:19:32 -06:00
DRC
044c22e12f Test: Honor CMAKE_CROSSCOMPILING_EMULATOR variable
This CMake variable is intended to define a wrapper program for
executing cross-compiled executables.  However, CTest doesn't use
CMAKE_CROSSCOMPILING_EMULATOR, because it isn't obvious which tests
should be executed with the wrapper and which tests are scripts that
don't need it.  This commit manually prepends
${CMAKE_CROSSCOMPILING_EMULATOR} to all unit test command lines that
execute a program built by the libjpeg-turbo build system.  Thus, one
can set CMAKE_CROSSCOMPILING_EMULATOR in a CMake toolchain file to (for
instance) "qemu-{architecture} {qemu_arguments}") in order to execute
all eligible unit tests using QEMU.
2020-02-17 14:41:43 -06:00
Kornel Lesiński
1d2320994d Merge remote-tracking branch 'turbo/master'
* turbo/master: (105 commits)
  makemacpkg.in: Allow universal DMG w/o ARMv8 arch
  Remove more unnecessary NULL checks before free()
  Eliminate unnecessary NULL checks before tjFree()
  Eliminate unnecessary NULL checks before free()
  simd/arm64/jsimd_neon.S: Fix checkstyle issue
  tjTransform(): Use instance err. for bad crop spec
  README.md, package specs: Various tweaks
  djpeg.c: Fix compiler warning w/o mem. src manager
  ARMv8 SIMD: Support execute-only memory (XOM)
  Travis: Use MacPorts instead of Homebrew
  Huffman enc.: Fix very rare local buffer overrun
  TurboJPEG: Fix erroneous subsampling detection
  ChangeLog.md: List CVE IDs for specific fixes
  tjDecompressToYUV*(): Fix OOB write/double free
  64-bit tjbench: Fix signed int overflow/segfault
  Fix copyright header formatting buglets
  example.txt: Avoid undefined setjmp() behavior
  Mac: Support hiding SIMD fct symbols w/ NASM 2.14+
  TJBench: Fix output with -componly -quiet
  Build: Don't require ASM_NASM if !REQUIRE_SIMD
  ...
2020-02-13 10:45:55 +00:00
DRC
9a2cf32317 Build: Enable separate iOS pkg/DMG w/ sim support
Refer to #406
2020-02-11 13:56:12 -06:00
DRC
6aabca86d3 Merge branch 'master' into dev 2020-02-11 12:47:12 -06:00
DRC
70327296e2 makemacpkg.in: Allow universal DMG w/o ARMv8 arch
(buglet)
2020-02-07 17:04:30 -06:00
DRC
379edfd815 AppVeyor: Use Visual C++ 2015 instead of 2010
Visual C++ < 2015 is no longer under mainstream support, and Visual C++
2010 will not be supported at all after July of this year.
(https://docs.microsoft.com/en-us/visualstudio/releases/2019/servicing)
2020-01-16 20:55:42 -06:00
DRC
ada6ea5105 BUILDING.md: Update Visual C++ recommendations 2020-01-16 20:52:15 -06:00
DRC
167b5a8059 Merge branch 'master' into dev 2020-01-08 15:02:58 -06:00
DRC
f81833aed6 Remove more unnecessary NULL checks before free() 2020-01-08 15:01:38 -06:00
DRC
4c57ad476c Merge branch 'master' into dev 2020-01-08 14:26:02 -06:00
DRC
00607ec260 Eliminate unnecessary NULL checks before tjFree()
+ document that tjFree() accepts NULL pointers without complaint.
Effectively, it has had that behavior all along, but the API does not
guarantee that tjFree() will be implemented with free() behind the
scenes, so it's best to formalize the behavior.
2020-01-08 14:24:37 -06:00
DRC
04d3143a65 Merge branch 'master' into dev 2020-01-07 16:21:03 -06:00
DRC
fdf8903354 Eliminate unnecessary NULL checks before free()
This programming practice (which exists in other code bases as well)
is a by-product of having used early C compilers that did not properly
handle free(NULL).  All modern compilers should properly handle that.

Fixes #398
2020-01-07 16:15:23 -06:00
DRC
b34c85ea4a Merge branch 'master' into dev 2019-12-31 01:20:12 -06:00
DRC
166e34213e simd/arm64/jsimd_neon.S: Fix checkstyle issue 2019-12-31 01:10:30 -06:00
DRC
c4675d62e8 Merge branch 'master' into dev 2019-12-31 00:58:42 -06:00
DRC
6367924ac6 tjTransform(): Use instance err. for bad crop spec
Addresses a concern raised in #396
2019-12-31 00:35:08 -06:00
DRC
29f718ee63 README.md, package specs: Various tweaks
- Don't enumerate the types of SIMD instructions that libjpeg-turbo
  supports, as this can change without notice.
- Use more clear terminology when describing support for libjpeg v7/v8
  features ("libjpeg" is, colloquially but not officially, the name for
  the IJG's software, whereas the "libjpeg API" refers to our emulation
  of said software.)
- "PhotoShop" = "Photoshop" (StudLy Caps Police)
- Adjust dynamic library versions to reflect the addition of
  jpeg_read_icc_profile() and jpeg_write_icc_profile() in
  libjpeg-turbo 2.0.x.
2019-12-31 00:27:04 -06:00
DRC
fe50cd9978 djpeg.c: Fix compiler warning w/o mem. src manager
insize is only used when the in-memory source manager is compiled in.
2019-12-31 00:05:05 -06:00
DRC
b542e4c8e9 ARMv8 SIMD: Support execute-only memory (XOM)
Move constants out of the .text section in simd/arm64/jsimd_neon.S and
into a .rodata section.  This ensures that the ARMv8 NEON SIMD
extensions are compatible with memory layouts that are marked
execute-only (and thus unreadable.)

Based on:
88f3ca7664

Closes #318
2019-12-20 14:24:10 -06:00
DRC
80acd5c4a7 Remove code for the obsolete RLE image format
libjpeg-turbo never included that code, because it requires an external
library (the Utah Raster Toolkit.)  The RLE image format was supplanted
by GIF in the late 1980s, so it is rarely seen these days.  (It had a
lousy Weissman score, anyhow.)
2019-12-19 10:36:26 -06:00
DRC
5000eaa3a6 cdjpeg.c: Fix Visual C++ compiler warning
(introduced by previous commit)
2019-12-19 10:13:05 -06:00
DRC
e98b061282 Add fault tolerance features to djpeg and jpegtran
- Enable progress reporting at run time using a new -report argument
  (cjpeg now supports that argument as well)
- Limit the allowable number of scans using a new -maxscans argument
- Treat warnings as fatal using a new -strict argument

This mainly demonstrates how to work around the two issues with the
JPEG standard described here:
https://libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf
since those and similar issues continue to be erroneously reported as
libjpeg-turbo bugs.
2019-12-18 15:35:56 -06:00
DRC
54288598bb ChangeLog.md: Document 81b8c0ee 2019-12-17 15:48:10 -06:00
DRC
81b8c0eed5 Loongson MMI: Merge with MIPS64/add auto-detection
Modern Loongson processors are MIPS64-compatible, and MMI instructions
are now supported in the mainline of GCC.  Thus, this commit adds
compile-time and run-time auto-detection of MMI instructions and moves
the MMI SIMD extensions for libjpeg-turbo from simd/loongson/ to
simd/mips64/.  That will allow MMI and MSA instructions to co-exist
in the same build once #377 has been integrated.

Based on:
82953ddd61

Closes #383
2019-12-17 14:35:49 -06:00
DRC
52fef34928 Eliminate internal use of GETJOCTET() macro
Because of 01e3032354 (officially
eliminating support for compilers without unsigned char, since we never
effectively supported those compilers anyhow), GETJOCTET() is now a
no-op.  Since that macro is in jmorecfg.h, it is part of the de facto
libjpeg API and must remain in the public headers.  However, there is no
reason to continue using it internally, and eliminating its internal use
improves code readability.
2019-12-10 19:10:55 -06:00
mayeut
e821464f79 ARM64 NEON SIMD impl. of prog. Huffman encoding
This commit adds ARM64 NEON optimizations for the
encode_mcu_AC_first() and encode_mcu_AC_refine() functions used in
progressive Huffman encoding.

Compression speedups for the typical set of five libjpeg-turbo test
images (https://libjpeg-turbo.org/About/Performance):
Cortex-A53: 23.8-39.2% (avg. 32.2%)
Cortex-A72: 26.8-41.1% (avg. 33.5%)
Apple A7:  29.7-45.9% (avg. 39.6%)

Closes #229
2019-12-10 00:21:57 -06:00
DRC
b8a7680e12 Merge branch 'master' into dev 2019-12-05 22:38:05 -06:00
DRC
52291467e1 Travis: Use MacPorts instead of Homebrew
Homebrew tends to drop support for a macOS release the second that Apple
stops releasing security updates for it, and that makes HB difficult to
use with some of the Travis macOS images.  Furthermore, even on
supported macOS releases, HB sometimes tries to build GCC from source
even if a binary (bottle) is available.  Long story short, MacPorts just
generally has better backward compatibility.  MacPorts is also what I
personally use on the official libjpeg-turbo build machine.
2019-12-05 22:28:18 -06:00
DRC
f64c5508df Merge branch 'master' into dev 2019-12-05 15:41:28 -06:00
DRC
c76f4a0826 Huffman enc.: Fix very rare local buffer overrun
... detected by ASan.  This is a similar issue to the issue that was
fixed with 402a715f82.  Apparently it is
possible to create a malformed JPEG image that exceeds the Huffman
encoder's 256-byte local buffer when attempting to losslessly tranform
the image.  That makes sense, given that it was necessary to extend the
Huffman decoder's local buffer to 512 bytes in order to handle all
pathological cases (refer to 0463f7c9aad060fcd56e98d025ce16185279e2bc.)

Since this issue affected only lossless transformation, a workflow that
isn't generally exposed to arbitrary data exploits, and since the
overrun did not overflow the stack (i.e. it did not result in a segfault
or other user-visible issue, and valgrind didn't even detect it), it did
not likely pose a security risk.

Fixes #392
2019-12-05 14:47:05 -06:00
DRC
26b4d62a65 Merge branch 'master' into dev 2019-11-15 13:58:22 -06:00
DRC
c0b16e3d2b TurboJPEG: Fix erroneous subsampling detection
... that caused some JPEG images with unusual sampling factors to be
misidentified as 4:4:4.  This led to a buffer overflow when attempting
to decompress some such images using tjDecompressToYUV*().

Regression introduced by 479501b07c

The correct behavior is for the TurboJPEG API to refuse to decompress
such images, which it did prior to the aforementioned commit.

Fixes #389
2019-11-15 13:48:50 -06:00
DRC
6cedf37c83 ChangeLog.md: List CVE IDs for specific fixes 2019-11-15 12:46:49 -06:00
DRC
9c6f79e919 Fix formatting issues detected by checkstyle 2019-11-14 12:16:38 -06:00
DRC
f60b6dd36f Remove vestigial jpeg_nbits_table.inc
Not needed since 087c29e07f
2019-11-12 17:42:39 -06:00
DRC
c43a5081ce Merge branch 'master' into dev 2019-11-12 17:07:46 -06:00
DRC
bd20344b0a tjDecompressToYUV*(): Fix OOB write/double free
... when attempting to decompress grayscale JPEG images with sampling
factors != 1.

Fixes #387
2019-11-12 16:35:57 -06:00
DRC
c30b1e72da 64-bit tjbench: Fix signed int overflow/segfault
... that occurred when attempting to decompress images with more than
715827882 (2048*1024*1024 / 3) pixels.

Fixes #388
2019-11-12 12:51:35 -06:00
DRC
713c451f58 Enable SSE2 progressive Huffman encoder for x32
Referring to #289, I'm not sure where I arrived at the conclusion that
the SSE2 progressive Huffman encoder doesn't provide any speedup for
x32.  Upon re-testing, I discovered it to be about 50% faster than the
C encoder.

This commit also re-purposes one of the CI tests (specifically, the
jpeg-7 API/ABI test) so that it tests x32 as well.
2019-11-08 16:03:38 -06:00
DRC
2234deeeed Fix MSan use-of-uninitialized-value error
... introduced by 42825b68d5.  In fact,
fault-tolerant multi-scan block smoothing cannot currently be used with
the arithmetic decoder, because that decoder doesn't have any way of
distinguishing a normal end of scan from an unexpected end of scan.
Thus, this commit also modifies the change log to reset the expectations
regarding the scope of the fault-tolerant multi-scan block smoothing
feature.  If, at some point in the future, the arithmetic decoder can be
modified to detect an unexpected end of scan, then one would need only
set entropy->pub.insufficient_data = TRUE when the arithmetic decoder
encounters an unexpected end of scan in order to make fault-tolerant
block smoothing work properly with that decoder.
2019-11-08 13:51:34 -06:00
DRC
82695cfddf ChangeLog: Acknowledge 2.0.3/de-acknowledge 2.0.4
It is very unlikely that there will be an official 2.0.4 release.
2019-11-07 15:15:36 -06:00
DRC
42825b68d5 Fault-tolerant multi-scan block smoothing
This commit modifies the behavior of the block smoothing algorithm in
the libjpeg API library so that, if a scan in a multi-scan JPEG image is
incomplete (due to premature termination of the image stream), the block
smoothing parameters from the previous (complete) scan are used to
smooth any iMCU rows that the incomplete scan does not contain.

Closes #343
2019-11-07 15:12:54 -06:00
DRC
f2d4b47315 Travis: Use Docker tag that matches Git branch
dcommander/buildljt:dev is a CentOS 6 container with YASM 1.2.0 rather
than NASM 2.10, so it can build the new optimized SSE2 Huffman encoder.
2019-11-07 03:07:17 -06:00
DRC
45dff48c9f Merge branch 'master' into dev 2019-11-06 23:02:03 -06:00
DRC
622c462e48 Fix copyright header formatting buglets 2019-11-06 17:24:34 -06:00
DRC
410c028f33 example.txt: Avoid undefined setjmp() behavior
Modifying a locally-defined non-volatile variable below the setjmp()
return point results in undefined behavior whereby the variable may not
have the expected value after setjmp() returns.

Fixes #379
2019-11-06 16:16:54 -06:00
DRC
d70047fcd2 Travis: Use GCC 6 for Mac pre-release builds
The primary impetus for this is to eliminate build warnings, such as

  (32-bit only)
  section "__textcoal_nt" is deprecated

  object file (XXXXXX.o) was built for newer OSX version (10.XX) than
  being linked (10.5)

Upgrading to GCC 6 results in neutral performance for compression,
a measured average overall decompression speedup of 2.5% for 64-bit
code, and a measured average overall decompression speedup of -4.3% for
32-bit code on a 3 GHz Core i7.  The 4.3% slow-down for 32-bit code is
deemed acceptable, given that 32-bit macOS apps are deprecated.
2019-11-05 17:57:59 -06:00
DRC
cbf0fcc8b7 i386 SSE2 Huffman: Fix pointer arithmetic issue
Splitting the pointer arithmetic in GET_SYM() into a separate add and
sub instruction was an attempt to work around an error ("invalid operand
type") that occurred when assembling the file with NASM.  However, this
created a link error on macOS ("ld: illegal text-relocation to
'_jconst_huff_encode_one_block' in
simd/CMakeFiles/simd.dir/i386/jchuff-sse2.asm.o from
'_jsimd_huff_encode_one_block_sse2' in
simd/CMakeFiles/simd.dir/i386/jchuff-sse2.asm.o for architecture i386")
and also changed the alignment of the code in ways that might have
affected the previous benchmark results (which took a great deal of time
to obtain.)  Ultimately, the path of least resistance is just to
require NASM 2.13 or later.
2019-11-05 15:56:28 -06:00
DRC
bbedb4b564 Merge branch 'master' into dev 2019-11-05 15:43:21 -06:00
DRC
cf54623b08 Mac: Support hiding SIMD fct symbols w/ NASM 2.14+
(NASM 2.14+ now supports the private_extern section directive, which was
previously only available with YASM.)
2019-11-05 15:41:59 -06:00
DRC
087c29e07f Optimize Huffman encoding
This commit improves the C and SSE2 Huffman encoding implementations in
the following ways:

- Avoid using xmm8-xmm15 in the x86-64 SSE2 implementation.  There is no
  actual need to use those registers, and avoiding them produces a
  cleaner WIN64 function entry/exit-- as well as shorter code, since REX
  prefixes can be avoided (this is helpful on certain CPUs, such as
  Intel Atom, for which instruction fetch and decoding can be a
  bottleneck.)
- Optimize register usage so that fewer REX prefixes and
  register-register moves are needed.
- Use the bit counter to store the number of free bits in the bit buffer
  rather than the number of bits in the bit buffer.  This changes the
  method for inserting a code into the bit buffer to:

  (put_buffer |= code << (free_bits -= code_size));

  As a result:
  * Only one bit counter needs to stay in a register (we just keep it in
    cl.)
  * The bit buffer contents are already properly aligned to be written
    out (after a byte swap.)
  * Adjusting the free bits counter and checking if the bit buffer is
    full can be combined into a single operation.
  * We can wait to flush the bit buffer until the buffer is actually
    full and not just in danger of becoming full.  Thus, eight bytes can
    be flushed at a time.

- Speed is quite sensitive to the alignment of branch target labels, so
  insert some padding and remove branches from the flush code.
  (Flushing this way isn't actually faster when compared to using
  branches, but the branchless code doesn't need extra alignment and is
  thus smaller.)
- Speculatively write out the bit buffer as a single 8-byte write,
  falling back to a byte-by-byte write only if there are any 0xFF bytes
  in the bit buffer that need to be encoded as 0xFF 0x00.
- Use MMX registers for the 32-bit implementation (so the bit buffer can
  be 64 bits wide.)
- Slightly reduce overall function code size.
- Eliminate or combine a few SSE instructions.
- Make some minor improvements to instruction scheduling.
- Adjust flush_bits() in jchuff.c to handle cases in which the bit
  buffer has less than 7 free bits (apparently that couldn't happen
  before.)

Based on:
947a09defa
262ebb6b81
6e9a091221

See change log for performance claims.

Closes #292
2019-11-04 19:04:05 -06:00
DRC
d92ae5df0c Merge branch 'master' into dev 2019-11-04 18:50:45 -06:00
DRC
ac59b2c582 TJBench: Fix output with -componly -quiet 2019-11-04 18:49:46 -06:00
DRC
6902cdb177 Build: Don't require ASM_NASM if !REQUIRE_SIMD
The build system is supposed to fall back to a non-SIMD build if
WITH_SIMD==1 but REQUIRE_SIMD==0.

Based on:
972df912d0

Closes #384
2019-10-29 12:08:40 -05:00
DRC
adf9cc942f j*huff.c: Remove crufty ASSIGN_STATE() macro
This macro is a relic of libjpeg's historic need to support a wide
variety of C compilers with varying degrees of compatibility.  Such was
necessary during the open systems era, because C compilers were often
supplied by the system vendor.  Prior to 1989, there was no C standard
per se, and even after ANSI C became a thing, there were still compilers
in use that didn't conform to it (libjpeg was first released in 1991.)

Realistically, only a handful of C compilers are in widespread use these
days, and all modern C compilers should support structure assignment.
2019-10-24 02:13:34 -05:00
DRC
95f4d6ef8b Merge branch 'master' into dev 2019-10-24 02:13:23 -05:00
DRC
55de97207d AppVeyor: Use MinGW-builds instead of MSYS2 MinGW
... to avoid backward compatibility issues with GCC 4-6 MinGW
toolchains.  Apparently GCC 7+ MinGW toolchains introduce a link-time
dependency with internal MinGW CRT functions that are meant to provide
compatibility with Microsoft's Universal CRT (ucrt) library, but those
internal functions are not available in GCC 4-6 MinGW toolchains.  This
made it impossible to use the official builds of libjpeg.a and
libturbojpeg.a with GCC 4-6 MinGW toolchains (a fatal link error--
"undefined reference to '__imp___acrt_iob_func'"-- occurred.)

This problem was not immediately apparent after switching to the MSYS2
implementation of MinGW (d6d7b53968)
because, for a while, MSYS2 was still using GCC 5 and 6.

Refer to libjpeg-turbo/libjpeg-turbo#382
2019-10-24 02:04:04 -05:00
DRC
708f013f89 Win packaging: Fix 64-bit VC/GCC co-install issue 2019-10-23 00:31:30 -05:00
DRC
163f0b1965 Bump version to 2.0.4 to prepare for new commits 2019-10-22 19:39:38 -05:00
DRC
3a32d199df x86 SIMD: Consistify capitalization of NASM types
byte, word, dword, qword, oword, and yword are all assembler keywords,
so it makes sense to use lowercase for these so as not to mistake them
for macros or constants.
2019-10-17 20:02:20 -05:00
DRC
9a51a87af3 x86 SIMD: Remove obsolete [TAB8] comments
With apologies to Richard Hendricks, our assembly code no longer uses
tabs.
2019-10-17 14:11:35 -05:00
DRC
74aeaddf8e jc*huff.c: Consistify preproc directive formatting
The rest of the libjpeg API code uses "#if defined(condition)" rather
than "#if defined condition".
2019-10-17 14:09:50 -05:00
DRC
2ae2bd66b4 Remove support for Apple's Java implementation
(AKA "Java for OS X systems.")  This implementation of Java 1.6 is long
obsolete and not supported on any version of macOS past High Sierra.
Oracle no longer provides a 32-bit JVM on macOS, so it is no longer
necessary to provide a 32-bit version of the TurboJPEG Java wrapper on
macOS.
2019-10-04 16:31:46 -05:00
DRC
b7523059c1 Merge branch 'master' into dev 2019-10-04 15:53:30 -05:00
DRC
ab6c4a5db1 Travis: Fix macOS build
Java 6 has moved to homebrew/cask-versions.
2019-10-04 15:02:18 -05:00
DRC
ec4cacc16e BUILDING.md: Document need for CRB/PowerTools repo
NASM and YASM are located in this non-default repository on
(respectively) RHEL and CentOS.
2019-10-02 16:42:03 -05:00
DRC
b4110b65fc Merge branch 'master' into dev 2019-09-04 18:58:12 -05:00
DRC
5db6a6819d README.md: Document memory debugger pitfalls
(more specifically, the need to disable libjpeg-turbo's SIMD extensions
when testing with valgrind, MSan, etc.)

Addresses a concern expressed in #365
2019-08-30 12:02:50 -05:00
DRC
f448279b14 README.md: Remove vestigial autotools references 2019-08-30 11:24:36 -05:00
DRC
ded5a504b4 tjDecodeYUV*: Fix err if TJ inst used for prog dec
If the TurboJPEG instance passed to tjDecodeYUV[Planes]() was previously
used to decompress a progressive JPEG image, then we need to disable the
progressive decompression parameters in the underlying libjpeg instance
before calling jinit_master_decompress().

This commit also modifies the build system so that the "tjtest" target
will test for this issue, and it corrects a previous oversight in the
build system whereby tjbenchtest did not test progressive
compression/decompression unless WITH_JAVA was true.
2019-08-15 13:57:36 -05:00
DRC
8ef53b102f Merge branch 'master' into dev 2019-08-14 22:08:59 -05:00
DRC
c0d0fe86d8 ChangeLog.md: Wordsmithing 2019-08-14 22:08:44 -05:00
DRC
a81a8c137b SSE2 SIMD: Fix prog Huffman enc. error if Sl%16==0
(regression introduced by 5b177b3cab)

The SSE2 implementation of progressive Huffman encoding performed
extraneous iterations when the scan length was a multiple of 16.

Based on:
bb7f1ef983

Fixes #335
Closes #367
2019-08-14 22:01:30 -05:00
DRC
02f7bcdbd1 Travis: Enable additional sanitizer tests
- Re-purpose the non-SIMD test to test with MSan as well.
- Re-purpose the ASan test to test with UBSan as well.
- Use the default Travis build environment rather than specifying Ubuntu
  14.04.  I think I added 'dist: trusty' back when 14.04 was newer than
  the default, but now it's older than the default.
- Enable verbose output for any unit tests that fail (so we can see the
  sanitizer output.)
2019-08-13 16:15:00 -05:00
Hugo Locurcio
bbb7550709 Improve grammar in cjpeg's -nojfif help message 2019-08-12 18:48:12 +01:00
DRC
7fbfe29c65 Merge branch 'master' into dev 2019-07-18 15:18:27 -05:00
DRC
5ced1f590b Travis: Cache Homebrew downloads
... to speed up the Mac CI builds.
2019-07-18 15:17:33 -05:00
DRC
b98ee19241 Travis: Update Homebrew/fix Mac CI build
Updating Homebrew wasn't necessary when the CI build first started using
the xcode8.3 image (see c8e52741fd), but
apparently it now is.
2019-07-18 14:14:47 -05:00
DRC
ad8330af72 TJBench.java: Remove space in method invocation
(to make checkstyle happy)
2019-07-12 17:29:27 -05:00
DRC
b25adabcfa tjbench.c: Fix minor code formatting errors
(introduced by 2a9e3bd743)
2019-07-12 17:28:15 -05:00
DRC
875e873f26 tjutil.c: Fix compiler warning with Visual Studio
Apparently windows.h includes stdlib.h, which defines the max() and
min() macros, so we need to ensure that tjutil.h is included after
that.
2019-07-11 17:06:08 -05:00
DRC
2a9e3bd743 TurboJPEG: Properly handle gigapixel images
Prevent several integer overflow issues and subsequent segfaults that
occurred when attempting to compress or decompress gigapixel images with
the TurboJPEG API:

- Modify tjBufSize(), tjBufSizeYUV2(), and tjPlaneSizeYUV() to avoid
  integer overflow when computing the return values and to return an
  error if such an overflow is unavoidable.
- Modify tjunittest to validate the above.
- Modify tjCompress2(), tjEncodeYUVPlanes(), tjDecompress2(), and
  tjDecodeYUVPlanes() to avoid integer overflow when computing the row
  pointers in the 64-bit TurboJPEG C API.
- Modify TJBench (both C and Java versions) to avoid overflowing the
  size argument to malloc()/new and to fail gracefully if such an
  overflow is unavoidable.

In general, this allows gigapixel images to be accommodated by the
64-bit TurboJPEG C API when using automatic JPEG buffer (re)allocation.
Such images cannot currently be accommodated without automatic JPEG
buffer (re)allocation, due to the fact that tjAlloc() accepts a 32-bit
integer argument (oops.)  Such images cannot be accommodated in the
TurboJPEG Java API due to the fact that Java always uses a signed 32-bit
integer as an array index.

Fixes #361
2019-07-11 16:56:50 -05:00
DRC
f37b7c1f96 Build: Fix build/install with Xcode IDE
Closes #355
2019-07-02 11:28:26 -05:00
Jonathan Wright
509c2680aa Use bias pattern for 4:4:0 (h1v2) fancy upsampling
This commit modifies h1v2_fancy_upsample() so that it uses an ordered
dither pattern, similar to that of h2v1_fancy_upsample(), rounding up or
down the result for alternate pixels rather than always rounding down.
This ensures that the decompression error pattern for a 4:4:0 JPEG image
will be similar to the rotated decompression error pattern for a 4:2:2
JPEG image.  Thus, the final result will be similar regardless of
whether a 4:2:2 JPEG image is rotated or transposed before or after
decompression.

Closes #356
2019-07-02 09:55:24 -05:00
Kornel
d48cfe591f Disable PNG on Windows 2019-06-18 00:00:38 +01:00
Diego Sanchez
68564c0f9e Adds extern "C" to transupp.h 2019-05-30 14:18:52 +02:00
DRC
ec5adb83dd Build/packaging: Support macOS package/DMG signing 2019-05-18 17:58:50 -05:00
Kornel
de4cbb5c21 Default to PNG enabled 2019-05-18 17:39:48 +01:00
DRC
051f4862f9 Travis: Fix iOS build
The new libjpeg-turbo 2.1.x official build scripts expect Xcode to be
under /Applications/Xcode83.app.
2019-05-09 20:46:18 -05:00
DRC
c055c88057 Discontinue support for 32-bit iOS builds 2019-05-09 20:36:51 -05:00
DRC
85d96d4478 Merge branch 'master' into dev 2019-05-09 19:13:39 -05:00
DRC
c8e52741fd Travis: Use xcode8.3 image
xcode7.3 is based on El Capitan, which is EOL, and Homebrew no longer
provides El Cap bottles (pre-compiled binaries.)  Thus, Homebrew was
trying to build GCC 5, YASM, and the other packages we need from source,
which caused the Mac CI builds to time out.  I tried goading Homebrew
into installing GCC 5.5.0_2 and YASM 1.3.0_1, which still have El Cap
bottles available, by using the URLs of those specific versions of the
formulae (from the Homebrew GitHub repository) as package names.  This
failed, however, because 'brew bundle' converted the URLs to all
lowercase.  I then tried explicitly installing the old formulae by using
'brew install' with the aforementioned URLs (bypassing the Travis
Homebrew addon), but Homebrew still tried to build all of the
dependencies from source.

Upgrading to Xcode 8.3.x necessitated regression testing the performance
on iOS, but that proved less of a pain than figuring out how to install
all of the old Homebrew bottles we needed.  Also, this future-proofs the
CI builds against the inevitable discontinuation of the xcode7.3 image.

Note that Xcode 8.3.x improves iOS 64-bit decompression performance
significantly relative to Xcode 7.2.x or 7.3.x.  iOS 32-bit performance
unfortunately regresses by as much as 5%, but it can't be helped (32-bit
iOS apps are no longer supported on iOS 11+ anyhow, and the next major
release of libjpeg-turbo will remove support for them as well.)
2019-05-09 18:09:42 -05:00
Kornel
72473266b8 Fix appveyor link 2019-04-24 15:56:40 +01:00
Kornel
a5ad46b9f8 Change unsupported format message
To be sure it's not coming from the old cjpeg
2019-04-24 15:54:33 +01:00
DRC
f36d531553 Merge branch 'master' into dev 2019-04-23 14:54:23 -05:00
DRC
6399d0a699 Fix code formatting/style issues ...
... including, but not limited to:
- unused macros
- private functions not marked as static
- unprototyped global functions
- variable shadowing

(detected by various non-default GCC 8 warning options)
2019-04-23 14:15:48 -05:00
Chris Blume
aa9db61677 x86 SIMD: Check for CPUID leaf 07H before using
According to Intel's manual [1], "If a value entered for CPUID.EAX is
higher than the maximum input value for basic or extended function for
that processor then the data for the highest basic information leaf is
returned."

Right now, libjpeg-turbo doesn't first check that leaf 07H is supported
before attempting to use it, so the ostensible AVX2 bit (Bit 05) of the
CPUID result might actually be Bit 05 from a lower leaf.  That bit might
be set, even if the CPU doesn't support AVX2.

This commit modifies the x86 and x86-64 SIMD feature detection code so
that it first checks whether CPUID leaf 07H is supported before
attempting to use it to check for AVX2 instruction support.

DRC:
This commit should fix
https://bugzilla.mozilla.org/show_bug.cgi?id=1520760
However, I have not personally been able to reproduce that issue,
despite using a Nehalem (pre-AVX2) CPU on which the maximum CPUID leaf
has been limited via a BIOS setting.

Closes #348

[1]
"Intel® 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (2A, 2B, 2C & 2D): Instruction Set Reference, A-Z", https://software.intel.com/sites/default/files/managed/a4/60/325383-sdm-vol-2abcd.pdf, page 3-192.
2019-04-16 17:07:28 -05:00
DRC
8a0e35b212 Merge branch 'master' into dev 2019-04-15 13:41:45 -05:00
DRC
2b05d47bc2 ChangeLog.md: Document 33011754 2019-04-15 13:38:15 -05:00
DRC
7bc9fca430 jdhuff.c: Silence UBSan signed int overflow err #2
Same as d3a3a73f64 but in the fast decode
path.  It was necessary to use a different-sized test image in order to
trigger the error in this location.

Refer to #347
2019-04-12 09:09:27 -05:00
DRC
bb16b94455 GitHub: Remove new lines from feature-request.md
(to make checkstyle happy)
2019-04-12 08:54:16 -05:00
DRC
33011754e6 Android: Fix "using JNI after critical get" errors
5ea77d8b77 was insufficient to fix all of
these.  In particular, we need to always release the primitive arrays
before throwing an exception, because throwing an exception qualifies as
"using JNI."

Refer to #300
2019-04-12 08:49:27 -05:00
DRC
bce58f487e Consistify formatting of macros in TurboJPEG code 2019-04-12 07:49:35 -05:00
DRC
ce067a6cd1 GitHub: Template tweaks
CONTRIBUTING.md: Correct misuse of "as such" (Grammar Police)

bug-report.md: Clarify that the submitter should always test against the
latest stable code base.
2019-04-10 15:20:46 -05:00
DRC
d3a3a73f64 jdhuff.c: Silence UBSan signed int overflow error
Some pathological test images have been created that can cause s to
overflow or underflow the signed int data type during decompression.
This is technically undefined behavior according to the C spec, although
every modern implementation I'm aware of will treat the signed int as a
2's complement unsigned int, thus causing the value to wrap around to
INT_MIN if it exceeds INT_MAX.  This commit simply makes that behavior
explicit in order to shut up UBSan.  At least when building for x86-64
or i386 using Clang or GCC, this commit does not change the
compiler-generated assembly code at all.

The code that triggered this error has existed in the libjpeg code base
for at least 20 years (and probably much longer), so the fact that it
hasn't produced a user-visible problem in all of that time strongly
suggests that UBSan is being overly pedantic here.  But if someone can
cough up a platform that doesn't wrap around to INT_MIN when 1 is added
to INT_MAX, then I'll happily change my opinion.

Fixes #347
2019-04-10 14:57:12 -05:00
DRC
58a3975e93 Bump version to 2.0.3 to prepare for new commits 2019-04-10 14:57:12 -05:00
Mozilla-GitHub-Standards
351d5d08fa Add Mozilla Code of Conduct file
Fixes #330.

_(Message COC002)_
2019-03-28 23:12:17 +00:00
Kornel
426de82d0c Bump version
Due to CMake change
2019-03-15 12:49:56 +00:00
DRC
5857929f95 GitHub: Formatting tweak to CONTRIBUTING.md 2019-03-05 17:48:20 -06:00
DRC
709477274e GitHub: Tweak bug report template 2019-03-01 13:13:27 -06:00
DRC
1af712c101 GitHub: Add feature request template 2019-03-01 13:11:11 -06:00
DRC
ec90cd0f90 GitHub: Add contributor guidelines 2019-03-01 12:57:28 -06:00
DRC
ce76ffac4c GitHub: Add bug report template 2019-03-01 10:07:51 -06:00
DRC
afbe48c290 MMI: Support 32-bit Loongson architectures 2019-02-27 13:36:48 -06:00
DRC
98ff5507d8 MMI: Fix bug in jsimd_h2v1_merged_upsample_mmi()
... that occurred when ((image width) & 1) != 0.
2019-02-27 13:36:48 -06:00
DRC
3ca6dba96e Merge branch 'master' into dev 2019-02-17 09:33:57 -06:00
DRC
500b5ecec3 turbojpeg.c: Fix compiler warning w/ -DNO_GETENV 2019-02-17 09:06:42 -06:00
DRC
87ab3360d0 appveyor.yml: Cache NASM binary package
... since www.nasm.us seems to be down frequently.  This doesn't help us
at the moment, but hopefully once the site is back up this will prevent
future build failures.
2019-02-14 10:01:16 -06:00
Chris Blume
b46af82cc1 ARMv7 NEON: #ifdef unused funcs/vars w/ -mfpu=neon
When simd/arm/jsimd.c is compiled with __ARM_NEON__ defined (which will
be the case if -mfpu=neon is passed to the compiler), the
parse_proc_cpuinfo() and check_feature() functions and the bufsize
variable are unused and thus need to be #ifdef'ed out in order to avoid
compiler warnings.  Note that the bufsize variable was already #ifdef'ed
out on Linux but not on Android due to lack of parentheses (&& takes
precedence over ||.)

Closes #331
2019-02-14 08:53:49 -06:00
DRC
a4aa30d9a0 ChangeLog.md: "floating-point"="floating point" 2019-02-13 22:03:31 -06:00
DRC
aaf58dabb6 Merge branch 'master' into dev 2019-02-13 17:05:26 -06:00
DRC
0d7818d1b6 rpm.spec.in: Fix "File listed twice" warning/error
%{_libdir}/pkgconfig is a directory and should thus be prefixed by
%{dir} (oops.)  This issue caused the debuginfo build under RHEL 8
(which is apparently now enabled by default-- regardless of whether the
RPM actually contains debug info, but that's another matter) to fail
with:

RPM build errors:
  File listed twice: /opt/libjpeg-turbo/lib64/pkgconfig/libjpeg.pc
  File listed twice: /opt/libjpeg-turbo/lib64/pkgconfig/libturbojpeg.pc
2019-02-13 17:04:46 -06:00
DRC
4b67db4d9b rpm.spec.in: Fix doc packaging issues w/ RHEL 7+
On RHEL 7 and later (not sure exactly whether this is a product of the
newer RPM release or something distro-specific), macros are lazily
expanded, so we need to set _docdir using %global (which expands at
definition time) and prior to _prefix and _datarootdir (which affect
_defaultdocdir.)  Otherwise, _docdir is set to a subdirectory of
/opt/libjpeg-turbo/share/doc or /opt/libjpeg-turbo/doc.  The former
(which happens on RHEL 7) leads to incorrect documentation packaging
(the docs should be packaged under /usr/share/doc per Red Hat
standards), and the latter (which happens on RHEL 8) leads to an RPM
build error.
2019-02-13 17:04:28 -06:00
DRC
f70a7e1ee1 rpm.spec.in: Update deprecated [Build]Prereq tags
AFAICT, Requires and BuildRequires subsumed the functionality of Prereq
and BuildPrereq in RPM 4.0, and none of the platforms we support with
libjpeg-turbo 2.0.x has RPM < 4.4.
2019-02-13 17:02:32 -06:00
Leonard Hecker
f27167f20c Fixed broken PNG_SUPPORTED flag (#326) 2019-02-13 19:42:25 +00:00
DRC
a9075a17c3 Merge branch 'master' into dev 2019-02-12 13:42:57 -06:00
DRC
6a8421fb44 GNUInstallDirs.cmake: Silence CMP0054 warning ...
in CMake 3.11 and later
2019-02-12 13:40:14 -06:00
DRC
031e16ecff tjbench.c: Fix GCC 8 compiler warning 2019-02-11 22:46:04 -06:00
DRC
75be88cfbd Build: Optionally install PDB files for MSVC DLLs
Based on
333a36ae98

Closes #329
Closes #324
2019-02-11 13:10:09 -06:00
DRC
bdec995839 MMI: Fix unaligned decomp. perf. for 32-bit PFs
(Oversight from db84125fcb)
2019-02-01 01:16:13 -06:00
DRC
fa905fbf7b MMI: Use unaligned stores w/ merged upsampling
... when necessary.  This was an oversight from
2f9e7c84d1
2019-02-01 01:03:32 -06:00
DRC
9aada25ced Merge branch 'master' into dev 2019-02-01 01:02:55 -06:00
DRC
e2442e0707 MMI: Fix unaligned comp. perf. for 32-bit PFs also
(Oversight from 1c2d3cfaaf)
2019-02-01 00:59:58 -06:00
DRC
73fd604161 MMI: Fix formatting issue detected by checkstyle 2019-02-01 00:24:09 -06:00
DRC
2f9e7c84d1 Loongson MMI h2v1 and h2v2 merged upsampling
Based on:
e8f5cee5aa
2019-01-31 23:18:48 -06:00
DRC
3c7199ff06 Loongson MMI h2v1 fancy upsampling
Based on:
e8f5cee5aa
2019-01-31 17:01:01 -06:00
DRC
73b98acd8b Loongson MMI RGB-to-Grayscale conversion
Based on:
e8f5cee5aa
2019-01-31 16:44:55 -06:00
DRC
bb0d170288 Improve readability of Loongson MMI code
We have more than eight registers to work with, as well as three-operand
intrinsics, so there's no need for the implementation to be such a
literal port of the MMX code.
2019-01-31 16:44:48 -06:00
DRC
db84125fcb MMI: Use aligned store instructions when possible
This improves decompression performance by 2-5%.
2019-01-31 15:30:58 -06:00
DRC
ae4221f905 Loongson MMI fast forward/inverse DCT
Based on:
32a9ca222d
2019-01-31 15:30:58 -06:00
DRC
674343ab14 Merge branch 'master' into dev 2019-01-31 15:30:25 -06:00
DRC
1c2d3cfaaf MMI: Fix comp. perf. issue w/ unaligned image rows
Using ldc1 with a non-64-bit-aligned memory location causes as much as a
10x slow-down in overall compression performance.
2019-01-31 15:30:05 -06:00
DRC
2d0b675adf Build: Fix install of static build w/ VStudio IDE
Unfortunately, this hack is necessary because:
- install(TARGETS, ...) doesn't support the RENAME option.
- We can't modify OUTPUT_NAME for the "-static" targets without breaking
  the regression tests.
- ${CMAKE_CFG_INTDIR} doesn't seem to work properly in an install()
  command.

Refer to #307
2019-01-25 16:54:10 -06:00
DRC
6fac90945a wrbmp.c, wrtarga.c: Remove unused variables
(should have been done with the previous commit)
2019-01-23 16:18:41 -06:00
DRC
01e3032354 Eliminate support for compilers w/o unsigned char
libjpeg-turbo has never really supported such compilers, since (AFAIK)
they are non-existent on any modern computing platform and thus
impossible for us to test.  (Also, the TurboJPEG API would break without
unsigned chars.)

Furthermore, the unified CMake-based build system introduced in 2.0
always defines HAVE_UNSIGNED_CHAR, so retaining other code paths is
pointless.  Eliminating support for compilers without unsigned char
eliminates the need for the GETJSAMPLE() macro, which improves the
readability of many parts of the code as well as improving the
performance of writing Targa and Windows BMP files.

Fixes #317
2019-01-23 15:12:26 -06:00
Kornel
a214094b37 Update README.md 2019-01-23 17:36:50 +00:00
Ewout ter Hoeven
83fcf7b9e9 Fix Appveyor configuration (#323)
* Fix cmake target and re-add msbuild
2019-01-23 17:24:30 +00:00
DRC
42d62bf114 Merge branch 'master' into dev 2019-01-23 11:20:11 -06:00
Kornel
8a885c5443 Update appveyor.yml 2019-01-23 17:18:04 +00:00
Ewout ter Hoeven
ae5c15eb59 Add continuous integration on Windows with AppVeyor (#322)
* Create appveyor.yml
2019-01-23 17:10:19 +00:00
DRC
90e2d7f3fd LICENSE.md: Clarifications RE: BSD & zlib licenses
Including the license templates was confusing to some, since it made
it appear as if the copyright year and author were unspecified for the
libjpeg-turbo source.  Thus, rather than include the zlib License
template, link to that template on opensource.org.  For the Modified BSD
License, include a roll-up of copyright years and authors, since the
terms of that license require the text of it to be included in product
documentation for binary distributions without accompanying source code.
2019-01-23 09:01:33 -06:00
DRC
5308c1a03b BUILDING.md: Update/simplify Android build instr.
Use the android.toolchain.cmake toolchain file in the NDK (v13b or
later), since this toolchain file generally takes care of setting the
approprate compiler flags and dealing with the differences between
GCC and Clang.  Our custom Android build procedure did not work with
Clang-based NDK toolchains, which meant that it could not be made to
work with NDK v18b or later.

Fixes #309
2019-01-22 12:20:26 -06:00
Orivej Desh
ce90ab5d44 Build: Fix regression test failure w/ ctest -j
The djpeg rgb-islow-icc-cmp test must run after the djpeg rgb-islow
test, since the latter generates testout_rgb_islow.icc.
2019-01-21 16:56:56 -06:00
DRC
1ee87a9e2e djpeg: Fix PPM output regression w/ color quant.
Regression caused by aa7459050d

Fix based on:
03fbacb8eb

Closes #310
2019-01-21 16:33:49 -06:00
DRC
479501b07c TurboJPEG: Decompress 4:4:4 JPEGs with unusual SFs
Normally, 4:4:4 JPEGs have horizontal x vertical luminance & chrominance
sampling factors of 1x1.  However, it is technically legal to create
4:4:4 JPEGs with sampling factors of 2x1, 1x2, 3x1, or 1x3, since the
sums of the products of those sampling factors are still <= 10.  The
libjpeg API correctly decodes such images, so the TurboJPEG API should
as well.

Fixes #323
2019-01-21 14:26:00 -06:00
DRC
a39c970d27 Merge branch 'master' into dev 2019-01-01 21:53:19 -06:00
DRC
12f3d0be84 Merge branch 'master' into dev 2019-01-01 21:52:21 -06:00
Stephen
9bc8eb6449 Travis: Use Homebrew addon to improve performance 2019-01-01 21:36:03 -06:00
DRC
0fa5ae6b54 TJBench Java: Properly handle transform warnings
+ warnings from TJDecompressor.decompressHeader()
2019-01-01 21:16:33 -06:00
DRC
1ff90822f1 TJBench: Fix FPE when decompressing 0-width JPEG
Fixes #319
2019-01-01 21:14:50 -06:00
DRC
f8cca819a4 wrbmp.c: Don't allow quantization w/ non-RGB CS
If cinfo->quantize_colors == 1, then jpeg_calc_output_dimensions() will
set cinfo->output_components to 1, and if cinfo->out_color_space is not
RGB (or extended RGB), hilarity will ensue.

Fixes #305
2019-01-01 20:48:14 -06:00
DRC
beefb62a6f wrbmp.c: Use IsExtRGB() macro where appropriate
(to improve readability)
2019-01-01 20:48:14 -06:00
DRC
3d9c64e9f8 tjLoadImage(): Fix int overflow/segfault w/big BMP
Fixes #304
2019-01-01 20:48:09 -06:00
DRC
23e8e0ff83 jversion.h: Bump copyright year to 2019 2019-01-01 18:59:59 -06:00
DRC
c868e41b22 Build: Fix regr. that nuked RPATH in Mac/iOS build
Caused by 950580eb0c.  Since the code that
sets CMAKE_INSTALL_RPATH now depends on ENABLE_SHARED, that code needed
to be moved to after the point at which ENABLE_SHARED is defined.
2019-01-01 18:59:53 -06:00
DRC
0696b0a451 Bump version to 2.0.2 to prepare for new commits 2019-01-01 13:55:01 -06:00
Gary Zhang
254909fab5 fix issue #315 jddctmgr.c contains mixed declaration, which MSVC can't accept. 2018-11-30 10:19:05 +00:00
DRC
aa829dcf50 Travis: Fetch GPG key from libjpeg-turbo.org
I give up on the public keyserver.  It inexplicably just fails
sometimes.  I was trying to use it out of an abundance of caution
(<cough> paranoia <cough>), but it seems like most open source projects
just serve up their public keys from their project web sites.  The
private and public pre-release keys are still stored on separate sites,
the private key is still strongly encrypted by Travis, and we use a
separate key for pre-releases anyhow, so even if it's compromised, we
can quickly and easily deploy a new one.
2018-11-20 22:52:36 -06:00
Kornel
fbef50bc8b Removed broken link 2018-11-15 18:11:56 +00:00
DRC
43ce78e032 Build: Fix issue with HAVE_MAPFILE test on Solaris
We have to link the test code into a shared library, or else the mapfile
prevents necessary libc symbols from being exposed.
2018-11-15 11:54:20 -06:00
Kornel
add6158e96 Merge pull request #275 from mozilla/idct-selector
Make IDCT method customizable
2018-11-15 16:05:51 +00:00
Kornel
65aaecd2d5 Link with libm 2018-11-15 15:17:17 +00:00
Kornel
cfb7138523 Update readme 2018-11-14 00:10:13 +00:00
DRC
2cc4f93c88 Merge branch 'master' into dev 2018-11-12 14:40:19 -06:00
DRC
bb3d325624 Travis: Try high-availability SKS keyserver pool
The saga continues ...
2018-11-12 13:20:28 -06:00
DRC
c701014dce tjbench.c: Fix compiler warnings with GCC 8
strncpy() may fail to truncate dst if len == strlen(dst).
2018-11-12 12:27:23 -06:00
DRC
950580eb0c Build: Fix install error with fully static build
Closes #273
2018-11-12 11:22:48 -06:00
Kornel
8217fd5478 Merge tag '2.0.0'
* tag '2.0.0': (160 commits)
  Clarify Android Windows build instructions
  Bump revision to 2.0.0
  Build: Don't use @rpath with OS X 10.4 builds
  Fix JPEG spec references per ISO/ITU-T suggestions
  Fix int overflow when decompr. corrupt prog. JPEG
  cjpeg: Fix OOB read caused by malformed 8-bit BMP
  Build: Preserve CMake exe suffix from cmd line
  Honor CMake exe suffix when inst. static builds
  README.ijg: Clarification regarding JPEG 2000/XR
  BUILDING.md: Correct iOS/Android examples
  Build: Detect whether compiler supports DSPr2
  Fix jpeg_skip_scanlines() segfault w/merged upsamp
  Fix infinite loop in partial image decompression
  tjLoadImage(): Fix FPE triggered by malformed BMP
  TurboJPEG: Handle JERR_BMP*,JERR_PPM* error codes
  Fix CVE-2018-11813
  Travis: Use SKS keyserver pool
  Additional code formatting tweaks
  Java: Further style refinements
  Java: Reformat code per checkstyle recommendations
  ...
2018-11-11 16:13:59 +00:00
Hugo Cuvillier
103c6c3276 Adds initial mozjpeg.podspec 2018-11-10 15:47:08 +00:00
DRC
2b1c9c6887 Travis: Don't check key server SSL certificate
... when downloading the RPM signing key.  Apparently the key server
URL sometimes redirects to an https URL, which may explain why fetching
the RPM signing keys failed frequently when we used to run wget inside
of the CentOS 5 Docker container.
2018-11-02 11:55:29 -05:00
DRC
07e304c3bf Travis: Work around frequent build failures
The build will consistently fail for days at a time with:

error: http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x0575F26BD5B3FDB1: import read failed(-1).

I have a hunch that this is related to the CentOS 5 Docker container, so
this commit causes Travis to download the RPM signing key outside of
the container and share it with the container.
2018-10-26 09:29:09 -05:00
DRC
5ea77d8b77 Android: Fix "using JNI after critical get" error
We shouldn't be making JNI calls between GetPrimitiveArrayCritical() and
ReleasePrimitiveArrayCritical().  Apparently Android is stricter about
this than desktop Java.

Issue was introduced in 0713c1bb54.

Fixes #300
2018-10-26 08:58:31 -05:00
Kornel
9a1d32095b Merge pull request #308 from bolknote/master
Fix errors while build rpm package (CentOS 7.x)
2018-10-12 13:54:23 +01:00
Evgeny Stepanischev
17ed160078 Fix errors while build rpm package (CentOS 7.x) 2018-10-12 12:37:50 +03:00
DRC
504a295cde Include .pc files in LJT SDKs for Visual C++
These are apparently useful in certain esoteric build environments.

Closes #296
2018-10-11 15:13:34 -05:00
DRC
d00d7d8c19 cjpeg: Fix OOB read caused by malformed 8-bit TGA
... in which one or more of the color indices is out of range for the
number of palette entries.

Fix partly borrowed from jpeg-9c.

Fixes #295
2018-10-05 16:13:07 -05:00
DRC
aaffc14f65 Clarify that Win7 SP0 crash was a regression 2018-09-30 11:57:29 -05:00
DRC
d5f281b734 SIMD: Fix c000001d exception on Win 7 w/o SP1
Apparently Windows 7 without SP1 has O/S support for XSAVE but not for
YMM registers, and this exposed a bug in our usage of xgetbv.  The test
instruction will set ZF only if none of the bits match between the two
operarands, so in effect, we were enabling AVX2 instructions if the O/S
supported XSAVE and the CPU supported AVX2 but the O/S only supported
XMM registers.  This bug was not exposed on, for instance, Windows XP or
RHEL 5 because those O/S's do not support XSAVE.

Fixes #288
2018-09-28 16:23:14 -05:00
DRC
f2729c983a Build: Update javah target to work with JDK 10+
javah is no longer a thing, but 'javac -h' can accomplish the same task.
2018-09-21 15:50:08 -05:00
DRC
c1f07a9fc4 BUILDING.md: Correct/update Java information
- CMake 3.10.x or later must be used with JDK 11, or an error
  ("regex not supported") will occur when CMake tries to parse the Java
  version number.
- The JDK is no longer available at java.com.
2018-09-21 15:17:27 -05:00
DRC
133e4af070 Add x32 ABI support on Linux
The x32 ABI is similar to the x86-64 ABI but uses 32-bit pointers.
(Refer to https://sites.google.com/site/x32abi)

Based on:
8da8fc5213
1e33dfea80
24ffea78da
dedcf76753
d04228a7b5
b4ad38316a

Closes #274
2018-09-05 17:10:06 -05:00
DRC
995eb29dc3 Bump version to 2.1 alpha1
(to prepare for new features)
2018-09-05 09:08:00 -05:00
Rosen Penev
4f943644e5 Enable DSPr2 SIMD extensions if CPU type is mipsel
The DSPr2 extensions have been verified to work with little endian MIPS.
Whether or not CMAKE_SYSTEM_PROCESSOR is set to "mips" or "mipsel" in a
little endian MIPS environment seems to be inconsistent, but our build
system needs to handle both cases.
2018-09-04 21:17:58 -05:00
DRC
3bef88f6ec Fix MIPS DSPr2 build when using soft float ABI
(for instance, when passing -msoft-float to the compiler)

The instructions used by jsimd_quantize_float_dspr2() and
jsimd_convsamp_float_dspr2() don't work with the soft float ABI, so
disable those functions when soft float is enabled.

Based on:
129a739bfa

Closes #272
2018-09-04 18:03:00 -05:00
DRC
2260b66e16 jconfig.h: restore Autotools compatibility
(regression introduced with the CMake-based Un*x build system)

Refer to change log for more details.

Based on:
d992d12bc7

Closes #275
2018-08-31 17:39:52 -05:00
DRC
a861cc2f31 Bump version to 2.0.1 to prepare for new commits 2018-08-31 12:54:09 -05:00
Kornel
5c064c6ba5 Merge pull request #303 from garyzyg/issue-302
fix issue #302 rdpng.c contains mixed declaration, which MSVC can't a…
2018-08-24 12:50:24 +01:00
Gary Zhang
9454cd365a fix issue #302 rdpng.c contains mixed declaration, which MSVC can't accept. 2018-08-24 09:37:22 +08:00
luzpaz
43c58ff983 Correct various typos in code comments
Found via `codespell -q 3`

Closes #263
2018-07-31 16:59:16 -05:00
Konstantin Kopachev
86a9bd1b08 Prefer smaller file only on non-image changing operations
When cli arguments request image-changing operation (like transform, scans or arith coding) to be applied, force output result file, even if it has bigger filesize than original
2018-07-31 10:11:20 +01:00
Konstantin Kopachev
a4a721fce5 Only use mem-based io if it is supported 2018-07-31 10:11:20 +01:00
DRC
574f3a772c Clarify Android Windows build instructions
(must add .exe to CMAKE_C_COMPILER)

Addresses a concern raised in #245, #260
2018-07-27 11:47:48 -05:00
DRC
ad6c316146 Bump revision to 2.0.0 2018-07-25 11:03:20 -05:00
DRC
8d95be3afb Build: Don't use @rpath with OS X 10.4 builds
@rpath is only supported with 10.5 and later deployment targets.
libjpeg-turbo hasn't supported 10.4 "Tiger" since prior to 1.4, but I
still sometimes use the 10.4 SDK to test PowerPC code in a Snow Leopard
VM.
2018-07-24 21:32:16 -05:00
DRC
a62895265f Fix JPEG spec references per ISO/ITU-T suggestions
- When referring to specific clauses, annexes, tables, and figures, a
  "timed reference" (a reference that includes the year) must be used in
  order to avoid confusion.
- "CCITT" = "ITU-T"
- Replace ambiguous "JPEG spec" with the specific document number.
2018-07-24 18:43:49 -05:00
Even Rouault
9ab569e616 Fix int overflow when decompr. corrupt prog. JPEG
No discernible performance regression

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9447
Credit to OSS Fuzz
Closes #259
2018-07-23 22:11:38 -05:00
DRC
9c78a04df4 cjpeg: Fix OOB read caused by malformed 8-bit BMP
... in which one or more of the color indices is out of range for the
number of palette entries.

Fix partly borrowed from jpeg-9c.  This commit also adopts Guido's
JERR_PPM_OUTOFRANGE enum value in lieu of our project-specific
JERR_PPM_TOOLARGE enum value.

Fixes #258
2018-07-20 19:57:43 -05:00
DRC
0fa7850aeb Build: Preserve CMake exe suffix from cmd line
Normally the value of CMAKE_EXECUTABLE_SUFFIX is clobbered by project().

This allows for specifying an executable suffix of .html with Emscripten
builds, which causes Emscripten to build standalone HTML versions of the
libjpeg-turbo test programs.
2018-07-20 12:21:20 -05:00
DRC
0c8eb5b4dd Honor CMake exe suffix when inst. static builds
This specifically allows an Emscripten (WASM) static build (for which
CMAKE_EXECUTABLE_SUFFIX=.js) to be properly installed.
2018-07-20 12:21:20 -05:00
DRC
84893085cf README.ijg: Clarification regarding JPEG 2000/XR
The sentence:
"Indeed, one of the original reasons for developing this free software
was to help force convergence on common, interoperable format standards
for JPEG files."
might be seen to imply that JPEG 2000 and JPEG XR are not interoperable
with themselves, although it is certainly the case that those formats
are not interoperable with each other, nor with
ITU T.81 | ISO/IEC 10918.  They are also certainly not as common as
ITU T.81 | ISO/IEC 10918, and (as an example) popular web browsers will
not display JPEG 2000 files.

The sentence in question was originally referring to proprietary,
non-standard formats and was meant to provide historical context.
libjpeg was originally released prior to the adoption of JFIF as an
official standard, so it encouraged adoption of JFIF as a de facto
standard by providing, under a business-friendly free software license,
a library for reading and writing images in that format.
2018-07-20 12:21:02 -05:00
DRC
f4b8a5cf03 BUILDING.md: Correct iOS/Android examples
toolchain.cmake should be created in the build directory, so the scripts
need to cd to that directory before generating that file.

Closes #254
2018-07-02 11:42:06 -05:00
DRC
6d8caa9f88 Build: Detect whether compiler supports DSPr2
This is basically the same test that was performed in acinclude.m4 in
the old autotools-based build system.  It was not ported to the
CMake-based build system because I previously had no way of testing
a non-DSPr2 build environment.

Fixes #248
2018-06-29 13:23:58 -05:00
Darrell Walisser
398c1e9acc Fix jpeg_skip_scanlines() segfault w/merged upsamp
Fixes NULL pointer reference when decompressing 4:2:2 or 4:2:0 JPEG
images with cinfo.do_fancy_upsampling = FALSE.

Closes #244
2018-06-24 19:04:19 -05:00
DRC
26f109290d Fix infinite loop in partial image decompression
... caused by using certain specific combinations of
jpeg_skip_scanlines() and jpeg_read_scanlines() calls with progressive,
vertically-subsampled JPEG images.

Fixes #237
2018-06-24 17:49:29 -05:00
DRC
43e84cff1b tjLoadImage(): Fix FPE triggered by malformed BMP
In rdbmp.c, it is necessary to guard against 32-bit overflow/wraparound
when allocating the row buffer, because since BMP files have 32-bit
width and height fields, the value of biWidth can be up to 4294967295.
Specifically, if biWidth is 1073741824 and cinfo->input_components = 4,
then the samplesperrow argument in alloc_sarray() would wrap around to
0, and a division by zero error would occur at line 458 in jmemmgr.c.

If biWidth is set to a higher value, then samplesperrow would wrap
around to a small number, which would likely cause a buffer overflow
(this has not been tested or verified.)
2018-06-12 21:17:34 -05:00
DRC
696e754ecf TurboJPEG: Handle JERR_BMP*,JERR_PPM* error codes
... in tjLoadImage()/tjSaveImage().  These error codes require an add-on
message table, and if it isn't initialized, then format_message()
produces "Bogus message code XXXX" instead.
2018-06-12 18:49:37 -05:00
DRC
909a8cfc7b Fix CVE-2018-11813
Refer to change log for details.

Fixes #242
2018-06-12 16:08:26 -05:00
Puyan Lotfi
7678cba140 Fixing compiler warning -Wmissing-prototypes
jdatadst.c:252:1: warning: no previous prototype for function 'jpeg_mem_dest_internal' [-Wmissing-prototypes]
2018-06-10 16:35:46 +03:00
Kornel
3820eb1e2d Merge pull request #290 from solvingj/patch-2
CMAKE_SOURCE_DIR -> CMAKE_CURRENT_SOURCE_DIR
2018-06-07 15:09:07 +01:00
Jerry
d23bf13189 CMAKE_SOURCE_DIR -> CMAKE_CURRENT_SOURCE_DIR
This change is proposed to enable cases where this library and it's CMakeLists.txt are included in other projects/CMakeLists.txt files as a dependency via the add_subdirectory method, for example: add_subdirectory(mozjpeg). There are several reasons and workflows which "wrap" third party projects/builds using this method, including many enterprise build/devops pipelines.

This change will have no effect on users building mozjpeg by itself as usual, it very simply enables the wrapping use cases.
2018-06-07 08:53:21 -04:00
Kornel
f7aeafaf00 Merge pull request #287 from JosePineiro/master
Add -nojfif param
2018-06-05 01:24:09 +01:00
JosePineiro
fce0382181 Add -nojfif param
With this parem do not write JFIF APP0 marker segment. Reduce size in 18 bytes.  This is a mandatory marker, but no error in know programs if are lost. Safe for web use.
2018-06-04 21:06:40 +02:00
DRC
3041cf67ff Travis: Use SKS keyserver pool
pgp.mit.edu seems to be frequently down, which was causing the PR builds
to fail.
2018-05-21 22:52:39 -05:00
DRC
1a85fc497d Additional code formatting tweaks
... detected with an improved version of our checkstyle script
2018-05-21 12:07:40 -05:00
DRC
eb8bba627f Java: Further style refinements
(detected by enabling additional checkstyle modules)

This commit also removes unnecessary uses of the "private" modifier in
the Java tests/examples.  The default access modifier disallows access
outside of the package, and none of these classes is in a package.  The
only reason we use "private" with member variables in these classes is
to make checkstyle happy, because we want it to enforce that behavior in
the TurboJPEG API code.
2018-05-16 11:05:01 -05:00
DRC
53bb941845 Java: Reformat code per checkstyle recommendations
... and modify tjbench.c to match the variable name changes made to
TJBench.java

("checkstyle" = http://checkstyle.sourceforge.net, not our regex-based
checkstyle script)
2018-05-15 14:59:57 -05:00
DRC
2401e4d10c TurboJPEG: Handle CMYK JPEGs w/ subsampled M, Y
Arguably it doesn't make much sense for non-chroma components to be
subsampled (which is why this type of image was overlooked in
cd7c3e6672cce3779450c6dd10d0d70b0c2278b2-- I didn't realize it was a
thing), but certain Adobe applications apparently generate these images.

Fixes #236
2018-04-26 18:15:27 -05:00
DRC
34e9d7e340 Bump revision to 1.5.91 for post-beta fixes 2018-04-26 17:33:52 -05:00
DRC
dc9bdf143a Additional code formatting tweaks
... detected with an improved version of our checkstyle script
2018-04-12 17:02:10 -05:00
DRC
b2d000e64b "Further" = "Furthermore"
Grammar Police.  Has Ray Stevens taught me nothing?
2018-04-11 10:47:16 -05:00
DRC
bfc3ce3157 x86[-64] SIMD: Don't auto-generate jsimdcfg.inc
The old Un*x (autotools-based) build system always auto-generated this
file, but that behavior was more or less a relic of the days before the
libjpeg-turbo colorspace extensions were implemented.  The thinking was
that, if a particular developer wanted to change RGB_RED, RGB_GREEN,
RGB_BLUE, or RGB_PIXELSIZE in order to compress from/decompress to
different RGB pixel layouts, then the SIMD extensions should
automatically respond to those changes whenever they were made to
jmorecfg.h.  The modern reality is that changing RGB_* is no longer
necessary because of the libjpeg-turbo colorspace extensions, and
changing any of the other constants in jsimdcfg.inc can't be done
without making deeper modifications to the SIMD extensions.  In general,
we treat RGB_* as a de facto, immutable part of the legacy libpjeg API.
Realistically, since the values of those constants have been the same in
every Un*x distribution released in the past 20-30 years, any software
that uses a system-supplied build of libjpeg must assume that those
constants will have default values.

Furthermore, even if it made sense to auto-generate jsimdcfg.inc, it was
never possible to do so on Windows, so it was always going to be
necessary to manually generate the Windows version of the file whenever
any of the constants changed.  This commit introduces a new custom CMake
target called "jsimdcfg" that can be used, on Un*x platforms, to
generate jsimdcfg.inc on demand, although this should only be necessary
when introducing new x86 SIMD instructions or making other deep
modifications, such as SIMD acceleration for 12-bit JPEGs.

For those who may be wondering why we don't do the same thing for
win/jconfig.h.in, it's because performing all of the necessary CMake
checks to populate that file is very slow on Windows.
2018-04-10 16:46:47 -05:00
mayeut
269e84c971 jsimd_can_encode_mcu_AC_*(): Remove useless checks
These were necessary for the first iteration of the feature (see #46),
which provided a different C front end for the SIMD version of the
function.  The final version of the feature uses a common C front end
for both SIMD and non-SIMD implementations, so these checks are no
longer necessary.

Closes #231
2018-04-09 21:30:25 -05:00
DRC
b628d6934f Additional code formatting tweaks
... detected with an improved version of our checkstyle script
2018-04-09 10:47:14 -05:00
DRC
450306a84b READMEs: Mention that prog JPEG is now accelerated 2018-04-06 18:31:17 -05:00
DRC
ed3c527386 README.ijg: Wordsmith per ISO/ITU-T suggestions
This commit merges the following paragraph from the latest libjpeg
release:
https://github.com/libjpeg-turbo/ijg/blob/jpeg-9c/README#L222-L229
which takes into account the fact that JFIF is now an official ISO/ITU-T
standard.  I also included the ISO/IEC document number for the JFIF spec
(jpeg-9c included only the ITU-T rec number.)

This commit also heavily wordsmiths the "FILE FORMAT WARS" section.
In jpeg-7 and later, this section has become somewhat impolitic,
referring to JPEG 2000 and JPEG XR as "faulty technologies" and
"momentary mistakes."  The original intent of this section, which was
introduced in jpeg-5 and refined in jpeg-6
(https://github.com/libjpeg-turbo/ijg/blob/jpeg-5/README#L317-L338,
https://github.com/libjpeg-turbo/ijg/blob/jpeg-6b/README#L335-L367)
was to highlight the problem of JPEG file format divergence that existed
in the 1990s prior to the adoption of JFIF as an official ISO/ITU-T
standard.  That problem is fortunately no longer a problem, thanks in
part to the existence of libjpeg.  I have attempted to preserve Tom's
intent of using this section to describe which file formats the code is
compatible with and why it isn't compatible with some file formats
bearing the name "JPEG."  Such modifications always put our project in a
very awkward position, because we are not the IJG and do not claim to
be, but it is still necessary for us to modify the IJG README file from
time to time to eliminate obsolete information while attempting to
remain as neutral as possible.
2018-04-06 18:18:27 -05:00
DRC
4a275cf080 Fix compiler warning w/ 32-bit MSVC builds 2018-03-31 21:49:01 -05:00
DRC
13e4803e6a Fix build errors when C flags include -Werror
Instructing the compiler to treat warnings as errors caused some of the
compiler tests to fail, because the test code was not 100% clean.

Note that we now use check_symbol_exists() to check for memset() and
memcpy(), since the test code for check_function_exists() produces a
compiler warning due to not including <string.h>.
2018-03-31 19:25:12 -05:00
DRC
a74655af45 CMakeLists.txt: Move intrin.h header check
It is more readable for this to be next to the __builtin_ctzl() check,
since both are used by the accelerated progressive Huffman code.
2018-03-31 15:35:08 -05:00
DRC
58cb10ee5f Eliminate compiler warnings w/ Solaris Studio 2018-03-31 14:03:37 -05:00
DRC
7b3c0f0109 PowerPC: Fix comp. warning when built w/ -maltivec 2018-03-31 14:03:02 -05:00
DRC
72964b8633 LICENSE.md: Explain why three licenses were used 2018-03-31 12:46:13 -05:00
DRC
3270768736 jversion.h: Bump copyright year to 2018 2018-03-31 12:46:13 -05:00
DRC
51f94caba1 Build: Use Colin Plumb's public domain MD5 code
... instead of the RSA code, the license for which contains an
advertising clause.  It is strongly believed that the RSA advertising
clause is innocuous, because:

- A clarification from RSA
  (http://www.ietf.org/ietf-ftp/IPR/RSA-MD-all), published in 2000,
  stated:

  "Implementations of these message-digest algorithms, including
  implementations derived from the reference C code in RFC-1319,
  RFC-1320, and RFC-1321, may be made, used, and sold without license
  from RSA for any purpose."

  Referring to the opinion from Fedora's legal team
  (https://fedoraproject.org/wiki/Licensing:FAQ?rd=Licensing/FAQ#What_about_the_RSA_license_on_their_MD5_implementation.3F_Isn.27t_that_GPL-incompatible.3F),
  this means that md5.c and md5.h, which were derived from the original
  RFC 1321 reference code (http://www.faqs.org/rfcs/rfc1321.html), can
  be used without the RSA license.

- In the context of libjpeg-turbo, RSA's MD5 code was used only in the
  build/test system.  It was not part of the libjpeg-turbo binary
  distribution, and thus the only "material mentioning or referencing"
  the MD5 code was the libjpeg-turbo source code, which-- by virtue of
  including RSA's original copyright headers-- properly attributed the
  code as required under the RSA license.

However, in light of the open source community's tendency to have
knee-jerk reactions to stuff like this, it would've been necessary to
include the above explanation in our source tree in order to head off
potential FUD, and a simple fix is always better than a complex
explanation.

This commit also assigns the 3-clause BSD license to my modifications of
the MD5 code.  This license is the same one used by md5cmp and other
parts of the build system.
2018-03-31 12:46:07 -05:00
Matthieu Darbois
9a12cf7ab5 Travis: Deploy only when using official repo
This prevents build failures on forks that contain a master or dev
branch.
2018-03-29 17:33:00 -05:00
DRC
c80ddef7a4 Build: Fix rpath in iOS shared libraries
When attempting to configure an iOS/ARM build with Xcode 7.2 and CMake
2.8.12, I got the following errors:

CMake Error at CMakeLists.txt:560 (add_library):
  Attempting to use MACOSX_RPATH without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG
  being set.  This could be because you are using a Mac OS X version less
  than 10.5 or because CMake's platform configuration is corrupt.
(x 3)

CMake Error at sharedlib/CMakeLists.txt:38 (add_library):
  Attempting to use MACOSX_RPATH without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG
  being set.  This could be because you are using a Mac OS X version less
  than 10.5 or because CMake's platform configuration is corrupt.
(x 3)

Upgrading to CMake 3.x (tried 3.0 and 3.1) got rid of the errors, but
the resulting shared libs still did not use @rpath as expected.  Note
also that CMake 3.x (at least the two versions I tested) does not
automatically set the MACOSX_RPATH property as claimed.  I could find
nothing in the release notes for later CMake releases to indicate that
either problem has been fixed.  What I did find was this little nugget
of code in the Darwin platform module:

f6b93fbf3a/Modules/Platform/Darwin.cmake (L33-L36)

This sets CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG="-Wl,-rpath," only if you
are running OS X 10.5 or later.  It makes no such check for iOS, perhaps
because shared libraries aren't much of a thing with iOS apps.  In any
event, this commit simply sets CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG if it
isn't set already, and that fixes all of the aforementioned problems.
2018-03-23 23:45:44 -05:00
DRC
d3a1f899ee Travis: Don't build tags 2018-03-23 16:11:06 -05:00
DRC
d64e8e2905 Fix continuous integration of pull requests
- Travis doesn't set the $encrypted_* variables for PRs, so disable GPG
signing when building a PR (artifacts aren't deployed for PRs anyhow,
and even if they were, I wouldn't want them to be signed, as they may
contain unvetted code.)
- Take advantage of the new -d option in buildljt, which allows for
building from an existing Git clone directory.  This eliminates the need
to rename and restore .git/shallow, allows the official build scripts to
work properly when building PRs, and prevents 'git clone' being invoked
twice in CI builds.

Refer to #217
2018-03-23 14:57:09 -05:00
DRC
e15a6b4e08 Include .pc and man files in MinGW install[er]s
These files are potentially useful to MinGW users, since MSYS2 MinGW
environments have a man command by default and provide an easy way to
install pkg-config.

Closes #223
2018-03-23 11:19:29 -05:00
DRC
ca56642128 release/installer.nsi.in: Remove extraneous quotes
These don't seem to affect anything, because $INSTDIR is already quoted
per 25758055ac.
2018-03-23 11:04:45 -05:00
DRC
3fa69b4d61 jcphuff.c: Fix compiler warning
Misleading indentation, introduced by
5b177b3cab
2018-03-23 10:41:07 -05:00
DRC
d83c997749 README.md: clarify where API docs can be found 2018-03-23 00:00:58 -05:00
DRC
d66dc70d7b ChangeLog.md: bump revision to prepare for beta 2018-03-22 17:16:12 -05:00
DRC
8adf4c0a4f jcphuff.c: Fix compiler warning with Visual C++
GCC doesn't seem to care if we pass no arguments to the ENCODE_COEFS*
macros, but MSVC does.  Insert a no-op to make it happy.
2018-03-22 17:14:15 -05:00
DRC
1095b822b0 Bump revision to 1.5.90 to prepare for beta 2018-03-22 16:08:25 -05:00
DRC
c0ca354eb4 Label this release 2.0 instead of 1.6
This also pulls the formatting changes from
19c791cdac into the TurboJPEG C API docs.
2018-03-22 16:05:58 -05:00
DRC
2e90ccac0b ChangeLog.md: clarification regarding AVX2 2018-03-22 15:56:09 -05:00
mayeut
5b177b3cab C/SSE2 optimization of encode_mcu_AC_first()
This commit adds C and SSE2 optimizations for the encode_mcu_AC_first()
function used in progressive Huffman encoding.

The image used for testing can be retrieved from this page:
https://blog.cloudflare.com/doubling-the-speed-of-jpegtran

All timings done on `Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz`
clang version is `Apple LLVM version 9.0.0 (clang-900.0.39.2)`
gcc-5 version is `gcc-5 (Homebrew GCC 5.5.0) 5.5.0`
gcc-7 version is `gcc-7 (Homebrew GCC 7.2.0) 7.2.0`

Here are the results in comparison to libjpeg-turbo@293263c using
`time ./jpegtran -outfile /dev/null -progressive -optimise -copy none print_poster_0025.jpg`

C
clang x86_64: +19%
gcc-5 x86_64: +80%
gcc-7 x86_64: +57%
clang i386: +5%
gcc-5 i386: +59%
gcc-7 i386: +51%

SSE2
clang x86_64: +79%
gcc-5 x86_64: +158%
gcc-7 x86_64: +122%
clang i386: +71%
gcc-5 i386: +134%
gcc-7 i386: +135%

Discussion in libjpeg-turbo/libjpeg-turbo#46
2018-03-22 15:49:23 -05:00
mayeut
16bd984557 C/SSE2 optimization of encode_mcu_AC_refine()
This commit adds C and SSE2 optimizations for the encode_mcu_AC_refine()
function used in progressive Huffman encoding.

The image used for testing can be retrieved from this page:
https://blog.cloudflare.com/doubling-the-speed-of-jpegtran

All timings done on `Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz`
clang version is `Apple LLVM version 9.0.0 (clang-900.0.39.2)`
gcc-5 version is `gcc-5 (Homebrew GCC 5.5.0) 5.5.0`
gcc-7 version is `gcc-7 (Homebrew GCC 7.2.0) 7.2.0`

Here are the results in comparison to libjpeg-turbo@3c54642 using
`time ./jpegtran -outfile /dev/null -progressive -optimise -copy none print_poster_0025.jpg`

C
clang x86_64: +7%
gcc-5 x86_64: +30%
gcc-7 x86_64: +33%
clang i386: +0%
gcc-5 i386: +24%
gcc-7 i386: +23%

SSE2
clang x86_64: +42%
gcc-5 x86_64: +53%
gcc-7 x86_64: +64%
clang i386: +35%
gcc-5 i386: +46%
gcc-7 i386: +49%

Discussion in libjpeg-turbo/libjpeg-turbo#46
2018-03-22 13:05:55 -05:00
DRC
81baa1b501 simd/i386/jchuff-sse2.asm: Minor formatting tweak 2018-03-21 13:03:30 -05:00
DRC
293263c352 Format preprocessor macros more consistently
Within the libjpeg API code, it seems to be more the convention than not
to separate the macro name and value by two or more spaces, which
improves general readability.  Making this consistent across all of
libjpeg-turbo is less about my individual preferences and more about
making it easy to automatically detect variations from our chosen
formatting convention.  I intend to release the script I'm using to
validate this stuff, once it matures and stabilizes a bit.
2018-03-17 15:19:41 -05:00
DRC
09497c1a73 Additional code formatting tweaks
Missed by previous analysis
2018-03-17 00:28:17 -05:00
DRC
84fbd4f1ed Merge branch 'master' into dev 2018-03-17 00:27:49 -05:00
DRC
bd96b30b74 Make all get/putenv() calls compile-time optional
* Modify the SIMD dispatchers so they guard their usage of getenv() with
  the existing NO_GETENV preprocessor definition.
* Introduce a new NO_PUTENV preprocessor definition to guard the
  usage of putenv() in the TurboJPEG API library.

This at least puts Windows Store compatibility within the realm of
possibility, although further steps are required.
2018-03-17 00:10:44 -05:00
DRC
25758055ac Win installer: allow install directories w/ spaces 2018-03-16 20:34:18 -05:00
Cameron Cawley
c743009717 Fix build with older MinGW releases
Some MinGW implementations need stdint.h in order to define SIZE_MAX.

Regression caused by a09ba29a55 and
not fully fixed by a0047bdea4.

Closes #220
2018-03-16 19:06:12 -05:00
DRC
29e453f7c0 turbojpeg.c: Fix Windows build
Broken by previous commit.  Although turbojpeg.c no longer needs
tjutil.h on Un*x, it still needs to include that file on Windows in
order to use snprintf() and strcasecmp() (which, on Windows, are macros
that wrap _snprintf_s() and stricmp().)
2018-03-16 14:12:15 -05:00
DRC
a4da0750f0 Merge branch 'master' into dev 2018-03-16 02:16:41 -05:00
DRC
19c791cdac Improve code formatting consistency
With rare exceptions ...
- Always separate line continuation characters by one space from
  preceding code.
- Always use two-space indentation.  Never use tabs.
- Always use K&R-style conditional blocks.
- Always surround operators with spaces, except in raw assembly code.
- Always put a space after, but not before, a comma.
- Never put a space between type casts and variables/function calls.
- Never put a space between the function name and the argument list in
  function declarations and prototypes.
- Always surround braces ('{' and '}') with spaces.
- Always surround statements (if, for, else, catch, while, do, switch)
  with spaces.
- Always attach pointer symbols ('*' and '**') to the variable or
  function name.
- Always precede pointer symbols ('*' and '**') by a space in type
  casts.
- Use the MIN() macro from jpegint.h within the libjpeg and TurboJPEG
  API libraries (using min() from tjutil.h is still necessary for
  TJBench.)
- Where it makes sense (particularly in the TurboJPEG code), put a blank
  line after variable declaration blocks.
- Always separate statements in one-liners by two spaces.

The purpose of this was to ease maintenance on my part and also to make
it easier for contributors to figure out how to format patch
submissions.  This was admittedly confusing (even to me sometimes) when
we had 3 or 4 different style conventions in the same source tree.  The
new convention is more consistent with the formatting of other OSS code
bases.

This commit corrects deviations from the chosen formatting style in the
libjpeg API code and reformats the TurboJPEG API code such that it
conforms to the same standard.

NOTES:
- Although it is no longer necessary for the function name in function
  declarations to begin in Column 1 (this was historically necessary
  because of the ansi2knr utility, which allowed libjpeg to be built
  with non-ANSI compilers), we retain that formatting for the libjpeg
  code because it improves readability when using libjpeg's function
  attribute macros (GLOBAL(), etc.)
- This reformatting project was accomplished with the help of AStyle and
  Uncrustify, although neither was completely up to the task, and thus
  a great deal of manual tweaking was required.  Note to developers of
  code formatting utilities:  the libjpeg-turbo code base is an
  excellent test bed, because AFAICT, it breaks every single one of the
  utilities that are currently available.
- The legacy (MMX, SSE, 3DNow!) assembly code for i386 has been
  formatted to match the SSE2 code (refer to
  ff5685d5344273df321eb63a005eaae19d2496e3.)  I hadn't intended to
  bother with this, but the Loongson MMI implementation demonstrated
  that there is still academic value to the MMX implementation, as an
  algorithmic model for other 64-bit vector implementations.  Thus, it
  is desirable to improve its readability in the same manner as that of
  the SSE2 implementation.
2018-03-16 02:14:34 -05:00
DRC
d45434fe19 usage.txt: Remove Alt-Space non-ASCII character 2018-03-16 02:13:03 -05:00
Kornel
b85de60a9f Merge pull request #280 from vvuk/master
Add optional PNG support to CMake build
2018-03-14 00:14:18 +00:00
Vladimir Vukicevic
e73ee60a8f Add optional PNG support to CMake build 2018-03-13 16:58:33 -07:00
DRC
4508ab3e51 Fix build when RGB_{RED,GREEN,BLUE}!={0,1,2}
Broken by aa7459050d
2018-03-13 10:57:08 -05:00
DRC
87bc8721b4 Travis: OS X official builds now use YASM
Because 367a838626
2018-03-05 12:50:48 -06:00
DRC
33ce0b5e71 Loongson MMI SIMD extensions
Based on:
42aff4497b

Closes #158
2018-03-05 12:16:11 -06:00
DRC
35ed3c97b2 SIMD: Formatting tweaks + remove unnecessary code
+ "JSIMD_ARM_NEON" = "JSIMD_NEON"
+ "JSIMD_MIPS_DSPR2" = "JSIMD_DSPR2"
+ "*_mips_dspr2" = "*_dspr2"

It's obvious that "NEON" refers to Arm and "DSPr2" refers to MIPS, and
this naming convention is consistent with the other SIMD extensions.
2018-03-01 18:53:58 -06:00
DRC
3c54642c81 Fix iOS/ARM[-64] build w/ newer versions of CMake
Newer versions of CMake (known to be the case with 3.7.x and 3.10.x)
fail to add a space between CMAKE_C_FLAGS and CMAKE_ASM_FLAGS, which
causes the build to fail when using the official build procedure.

Closes #216
2018-02-27 11:40:05 -06:00
DRC
367a838626 Make SIMD syms private for x86[-64]/Mach-O builds
... if building with YASM.  NASM doesn't currently support the necessary
directives.

Closes #212
2018-02-26 21:02:55 -06:00
DRC
7c2bfdb040 Merge branch 'master' into dev
Closes #214
2018-02-26 18:43:40 -06:00
mayeut
0dd9a2c1fd Fix Win64 ABI conformance when using xmm8-xmm11
Referring to https://docs.microsoft.com/en-US/cpp/build/stack-usage:

"All memory beyond the current address of RSP is considered volatile:
The OS, or a debugger, may overwrite this memory during a user debug
session, or an interrupt handler.  Thus, RSP must always be set before
attempting to read or write values to a stack frame."

Basically, if-- under extremely rare circumstances-- a context swap were
to occur between saving the values of xmm8-xmm11 and setting the new
value of rsp, the O/S might not preserve that area of the stack.  In
general, libjpeg-turbo should not be using xmm8-xmm11 before or after
the call to jsimd_huff_encode_one_block_sse2(), so this is probably a
non-issue, but it's still a good idea to fix it.

Based on
ff7d2030dd
2018-02-26 18:00:15 -06:00
Matthieu Darbois
32eaeeac9e Fix BUILDING.md buglet ("--mfloat-abi=softfp")
(Introduced with the build system overhaul)

Closes #215
2018-02-26 12:56:31 -06:00
mayeut
4c4dc6149b Fix Win64 ABI conformance issue in AVX2 ISLOW IDCT
xmm8-xmm11 must be saved and restored, since the function uses
ymm8-ymm11.

Closes #211
2018-02-26 12:00:56 -06:00
mayeut
feaec37d32 Fix build with YASM
vinserti128 requires all operands to be specified
2018-02-24 16:50:03 -06:00
mayeut
b6909ab3f7 Make SIMD symbols private for MIPS ELF builds
Closes #210
2018-02-23 18:49:08 -06:00
mayeut
9bef5df776 Make SIMD symbols private for iOS ARM/ARM64 builds 2018-02-23 18:39:06 -06:00
mayeut
88421563ad Make SIMD symbols private for x86[-64] ELF builds 2018-02-23 18:37:46 -06:00
DRC
9cdec16ceb 32-bit AVX2 implementation of slow int inverse DCT 2018-02-23 15:19:16 -06:00
DRC
845fe8bf80 32-bit AVX2 buglet: IS_ALIGNED_SSE=IS_ALIGNED_AVX 2018-02-23 12:24:10 -06:00
DRC
de9e9db6a5 64-bit AVX2 implementation of slow int inverse DCT 2018-02-23 11:50:11 -06:00
DRC
715b7c38a8 32-bit AVX2 implementation of int sample conv. 2018-02-19 00:24:53 -06:00
DRC
ca387e7fda 32-bit AVX2 implementation of slow int forward DCT 2018-02-19 00:00:55 -06:00
DRC
39e9e65c5b 64-bit AVX2 implementation of int sample conv. 2018-02-18 23:30:14 -06:00
DRC
264dd42a98 64-bit AVX2 implementation of slow int forward DCT 2018-02-18 23:30:08 -06:00
DRC
ff392d81ef AVX2: Introduce YMMBLOCK macro for readability 2018-02-17 17:29:38 -06:00
DRC
37bae1a0e9 Prog Huff enc: bit count/branchless abs val opts
Ported from baseline Huffman encoder.  This improves overall compression
performance by ~3-9% in my testing.
2018-02-14 17:24:08 -06:00
DRC
985ef4f9f1 Merge branch 'master' into dev 2018-02-14 14:50:04 -06:00
Ben Boeckel
700de8aa81 README.md: Fix permissions 2018-02-14 14:41:36 -06:00
DRC
4e240795cc Merge branch 'master' into dev 2018-02-13 16:34:21 -06:00
DRC
d4859558da Fix dithering bug in merged 4:2:0/RGB565 algorithm
d0 should always be used for the first row, and d1 should always be used
for the second row.

Addresses concerns raised in #95, #81.
2018-02-13 16:22:43 -06:00
DRC
289014d470 Merge branch 'master' into dev 2018-01-05 12:05:43 -06:00
Stephen
3847f91122 Travis/OS X: Use 'brew bundle' + Brewfile
This ensures that the build script will not fail if the Homebrew
dependencies are already installed.
2018-01-03 09:57:21 -08:00
Kornel
f918646f9a Merge pull request #276 from mozilla/merge-1.5.3
Merge libjpeg-turbo 1.5.3
2017-12-29 20:34:31 +00:00
Kornel
365bc1ce11 Make IDCT method customizable 2017-12-23 01:29:16 +00:00
Kornel
836e711c38 Merge tag '1.5.3'
Tag 1.5.3 release

* tag '1.5.3': (29 commits)
  Fix whitespace errors
  jpeg_crop_scanlines: Handle gray images w/ samp!=1
  Fix lib state when skipping to end of 1-scan image
  Travis: Work around xcode7.3 image bug
  TJExample: Fix array index OOB w/ 4:1:1 JPEG input
  Code formatting tweaks
  Uniquify tjbenchtest log file names based on args
  TJExample.java: Don't ignore mistyped args
  Doc tweak: TJFLAG_ACCURATEDCT is the first flag
  tjbench.exe: Fix decompression access violation
  ChangeLog.md: buglet
  Build: Fix `make dist`
  Further partial image decompression fixes
  TJBench/TJUnitTest: Don't ignore mistyped args
  TurboJPEG C: Code formatting tweaks
  djpeg -crop: Exit gracefully with non-PPM formats
  Prevent "unmappable character" error in Java build
  Fix PowerPC 32-bit RPM build
  Fix 32-bit RPM build w/ newer RHEL/Fedora releases
  Packaging: Use parallel make when rebuilding SRPM
  ...
2017-12-23 01:10:55 +00:00
DRC
bd544e284b Merge branch 'master' into dev 2017-12-16 09:34:28 -06:00
DRC
0e2bca0744 jdarith.c: Fix two signed integer overflows
I guess I have to fix these, or Google Autofuzz is going to keep bugging
me about them.

Fixes #171
Fixes #197
Fixes #198
2017-12-15 20:37:02 -06:00
DRC
0fba3c1993 Bump version to 1.5.4 to prepare for new commits 2017-12-15 20:05:58 -06:00
DRC
7d3feda796 BUILDING.md: Adjust Android recipes for NDK r16+
NDK r16b moved some things around, so modify the Android build recipes
to take that into account while preserving compatibility with previous
NDK releases.

NOTE: the GCC 4.9 NDK toolchain is deprecated, so we will need to
develop new Android build recipes for libjpeg-turbo 1.6 that use the
Clang toolchain.

Closes #196
2017-12-15 16:53:25 -06:00
DRC
bf6c774305 Fix whitespace errors 2017-12-13 21:48:54 -06:00
DRC
afdd7999e4 Merge branch 'master' into dev
+ acknowledge 1.5.3 release
2017-12-06 12:20:24 -06:00
DRC
c308d43416 jpeg_crop_scanlines: Handle gray images w/ samp!=1
Since the sampling factor has no meaning for single-component images,
the decompressor ignores it, and jpeg_crop_scanlines() should as well.

Fixes #195
2017-12-06 11:59:04 -06:00
DRC
773040f9d9 Fix lib state when skipping to end of 1-scan image
If jpeg_skip_scanlines() is used to skip to the end of a single-scan
image, then we need to change the library state such that subsequent
calls to jpeg_consume_input() will return JPEG_REACHED_EOI rather than
JPEG_SUSPENDED.  (NOTE: not necessary for multi-scan images, since the
scans are processed prior to any call to jpeg_skip_scanlines().)

Unless I miss my guess, using jpeg_skip_scanlines() in this manner
will prevent any markers at the end of the JPEG image from being
read, but I don't think there is any way around that without actually
reading the data, which would defeat the purpose of
jpeg_skip_scanlines().

Fixes #194
2017-12-05 16:08:01 -06:00
DRC
c05d124968 Merge branch 'master' into dev 2017-11-29 14:36:39 -06:00
DRC
a831b5a986 Travis: Work around xcode7.3 image bug
Refer to travis-ci/travis-ci#8552.  This was supposed to be fixed on
November 15, then on November 28.  Travis blew through both deadlines,
so I have no confidence that the issue will be fixed as promised in a
timely manner.  Adding 'brew update' to .travis.yml slows the OS X
build, but there is no choice at the moment.
2017-11-29 14:23:31 -06:00
DRC
9f1f86bf7f tjLoadImage(): Fix OOB array access w/TJPF_UNKNOWN
Because the previous commit added a test for TJPF_UNKNOWN to tjunittest,
the ASAN CI build detected this issue.
2017-11-19 09:21:37 -06:00
DRC
e817c07779 tjLoadImage(): return TJPF_GRAY for grayscale BMPs
... if *pixelFormat=TJPF_UNKNOWN is passed to the function.
2017-11-19 08:43:07 -06:00
DRC
479fa1d870 tjLoadImage(): Don't convert RGB to grayscale
Loading RGB image files into a grayscale buffer isn't a particularly
useful feature, given that libjpeg-turbo can perform this conversion
much more optimally (with SIMD acceleration on some platforms) during
the compression process.  Also, the RGB2GRAY() macro was not producing
deterministic cross-platform results because of variations in the
round-off behavior of various floating point implementations, so
`tjunittest -bmp` was failing in i386 builds.
2017-11-18 11:40:53 -06:00
DRC
8c40ac8ae6 Add TurboJPEG C example and clean up Java example
Also rename example.c --> example.txt and add a disclaimer to that file
so people will stop trying to compile it.
2017-11-17 22:49:11 -06:00
DRC
dc4b900223 TurboJPEG: Add alpha offset array/method
Also, set the red/green/blue offsets for TJPF_GRAY to -1 rather than 0.
It was undefined behavior for an application to use those arrays/methods
with TJPF_GRAY anyhow, and this makes it easier for applications to
programmatically detect whether a given pixel format has red, green, and
blue components.
2017-11-17 22:49:07 -06:00
DRC
aa7459050d TurboJPEG C API: Add BMP/PPM load/save functions
The main justification for this is to provide new libjpeg-turbo users
with a quick & easy way of developing a complete JPEG
compression/decompression program without requiring them to build
libjpeg-turbo from source (which was necessary in order to use the
project-private bmp API) or to use external libraries.  These new
functions build upon significant enhancements to rdbmp.c, wrbmp.c,
rdppm.c, and wrppm.c which allow those engines to convert directly
between the native pixel format of the file and a pixel format
("colorspace" in libjpeg parlance) specified by the calling program.
rdbmp.c and wrbmp.c have also been modified such that the calling
program can choose to read or write image rows in the native (bottom-up)
order of the file format, thus eliminating the need to use an inversion
array.  tjLoadImage() and tjSaveImage() leverage these new underlying
features in order to significantly improve upon the performance of the
old bmp API.

Because these new functions cannot work without the libjpeg-turbo
colorspace extensions, the libjpeg-compatible code in turbojpeg.c has
been removed.  That code was only there to serve as an example of how
to use the TurboJPEG API on top of libjpeg, but more specific, buildable
examples now exist in the https://github.com/libjpeg-turbo/ijg
repository.
2017-11-17 19:32:52 -06:00
DRC
087ec126c1 tjbenchtest: Test new TurboJPEG progressive flag 2017-11-17 19:31:32 -06:00
DRC
cd8a12586a Build: Fix 'tjtest' target on Windows
tjbenchtest and its Java derivatives are useful for rooting out hidden
problems with the more esoteric TJBench and TurboJPEG features.  For
instance, on Windows, running tjbenchtest uncovered
5fce2e9421.

This commit also causes tjbenchtest and tjbenchtest.java to append -yuv
and -alloc to their log file names, depending on the arguments passed,
and it causes the build system to clean up those log files when the
'testclean' target is built.
2017-11-17 19:11:07 -06:00
DRC
4893e5d8b8 Merge branch 'master' into dev 2017-11-17 19:00:53 -06:00
DRC
19b393b624 TJExample: Fix array index OOB w/ 4:1:1 JPEG input 2017-11-17 18:45:08 -06:00
DRC
9d9d8fe658 Code formatting tweaks 2017-11-17 18:39:53 -06:00
DRC
78e97e38cb Uniquify tjbenchtest log file names based on args
+ clean up log files when 'make testclean' is invoked
+ fix 'tjbenchtest -yuv -alloc'
+ fix tjexampletest so that it creates images under /tmp
+ clean up tjexampletest
2017-11-17 18:39:53 -06:00
DRC
468f2fed27 TJExample.java: Don't ignore mistyped args 2017-11-17 18:39:48 -06:00
DRC
5abf2536f6 Doc tweak: TJFLAG_ACCURATEDCT is the first flag 2017-11-14 16:12:13 -06:00
DRC
5fce2e9421 tjbench.exe: Fix decompression access violation
The program crashed when a JPEG image was passed on the command line,
because we were mixing our metaphors vis-a-vis malloc()/free() and
tjAlloc()/tjFree() (malloc()/free() uses the tjbench.exe heap,
whereas tjAlloc()/tjFree() uses the turbojpeg.dll heap.)
2017-11-14 15:41:30 -06:00
DRC
907dd683a4 ChangeLog.md: buglet 2017-11-13 21:46:07 -06:00
DRC
f008876cc1 Build: Fix make dist
Broken by previous commit
2017-11-13 21:24:05 -06:00
DRC
5bc43c7821 Further partial image decompression fixes
- Referring to 073b0e88a1 and #185, the
  reason why BMP and RLE didn't (and won't) work with partial image
  decompression is that the output engines for both formats maintain a
  whole-image buffer, which is used to reverse the order of scanlines.
  However, it was straightforward to add -crop support for GIF and
  Targa, which is useful for testing partial image decompression along
  with color quantization.
- Such testing reproduced a bug reported by Mozilla (refer to PR #182)
  whereby jpeg_skip_scanlines() would segfault if color quantization was
  enabled.  To fix this issue, read_and_discard_scanlines() now sets up
  a dummy quantize function in the same manner that it sets up a dummy
  color conversion function.

Closes #182
2017-11-13 21:01:53 -06:00
DRC
f3ad13e3d8 TJBench/TJUnitTest: Don't ignore mistyped args 2017-11-13 16:00:35 -06:00
DRC
94e152b186 TurboJPEG C: Code formatting tweaks 2017-11-13 15:14:12 -06:00
DRC
073b0e88a1 djpeg -crop: Exit gracefully with non-PPM formats
... and document that only PPM/PGM output images are supported with the
-crop option for the moment.

I investigated the possibility of supporting -crop with -bmp, but even
after resetting the buffer dimensions, I still kept getting virtual
array access errors.  It seems that doing this the "right way" would
require creating a re-initialization function for each image format's
destination manager.  I'm disinclined to do that right now, given that
this feature was Google's baby (developed as a prerequisite for
including libjpeg-turbo in Android), and the -crop option in djpeg is
intended only as an example of how to use the partial image
decompression API.  Real-world applications would need to handle this
in their own destination managers.

It would probably be possible to make this work with Targa by employing
a similar hack to the one we used with PPM, but Targa isn't popular
enough to bother.

Fixes #185
2017-11-08 21:30:19 -06:00
DRC
616b4e2d1b TurboJPEG C: Compiler warnings
Introduced in b9ab64d8db.
2017-09-20 19:59:21 +00:00
DRC
3d72522a68 SRPM build: Define _libdir based on build arch
Setting _libdir to CMAKE_INSTALL_FULL_LIBDIR only works when doing an
in-tree RPM build.  SRPMs are architecture-agnostic, so the spec needs
to compute_libdir at the time the SRPM is rebuilt, not at the time it
is generated.

This is a regression introduced when implementing the new CMake-based
cross-platform build system.
2017-09-20 18:13:23 +00:00
DRC
f0dd80f246 Merge branch 'master' into dev 2017-09-20 17:13:46 +00:00
DRC
1b385f37f3 Prevent "unmappable character" error in Java build
This was causing the build to fail when rebuilding libjpeg-turbo from
a source RPM.
2017-09-20 17:05:15 +00:00
DRC
fd778bba46 Fix PowerPC 32-bit RPM build 2017-09-20 16:43:27 +00:00
DRC
8d403aeb6a Fix 32-bit RPM build w/ newer RHEL/Fedora releases
The version of RPM on RHEL 5 and older platforms defines _libdir
as %{_exec_prefix}/%{_lib}, so defining _lib in the spec file redefined
_libdir.  However, newer versions of RPM (probably >= 4.6, since that
was the version that introduced the ISA macros) define _libdir as either
%{_prefix}/lib or %{_prefix}/lib64.  Thus, we need to explicitly
override _libdir in our spec file.
2017-09-19 23:15:46 +00:00
DRC
01b74c101e Packaging: Use parallel make when rebuilding SRPM 2017-09-11 10:06:22 -05:00
DRC
db0dec3c5a Travis: Limit parallel make jobs to # of CPU cores
This tends to be faster than 'make -j', since it is making more wise
use of the available resources.
2017-09-11 09:48:33 -05:00
nyg
ba6e9d8a11 wrjpgcom: Fix comment typo
Comment was copied/pasted from skip_variable() without making the
necessary modifications.
2017-09-05 11:23:56 -05:00
DRC
7106ffe5f2 Merge branch 'master' into dev 2017-09-02 04:20:40 +00:00
DRC
5426a4cb16 TJUnitTest: Usage formatting tweaks 2017-09-02 04:08:06 +00:00
DRC
d0bac69a8a Java: Fix TJUnitTest on big endian platforms
It is necessary for the C code to be aware of the machine's endianness,
which is why the TurboJPEG Java wrapper sets a different pixel format
for integer BufferedImages depending on ByteOrder.nativeOrder().
However, it isn't necessary to handle endianness in pure Java code such
as TJUnitTest (d'oh!)  This was a product of porting the C version of
TJUnitTest too literally, and of insufficient testing (historically,
the big endian systems I had available for testing didn't have Java.)
2017-09-02 03:47:56 +00:00
DRC
59322e0973 Build: Change ppc64le DEB arch to ppc64el
This is the convention among Debian-based distros.
2017-09-01 21:57:48 +00:00
DRC
51cc89fa7b Merge branch 'master' into dev 2017-09-01 09:02:55 -05:00
DRC
4ded4dfac6 Build: Fix AltiVec detection on OS X Leopard
The ability to directly access elements of an AltiVec vector is
apparently a more recent thing.
2017-09-01 09:01:00 -05:00
DRC
1d93541617 Build: Use -maltivec when testing AltiVec support
Doesn't seem to be necessary with recent Linux/GCC configurations, but
it is definitely necessary with OS X.
2017-09-01 08:55:33 -05:00
DRC
c0f3512d5a Merge branch 'master' into dev 2017-09-01 07:12:51 -05:00
DRC
02fa8f244e Fix build on PowerPC SPE systems
SPE systems don't support AltiVec instructions.

Fixes #172
2017-08-31 20:32:48 -05:00
DRC
32120054c2 Java: Fix NullPointerException in YUVImage
planes == null is a valid argument to setBuf() if alloc == true, so we
need to make sure that planes is non-null before validating its length.
We also need to allocate one dimension of the planes array if it's null.

Fixes #168
2017-08-14 11:46:26 -05:00
DRC
1478361204 Bump version to 1.5.3 to prepare for new commits 2017-08-14 11:20:19 -05:00
Kornel
f154ccc091 Version bump 2017-07-10 11:58:14 +01:00
Kornel
9be7a47841 Merge tag '1.5.2'
Tag 1.5.2 release

* tag '1.5.2': (54 commits)
  x86: Fix "short jump is out of range" w/ NASM<2.04
  TurboJPEG: Document xform issue w/ big marker data
  Java TJBench: Fix parsing of -warmup argument
  Build: Disable warmup in TJBench regression tests
  TJBench: Improve consistency of results
  TurboJPEG: C API documentation buglet
  TJBench: Code formatting tweaks
  TJBench: Fix errors when decomp. files w/ ICC data
  BUILDING.md: Include Android/x86 build recipes
  Travis: Fix OS X build
  Restore compatibility with older autoconf releases
  Attribute ARM runtime detection code to Nokia
  Honor max_memory_to_use/JPEGMEM/-maxmemory
  AppVeyor: Fix CI build
  TurboJPEG: Fix potential memory leaks
  Always tweak EXIF w/h tags w/ lossless transforms
  Fix error w/ lossless crop & libjpeg v7 emulation
  Include jpeg_skip/crop_scanlines() in jpeg7.dll
  libjpeg.txt: Include partial decomp. in TOC
  Slightly de-confusify cjpeg, jpegtran usage info
  ...
2017-07-10 11:54:52 +01:00
DRC
e5c1613ccd x86: Fix "short jump is out of range" w/ NASM<2.04 2017-07-07 15:28:49 -05:00
Kornel
4d77515bc9 Merge pull request #263 from lambdapioneer/fix_dcscanopt2
Calculate jpeg_simple_progression nscans correctly
2017-07-06 12:21:29 +01:00
Daniel Hugenroth
fb27709ab1 Calculate jpeg_simple_progression nscans correctly 2017-07-06 11:18:19 +01:00
DRC
c94531212f TJBench: Recover from non-fatal errors if possible
Previously, -stoponwarning only had an effect on the underlying
TurboJPEG C functions, but TJBench still aborted if a non-fatal error
occurred.  This commit modifies the C version of TJBench such that it
always recovers from a non-fatal error unless -stoponwarning is
specified.  Furthermore, the benchmark stores the details of the last
non-fatal error and does not print any subsequent non-fatal error
messages unless they differ from the last one.

Due to limitations in the Java API (specifically, the fact that it
cannot communicate errors, fatal or otherwise, to the calling program
without throwing a TJException), it was only possible to make
decompression operations fully recoverable within TJBench.  With other
operations, -stoponwarning still has an effect on the underlying C
library but has no effect at the Java level.

The Java API documentation has been amended to reflect that only certain
methods are truly recoverable, regardless of the state of
TJ.FLAG_STOPONWARNING.
2017-06-29 17:09:53 -05:00
DRC
9baef107e1 TurboJPEG: Don't make STOPONWARNING persistent
Due to an oversight in d4092f6b4d,
the state of TJFLAG_STOPONWARNING persisted beyond the function it
was passed to.
2017-06-29 12:08:02 -05:00
DRC
dadebcd79a TurboJPEG: Add "copy none", progressive xform opts
Allow progressive entropy coding to be enabled on a
transform-by-transform basis, and implement a new transform option for
disabling the copying of markers.

Closes #153
2017-06-28 15:32:33 -05:00
DRC
dedce66eb5 Merge branch 'master' into dev 2017-06-28 15:30:41 -05:00
DRC
b0971e47d7 TurboJPEG: Document xform issue w/ big marker data
If the source image for a transform operation has a lot of EXIF or ICC
data embedded in it, then it may cause the output image size to exceed
the worst-case size returned by tjBufSize() (because tjTransform()
transfers all markers to the output image.)  This is only a problem if
TJFLAG_NOREALLOC is passed to the function.  Since the TurboJPEG C API
doesn't require the destination image size to be set in this case, it
makes the documented assumption that the calling program has allocated
the destination buffer to exactly the size returned by tjBufSize().
Changing this assumption would change the API behavior and necessitate
a new function name (tjTransform2().)  At the moment, it's easier to
just document this as a known issue, since it's easy to work around in
the C API.

The Java API is unfortunately a different story, since it must always
use TJFLAG_NOREALLOC (because, when using the TurboJPEG Java API, all
buffers are allocated on the Java heap, and thus they can't be
reallocated by the C code.)  There is no easy way to work around this
without changing the C API as discussed above, because if the source
image contains large amounts of marker data, it's virtually impossible
to determine how big the output image will be.
2017-06-28 15:22:33 -05:00
DRC
e248d430e2 Java TJBench: Fix parsing of -warmup argument
Due to an oversight, this wasn't included in
1db1ce45da.
2017-06-28 15:22:32 -05:00
DRC
acb634931a Build: Disable warmup in TJBench regression tests
Fixes slow-down in 'make test' caused by previous commit.
2017-06-28 15:19:53 -05:00
DRC
1db1ce45da TJBench: Improve consistency of results
Given that libjpeg-turbo can often process hundreds of megapixels/second
on modern hardware, the default of one warmup iteration was essentially
meaningless.  Furthermore, the -warmup option was a bit clunky, since
it required some foreknowledge of how fast the benchmarks were going to
execute.

This commit introduces a 1-second warmup interval for each benchmark by
default, and the -warmup option has been retasked to control the length
of that interval.
2017-06-27 14:28:43 -05:00
DRC
aba6ae5950 TurboJPEG: Opt. enable progressive entropy coding
Fulfills part of the feature request in #153.  Also paves the way for
SIMD-accelerated progressive Huffman coding (refer to #46.)
2017-06-27 13:26:26 -05:00
DRC
596e3965e7 Merge branch 'master' into dev 2017-06-27 11:51:34 -05:00
DRC
d0c3aa900b TurboJPEG: C API documentation buglet
TJFLAG_NOREALLOC, tjAlloc(), and tjFree() apply to all TurboJPEG
compression functions, not just tjCompress2().
2017-06-27 11:49:38 -05:00
DRC
d4092f6b4d TurboJPEG: Improve error handling
- Provide a new C API function and TJException method that allows
  calling programs to query the severity of a compression/decompression/
  transform error.
- Provide a new flag that instructs the library to immediately stop
  compressing/decompressing/transforming if a warning is encountered.

Fixes #151
2017-06-27 11:03:26 -05:00
DRC
42e1e2d886 Build: Custom target for generating JNI headers 2017-06-27 11:03:26 -05:00
DRC
25c912c1b2 Build: Add custom target for generating Java docs 2017-06-27 11:03:26 -05:00
DRC
178796e748 Build: Fix buglet in java/CMakeLists.txt (MSYS)
CMAKE_HOST_SYSTEM_NAME should be restored with the value of
CMAKE_HOST_SYSTEM_NAME_BAK.
2017-06-27 11:03:26 -05:00
DRC
b9ab64d8db TurboJPEG: Thread-safe error message retrieval
Introduce a new C API function (tjGetErrorStr2()) that can be used to
retrieve compression/decompression/transform error messages in a
thread-safe (i.e. instance-specific) manner.  Retrieving error messages
from global functions is still thread-unsafe.

Addresses a concern expressed in #151.
2017-06-27 10:58:36 -05:00
DRC
2ac4e9d914 Merge branch 'master' into dev 2017-06-26 22:03:32 -05:00
DRC
6a2b067428 TJBench: Code formatting tweaks
Spaces-->tab + remove stray control character that was introduced in
95e4cb2060
2017-06-26 21:15:15 -05:00
DRC
11eec4a398 TJBench: Fix errors when decomp. files w/ ICC data
Embedded ICC profiles can cause the size of a JPEG file to exceed the
size returned by tjBufSize() (which is really meant to be used for
compression anyhow, not for decompression), and this was causing a
segfault (C) or an ArrayIndexOutOfBoundsException (Java) when
decompressing such files with TJBench.  This commit modifies the
benchmark such that, when tiled decompression is disabled, it re-uses
the source buffer as the primary JPEG buffer.
2017-06-26 21:12:40 -05:00
DRC
301ba4f305 BUILDING.md: Include Android/x86 build recipes
Addresses a concern raised in #155.
2017-06-26 21:12:33 -05:00
Kornel
a9bfef2a57 Reset scans to value expected by the TJ API
Fixes #260
2017-05-25 16:32:23 +01:00
Kornel
12909e6a0f Merge pull request #258 from pornel/turbo151
Update to libjpeg-turbo 1.5.1
2017-05-25 16:30:09 +01:00
Kornel
60a61a34fc Ignore test temp files 2017-05-25 16:28:56 +01:00
Kornel
216ccd6702 Merge pull request #259 from pornel/pngtiny
Embed an sRGB profile if PNG had an sRGB chunk
2017-05-21 22:35:31 +01:00
Kornel
88e99ac246 Embed an sRGB profile if PNG had an sRGB chunk 2017-05-11 13:56:06 +01:00
DRC
70f236ddd7 Travis: Fix OS X build
The Travis xcode7.3 image now apparently includes GnuPG 1.4.x by
default, so use it instead of installing GnuPG 2.  Using GnuPG 2.1.x,
the default version in Homebrew as of this writing, is problematic for
this reason:
https://wiki.archlinux.org/index.php/GnuPG#Unattended_passphrase
2017-05-08 14:42:52 -05:00
DRC
2a4f189444 Restore compatibility with older autoconf releases
(broken by f06cc1200f)

Fixes #149
2017-05-05 20:45:40 -05:00
Kornel
78e3171864 Merge pull request #254 from pornel/pngicc
Preserve ICC profile when converting from PNG
2017-05-01 15:26:05 +01:00
Kornel
72d249b89c Merge pull request #253 from pornel/master
Expanded readme
2017-05-01 13:36:38 +01:00
Kornel
075a1e1afc Copy ICC profile from PNG to JPEG 2017-04-30 15:02:57 +01:00
Kornel
2dd5ae7b83 Support G+A PNG (without alpha of course) 2017-04-30 15:02:57 +01:00
Kornel
e95be67503 Prevent overflows in large PNGs 2017-04-30 15:02:57 +01:00
Kornel
ec4255bb74 Expanded readme 2017-04-30 14:06:30 +01:00
DRC
9d64f3c60b Attribute ARM runtime detection code to Nokia
This code was submitted in the initial ARM NEON patches
(https://sourceforge.net/p/libjpeg-turbo/patches/7/) by Siarhei while he
was still a Nokia employee.
2017-04-24 14:42:58 -05:00
Kornel
cfff992fc6 Merge pull request #251 from lambdapioneer/fix_dcscanopt
Calculate jpeg_simple_progression nscans correctly when dc_scan_opt_mode
2017-04-24 10:56:12 +01:00
Daniel Hugenroth
31d957d25a Calculate jpeg_simple_progression nscans correctly with respect to dc_scan_opt_mode 2017-04-21 17:23:50 +01:00
Kornel
41dd774c1f Merge pull request #243 from pornel/autosample
Guess default chroma subsampling setting from the quality setting
2017-04-14 21:29:02 +02:00
Kornel Lesiński
1374cdfabe JPEG_C_PARAM_SUPPORTED to allow detection of the API
Fixes #165
2017-03-18 23:17:47 +00:00
DRC
da2a27ef05 Honor max_memory_to_use/JPEGMEM/-maxmemory
This re-introduces a feature of the obsolete system-specific libjpeg
memory managers-- namely the ability to limit the amount of main memory
used by the library during decompression or multi-pass compression.
This is mainly beneficial for two reasons:

- Works around a 2 GB limit in libFuzzer
- Allows security-sensitive applications to set a memory limit for the
  JPEG decoder so as to work around the progressive JPEG exploit
  (LJT-01-004) described here:
  http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf

This commit also removes obsolete documentation regarding the MS-DOS
memory manager (which itself was removed long ago) and changes the
documentation of the -maxmemory switch and JPEGMEM environment variable
to reflect the fact that backing stores are never used in libjpeg-turbo.

Inspired by:
066fee2e7d

Closes #143
2017-03-18 17:42:34 -05:00
DRC
c082dc039d AppVeyor: Fix CI build
Something changed in the CI build environment, and our previous trick of
setting the Git URL to file://c:/projects/libjpeg-turbo no longer works.
Using cygpath to translate the Windows path to a MinGW-friendly format
is a better solution anyhow.
2017-03-18 13:25:30 -05:00
DRC
d4c41fe0da TurboJPEG: Fix potential memory leaks
Referring to https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=746,
it seems that the values of local buffer pointers in TurboJPEG API
functions aren't always preserved if longjmp() returns control to a
point prior to the allocation of the local buffers.  This is known to
be an issue with GCC 4.x and clang with -O1 and higher optimization
levels but not with GCC 5.x and later.  It is unknown why GCC 5.x and
6.x do not suffer from the issue, but possibly the local buffer pointers
are not allocated on the stack when using those more recent compilers.

In any case, this commit modifies the TurboJPEG API library code such
that the jump buffer is always updated after any local buffer pointers
are allocated but before any subsequent libjpeg API functions are
called.
2017-03-18 13:12:17 -05:00
Kornel Lesiński
3a86fa5b22 If there is no explicit subsample argument, guess the default from the quality setting 2017-03-18 15:33:11 +00:00
Kornel Lesiński
499bd1da89 Merge tag '1.5.1'
Tag 1.5.1 release

* tag '1.5.1':
  ARM64 NEON: Fix another ABI conformance issue
  Build: Remove ARMv6 support from 'make iosdmg'
  Fix out-of-bounds write in partial decomp. feature
  Silence additional UBSan warnings
  Fix unsigned int overflow in libjpeg memory mgr.
  TurboJPEG: Decomp. 4:2:2/4:4:0 JPEGs w/unusual SFs
  Silence pedantic GCC6 code formatting warnings
  Use plain upsampling if merged isn't accelerated
  Implement h1v2 fancy upsampling
  Fix AArch64 ABI conformance issue in SIMD code
  Don't install libturbojpeg.pc if TJPEG disabled
  Linux/PPC: Only enable AltiVec if CPU supports it
  ARM/MIPS: Change the behavior of JSIMD_FORCE*
  Bump version to 1.5.1 to prepare for new commits
2017-03-12 17:01:41 +00:00
Kornel Lesiński
527477ae43 Add file to cmake 2017-02-14 11:58:56 +00:00
Kornel Lesiński
3b1b5646d4 Bump version 2017-02-13 21:03:13 +00:00
DRC
44b2399a94 libjpeg API: Support reading/writing ICC profiles
This commit does the following:

-- Merges the two glueware functions (read_icc_profile() and
write_icc_profile()) from iccjpeg.c, which is contained in downstream
projects such as LCMS, Ghostscript, Mozilla, etc.  These functions were
originally intended for inclusion in libjpeg, but Tom Lane left the IJG
before that could be accomplished.  Since then, programs and libraries
that needed to embed/extract ICC profiles in JPEG files had to include
their own local copy of iccjpeg.c, which is suboptimal.

   -- The new functions were prefixed with jpeg_ and split into separate
   files for the compressor and decompressor, per the existing libjpeg
   coding standards.

   -- jpeg_write_icc_profile() was made slightly more fault-tolerant.
   It will now trigger a libjpeg error if it is called before
   jpeg_start_compress() or if it is passed NULL arguments.

   -- jpeg_read_icc_profile() was made slightly more fault-tolerant.
   It will now trigger a libjpeg error if it is called before
   jpeg_read_header() or if it is passed NULL arguments.  It will also
   now trigger libjpeg warnings if the ICC profile data is corrupt.

   -- The code comments have been wordsmithed.

   -- Note that the one-line setup_read_icc_profile() function was not
   included.  Instead, libjpeg.txt now documents the need to call
   jpeg_save_markers(cinfo, JPEG_APP0 + 2, 0xFFFF) prior to calling
   jpeg_read_header(), if jpeg_read_icc_profile() is to be used.

-- Adds documentation for the new functions to libjpeg.txt.

-- Adds an -icc switch to cjpeg and jpegtran that allows those programs
to embed an ICC profile in the JPEG files they generate.

-- Adds an -icc switch to djpeg that allows that program to extract an
ICC profile from a JPEG file while decompressing.

-- Adds appropriate unit tests for all of the above.

-- Bumps the SO_AGE of the libjpeg API library to indicate the presence
of new API functions.

Note that the licensing information was obtained from:
https://github.com/mm2/Little-CMS/issues/37#issuecomment-66450180
2017-01-19 19:06:22 -06:00
DRC
d9cb76f636 Remove vestigial license text regarding autoconf 2017-01-19 19:05:38 -06:00
DRC
d34d255957 Merge branch 'master' into dev 2017-01-19 19:05:21 -06:00
DRC
a0b7de9a47 Always tweak EXIF w/h tags w/ lossless transforms
... even if using libjpeg v6b emulation.  Previously
adjust_exif_parameters() was only called with libjpeg v7/v8 emulation,
but due to a bug (which this commit also fixes), it only worked properly
with libjpeg v8 emulation.
2017-01-19 19:00:27 -06:00
DRC
2252795571 Fix error w/ lossless crop & libjpeg v7 emulation
The JPEG_LIB_VERSION #ifdef in jtransform_adjust_parameters() was
incorrect, which caused a "Bogus virtual array access" error when
attempting to use the lossless crop feature.

Introduced in c04bd3cc97.

This also adds libjpeg v7 API/ABI emulation to the Travis CI tests.
2017-01-19 18:41:13 -06:00
DRC
eb38b61bfe Include jpeg_skip/crop_scanlines() in jpeg7.dll
... when the in-memory source/destination managers are included.
Oversight in 306e1d2d77 and
3ab68cf563.
2017-01-19 16:44:10 -06:00
DRC
47b29e8cd9 libjpeg.txt: Include partial decomp. in TOC
(oversight)
2017-01-19 15:36:58 -06:00
DRC
e1e816e665 Slightly de-confusify cjpeg, jpegtran usage info
+ bump copyright year
2017-01-19 15:35:54 -06:00
DRC
2fb4d7e337 BUILDING.md: Documentation buglet
`make cygwinpkg` was listed under "Mac".
2016-12-11 22:38:30 -06:00
DRC
8a9b042b26 Merge branch 'master' into dev 2016-12-10 09:35:30 -06:00
DRC
6441018150 LICENSE.md: Include text of BSD/zlib licenses
LICENSE.md is included in the binary distributions as well, so it
doesn't make much sense to refer to license headers in source files that
aren't necessarily going to be there.
2016-12-10 09:32:23 -06:00
DRC
11426a8716 Packaging system: "PACKAGE_NAME" = "PKGNAME"
Using PACKAGE_NAME as a variable name made more sense with autotools,
but now it's more of an inconvenience variable than a convenience
variable.
2016-12-10 09:10:57 -06:00
DRC
67ad535022 Build: Don't require sudo for make tarball
The whole point of `make tarball` is to make it easy for users to create
a binary distribution of libjpeg-turbo on platforms that aren't
supported by our official build system, so requiring root permissions
somewhat defeated that purpose.  Intead, the script now attempts to
detect whether the system has GNU tar or a recent version of BSD tar
that supports setting the ownership of the files in the tarball.
2016-12-10 09:02:53 -06:00
DRC
6c6696e569 Mac pkg: Use PKGNAME for documentation directory
Although there is little chance that we will ever have a package
conflict on OS X, the convention from our Linux packages is to use the
package name, not the project name, for the name of the documentation
directory.
2016-12-09 19:12:25 -06:00
DRC
6530203fdd Build: More GNUInstallDirs improvements
These improvements enable build systems to use GNUInstallDirs to define
custom directory variables.

- The set_dir() macro was renamed to GNUInstallDirs_set_install_dir(),
  in keeping with the module's established macro naming convention.

- Rather than detecting whether the prefix has changed, the new
  GNUInstallDirs_set_install_dir() macro instead examines whether the
  default for the variable in question has changed.  This allows for
  more flexibility, since build systems may decide to change the
  defaults based on factors other than the prefix.  It also enables the
  macro to work properly outside of the module.

- The module now performs directory variable substitution within the
  body of GNUInstallDirs_get_absolute_install_dir().

- The JAVADIR variable is no longer included in GNUInstallDirs.  That
  directory is not part of the GNU spec, and it turns out that various
  operating systems use different conventions for the location of Java
  classes.  Instead, the variable is now implemented in our build
  system as a demonstration of the aforementioned GNUInstallDirs
  enhancements.
2016-12-09 12:09:08 -06:00
DRC
c8358fcbd9 Build: Various improvements to install/pkg system
- GNUInstallDirs: any directory variable can now reference any other
  directory variable by including its name in angle brackets (<>).

- Changed the documentation of the directory variables in BUILDING.md
  accordingly.  This commit also includes some formatting tweaks to
  that section (using boldface for directory names, as is our
  convention.)

- Changed the package scripts such that they use
  CMAKE_INSTALL_DATAROOTDIR rather than CMAKE_INSTALL_DATADIR.

- We no longer override the install dir. defaults on Windows unless
  performing an official build.  It may be useful, for instance, to
  use the GNU defaults when installing into an MSYS environment.
2016-12-08 18:49:14 -06:00
DRC
b0fcd0ccc5 Build: Minor tweaks to GNUInstallDirs defaults
It isn't actually necessary to specify `CMAKE_INSTALL_DEFAULT_MANDIR`
for our official build.  Because `CMAKE_INSTALL_DEFAULT_DATAROOTDIR` is
blank for the official build, the default of "<DATAROOTDIR>/man" will
resolve to "man".

For the same reason, this commit changes the specification of
`CMAKE_INSTALL_DEFAULT_DOCDIR` and `CMAKE_INSTALL_DEFAULT_JAVADIR` in
the official build to be dependent on the data root directory (mainly to
make it obvious what we're doing.)

This commit also tweaks the example CMake command line in the directory
variable documentation so that it shows the correct location of the
CMake argument.
2016-12-07 19:20:46 -06:00
DRC
2b29bca2a9 Build: Fix Debug/RelWithDebInfo build with YASM
YASM requires a debug format to be specified with -g.  Currently the
only combination that I can make work at all is DWARF-2/ELF (YASM
doesn't support Mach-O debugging at all, and its support for CV8/MSVC
and MinGW/DWARF-2 appears to be broken), so debugging is only enabled
automatically for ELF at the moment.  For other formats, we don't
specify -g at all, which is how the old build system behaved.

Fixes #125, Closes #126
2016-12-07 18:18:35 -06:00
DRC
d681fa7626 Build: Set install dirs in a more GNU-friendly way
This builds upon the existing GNUInstallDirs module in CMake but adds
the following features to that module:

- The ability to override the defaults for each install directory
  through a new set of variables (`CMAKE_INSTALL_DEFAULT_*DIR`).

  Before operating system vendors began shipping libjpeg-turbo, it was
  meant to be a run-time drop-in replacement for the system's
  distribution of libjpeg, so it has traditionally installed itself
  under /opt/libjpeg-turbo on Un*x systems by default.  On Windows, it
  has traditionally installed itself under %SystemDrive%\libjpeg-turbo*,
  which is not uncommon behavior for open source libraries (open source
  SDKs tend to install outside of the Program Files directory so as to
  avoid spaces in the directory name.)  At least in the case of Un*x,
  the install directory behavior is based somewhat on the Solaris
  standard, which requires all non-O/S packages to install their files
  under /opt/{package_name}.  I adopted that standard for VirtualGL and
  TurboVNC while working at Sun, because it allowed those packages to be
  located under the same directory on all platforms.  I adopted it for
  libjpeg-turbo because it ensured that our files would never conflict
  with the system's version of libjpeg.  Even though many Un*x
  distributions ship libjpeg-turbo these days, not all of them ship the
  TurboJPEG API library or the Java classes or even the latest version
  of the libjpeg API library, so there are still many cases in which it
  is desirable to install a separate version of libjpeg-turbo than the
  one installed by the system.  Furthermore, installing the files under
  /opt mimics the directory structure of our official binary packages,
  and it makes it very easy to uninstall libjpeg-turbo.

  For these reasons, our build system needs to be able to use
  non-GNU-compliant defaults for each install directory if
  `CMAKE_INSTALL_PREFIX` is set to the default value.

- For each directory variable, the module now detects changes to
  `CMAKE_INSTALL_PREFIX` and changes the directory variable accordingly,
  if the variable has not been changed by the user.

  This makes it easy to switch between our "official" directory
  structure and the GNU-compliant directory structure "on the fly"
  simply by changing `CMAKE_INSTALL_PREFIX`.  Also, this new mechanism
  eliminated the need for the crufty mechanism that previously did the
  same thing just for the library directory variable.

  How it should work:
  - If a dir variable is unset, then the module will set an internal
    property indicating that the dir variable was initialized to its
    default value.
  - If the dir variable ever diverges from its default value, then the
    internal property is cleared, and it cannot be set again without
    unsetting the dir variable.
  - If the install prefix changes, and if the internal property
    indicates that the dir variable is still set to its default value,
    and if the dir variable's value is not being manually changed at the
    same time that the install prefix is being changed, then the dir
    variable's value is automatically changed to the new default value
    for that variable (as determined by the new install prefix.)

- The directory variables are now always cached, regardless of whether
  they were set on the command line or not.  This ensures that they can
  easily be examined and modified after being set, regardless of how they
  were set.

  This was made possible by the introduction of the aforementioned
  `CMAKE_INSTALL_DEFAULT_*DIR` variables.

- Improved directory variable documentation (based on descriptions at
  https://www.gnu.org/prep/standards/html_node/Directory-Variables.html)

- The module now allows "<DATAROOTDIR>" to be used as a placeholder in
  relative directory variables.

  It is replaced "on the fly" with the actual path of
  `CMAKE_INSTALL_DATAROOTDIR`.

This should more closely mimic the behavior of the old autotools build
system while retaining our customizations to it, and it should retain
the behavior of the old CMake build system.

Closes #124
2016-12-07 16:55:38 -06:00
DRC
ff05b6e0de Build: Fix Win "installer" target Java dependency
The correct target name is now "turbojpeg-java".
2016-12-07 14:09:41 -06:00
DRC
e6426d2420 Build: Formatting tweak
(It is our convention to use lowercase for CMake macro/function names)
2016-12-07 10:40:28 -06:00
DRC
2af2fe42a3 Build: Clean up inline keyword detection
Strict C89-conformant compilers don't support the "inline" keyword, but
most of them support "__inline__", and that keyword can be used with the
always_inline atribute as well.  This commit also removes duplicate code
by using a foreach() loop to test the various keywords.
2016-12-05 16:52:54 -06:00
DRC
fcfc6c5eed Fix build when CFLAGS contains -std=c89 (or -ansi)
This is a subtle point, but AC_C_INLINE defines "inline" to be either
"inline", "__inline__", or "__inline".  The subsequent test for
"inline __attribute__((always_inline))" uses this definition.  The
attribute is irrespective of the inline keyword, so whereas
"__inline__ __attribute__((always_inline))" works under C89,
"inline __attribute__((always_inline))" doesn't, and defining INLINE to
the latter causes the build to fail.  The easiest way around this is
simply to define "inline" ahead of "INLINE" in jconfigint.h,
which causes the inline keyword detected by AC_C_INLINE to modify the
INLINE macro if necessary.
2016-12-05 14:02:59 -06:00
DRC
786b649331 Reorg AltiVec detection code
+ advertise that full AltiVec SIMD acceleration is now available on
OpenBSD.

The relevant compilers probably all support C99 or GNU's variation of
C90 that allows variables to be declared anywhere, but our policy is to
conform to the C90 standard, if for no other reason than that it
improves code readability.
2016-12-05 13:14:19 -06:00
Donovan Watteau
f4ba09b33a Detect AltiVec support on OpenBSD 2016-12-05 12:35:15 -06:00
DRC
261db7706d Packaging: Use correct name for SRPM spec file
Per convention, the file should be named {package name}.spec.
2016-12-03 15:51:58 -06:00
Colin Cross
0f4fcced0a Fix sign mismatch comparison warnings
Fixes:
rdppm.c:257:14: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
    if (temp > maxval)
        ~~~~ ^ ~~~~~~
rdppm.c:284:14: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
    if (temp > maxval)
        ~~~~ ^ ~~~~~~
rdppm.c:289:14: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
    if (temp > maxval)
        ~~~~ ^ ~~~~~~
rdppm.c:294:14: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
    if (temp > maxval)
2016-12-03 15:30:59 -06:00
DRC
952191da79 Build: Fix issues when building as a Git submodule
- Replace CMAKE_SOURCE_DIR with CMAKE_CURRENT_SOURCE_DIR
- Replace CMAKE_BINARY_DIR with CMAKE_CURRENT_BINARY_DIR
- Don't use "libjpeg-turbo" in any of the package system filenames
  (because CMAKE_PROJECT_NAME will not be the same if building LJT as
  a submodule.)

Closes #122
2016-12-03 15:21:27 -06:00
DRC
d642da75bd Build: Fix buglet in output of make tjtest 2016-12-03 15:20:36 -06:00
DRC
059c9a5f2a Build: Fix regression in AltiVec SIMD detection
Only the SIMD source files should be built with -maltivec.  Otherwise
the detection code will not be compiled in.
2016-12-03 15:19:41 -06:00
DRC
82bf7f5858 Fix md5cmp on AmigaOS 4 (PowerPC big-endian)
+ Document AmigaOS support in the change log.

Based on:
b4f3b75797

Closes #119
2016-12-01 18:23:32 -06:00
DRC
3582ce90bb Travis: Use xcode7.3 image
The xcode7.2 image is verfallen, verlumpt, verblunget, verkackt

This also ensures that the build scripts are checked out from a
branch matching the libjpeg-turbo repository branch (not strictly
necessary when building from master, but it keeps the code in sync with
dev.)
2016-12-01 01:58:34 -06:00
DRC
94686e3c0f Build: Use wrapper script for gas-preprocessor.pl
The previous hack (adding ${CMAKE_ASM_COMPILER} to CMAKE_ASM_FLAGS)
didn't work in all cases, because more recent versions of CMake place
the includes ahead of the flags (which meant that the real assembler
wasn't the first argument to gas-preprocessor.pl.)
2016-11-25 18:54:55 -06:00
DRC
97205269bc Travis: Fix OS X build
+ migrate to new xcode7.3 image, since xcode7.2 is going away soon.
2016-11-23 18:44:33 -06:00
DRC
27d4c5ea22 Build: Fix RPATH handling
CMAKE_INSTALL_RPATH has to be set before the targets are defined (oops.)

This also explicitly turns on MACOSX_RPATH for the shared libraries
(which is the default with newer versions of CMake but not with 2.8.x.)
The old autotools/libtool build system hard-coded the install name
directory of the OS X shared libraries to libdir, which meant that any
executable that linked against those libraries would also be hard-coded
to look for the libjpeg-turbo libraries in that directory.  @rpath makes
the OS X version of libjpeg-turbo behave like the Linux version, in the
sense that the executables under /opt/libjpeg-turbo/bin will
automatically pick up the libraries under /opt/libjpeg-turbo/lib* by
default, but other executables won't unless they are linked with -rpath.
2016-11-23 18:31:32 -06:00
DRC
6abd39160c Unified CMake-based build system
See #56 for discussion.

Fixes #21, Fixes #29, Fixes #37, Closes #56, Fixes #58, Closes #73
Obviates #82

See also:
https://sourceforge.net/p/libjpeg-turbo/feature-requests/5/
https://sourceforge.net/p/libjpeg-turbo/patches/5/
2016-11-22 13:06:30 -06:00
DRC
9df7ac2e6a BUILDING.md: NASM 2.10+/YASM 1.2.0+ always needed
... for all x86[-64] builds, because we now have both 64-bit and 32-bit
AVX2 SIMD extensions.
2016-11-22 09:33:37 -06:00
DRC
0ff7da7191 Advertise the new AVX2 SIMD extensions
(our story so far ...)
2016-11-22 09:33:37 -06:00
DRC
9fdb8f8553 Merge branch 'master' into dev 2016-11-22 09:33:19 -06:00
DRC
d6d7b53968 AppVeyor: Use built-in MSYS2 MinGW compilers
AppVeyor already has MinGW32 and MinGW64 flavors of GCC 5.3.0
installed under MSYS2, so there is no need to install our own builds of
MinGW.  MinGW-builds is no longer an active project, and we were getting
occasional timeouts while wgetting those files from SourceForge.
Furthermore, GCC 5.3.0 should produce faster code than GCC 4.8.1.
2016-11-21 23:10:02 -06:00
DRC
f9f0c75bb8 BUILDING.md: Clarifications and wordsmithing
Updated out-of-date information, wordsmithed and clarified many
sections, and generally cleaned up the build recipes (including a
complete overhaul of the iOS recipes.)
2016-11-20 21:47:46 -06:00
DRC
3da94de248 Windows build: Add an "uninstall" target 2016-11-20 19:10:54 -06:00
DRC
ab664e35fc BUILDING.md/README.md: Increment libjpeg SO age
Documentation buglet.  This should have been changed in
6ed4d9d110 to reflect the addition of
libjpeg API functions in libjpeg-turbo 1.5.
2016-11-20 16:22:23 -06:00
DRC
ce26e83f47 README.md: Don't use trailing spaces as line break
Makes it easier to maintain this file using editors that automatically
remove trailing spaces.
2016-11-20 16:22:23 -06:00
DRC
74e4c793cd TJBench: Fix regression/-nowrite always enabled
Introduced by eb59b6e72d
2016-11-20 16:22:23 -06:00
DRC
a280fa630c BUILDING.md: Don't use trailing spaces as line break
Makes it easier to maintain this file using editors that automatically
remove trailing spaces.
2016-11-20 16:22:23 -06:00
DRC
6aae007745 CMake build system: Fix the "testclean" target
Regression caused by f9134384b7

This commit also makes the "testclean" target clean up the 4:1:1 test
images.  This was implemented in the autotools build system in
1f3635c496 but was left out of the CMake
build system due to an oversight.
2016-11-20 16:22:23 -06:00
Chris Young
4ad94b2963 Detect AltiVec support on AmigaOS 4 2016-11-18 13:03:28 -06:00
Kornel
cd81708ba9 Merge pull request #226 from inian/master
Update baseline defn in usage.txt
2016-11-11 20:02:24 +00:00
Inian Parameshwaran
f5c596e8f2 Update baseline defn in usage.txt 2016-11-10 16:32:24 +00:00
DRC
a949da48da Merge branch 'master' into dev 2016-10-20 19:17:30 -05:00
DRC
2d4b2f14d0 Travis: Deploy to S3 rather than SourceForge
This has the following advantages:
-- It doesn't require checking a private SSH key into the repository.
(With SourceForge, an SSH key is the "keys to the kingdom".)
-- If the S3 key is compromised, it is very easy to revoke it and
generate a new one.
-- The S3 bucket is isolated, so even if it becomes compromised, then
the damage that one could do is limited.
-- It's much easier to manage files through S3's web interface than
through SourceForge.
-- The files are served via HTTPS.
-- Travis fully supports S3 as a deployment target, so this simplifies
.travis.yml somewhat.
2016-10-20 18:17:15 -05:00
DRC
108b1cd9ba Merge branch 'master' into dev 2016-10-20 01:37:40 -05:00
DRC
9366cf0bca Travis: GPG sign Linux binaries/source tarballs
Since we're still deploying our Linux/macOS CI artifacts to a web server
(specifically SourceForge Project Web Services) that doesn't support
HTTPS, it's a good idea to sign them.  But since the private key has to
be checked into the repository, we use a different key for signing the
pre-releases (per project policy, the private signing keys for our
release binaries are never made available on any public server.)
2016-10-20 01:13:11 -05:00
DRC
13e6b151b0 Win: Use YASM if it is in the PATH and NASM isn't
Previously, simd/CMakeLists.txt was hard-coded to use NASM, and it was
necessary to override the NASM variable in order to use YASM.  This
commit changes the behavior such that NASM is still preferred, but YASM
will be used if it is in the PATH and NASM isn't available.  This brings
the actual behavior in line with the behavior described in BUILDING.md.

Based on
b0799a1598

Closes #107
2016-10-11 11:58:20 -05:00
DRC
1a8c68ac5b Merge branch 'master' into dev 2016-10-07 12:55:18 -05:00
DRC
1ee329d617 Travis: Fix deployment issue (2nd attempt) 2016-10-07 12:54:55 -05:00
DRC
fa3bdfb7bc Merge branch 'master' into dev 2016-10-07 05:47:35 -05:00
DRC
b47c5e737f Travis: Fix deployment issue
"Skipping a deployment with the script provider because this branch is
not permitted"
2016-10-07 05:34:33 -05:00
DRC
ce262eb5d7 Fix AppVeyor build on non-master branches
buildljt will clone the Git repository into the temp. directory, even if
the repository is really a local sandbox, so we need to specify the
branch.
2016-10-07 05:20:26 -05:00
DRC
27f817cd11 Travis: Use existing sandbox for official builds
This eliminates the need to specify the remote repository and branch,
and it prevents the code from being checked out twice.
2016-10-07 05:09:16 -05:00
DRC
7884e245bc Merge branch 'master' into dev 2016-10-07 04:51:29 -05:00
DRC
0df2e2188b Add AppVeyor config for Windows pre-release builds 2016-10-07 04:29:37 -05:00
DRC
be908ac024 Travis CI: Fixes to support AVX2 code
-- Use trusty for SIMD builds.  Ubuntu 12.04 is still using NASM 2.09.x,
   which isn't new enough to support AVX2.
-- Add a special test for the SSE2 code path, since it is no longer the
   default.
2016-10-05 14:50:43 -05:00
DRC
ed21f4bd03 Merge branch 'master' into dev 2016-10-05 14:41:14 -05:00
DRC
6d22430a3a Travis: use correct repo/branch for off. builds
Pass the actual repository and branch that Travis is using into the
builtljt script, so the official builds it generates will come from
the same code base as the other tested builds.
2016-10-05 14:36:46 -05:00
DRC
f34f2f5bc6 Fix 'make dist' 2016-10-05 13:36:35 -05:00
DRC
e9e3a2edd7 Travis CI: Use correct key for this repository 2016-10-05 12:38:59 -05:00
DRC
211c69f317 Add Travis CI config for Un*x pre-release builds 2016-10-05 12:33:28 -05:00
DRC
1625253d49 Fix 32-bit non-SIMD FP regression tests
- Introduce a new FLOATTEST value ("387") on Un*x systems that will
  compare the floating point DCT/IDCT algorithms against the expected
  results from the C algorithms when built using 32-bit code and
  -mfpmath=387.
- Extend the Windows regression tests so that they work properly when
  building libjpeg-turbo with 32-bit code and without SIMD, using either
  Visual C++ (tested with 2008, 2010, 2015) or MinGW.
2016-10-04 13:55:00 -05:00
DRC
a0047bdea4 Fix broken build w/ Visual C++ < 2010
Regression introduced by dfefba7752
(Windows doesn't always have stdint.h.)
2016-10-04 13:25:34 -05:00
DRC
7bfb22af12 Fix broken MIPS build
Regression introduced by 9055fb408d

Fixes #104
2016-09-26 18:01:54 -05:00
DRC
ac4a899511 Fix UBSan warning in arithmetic decoder
Very similar to the ones that were fixed in the Huffman decoders in
8e9cef2e6f.  These are innocuous.

Refer to https://bugzilla.mozilla.org/show_bug.cgi?id=1304567.
2016-09-22 14:40:41 -05:00
DRC
dfefba7752 Fix broken build with NDK platforms < android-21
Regression introduced by a09ba29a55

Fixes #103
2016-09-22 14:22:45 -05:00
DRC
4cf67f2363 Bump version to 1.5.2 to prepare for new commits 2016-09-22 14:14:05 -05:00
Roberto Civille Rodrigues
9407cf7f47 README.md: Fix typo
Introduced in 17de518357

Closes #102
2016-09-22 13:39:24 -05:00
DRC
6c36568626 Merge branch 'master' into dev 2016-09-20 18:09:15 -05:00
mayeut
cb88e5da80 ARM64 NEON: Fix another ABI conformance issue
Based on
98a5a9dc89
with wordsmithing by DRC.

In the AArch64 ABI, as in many others, it's forbidden to read/store data
below the stack pointer.  Some SIMD functions were doing just that
(stack pointer misuse) when trying to preserve callee-saved registers,
and this resulted in those registers being restored with incorrect
contents under certain circumstances.

This patch fixes that behavior, and callee-saved registers are now
stored above the stack pointer throughout the function call.  The patch
also removes register saving in places where it is unnecessary for this
ABI, or it makes use of unused scratch regiters instead of callee-saved
registers.

Fixes #97.  Closes #101.

Refer also to https://bugzilla.redhat.com/show_bug.cgi?id=1368569
2016-09-20 17:38:39 -05:00
DRC
e9d9c31fd2 Build: Remove ARMv6 support from 'make iosdmg'
The last iDevice to require ARMv6 was the iPhone 3G, which required iOS
4.2.1 or older.  Our binaries have always required iOS 4.3 or newer,
so I'm not sure if the ARMv6 fork of our binaries was ever useful to
begin with.  In any case, if it ever was useful, it no longer is.  Fat
binaries can still be generated with ARMv6 support by invoking
{build_directory}/pkgscripts/makemacpkg manually.
2016-09-20 11:29:22 -05:00
DRC
077e5bb4e0 Fix out-of-bounds write in partial decomp. feature
Reported by Clang UBSan (refer to
https://bugzilla.mozilla.org/show_bug.cgi?id=1301252 for test image.)
This appears to be a legitimate bug introduced by
3ab68cf563.  Any component array, such
as first_MCU_col and last_MCU_col, should always be able to accommodate
MAX_COMPONENTS values.  The aforementioned test image had 8 components,
which was not enough to make the out-of-bounds write bust out of the
jpeg_decomp_master struct (and fortunately the memory after last_MCU_col
is an integer used as a boolean, so stomping on it will do nothing other
than change the decoder state.)  I crafted another special image that
has 10 components (the maximum allowable), but that was apparently not
enough to bust out of the allocated memory, either.  Thus, it is
posited that the security threat posed by this bug is either extremely
minimal or non-existent.
2016-09-08 22:01:09 -05:00
DRC
a1dd35680d Silence additional UBSan warnings
NOTE: The jdhuff.c/jdphuff.c warnings should have already been silenced
by 8e9cef2e6f, but apparently I need to
be REALLY clear that I'm trying to do pointer arithmetic rather than
dereference an array.  Grrr...

Refer to:
https://bugzilla.mozilla.org/show_bug.cgi?id=1301250
https://bugzilla.mozilla.org/show_bug.cgi?id=1301256
2016-09-08 21:29:58 -05:00
DRC
a09ba29a55 Fix unsigned int overflow in libjpeg memory mgr.
When attempting to decode a malformed JPEG image (refer to
https://bugzilla.mozilla.org/show_bug.cgi?id=1295044) with dimensions
61472 x 32800, the maximum_space variable within the
realize_virt_arrays() function will exceed the maximum value of a 32-bit
integer and will wrap around.  The memory manager subsequently fails
with an "Insufficient memory" error (case 4, in alloc_large()), so this
commit simply causes that error to be triggered earlier, before UBSan
has a chance to complain.

Note that this issue did not ever represent an exploitable security
threat, because the POSIX-based memory manager that we use doesn't ever
do anything meaningful with the value of maximum_space.
jpeg_mem_available() simply sets avail_mem = maximum_space, so the
subsequent behavior of the memory manager is the same regardless of
whether maximum_space is correct or not.  This commit simply removes a
UBSan warning in order to make it easier to detect actual security
issues.
2016-09-08 16:17:05 -05:00
DRC
8ce2c9119a TurboJPEG: Decomp. 4:2:2/4:4:0 JPEGs w/unusual SFs
Normally, 4:2:2 JPEGs have horizontal x vertical luminance,chrominance
sampling factors of 2x1,1x1, and 4:4:0 JPEGs have horizontal x vertical
luminance,chrominance sampling factors of 1x2,1x1.  However, it is
technically legal to create 4:2:2 JPEGs with sampling factors of
2x2,1x2 and 4:4:0 JPEGs with sampling factors of 2x2,2x1, since the
sums of the products of those sampling factors (2x2 + 1x2 + 1x2 and
2x2 + 2x1 + 2x1) are still <= 10.  The libjpeg API correctly decodes
such images, so the TurboJPEG API should as well.

Fixes #92
2016-08-01 11:59:31 -05:00
Kornel
6ee36adc4e Merge pull request #213 from tmatth/yuvjpeg_crash
yuvjpeg: fix NULL dereference on invalid format string
2016-07-15 17:08:15 +01:00
Tristan Matthews
24d2c9de3d yuvjpeg: fix NULL dereference on invalid format string
(cherry picked from daala commit 82e51ebb8545d99316dbeaeeef3d7b5a929702e8)
2016-07-15 10:58:32 -04:00
DRC
db04435165 Silence pedantic GCC6 code formatting warnings
Apparently it's "misleading" to put two self-contained if statements
on a single line.  Who knew?
2016-07-14 13:36:47 -05:00
DRC
7723d7f7d0 Use plain upsampling if merged isn't accelerated
Currently, this only affects ARM, since it is the only platform that
accelerates YCbCr-to-RGB conversion but not merged upsampling.  Even if
"plain" upsampling isn't accelerated, the combination of accelerated
color conversion + unaccelerated plain upsampling is still faster than
the unaccelerated merged upsampling algorithms.

Closes #81
2016-07-13 22:06:11 -05:00
Kornel Lesiński
628c168c86 Implement h1v2 fancy upsampling
This allows fancy upsampling to be used when decompressing 4:2:2 images
that have been losslessly rotated or transposed.

(docs and comments added by DRC)

Based on f63aca945d

Closes #89
2016-07-13 17:28:19 -05:00
DRC
3924ebceb5 AVX2: Perform additional checks for O/S support
cpuid tells us whether the O/S uses extended state management via
XSAVE/XRSTOR, but we have to call xgetbv to verify that it is using
XSAVE/XRSTOR to manage the state of XMM/YMM registers.
2016-07-13 16:03:36 -05:00
DRC
1120ff29a1 Fix AArch64 ABI conformance issue in SIMD code
In the AArch64 ABI, the high (unused) DWORD of a 32-bit argument's
register is undefined, so it was incorrect to use 64-bit
instructions to transfer a JDIMENSION argument in the 64-bit NEON SIMD
functions.  The code worked thus far only because the existing compiler
optimizers weren't smart enough to do anything else with the register in
question, so the upper 32 bits happened to be all zeroes.

The latest builds of Clang/LLVM have a smarter optimizer, and under
certain circumstances, it will attempt to load-combine adjacent 32-bit
integers from one of the libjpeg structures into a single 64-bit integer
and pass that 64-bit integer as a 32-bit argument to one of the SIMD
functions (which is allowed by the ABI, since the upper 32 bits of the
32-bit argument's register are undefined.)  This caused the
libjpeg-turbo regression tests to crash.

This patch tries to use the Wn registers whenever possible.  Otherwise,
it uses a zero-extend instruction to avoid using the upper 32 bits of
the 64-bit registers, which are not guaranteed to be valid for 32-bit
arguments.

Based on 1fbae13021

Closes #91.  Refer also to android-ndk/ndk#110 and
https://llvm.org/bugs/show_bug.cgi?id=28393
2016-07-13 14:36:19 -05:00
DRC
1945ad961b Don't install libturbojpeg.pc if TJPEG disabled 2016-07-12 22:21:20 -05:00
DRC
3dcb85ee9a AVX2: Verify O/S support for AVX2 before enabling
This fixes crashes that would occur when attempting to use
libjpeg-turbo's AVX2 extensions on older O/S's (such as Windows XP or
RHEL 5.)  Even if the CPU supports AVX2, the O/S has to also support
saving/restoring YMM registers when switching contexts.
2016-07-11 20:26:34 -05:00
DRC
1be87b6273 Reformat jsimdcpu[-64].asm to improve readability 2016-07-11 19:42:37 -05:00
Josh Aas
4b8d1ee39e Merge pull request #206 from pornel/temppool
Use temporary pool for internal recompression
2016-07-11 14:12:19 -05:00
Josh Aas
fb16334315 Merge pull request #210 from pornel/turbo150
Libjpeg-turbo 1.5.0
2016-07-11 14:12:00 -05:00
DRC
b331385e8a Merge branch 'master' into dev 2016-07-11 13:11:25 -05:00
DRC
b2921f1bcc 32-bit AVX2 implementation of integer quantization 2016-07-08 21:28:48 -05:00
DRC
eaae2cdb16 64-bit AVX2 implementation of integer quantization 2016-07-08 21:15:27 -05:00
DRC
a7c2f97939 AVX2: Avoid expensive AVX-SSE transitions
Refer to
https://software.intel.com/sites/default/files/m/d/4/1/d/8/11MC12_Avoiding_2BAVX-SSE_2BTransition_2BPenalties_2Brh_2Bfinal.pdf
for more information.  This eliminates all AVX-SSE transitions detected
with the Intel SDE tool.
2016-07-08 20:10:24 -05:00
DRC
e06ccbe3f7 64-bit AVX2: Fix bug in IS_ALIGNED_AVX() macro
32 = 1 << 5, not 1 << 8
2016-07-08 13:02:30 -05:00
DRC
67de29b503 32-bit AVX2 impl. of h2v2 & h2v1 merged upsampling 2016-07-08 13:02:30 -05:00
DRC
c22e42e9a2 Optimize 64-bit AVX2 h2v2 fancy upsampler
Reduce register usage and eliminate unnecessary mov instructions
2016-07-08 13:02:30 -05:00
DRC
6d765524bc 32-bit AVX2 impl. of h2v2 & h2v1 upsampling
(Fancy & Plain)
2016-07-08 13:02:30 -05:00
DRC
421d34fd2f 32-bit AVX2 impl. of YCC->RGB color conversion 2016-07-08 13:02:30 -05:00
DRC
c6300ffe4e 32-bit AVX2 impl. of h2v2 & h2v1 downsampling 2016-07-08 13:02:30 -05:00
DRC
6448a5e584 32-bit AVX2 impl. of RGB->YCC/RGB->Gray color conv 2016-07-08 13:02:24 -05:00
DRC
6e9d43e085 Linux/PPC: Only enable AltiVec if CPU supports it
This eliminates "illegal instruction" errors when running libjpeg-turbo
under Linux on PowerPC chips that lack AltiVec support (e.g. the old
7XX/G3 models but also the newer e5500 series.)
2016-07-07 19:02:44 +00:00
DRC
9055fb408d ARM/MIPS: Change the behavior of JSIMD_FORCE*
The JSIMD_FORCE* environment variables previously meant "force the use
of this instruction set if it is available but others are available as
well", but that did nothing on ARM platforms, since there is only ever
one instruction set available.  Since the ARM and MIPS CPU feature
detection code is less than bulletproof, and since there is only one
SIMD instruction set (currently) supported on those platforms, it makes
sense for the JSIMD_FORCE* environment variables on those platforms to
actually force the use of the SIMD instruction set, thus bypassing the
CPU feature detection code.

This addresses a concern raised in #88 whereby parsing /proc/cpuinfo
didn't work within a QEMU environment.  This at least provides a
workaround, allowing users to force-enable or force-disable SIMD
instructions for ARM and MIPS builds of libjpeg-turbo.
2016-07-07 13:38:48 -05:00
DRC
9e6c6a14f8 Bump version to 1.5.1 to prepare for new commits 2016-07-06 16:22:27 +00:00
DRC
7ee3ce9ada Lay the groundwork for 32-bit AVX2 SIMD support 2016-07-05 16:23:06 -05:00
DRC
b5426c52c0 64-bit AVX2 SIMD: Restore instructive comments
This commit adds back instructive comments in the image-space
algorithms, similar to those in the SSE2 code.  These comments make it
easier to follow the flow of data through the algorithms.
2016-06-29 13:56:50 -05:00
Kornel Lesiński
5ff20ca303 Allocate from temporary image pool to avoid leaking mem mgr 2016-06-08 01:08:11 +01:00
Kornel Lesiński
dbbf6185a9 Merge tag '1.5.0'
Tag 1.5.0 release

* tag '1.5.0':
  1.5.0
  BUILDING.md: More NASM/YASM clarifications
  Format copyright headers more consistently
  BUILDING.txt: Clarify NASM build requirements
  Don't allow opaque source/dest mgrs to be swapped
  Build: Add integer version macro to jconfig.h
  Build: Don't allow jpeg-7+ emul. w/o arith coding
  ARMv7 SIMD: Fix clang compatibility (Part 2)
  ARMv7 SIMD: Fix clang compatibility
  Fix CMake fallback BUILD var on non-U.S. machines
2016-06-08 00:59:37 +01:00
DRC
621b29f5b1 64-bit AVX2 impl. of h2v2 & h2v1 merged upsampling 2016-05-31 22:56:11 -05:00
DRC
f1cbc32876 64-bit AVX2 impl. of h2v2 & h2v1 upsampling
(Fancy & Plain)
2016-05-31 22:56:11 -05:00
DRC
72c837da24 64-bit AVX2 impl. of YCC->RGB color conversion 2016-05-31 22:56:11 -05:00
DRC
1c8a475cd4 64-bit AVX2 impl. of h2v2 & h2v1 downsampling 2016-05-31 22:56:11 -05:00
DRC
8880e08771 64-bit AVX2 impl. of RGB->Gray color conversion 2016-05-31 22:56:11 -05:00
DRC
426d787c4c 64-bit AVX2 impl. of RGB->YCC color conversion 2016-05-31 22:56:11 -05:00
DRC
2cf199cbbd Lay the groundwork for 64-bit AVX2 SIMD support 2016-05-31 22:54:38 -05:00
DRC
16b121890c x86-64 SIMD: Optimize argument collection
Expand collect_args/uncollect_args macros so that the number of
arguments can be specified.  This prevents unnecessary push and mov
instructions.

NOTE: On Windows, the push/pop of xmm6 and xmm7 had to be moved to the
other end of the macro to ensure that rsp is aligned on a 16-byte
boundary.
2016-05-31 22:54:37 -05:00
DRC
6cb27c31d9 Bump version to 1.6 alpha1
(to prepare for new features)
2016-05-31 22:54:37 -05:00
DRC
ff5685d534 Reformat SSE/SSE2 SIMD code to improve readability 2016-05-31 22:53:40 -05:00
DRC
3ff13e651b 1.5.0 2016-05-31 22:53:17 -05:00
DRC
1d50a8cd08 BUILDING.md: More NASM/YASM clarifications
28d1a1300c introduced the line
"nasm.exe should be in your PATH".  This commit corrects an oversight in
8f1c0a681c /
e5091f2cf3 whereby this line should have
been extended to include yasm.exe.
2016-05-31 22:48:52 -05:00
DRC
123f7258a8 Format copyright headers more consistently
The IJG convention is to format copyright notices as:

Copyright (C) YYYY, Owner.

We try to maintain this convention for any code that is part of the
libjpeg API library (with the exception of preserving the copyright
notices from Cendio's code verbatim, since those predate
libjpeg-turbo.)

Note that the phrase "All Rights Reserved" is no longer necessary, since
all Buenos Aires Convention signatories signed onto the Berne Convention
in 2000.  However, our convention is to retain this phrase for any files
that have a self-contained copyright header but to leave it off of any
files that refer to another file for conditions of distribution and use.
For instance, all of the non-SIMD files in the libjpeg API library refer
to README.ijg, and the copyright message in that file contains "All
Rights Reserved", so it is unnecessary to add it to the individual
files.

The TurboJPEG code retains my preferred formatting convention for
copyright notices, which is based on that of VirtualGL (where the
TurboJPEG API originated.)
2016-05-28 19:16:58 -05:00
DRC
e5091f2cf3 Merge branch '1.4.x' 2016-05-28 18:19:58 -05:00
DRC
8f1c0a681c BUILDING.txt: Clarify NASM build requirements
The version requirements only apply to NASM (not YASM.)  Also, 2.11.09
was never actually released (the first release containing the OS X fix
is 2.12.)
2016-05-28 18:16:24 -05:00
Kornel
e4e091a184 Merge pull request #207 from mozilla/jpg-yuv-cleanup
Cleanup for jpegyuv and yuvjpeg
2016-05-25 17:30:36 +01:00
Josh Aas
730f65fd4a Merge pull request #180 from tmatth/unused
Drop unused includes
2016-05-25 13:52:28 +02:00
Josh Aas
5e01695e2d Cleanup for jpegyuv and yuvjpeg 2016-05-25 13:36:12 +02:00
Kornel
a53303b82e Merge pull request #205 from pornel/libjpeg-turbo-master
Merge with new libjpeg-turbo repository
2016-05-13 17:20:23 +01:00
DRC
68cf83db56 Don't allow opaque source/dest mgrs to be swapped
Calling jpeg_stdio_dest() followed by jpeg_mem_dest(), or jpeg_mem_src()
followed by jpeg_stdio_src(), is dangerous, because the existing opaque
structure would not be big enough to accommodate the new source/dest
manager.  This issue was non-obvious to libjpeg-turbo consumers, since
it was only documented in code comments.  Furthermore, the issue could
also occur if the source/dest manager was allocated by the calling
program, but it was not allocated with enough space to accommodate the
opaque stdio or memory source/dest manager structs.  The safest thing to
do is to throw an error if one of these functions is called when there
is already a source/dest manager assigned to the object and it was
allocated elsewhere.

Closes #78, #79
2016-05-10 21:30:15 -05:00
DRC
f06cc1200f Build: Add integer version macro to jconfig.h
This makes it significantly easier to do conditional compilation based
on the libjpeg-turbo version.

Based on:
e6d5b3e50b
1394a89ba6

Closes #80
2016-05-10 19:36:52 -05:00
DRC
5c064de10d Build: Don't allow jpeg-7+ emul. w/o arith coding
The jpeg-7/jpeg-8 APIs/ABIs require arithmetic coding, and the jpeg-8
API/ABI requires the memory source/destination manager, so this commit
causes the build system to ignore --with-arith-enc/--without-arith-enc
and --with-arith-dec/--without-arith-dec (and the equivalent CMake
variables-- WITH_ARITH_ENC and WITH_ARITH_DEC) when v7/v8 API/ABI
emulation is enabled.  Furthermore, the CMake build system now ignores
WITH_MEM_SRCDST whenever WITH_JPEG8 is specified (the autotools build
system already did that.)
2016-05-09 20:00:46 -05:00
Kornel Lesiński
8f21330ed5 Use turbo settings in md5 tests 2016-05-05 18:20:25 +01:00
mattsarett
2e480fa2a3 ARMv7 SIMD: Fix clang compatibility (Part 2)
GCC does support UAL syntax (strbeq) if the ".syntax unified" directive
is supplied.  This directive is supported by all versions of GCC and
clang going back to 2003, so it should not create any backward
compatibility issues.

Based on 1264349e2f

Closes #76
2016-05-03 13:08:58 -05:00
mattsarett
5e576386b5 ARMv7 SIMD: Fix clang compatibility
By design, clang only supports Unified Assembler Language (and not
pre-UAL syntax):
https://llvm.org/bugs/show_bug.cgi?id=23507
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473c/BABJIHGJ.html

Thus, clang only supports the strbeq instruction and not streqb, but
unfortunately some versions of GCC only support streqb.  Go, go
Gadget #ifdef...

Based on https://github.com/mattsarett/libjpeg-turbo/commit/a82e63aac63f8fa3
95fa4caad4de6859623ee2e2

Closes #75
2016-05-02 12:20:10 -05:00
DRC
0d61e80ab0 Merge branch '1.4.x' 2016-05-01 12:07:05 -05:00
DRC
ee681aa304 Fix CMake fallback BUILD var on non-U.S. machines
If wmic.exe wasn't available, then CMakeLists.txt would call
"cmd /C date /T" and parse the result in order to set the BUILD
variable.  However, the parser assumed that the date was in MM/DD/YYYY
format, which is not generally the case unless the user's locale is U.S.
English with the default region/language settings for that locale.

This commit modifies CMakeLists.txt such that it uses the
string(TIMESTAMP) function available in CMake 2.8.11 and later to set
the BUILD variable, thus eliminating the need to use wmic.exe or any
other platform-specific hack.

This commit also modifies the build instructions to remove any reference
to CMake 2.6 (which hasn't been supported by our build system since
libjpeg-turbo 1.3.x.)

Closes #74
2016-05-01 12:02:16 -05:00
Kornel Lesiński
ec333d5bbd Merge remote-tracking branch 'libjpeg-turbo/master' into libjpeg-turbo
* libjpeg-turbo/master: (140 commits)
  Increase severity of tjDecompressToYUV2() bug desc
  Catch libjpeg errors in tjDecompressToYUV2()
  BUILDING.md: Fix "... OR ..." indentation again
  BUILDING.md: Fix confusing Windows build reqs
  ChangeLog.md: Improve readability of plain text
  change.log: Refer users to ChangeLog.md
  Markdown version of ChangeLog.txt
  Rename ChangeLog.txt
  README.md: Link to BUILDING.md
  BUILDING.md and README.md: Cosmetic tweaks
  ChangeLog: "1.5 beta1" --> "1.4.90 (1.5 beta1)"
  Java: Fix parallel make with autotools
  Win/x64: Fix improper callee save of xmm8-xmm11
  Bump TurboJPEG C API revision to 1.5
  ChangeLog: Mention jpeg_crop_scanline() function
  1.5 beta1
  Fix v7/v8-compatible build
  libjpeg API: Partial scanline decompression
  Build: Make the NASM autoconf variable persistent
  Use consistent/modern code formatting for dbl ptrs
  ...
2016-04-28 01:08:01 +01:00
Kornel Lesiński
4d8f239872 Merge remote-tracking branch 'libjpeg-turbo/1.4.x' into libjpeg-turbo
* libjpeg-turbo/1.4.x: (94 commits)
  CMakeLists.txt: Clarify that Un*x isn't supported
  Catch libjpeg errors in tjDecompressToYUV2()
  cjpeg: Fix buf overrun caused by bad bin PPM input
  Add version/build info to global string table
  Ensure that default Huffman tables are initialized
  Fix memory leak when running tjunittest -yuv
  Prevent overread when decoding malformed JPEG
  Guard against wrap-around in alloc functions
  Fix Visual C++ compiler warnings
  rdppm.c: formatting tweaks
  jmemmgr.c: formatting tweaks
  TurboJPEG: Avoid dangling pointers
  Update Android build instr. for ARMv8, PIE, etc.
  Makefile.am: formatting tweak
  Update build instructions for new autoconf, GitHub
  1.4.3
  Regression: Allow co-install of 32-bit/64-bit RPMs
  Build: Use FILEPATH type for NASM CMake variable
  Comment formatting tweaks
  Fix 'make dist'
  ...
2016-04-28 00:50:50 +01:00
Kornel Lesiński
667fb53e3f Merge tag '1.4.1' into libjpeg-turbo
Tag 1.4.1 release

* tag '1.4.1': (427 commits)
  Now that the TurboJPEG API is reporting libjpeg warnings as errors, an "Invalid SOS parameters for sequential JPEG" warning surfaced in tjDecodeYUV*().  This was caused by the Se member of jpeg_decompress_struct being set to 0 (it is normally set to a non-zero value when the start-of-scan markers are read, but there are no SOS markers in this case, because we're not actually decompressing a JPEG file.)
  Fix a segfault that occured in the MIPS DSPr2 fancy upsampling routine when downsampled_width==3.  Because the DSPr2 code unrolls the loop for the middle columns (refer to jdsample.c), it has the effect of performing two column iterations, and that only works properly if the number of columns (minus the first and last) is >= 2.  For the specific case of downsampled_width==3, this patch skips to the second iteration of the unrolled column loop.
  If a warning (such as "Premature end of JPEG file") is triggered in the underlying libjpeg API, make sure that the TurboJPEG API function returns -1.  Unlike errors, however, libjpeg warnings do not make the TurboJPEG functions abort.
  Back out r1555 and r1548.  Using setenv() didn't fix the iOS simulator issue.  It just replaced an undefined _putenv$UNIX2003 symbol with an undefined _setenv$UNIX2003 symbol.  The correct solution seems to be to use -D_NONSTD_SOURCE when generating our official builds.
  Fix the Windows build.  I remember now why I used putenv() originally-- because Windows doesn't have setenv().  We could use _putenv_s(), but older versions of MinGW don't have that either.  Fortunately, since all of the environment values we're setting in turbojpeg.c are static, we can just map setenv() to putenv() using a macro.  NOTE: we still have to use _putenv_s() in turbojpeg-jni.c, but at least people who may need to build with an older version of MinGW can still do so by disabling the Java build.
  Allow building only static or only shared libraries on Windows
  __WORDSIZE doesn't seem to be available on platforms other than Mac or Linux, and best practices are for user-level code not to rely on it anyhow, since it's meant to be an internal macro.  Fortunately, autoconf already has a way of determining the word size at configure time, so it can be passed into the compiler.  This should work on any platform and has been tested on all of the Un*x platforms we support (Linux, Mac, FreeBSD, Solaris.)
  Unless you define _ANSI_SOURCE, then putenv() on Mac is renamed to putenv$UNIX2003(), and this causes problems when trying to link an i386 iOS application (for the simulator) against the TurboJPEG static library.  It's easiest to just use setenv() instead.
  Fix a bug in the 64-bit Huffman encoder that Google discovered when encoding some very specific (and proprietary) aerial images using quality=98, an optimized Huffman table, and the ISLOW DCT.  These images were causing the Huffman bit buffer to overflow, because the code for encoding the DC coefficient was using the equivalent of the 32-bit version of EMIT_BITS().  Thus, when 64-bit code was used, the DC coefficient code was not properly checking how many bits were in the buffer before attempting to add more bits to it.  This issue appears to have existed in all versions of libjpeg-turbo.
  Restore backward compatibility with MSVC < 2010 (broken by r1541)
  Oops.  OS X doesn't define __WORDSIZE unless you include stdint.h, so apparently the Huffman codec hasn't ever been fully accelerated on 64-bit OS X.
  Allow the executables and libraries outside of the sharedlib/ directory to be linked against msvcr*.dll instead of libcmt*.lib.  This is reported to be necessary when building libjpeg-turbo for use with C#.
  Surround the usage of getenv() in the TurboJPEG API with #ifndef NO_GETENV so that developers can add -DNO_GETENV to the C flags when building for platforms that don't have getenv().  Currently this is known to be necessary when building for Windows Phone.
  If libjpeg-turbo is configured with a non-default prefix, such as /usr, then use the docdir variable defined by autoconf 2.60 and later, if available.  This will, for instance, install the documentation under /usr/share/doc/libjpeg-turbo by default if prefix=/usr, unless docdir is overridden.  When using earlier versions of autoconf, docdir is set to ${datadir}/doc, as it always has been.
  Enable silent build rules for the NASM objects, if the source is configured with automake 1.11 or later.  NOTE: the build still spits out "error: ignoring unknown tag NASM" for each object, but unfortunately, if we remove "--tag NASM" from the command line, the build breaks under older versions of automake (it aborts with "unable to infer tagged configuration.")
  Set the RPM and deb architecture properly on non-x86 platforms.
  Come on, Cohaagen, you got what you want.  Give these people air!
  Oops.  Need to set the alpha channel when using TYPE_4BYTE_ABGR*.  This has no bearing on the actual tests, but it prevents the PNG pre-encode reference images for those tests from being blank.
  Oops.  The MIPS SIMD implementations of h2v1 and h2v2 upsampling were not checking for DSPr2 support, so running 'djpeg -nosmooth' on a non-DSPr2-enabled platform caused an "illegal instruction" error.
  Introduce fast paths to speed up NULL color conversion somewhat, particularly when using 64-bit code;  on the decompression side, the "slow path" also now use an approach similar to that of the compression side (with the component loop outside of the column loop rather than inside.)  This is faster when using 32-bit code.
  ...
2016-04-28 00:45:08 +01:00
Kornel Lesiński
a22ab9f3df Merge remote-tracking branch 'origin/master' into libjpeg-turbo
* origin/master: (108 commits)
  Bump version number to 3.1.
  jpegyuv: fix memory leak when path is invalid
  jpegyuv: fix memory leak when @image_buffer allocation fails
  yuvjpeg: fix memory leak when @image_buffer allocation fails
  jpegtran: Do not leak the input and output buffers
  Fix previous commit
  Scan optimization: return error when unable to copy data buffer
  cjpeg option for baseline quant tables
  Fix #153
  rdpng: convert 16-bit input to 8-bit
  Larger number of DC trellis candidates
  Fix overflow issue #157
  Const on getters
  Const on simple getters and copy source
  Expanded .gitignore
  Add pkg-config requirement
  Re-order links.
  Declare inbuffer const
  Oops.  Delete the duplicate copy of [lib]turbojpeg.dll in the binary directory when uninstalling the package.
  Get rid of changelog file that we don't update.
  ...
2016-04-27 23:35:38 +01:00
Kornel Lesiński
1a830d52a4 Merge commit 'eca0637c8150d3d1c08a60c64d7ee16eaea4b198' into libjpeg-turbo
* commit 'eca0637c8150d3d1c08a60c64d7ee16eaea4b198':
  Remove trailing spaces
  Another oops.  tjBufSizeYUV2() should return -1 if width < 1.
  Oops.  tjPlaneSizeYUV() should return -1 if componentID > 0 and subsamp==TJSAMP_GRAY.
  When building libjpeg-turbo on Un*x systems, INT32 is usually typedef'ed to long, not int, so we need to specify an int pointer when doing a 4-byte write to the RGB565 output buffer.  On little endian systems, this doesn't matter, but when you write a 32-bit int to a 64-bit long pointer address on a big endian system, you are writing to the upper 4 bytes, not the lower 4 bytes.  NOTE: this will probably break on big endian systems that use 16-bit ints (are there any of those still around?)
  Fix Windows build
  Fix issues with RGB565 color conversion on big endian machines.  The RGB565 routines are now abstracted in a separate file, with separate little-endian and big-endian versions defined at compile time through the use of macros (this is similar to how the colorspace extension routines work.)  This allows big-endian machines to take advantage of the same performance optimizations as little-endian machines, and it retains the performance on little-endian machines, since the conditional branch for endianness is at a very coarse-grained level.
  Fix build on OS X PowerPC platforms
  Oops.  Forgot to alter the version header in the change log to indicate the release of 1.4 beta.
  Create 1.4.x branch
2016-04-27 23:34:59 +01:00
Kornel Lesiński
c5a46f7e9f Merge commit '445d9b4196aed7d3d2915609267666314e63fc50' into libjpeg-turbo 2016-04-27 23:32:38 +01:00
Kornel Lesiński
d8d5f06dd9 Merge commit '0a9a25265484a09fd9eaadc4f5de336942acd19e' into libjpeg-turbo 2016-04-27 23:28:13 +01:00
Kornel Lesiński
93060bf32e Merge commit '662bf6ba7b70dfc727de7c186dec594e58f00ad1' into libjpeg-turbo 2016-04-27 23:28:01 +01:00
Kornel Lesiński
d5e22710be Merge commit '73821bff789450b6dc665a7508e3fb38ee9ff99b' into libjpeg-turbo 2016-04-27 23:27:15 +01:00
Kornel Lesiński
2d06b326b6 Merge commit '71539b3e1324f51e29b08fe9e0412c596fd6f0ec' into libjpeg-turbo 2016-04-27 23:26:42 +01:00
Kornel Lesiński
fd825574d1 Merge commit '0cfc4c17b740cb2cbb11f9d85c8ab3745d5b913a' into libjpeg-turbo 2016-04-27 23:26:12 +01:00
DRC
346837cad3 Merge branch '1.4.x' 2016-04-25 19:08:47 -05:00
DRC
eb7962a02b CMakeLists.txt: Clarify that Un*x isn't supported
At one time, it was possible to use CMake to build under Cygwin, but
that hasn't worked since 1.4.1 (due to the Huffman codec changes that
now require SIZEOF_SIZE_T to be defined for non-WIN32 platforms) and may
have even been broken before that.  Originally, we used the "date"
command under MSYS in order to obtain the default build number, but that
was rendered unnecessary by 5e3bb3e9 (v1.3 beta.)  9fe22dac (1.4 beta)
further modified CMakeLists.txt so that the "date" command was only used
on Cygwin, but for unexplained reasons, that commit also applied the
(now vestigial) code to all non-WIN32 platforms.  This prevented
CMakeLists.txt from displaying an error if someone attempted to use the
CMake build system on Un*x platforms, and that may have been behind the
flurry of pull requests and issues-- including #21, #29, #37, #58, #73--
complaining that the CMake build system didn't work on Un*x platforms
(although it was not until #73 that this bug came to light.)

This commit removes all vestiges of Un*x support from the CMake build
system and makes it clear that CMake cannot be used to build
libjpeg-turbo on non-WIN32 platforms.  It is our position that CMake
will not be supported on non-WIN32 platforms until/unless the autotools
build system is removed, and this will not happen without broad support
from the community (including major O/S vendors.)  If you are in favor
of migrating the entire build system to CMake, then please make your
voice heard by commenting on #56.
2016-04-25 19:06:16 -05:00
DRC
3c67d4f7c0 Catch libjpeg errors in tjDecompressToYUV2()
Even though tjDecompressToYUV2() is mostly just a wrapper for
tjDecompressToYUVPlanes(), tjDecompressToYUV2() still calls
jpeg_read_header(), so it needs to properly set up the libjpeg error
handler prior to making this call.  Otherwise, under very esoteric (and
arguably incorrect) use cases, a program could call tjDecompressToYUV2()
without first checking the JPEG header using tjDecompressHeader3(), and
if the header was corrupt, then the libjpeg API would invoke
my_error_exit().  my_error_exit() would in turn call longjmp() on the
previous value of myerr->setjmp_buffer, which was probably set in a
previous TurboJPEG function, such as tjInitDecompress().  Thus, when a
libjpeg error was triggered within the body of tjDecompressToYUV2(), the
PC would jump to the error handler of the previous TurboJPEG function,
and this usually caused stack corruption in the calling program (because
the signature and return type of the previous TurboJPEG function
probably wasn't the same as that of tjDecompressToYUV2().)
2016-04-25 17:57:59 -05:00
DRC
1959e28b49 Increase severity of tjDecompressToYUV2() bug desc
Actually, what happened was that the longjmp() call within
my_error_exit() acted on the previous value of myerr->setjmp_buffer,
which was probably set in a previous TurboJPEG function, such as
tjInitDecompress().  Thus, when a libjpeg error was triggered within
the body of tjDecompressToYUV2(), the PC jumped to the error handler
of the previous TurboJPEG function, and this usually caused stack
corruption in the calling program (because the signature and return
type of the previous TurboJPEG function probably wasn't the same.)
2016-04-21 10:28:19 -05:00
DRC
dec79952d6 Catch libjpeg errors in tjDecompressToYUV2()
Even though tjDecompressToYUV2() is mostly just a wrapper for
tjDecompressToYUVPlanes(), tjDecompressToYUV2() still calls
jpeg_read_header(), so it needs to properly set up the libjpeg error
handler prior to making this call.  Otherwise, under very esoteric (and
arguably incorrect) use cases, a program can call tjDecompressToYUV2()
without first checking the JPEG header using tjDecompressHeader3(), and
if the header is corrupt, tjDecompressToYUV2() will abort without
triggering an error.

Fixes #72
2016-04-20 11:39:51 -05:00
DRC
2628c562bc BUILDING.md: Fix "... OR ..." indentation again
<sigh> GitHub doesn't render indented text the same as my local MarkDown
viewer (MacDown), so it's necessary to indent "... OR ..." by 3 spaces
so both will display it on the same indentation level as "Visual C++
2005 or later" and "MinGW".
2016-04-14 14:19:19 -05:00
DRC
28d1a1300c BUILDING.md: Fix confusing Windows build reqs
Indent "... OR ..." to make it clear that the choice is between Visual
C++ and MinGW, not Visual C++ and MinGW + NASM.  Move NASM to the top of
the list to make that even more clear.  Make it clear that nasm.exe
should be in the PATH.

Addresses concerns raised in #70
2016-04-14 14:15:30 -05:00
DRC
1a3aebd88e Merge branch '1.4.x' 2016-03-31 10:02:44 -05:00
DRC
1e81b0c3ea cjpeg: Fix buf overrun caused by bad bin PPM input
This extends the fix in 6709e4a0cf to
include binary PPM/PGM files, thus preventing a malformed binary
PPM/PGM input file from triggering an overrun of the rescale array and
potentially crashing cjpeg.

Note that this issue affected only cjpeg and not the underlying
libjpeg-turbo libraries, and thus it did not represent a security
threat.

Thanks to @hughdavenport for the discovery.
2016-03-31 09:54:14 -05:00
DRC
b2817f5251 Merge branch '1.4.x' 2016-03-16 07:18:30 -05:00
DRC
6f241d4d42 Add version/build info to global string table
This is a common practice in other infrastructure libraries, such as
OpenSSL and libpng, because it makes it easy to examine an application
binary and determine which version of the library the application was
linked against.

Closes #66
2016-03-16 07:14:19 -05:00
DRC
1385f8b281 ChangeLog.md: Improve readability of plain text 2016-03-14 13:32:00 -05:00
DRC
742fb37dde change.log: Refer users to ChangeLog.md
change.log is included only to document the changes that we have merged
from libjpeg.
2016-03-13 18:28:14 -05:00
DRC
a839a7a964 Markdown version of ChangeLog.txt
This will make it easier to crib ChangeLog information into release
notes, since both SourceForge and GitHub support MD.
2016-03-13 18:21:56 -05:00
DRC
3f56bd597c Rename ChangeLog.txt
... in preparation for creating a MarkDown version (Git will not
preserve history unless you rename the file prior to modifying it.)
2016-03-13 18:21:21 -05:00
DRC
e5f280c4c4 README.md: Link to BUILDING.md
Addresses a concern expressed in #56 and #58.
2016-03-11 11:14:28 -06:00
DRC
4f58123130 BUILDING.md and README.md: Cosmetic tweaks 2016-03-09 17:26:47 -06:00
DRC
622d6678a8 ChangeLog: "1.5 beta1" --> "1.4.90 (1.5 beta1)"
(for consistency with other beta release headings)
2016-03-06 08:34:48 -06:00
DRC
b3247c7d71 Merge branch '1.4.x' 2016-03-06 08:34:00 -06:00
DRC
a572622dd6 Ensure that default Huffman tables are initialized
This prevents a malformed motion-JPEG frame (MJPEG frames lack Huffman
tables) from causing the "fast path" of the Huffman decoder to read
uninitialized memory.  Essentially, this is doing the same thing for
MJPEG frames as 43d8cf4d45 did for regular
images.
2016-03-06 08:29:44 -06:00
DRC
7cb8de4ae0 Java: Fix parallel make with autotools
Running 'make -j{jobs}' on a build that was configured with Java
(--with-java) would previously cause an error:

    make: *** No rule to make target `TJExample.class', needed by
        `turbojpeg.jar'.

It seems that parallel make doesn't understand that the files in
$(JAVA_CLASSES) are all generated from the same invocation of javac, so
it tries to parallelize the building of those files (which of course
doesn't work.)  This patch instead makes turbojpeg.jar depend on
classnoinst.stamp.  This effectively creates a synchronization fence,
since that file is only created when all of the class files have been
built.

Fixes #62
2016-03-02 09:59:50 -06:00
DRC
056536f660 Win/x64: Fix improper callee save of xmm8-xmm11
The x86-64 SIMD accelerations for Huffman encoding used incorrect
stack math to save xmm8-xmm11 on Windows.  This caused TJBench to
always report 1 Mpixel/sec for the compression performance, and it
likely would have caused other application issues as well.
2016-02-29 17:46:34 -06:00
DRC
7c202f76e7 Bump TurboJPEG C API revision to 1.5
The changes relative to 1.4.x are only cosmetic (using const pointers)
and should not affect API/ABI compatibility, but our practice is to
synchronize the API revision with the most recent release that provides
user-visible changes to the API.
2016-02-29 13:21:12 -06:00
DRC
fa722636be ChangeLog: Mention jpeg_crop_scanline() function 2016-02-29 12:06:56 -06:00
DRC
2354810a43 1.5 beta1 2016-02-29 11:54:42 -06:00
DRC
45c1e3a887 Merge branch '1.4.x' 2016-02-25 17:15:44 -06:00
mayeut
f57bae0ddd Fix memory leak when running tjunittest -yuv
Closes #61
2016-02-25 17:14:56 -06:00
DRC
025c1f66de Fix v7/v8-compatible build
Broken by 3ab68cf563

Fixes #60
2016-02-22 10:01:16 -06:00
DRC
3ab68cf563 libjpeg API: Partial scanline decompression
This, in combination with the existing jpeg_skip_scanlines() function,
provides the ability to crop the image both horizontally and vertically
while decompressing (certain restrictions apply-- see libjpeg.txt.)

This also cleans up the documentation of the line skipping feature and
removes the "strip decompression" feature from djpeg, since the new
cropping feature is a superset of it.

Refer to #34 for discussion.

Closes #34
2016-02-19 21:07:39 -06:00
DRC
5f972324ee Build: Make the NASM autoconf variable persistent
Previously, if a custom value of this variable was specified when
running configure, then that value would be lost if configure was
automatically re-run (as a result of changes to configure.ac, for
instance.)

As a bonus, the NASM variable is now also listed when running
'configure --help', so it is obvious how to override the default
NASM command.
2016-02-19 13:16:56 -06:00
DRC
f76c01d0bd Use consistent/modern code formatting for dbl ptrs 2016-02-19 10:56:13 -06:00
DRC
d4be42360c usage.txt: Restore accidentally deleted phrase
It somehow got lost when merging the jpeg-9+ documentation changes.
2016-02-19 10:35:41 -06:00
DRC
e621dfc508 More minor code formatting tweaks 2016-02-19 10:35:09 -06:00
DRC
9100b67a75 Clean up a couple of copyright messages 2016-02-19 09:25:44 -06:00
DRC
bd49803f92 Use consistent/modern code formatting for pointers
The convention used by libjpeg:

    type * variable;

is not very common anymore, because it looks too much like
multiplication.  Some (particularly C++ programmers) prefer to tuck the
pointer symbol against the type:

    type* variable;

to emphasize that a pointer to a type is effectively a new type.
However, this can also be confusing, since defining multiple variables
on the same line would not work properly:

    type* variable1, variable2;  /* Only variable1 is actually a
                                    pointer. */

This commit reformats the entirety of the libjpeg-turbo code base so
that it uses the same code formatting convention for pointers that the
TurboJPEG API code uses:

    type *variable1, *variable2;

This seems to be the most common convention among C programmers, and
it is the convention used by other codec libraries, such as libpng and
libtiff.
2016-02-19 09:10:07 -06:00
DRC
ae41128845 Reorder copyright messages in cjpeg/djpeg/jpegtran
Place the authors in the following order:
* libjpeg-turbo authors (2009-) in descending order of the date of their
  most recent contribution to the project, then in ascending order of
  the date of their first contribution to the project
* Upstream authors in descending order of the date of the first
  inclusion of their code (this indicates that their code serves as the
  foundation of this code.)

This also adds Siarhei to the author list, since he contributed ARM SIMD
code both as a Nokia employee and more recently as an independent
developer.
2016-02-18 16:33:23 -06:00
DRC
54e6b8e806 Include some comments/doc tweaks from jpeg-9+ 2016-02-18 15:16:17 -06:00
DRC
83aeb7b28c Wordsmith GIF limitations in cjpeg.1/djpeg.1 2016-02-17 20:05:44 -06:00
Guido Vollbeding
a560e4b423 The Independent JPEG Group's JPEG software v9b 2016-02-16 12:27:41 -06:00
Guido Vollbeding
fc11193e7a The Independent JPEG Group's JPEG software v9a 2016-02-16 12:26:00 -06:00
Guido Vollbeding
e7f88aec23 The Independent JPEG Group's JPEG software v9 2016-02-16 12:22:55 -06:00
DRC
aefd8b7942 Clean up pkgconfig dir when removing RPM & Mac pkg 2016-02-14 17:20:30 -06:00
DRC
18dcac4632 Fix compiler warning 2016-02-14 09:01:07 -06:00
DRC
03841e6e89 Win: Display effective C/LD flags in CMake output 2016-02-09 18:30:59 -06:00
DRC
d123c125c5 Java: Avoid OOM error when running 'make test'
We need to garbage collect between iterations of the outside loop in
bufSizeTest() in order to avoid exhausting the heap when running with
Java 6 (which is still used on Linux to test the 32-bit version of
libjpeg-turbo in automated builds.)
2016-02-09 01:35:39 -06:00
DRC
8632f1b262 ARM64: Avoid tbl instruction on Cortex-A53/A57
Full-color compression speedups relative to previous commits:
Cortex-A53 (Nexus 5X), Android, 64-bit: 0.91-3.0% (avg. 1.8%)
Cortex-A57 (Nexus 5X), Android, 64-bit: -0.35-1.5% (avg. 0.65%)
2016-02-09 00:38:58 -06:00
DRC
bba7978981 ChangeLog: Mention ARM64 Huffman & adj perf claims 2016-02-08 16:10:28 -06:00
DRC
28f00bf235 Fix iOS/ARMv8 build
Broken by 46ecffa324.

gas-preprocessor.pl and/or the clang assembler apparently don't like
default values in macro arguments, and we need to use a separate const
section for each function (because of our use of adr, also necessitated
by the broken clang assembler.)
2016-02-08 15:15:11 -06:00
DRC
ab80273b61 BUILDING.md: Update OS X Java information
The Apple Java Developer Package is only necessary on OS X < 10.7.
When building on Lion and later, the Oracle JDK is preferred.
2016-02-08 14:41:07 -06:00
DRC
53c635b8e8 Fix 'make dist'; Include LICENSE.md in packages 2016-02-08 14:03:13 -06:00
DRC
46ecffa324 ARM64: Avoid LD3/ST3 at run time, not compile time
... and only if ThunderX is detected.  This can be easily expanded later
on to include other CPUs that are known to suffer from slow LD3/ST3, but
it doesn't make sense to disable LD3/ST3 for all non-Android Linux
platforms just because ThunderX is slow.
2016-02-07 22:05:56 -06:00
DRC
219470d6ac ARM64 NEON SIMD implementation of Huffman encoding
Full-color compression speedups relative to previous commits:
Cortex-A53 (Nexus 5X), Android, 64-bit: 1.1-13% (avg. 6.0%)
Cortex-A57 (Nexus 5X), Android, 64-bit: 0.0-22% (avg. 6.3%)

Refer to #47 and #50 for discussion

Closes #50

Note that this commit introduces a similar /proc/cpuinfo parser to that
of the ARM32 implementation.  It is used to specifically check whether
the code is running on Cavium ThunderX and, if so, disable the ARM64
SIMD Huffman routines (which slow performance by an average of 8% on
that CPU.)

Based on:
a8c282e5e5
2016-02-07 21:51:11 -06:00
DRC
15aaa7f7e2 ARM SIMD: Comment tweaks 2016-02-07 17:39:33 -06:00
DRC
45bbe06ec5 Un*x: Enable testing cross-compiled builds
Don't include the all: target as a dependency of the tests when
cross-compiling, and ensure that the files generated by the tests are
removed, even if they were created read-only (or if the tests are being
run on a different type of system that doesn't correctly interpret the
file permissions.)  This allows one to easily build the code on one
machine and run 'make test' on another.
2016-02-06 18:40:52 -06:00
DRC
2d62325754 Fix Visual C++ compiler warnings
Somehow this got reverted with aa769febf2.
Oops.
2016-02-06 18:40:52 -06:00
DRC
f9134384b7 Win: Enable testing cross-compiled builds
When cross-compiling, CMakeLists.txt now generates the CTest script
using relative paths, so that CTest can more easily be executed on a
different machine from the build machine.  Furthermore, Windows builds
are now tested using md5cmp, just like on Linux, rather than a CMake
script.  This prevents issues with differing CMake locations between
the build and test machines.

This also removes some trailing spaces from the md5cmp code and improves
the readability of the test code in CMakeLists.txt.
2016-02-06 18:40:19 -06:00
DRC
ce0dd949b2 Fix MinGW build
jinclude.h can't be safely included multiple times, so instead of
including it in the shared (broken-out) headers, it should instead be
included by the source files that include one or more of those headers.
2016-02-06 12:18:44 -06:00
DRC
8ff67fdb24 Update MinGW Linux build recipe 2016-02-06 12:17:40 -06:00
DRC
55a18d4007 Merge branch '1.4.x' 2016-02-04 18:52:23 -06:00
DRC
2d56acb840 Merge branch '1.3.x' into 1.4.x 2016-02-04 18:48:22 -06:00
DRC
c454c595dc Merge branch '1.2.x' into 1.3.x 2016-02-04 18:46:13 -06:00
DRC
0463f7c9aa Prevent overread when decoding malformed JPEG
The accelerated Huffman decoder was previously invoked if there were
> 128 bytes in the input buffer.  However, it is possible to construct a
JPEG image with Huffman blocks > 430 bytes in length
(http://stackoverflow.com/questions/2734678/jpeg-calculating-max-size).
While such images are pathological and could never be created by a
JPEG compressor, it is conceivable that an attacker could use such an
artifially-constructed image to trigger an input buffer overrun in the
libjpeg-turbo decompressor and thus gain access to some of the data on
the calling program's heap.

This patch simply increases the minimum buffer size for the accelerated
Huffman decoder to 512 bytes, which should (hopefully) accommodate any
possible input.

This addresses a major issue (LJT-01-005) identified in a security audit
by Cure53.
2016-02-04 18:43:48 -06:00
DRC
04dd34c14e Guard against wrap-around in alloc functions
Because of the exposed nature of the libjpeg API, alloc_small() and
alloc_large() can potentially be called by external code.  If an
application were to call either of those functions with
sizeofobject > SIZE_MAX - ALIGN_SIZE - 1, then the math in
round_up_pow2() would wrap around to zero, causing that function to
return a small value.  That value would likely not exceed
MAX_ALLOC_CHUNK, so the subsequent size checks in alloc_small() and
alloc_large() would not catch the error.

A similar problem could occur in 32-bit builds if alloc_sarray() were
called with
samplesperrow > SIZE_MAX - (2 * ALIGN_SIZE / sizeof(JSAMPLE)) - 1

This patch simply ensures that the size argument to the alloc_*()
functions will never exceed MAX_ALLOC_CHUNK (1 billion).  If it did,
then subsequent size checks would eventually catch that error, so we
are instead catching the error before round_up_pow2() is called.

This addresses a minor concern (LJT-01-001) expressed in a security
audit by Cure53.
2016-02-04 11:37:13 -06:00
DRC
3ee3d8799a Fix Visual C++ compiler warnings 2016-02-04 10:58:10 -06:00
DRC
6c8a71efa7 rdppm.c: formatting tweaks 2016-02-04 10:51:22 -06:00
DRC
271b0bf033 jmemmgr.c: formatting tweaks 2016-02-04 10:08:38 -06:00
DRC
6e053525ee TurboJPEG: Avoid dangling pointers
This addresses a minor concern (LJT-01-002) expressed in a security
audit by Cure53.  _tjInitCompress() and _tjInitDecompress() call
(respectively) jpeg_mem_dest_tj() and jpeg_mem_src_tj() with a pointer
to a dummy buffer, in order to set up the destination/source manager.
The dummy buffer should never be used, but it's still better to make it
static so that the pointer in the destination/source manager always
points to a valid region of memory.
2016-02-04 09:20:41 -06:00
DRC
fe11699d90 Adjust performance claims
Document the latest benchmarks on the Nexus 5X and change the "2-4x"
overall claim to "2-6x".  The peak performance on x86 platforms was
already closer to 5x, and the addition of SIMD-accelerated Huffman
encoding gave it that extra push over the cliff.
2016-02-03 14:02:13 -06:00
DRC
cf888486d1 Use consistent formatting in ARM NEON SIMD code
There aren't really any best practices to follow here.  I tried as best
as I could to adopt a standard that would ease any future maintenance
burdens.  The basic tenets of that standard are:

* Assembly instructions always start on Column 5, and operands always
  start on Column 21, except:
  - The instruction and operand can be indented (usually by 2 spaces)
    to indicate a separate instruction stream.
  - If the instruction is within an enclosing .if block in a macro,
    it should always be indented relative to the .if block.
* Comments are placed with an eye toward readability.  There are always
  at least 2 spaces between the end of a line of code and the associated
  in-line comment.  Where it made sense, I tried to line up the comments
  in blocks, and some were shifted right to avoid overlap with
  neighboring instruction lines.  Not an exact science.
* Assembler directives and macros use 2-space indenting rules.  .if
  blocks are indented relative to the macro, and code within the .if
  blocks is indented relative to the .if directive.
* No extraneous spaces between operands.  Lining up the operands
  vertically did not really improve readability-- personally, I think it
  made it worse, since my eye would tend to lose its place in the
  uniform columns of characters.  Also, code with a lot of vertical
  alignment is really hard to maintain, since changing one line could
  necessitate changing a bunch of other lines to avoid spoiling the
  alignment.
* No extraneous spaces in #defines or other directives.  In general, the
  only extraneous spaces (other than indenting spaces) are between:
  - Instructions and operands
  - Operands and in-line comments
This standard should be more or less in keeping with other formatting
standards used within the project.
2016-02-02 23:39:03 -06:00
DRC
cb49bb00d9 Opt. ARM64 SIMD decompr. for in-order pipelines
Decompression speedup relative to libjpeg-turbo 1.4.2 (ISLOW IDCT):
48-core ThunderX (RunAbove ARM Cloud), Linux, 64-bit: 60-113% (avg. 86%)
Cortex-A53 (Nexus 5X), Android, 64-bit: 6.8-27% (avg. 14%)
Cortex-A57 (Nexus 5X), Android, 64-bit: 2.0-14% (avg. 6.8%)

Decompression speedup relative to libjpeg-turbo 1.4.2 (IFAST IDCT):
48-core ThunderX (RunAbove ARM Cloud), Linux, 64-bit: 51-98% (avg. 75%)

Minimal speedup (1-5%) observed on iPhone 5S (Cortex-A7)

NOTE: This commit avoids the st3 instruction for non-Android and
non-Apple builds, which may cause a performance regression against
libjpeg-turbo 1.4.x on ARM64 systems that are running plain Linux.
Since ThunderX is the only platform known to suffer from slow ld3 and
st3 instructions, it is probably better to check for the CPU type
at run time and disable ld3/st3 only if ThunderX is detected.

This commit also enables the use of ld3 on Android platforms, which
should be a safe bet, at least for now.  This speeds up compression on
the afore-mentioned Nexus Cortex-A53 by 5.5-19% (avg. 12%) and on the
Nexus Cortex-A57 by 1.2-14% (avg. 6.3%), relative to the previous
commits.

This commit also removes unnecessary macros.

Refer to #52 for discussion.

Closes #52.

Based on:
6bad905034
488dd7bf17
4f4d057c1f
d3198afc43
2016-02-02 23:14:27 -06:00
DRC
cbfa696fc1 Update Android build instr. for ARMv8, PIE, etc.
* Include information on how to do a 64-bit ARMv8 build with the latest
NDK
* Suggest -fPIE and -pie as default CFLAGS (required for android-16 and
later.
* Remove -fstrict-aliasing flag (-Wall already includes it)
2016-02-01 11:28:55 -06:00
DRC
f5cd71c5cf Merge branch '1.4.x' 2016-02-01 11:19:06 -06:00
DRC
da047e8b14 Makefile.am: formatting tweak 2016-02-01 11:17:41 -06:00
DRC
6c3fc97b1a Update Android build instr. for ARMv8, PIE, etc.
* Include information on how to do a 64-bit ARMv8 build with the latest
NDK
* Suggest -fPIE and -pie as default CFLAGS (required for android-16 and
later.
* Remove -fstrict-aliasing flag (-Wall already includes it)
2016-02-01 11:12:22 -06:00
DRC
3128061382 TJBench: Fix segfault on Android
For whatever reason, the "write" global variable in tjbench.c was
overriding the linkage with the write() system function.  This may have
affected other platforms as well but was not known to.
2016-02-01 11:03:39 -06:00
DRC
8af3f8a9cb Provide pkg-config (.pc) scripts
This allows a project to use PKG_CHECK_MODULES() in its configure.ac
file to easily check for the presence of libjpeg-turbo and modify the
compiler/linker flags accordingly.  Note that if a project relies solely
on pkg-config to check for libjpeg-turbo, then it will not be possible
to build that project using libjpeg or an earlier version of
libjpeg-turbo.

Closes #53

Based on:
4967138719
2016-01-18 16:43:50 -06:00
DRC
d38b4f21ec Optimize ARM64 SIMD code for Cavium ThunderX
Per @ssvb:
ThunderX is an ARM64 chip that dedicates most of its transistor real
estate to providing 48 cores, so each core is not as fast as a result.
Each core is dual-issue & in-order for scalar instructions and has only
a single-issue half-width NEON unit, so the peak throughput is one
128-bit instruction per 2 cycles.  So careful instruction scheduling is
important.  Furthermore, ThunderX has an extremely slow implementation
of ld2 and ld3, so this commit implements the equivalent of those
instructions using ld1.

Compression speedup relative to libjpeg-turbo 1.4.2:
48-core ThunderX (RunAbove ARM Cloud), Linux, 64-bit: 58-85% (avg. 74%)
relative to jpeg-6b: 1.75-2.14x (avg. 1.95x)

Refer to #49 and #51 for discussion.

Closes #51.

This commit also wordsmiths the ChangeLog entry (the ARMv8 SIMD
implementation is "complete" only for compression-- it still lacks some
decompression algorithms, as does the ARMv7 implementation.)

Based on:
9405b5fd03

which is based on:
f561944ff7
962c8ab21f
2016-01-16 02:39:02 -06:00
DRC
e8aa5fa934 Add JSIMD_NOHUFFENC environment variable for ARM
Useful in regression/performance testing
2016-01-15 13:15:54 -06:00
DRC
ec6941f7bc Complete the ARM64 NEON SIMD implementation
This adds 64-bit NEON coverage for all of the algorithms that are
covered by the 32-bit NEON implementation, except for h2v1 (4:2:2) fancy
upsampling (used when decompressing 4:2:2 JPEG images.)  It also adds
64-bit NEON SIMD coverage for:

* slow integer forward DCT (compressor)
* h2v2 (4:2:0) downsampling (compressor)
* h2v1 (4:2:2) downsampling (compressor)

which are not covered in the 32-bit implementation.

Compression speedups relative to libjpeg-turbo 1.4.2:
Apple A7 (iPhone 5S), iOS, 64-bit: 113-150% (reported)
48-core ThunderX (RunAbove ARM Cloud), Linux, 64-bit: 2.1-33% (avg. 15%)

Refer to #44 and #49 for discussion

This commit also removes the unnecessary

    if (simd_support & JSIMD_ARM_NEON)

statements from the jsimd* algorithm functions.  Since the jsimd_can*()
functions check for the existence of NEON, the corresponding algorithm
functions will never be called if NEON isn't available.

Based on:
dcd9d84f10
b0d87b811f
70cd5c8a49
3e58d9a064
837b19542f
73dc43ccc8
a82b71a261
c1b1188c21
305c89284e
7f443f9995
4c2b53b77d

Unified version with fixes:
1004a3cd05
2016-01-15 11:21:48 -06:00
DRC
499c470b63 ARM32 NEON SIMD implementation of Huffman encoding
Full-color compression speedups relative to libjpeg-turbo 1.4.2:

800 MHz ARM Cortex-A9, iOS, 32-bit:  26-44% (avg. 32%)

Refer to #42 and #47 for discussion.

This commit also removes the unnecessary

    if (simd_support & JSIMD_ARM_NEON)

statements from the jsimd* algorithm functions.  Since the jsimd_can*()
functions check for the existence of NEON, the corresponding algorithm
functions will never be called if NEON isn't available.  Removing those
if statements improved performance across the board by a couple of
percent.

Based on:
fc023c880c
2016-01-13 23:38:35 -06:00
DRC
9c8cee8c29 tjbench: Further tweaks to -nowrite feature
* Do not compute compression error if -nowrite is specified
* Adjust formatting of -nowrite usage description
2016-01-13 22:32:19 -06:00
DRC
4e356a92dc BUILDING.md: Restore autotools processing instr.
Partially reverts 54014d9c2a.  When
building from a git sandbox, as opposed to from an official source
tarball, it is still necessary to run autoreconf.

Closes #48
2016-01-13 12:27:42 -06:00
DRC
93eaa37a3b Update build instructions for new autoconf, GitHub
The Linux build machine has been upgraded to autoconf 2.69, automake
1.15, m4 1.4.17, and libtool 2.4.6, so it is no longer necessary to
recommend running autoreconf prior to building the source, if one is
building from an official source tarball (as opposed to from a git
sandbox.)  Also, there is no SVN repository anymore (oops.)
2016-01-13 12:20:01 -06:00
DRC
f3a8684cd1 SSE2 SIMD implementation of Huffman encoding
Full-color compression speedups relative to libjpeg-turbo 1.4.2:

2.8 GHz Intel Xeon W3530, Linux, 64-bit:  2.2-18% (avg. 9.5%)
2.8 GHz Intel Xeon W3530, Linux, 32-bit:  10-25% (avg. 17%)

2.3 GHz AMD A10-4600M APU, Linux, 64-bit:  4.9-17% (avg. 11%)
2.3 GHz AMD A10-4600M APU, Linux, 32-bit:  8.8-19% (avg. 15%)

3.0 GHz Intel Core i7, OS X, 64-bit:  3.5-16% (avg. 10%)
3.0 GHz Intel Core i7, OS X, 32-bit:  4.8-14% (avg. 11%)

2.6 GHz AMD Athlon 64 X2 5050e:
Performance-neutral (give or take a few percent)

Full-color compression speedups relative to IPP:

2.8 GHz Intel Xeon W3530, Linux, 64-bit:  4.8-34% (avg. 19%)
2.8 GHz Intel Xeon W3530, Linux, 32-bit:  -19%-7.0% (avg. -7.0%)

Refer to #42 for discussion.  Numerous other approaches were attempted,
but this one proved to be the most performant across all platforms.

This commit also fixes #3 (works around, really-- the clang-compiled version
of jchuff.c still performs 20% worse than its GCC-compiled counterpart, but
that code is now bypassed by the new SSE2 Huffman algorithm.)

Based on:
2cb4d41330
36c94e050d
2016-01-12 03:03:49 -06:00
DRC
eb59b6e72d Add -nowrite arg to TJBench to improve consistency
Prevents any images from being written to disk, thus making the
performance of the benchmark as CPU-bound as possible.
2016-01-12 00:36:32 -06:00
DRC
368cd52d38 Allow JSIMD_FORCENONE=1 env to disable x86-64 SIMD
Traditionally, the x86-64 code did not call init_simd() because it had
no need to (only SSE2 was supported.)  However, having the ability to
disable SIMD at run time is a useful testing tool, and all of the other
SIMD implementations have this ability.
2016-01-12 00:29:34 -06:00
DRC
e7f1418525 1.4.3 2016-01-06 19:25:28 -06:00
DRC
2111c5acda Merge branch '1.4.x' 2016-01-06 19:24:55 -06:00
DRC
5a3b4fed4b Regression: Allow co-install of 32-bit/64-bit RPMs
Fix a regression introduced in 1.4.1 that prevented 32-bit and 64-bit
libjpeg-turbo RPMs from being installed simultaneously on recent Red
Hat/Fedora distributions.  This was due to the addition of the
SIZEOF_SIZE_T macro in jconfig.h, which allows the Huffman codec to
determine the word size at compile time.  Since that macro differs
between 32-bit and 64-bit builds, this caused a conflict between the
i386 and x86_64 RPMs (any differing files, other than executables, are
not allowed when 32-bit and 64-bit RPMs are installed simultaneously.)
Since the macro is used only internally, it has been moved into
jconfigint.h.
2016-01-06 19:17:54 -06:00
DRC
5f2cbbd039 Fix iOS ARM64 build broken by removal of .arch
The unnecessary .arch directive was removed from the ARM64 SIMD code
in d70a5c12fc, thus allowing clang's
integrated assembler to assemble the code on Linux systems.  However,
this broke the detection mechanism in acinclude.m4 that tells the build
system whether it needs to use gas-preprocessor.pl.  Since one of the
primary motivators for using gas-preprocessor.pl with ARM64 builds is
the lack of .req/.unreq directives in Apple's implementation of clang,
acinclude.m4 now checks whether .req/.unreq can be properly assembled
and uses gas-preprocessor.pl if not.

Closes #33.
2016-01-06 14:02:27 -06:00
DRC
fbe5007fbc Merge branch '1.4.x' 2015-12-19 14:29:46 -06:00
DRC
71e971fb35 Build: Use FILEPATH type for NASM CMake variable
This causes cmake-gui to to display the proper file chooser dialog
(as opposed to the directory chooser.)

Fixes #40
2015-12-19 14:18:21 -06:00
DRC
6fa5ebdc10 cjpeg: Adjust claims RE: image quality settings
Quality values > 95 are not useless.  They just may not provide as good
of a size vs. perceptual quality tradeoff as lower quality values.  This
also displays the default quality value in the cjpeg usage.

Closes #39
2015-12-17 10:41:51 -06:00
DRC
d70a5c12fc Remove unnecessary .arch directive in ARM64 code
This directive was preventing the code from assembling using the
integrated assembler in clang.

Fixes #33
2015-12-14 17:02:43 -06:00
DRC
aa769febf2 Fix compiler warnings under Visual C++
A few of these are long-standing, but most were exposed when switching
from INT32 to JLONG.
2015-10-15 02:25:00 -05:00
DRC
d65e768b2e Fix additional issues reported by UB sanitizers
Most of these involved overrunning the signed 32-bit JLONG type whenever
building libjpeg-turbo with a 32-bit compiler.  These issues are not
believed to represent actual security threats, but eliminating them
makes it easier to detect such threats should they arise in the future.
2015-10-14 22:59:51 -05:00
DRC
1e32fe3113 Replace INT32 with a new internal datatype (JLONG)
These days, INT32 is a commonly-defined datatype in system headers.  We
cannot eliminate the definition of that datatype from jmorecfg.h, since
the INT32 typedef has technically been part of the libjpeg API since
version 5 (1994.)  However, using INT32 internally is risky, because the
inclusion of a particular header (Xmd.h, for instance) could change the
definition of INT32 from long to int on 64-bit platforms and thus change
the internal behavior of libjpeg-turbo in unexpected ways (for instance,
failing to correctly set __INT32_IS_ACTUALLY_LONG to match the INT32
typedef-- perhaps as a result of including the wrong version of
jpeglib.h-- could cause libjpeg-turbo to produce incorrect results.)

The library has always been built in environments in which INT32 is
effectively long (on Windows, long is always 32-bit, so effectively it's
the same as int), so it makes sense to turn INT32 into an explicitly
long datatype.  This ensures that libjpeg-turbo will always behave
consistently, regardless of the headers included at compile time.

Addresses a concern expressed in #26.
2015-10-14 20:34:32 -05:00
DRC
250c887763 ChangeLog: acknowledge existence of 1.4.2 2015-10-13 13:37:32 -05:00
DRC
e42032ba62 README.md: create link for jcstest.c 2015-10-10 10:56:58 -05:00
DRC
17de518357 Markdown versions of README, LICENSE, BUILDING 2015-10-10 10:34:55 -05:00
DRC
7e3acc0e0a Rename README, LICENSE, BUILDING text files
The IJG README file has been renamed to README.ijg, in order to avoid
confusion (many people were assuming that that was our project's README
file and weren't reading README-turbo.txt) and to lay the groundwork for
markdown versions of the libjpeg-turbo README and build instructions.
2015-10-10 10:31:33 -05:00
DRC
ac85335cd8 Merge branch '1.4.x' 2015-10-09 20:03:59 -05:00
DRC
bf04316e63 Comment formatting tweaks 2015-10-09 20:02:31 -05:00
DRC
d8da49effe Fix 'make dist' 2015-09-21 13:45:45 -05:00
DRC
30ebafda2a 1.4.2 2015-09-21 13:43:36 -05:00
DRC
60efb896e0 Merge branch '1.4.x' 2015-09-21 13:17:17 -05:00
DRC
8e9cef2e6f Fix various issues reported by the UB sanitizers
Most of these involved left shifting a negative number, which is
technically undefined (although every modern compiler I'm aware of
will implement this by treating the signed integer as a 2's complement
unsigned integer-- the LEFT_SHIFT() macro just makes this behavior
explicit in order to shut up ubsan.)  This also fixes a couple of
non-issues in the entropy codecs, whereby the sanitizer reported an
out-of-bounds index in the 4th argument of jpeg_make_d_derived_tbl().
In those cases, the index was actually out of bounds (caused by a
malformed JPEG image), but jpeg_make_d_derived_tbl() would have caught
the error and aborted prior to actually using the invalid address.  Here
again, the fix was to make our intentions explicit so as to shut up
ubsan.
2015-09-21 13:12:04 -05:00
DRC
870b4f28b4 Fix ChangeLog numbering biffed by previous merge 2015-09-16 23:26:13 -05:00
DRC
b961f0bfce Merge branch '1.4.x' 2015-09-16 23:16:38 -05:00
James Cowgill
54792ba340 Fix MIPS DSPr2 4:2:0 upsample bug w/ small images
The DSPr2 code was errantly comparing the residual (t9, width & 0xF)
with the end pointer (t4, out + width) instead of the width directly
(a1).  This would give the wrong results with any image whose output
width was less than 16.  The other small changes (ulw to lw and removal
of the nop) are just some easy optimizations around this code.

This issue caused a buffer overrun and subsequent segfault on images
whose scaled output height was 1 pixel and whose scaled output width was
< 16 pixels.  Note that the "plain" (non-fancy and non-merged) upsample
routine, which was affected by this bug, is normally not used except
when decompressing a non-YCbCr JPEG image, but it is also used when
decompressing a single-row image (because the other upsampling
algorithms require at least two rows.)

Closes #16.
2015-09-16 23:15:22 -05:00
Chandler Carruth
498d9bc92f Fix x86-64 ABI conformance issue in SIMD code
(descriptions cribbed by DRC from discussion in #20)
In the x86-64 ABI, the high (unused) DWORD of a 32-bit argument's
register is undefined, so it was incorrect to use a 64-bit mov
instruction to transfer a JDIMENSION argument in the 64-bit SSE2 SIMD
functions.  The code worked thus far only because the existing compiler
optimizers weren't smart enough to do anything else with the register in
question, so the upper 32 bits happened to be all zeroes-- for the past
6 years, on every x86-64 compiler previously known to mankind.

The bleeding-edge Clang/LLVM compiler has a smarter optimizer, and
under certain circumstances, it will attempt to load-combine adjacent
32-bit integers from one of the libjpeg structures into a single 64-bit
integer and pass that 64-bit integer as a 32-bit argument to one of the
SIMD functions (which is allowed by the ABI, since the upper 32 bits of
the 32-bit argument's register are undefined.)  This caused the
libjpeg-turbo regression tests to crash.

Also enhance the documentation of JDIMENSION to explain that its size
is significant to the implementation of the SIMD code.

Closes #20.  Refer also to http://crbug.com/532214.
2015-09-16 22:35:31 -05:00
DRC
b4922b42e7 Merge branch '1.4.x' 2015-09-08 19:02:18 -05:00
DRC
465a9fe0cb Add file that explains the libjpeg-turbo licenses
Previously this information was found in a page on libjpeg-turbo.org,
but there was still some confusion, because README-turbo.txt wasn't
clear as to which license applied to what.
2015-09-08 18:59:37 -05:00
DRC
00d82c425e Merge branch '1.4.x' 2015-08-29 18:15:25 -05:00
DRC
b5a55e6dd7 Fix negative shift with IFAST FDCT and qual=100
With certain images, compressing using quality=100 and the fast integer
forward DCT will cause the divisor passed to compute_reciprocal() to be
1.  In those cases, the library already disables the SIMD quantization
algorithm to avoid 16-bit overflow.  However, compute_reciprocal()
doesn't properly handle the divisor==1 case, so we need to use special
values in that case so that the C quantization algorithm will behave
like an identity function.
2015-08-29 18:10:58 -05:00
James Cowgill
f62dbccf5f Fix build error when compiling MIPS SIMD w/ -mfpxx
When compiled with -mfpxx (which is now the default on Debian), there are
some restrictions on the use of odd-numbered FP registers. More details
about FPXX can be found here:
https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking

This commit simply changes all uses of FP registers to an even-numbered
equivalent like this:
 f0 -> f0
 f1 -> f2
 f2 -> f4
 ...
 f8 -> f16

This commit should have no observable effect except that the MIPS assembly
will now compile with -mfpxx.

Closes #11
2015-08-26 21:30:18 -05:00
DRC
b657631953 Merge branch '1.4.x' 2015-08-26 20:31:13 -05:00
DRC
58ae401e50 Eliminate cppcheck false positive in turbojpeg.c 2015-08-26 20:29:36 -05:00
DRC
333f3cf756 Fix 'make dist' 2015-08-15 17:04:58 -05:00
DRC
73befdb148 Merge branch '1.4.x' 2015-08-14 11:48:05 -05:00
Frank Bossen
6709e4a0cf Check range of integer values in PPM text file
Add checks to ensure values are within the specified range.

Fixes mozilla/mozjpeg#141, closes #8
2015-08-14 11:42:29 -05:00
Frank Bossen
82923eb93a Check image size when reading targa file
Throw an error when image width or height is 0.

Fixes mozilla/mozjpeg#140, closes #7.
2015-08-14 11:42:23 -05:00
DRC
a3ef34c626 Fix cjpeg segfault when Windows BMP width/height<0
rdbmp.c used the ambiguous INT32 datatype, which is sometimes typedef'ed
to long.  Windows bitmap headers use 32-bit signed integers for the
width and height, because height can sometimes be negative (this
indicates a top-down bitmap.)  If biWidth or biHeight was negative and
INT32 was a 64-bit long, then biWidth and biHeight were read as a
positive integer > INT32_MAX, which failed the test in line 385:

    if (biWidth <= 0 || biHeight <= 0)
        ERREXIT(cinfo, JERR_BMP_EMPTY);

This commit refactors rdbmp.c so that it uses the datatypes specified by
Microsoft for the Windows BMP header.

This closes #9 and also provides a better solution for mozilla/mozjpeg#153.
2015-08-13 20:24:27 -05:00
DRC
6fa14b37ee Declare source buffers in TurboJPEG C API as const
This reassures the caller that the buffers will not be modified and also
allows read-only buffers to be passed to the functions.

Partially reverts 3947a19f25fc8186d3812dbcf8e70baea36ef652.
2015-08-13 20:08:08 -05:00
DRC
ce4ff407ff Merge branch '1.4.x' 2015-08-13 18:09:20 -05:00
DRC
b1682fb7c8 Tabs to spaces in turbojpeg.h
This was a formatting regression in 1.4.x introduced when the new
TurboJPEG functions were added.
2015-08-13 18:05:32 -05:00
DRC
b2db23c449 Merge pull request #10 from pornel/const
Declare inbuffer arg in jpeg_mem_src() to be const
This reassures the caller that the buffer will not be modified and also
allows read-only buffers to be passed to the function.
2015-08-13 16:51:08 -05:00
Kornel Lesiński
7222ec2717 Declare inbuffer const 2015-08-13 22:44:51 +01:00
DRC
8fb37b8171 Fix cjpeg segfault when Windows BMP width/height<0
rdbmp.c used the ambiguous INT32 datatype, which is sometimes typedef'ed
to long.  Windows bitmap headers use 32-bit signed integers for the
width and height, because height can sometimes be negative (this
indicates a top-down bitmap.)  If biWidth or biHeight was negative and
INT32 was a 64-bit long, then biWidth and biHeight were read as a
positive integer > INT32_MAX, which failed the test in line 385:

    if (biWidth <= 0 || biHeight <= 0)
        ERREXIT(cinfo, JERR_BMP_EMPTY);

This commit refactors rdbmp.c so that it uses the datatypes specified by
Microsoft for the Windows BMP header.

This closes #9 and also provides a better solution for mozilla/mozjpeg#153.
2015-08-13 11:09:05 -05:00
DRC
b3b3b29e4c Update x86[-64] assembler recommendations
NASM 2.11.08 has a bug that prevents it from properly assembling a
macho64 version of libjpeg-turbo (the resulting binary generates corrupt
images.)  2.11.09 works properly.  YASM also works properly and has been
a supported alternative since libjpeg-turbo 1.2.
2015-08-03 23:59:27 -05:00
DRC
7170d9e0e5 Update x86[-64] assembler recommendations
NASM 2.11.08 has a bug that prevents it from properly assembling a
macho64 version of libjpeg-turbo (the resulting binary generates corrupt
images.)  2.11.09 works properly.  YASM also works properly and has been
a supported alternative since libjpeg-turbo 1.2.
2015-08-03 23:59:12 -05:00
DRC
57e206662a Update x86[-64] assembler recommendations
NASM 2.11.08 has a bug that prevents it from properly assembling a
macho64 version of libjpeg-turbo (the resulting binary generates corrupt
images.)  2.11.09 works properly.  YASM also works properly and has been
a supported alternative since libjpeg-turbo 1.2.
2015-08-03 23:58:40 -05:00
DRC
939e466082 Update x86[-64] assembler recommendations
NASM 2.11.08 has a bug that prevents it from properly assembling a
macho64 version of libjpeg-turbo (the resulting binary generates corrupt
images.)  2.11.09 works properly.  YASM also works properly and has been
a supported alternative since libjpeg-turbo 1.2.
2015-08-03 23:56:09 -05:00
DRC
7c726a4515 Update URL for our custom gas-preprocessor.pl 2015-08-03 13:24:22 -05:00
DRC
a61fd32137 Update URL for our custom gas-preprocessor.pl 2015-08-03 13:16:21 -05:00
DRC
944aa8e3c4 Fix rare bug: right shift by a negative # of bits
Under very rare circumstances, decompressing specific corrupt JPEG
images would create a situation whereby GET_BITS(1) was invoked
from within HUFF_DECODE_FAST() when bits_left=0. This produced a right
shift by a negative number of bits, which is undefined in C.
2015-07-29 17:19:35 -05:00
DRC
2a0b4ac337 Fix rare bug: right shift by a negative # of bits
Under very rare circumstances, decompressing specific corrupt JPEG
images would create a situation whereby GET_BITS(1) was invoked
from within HUFF_DECODE_FAST() when bits_left=0. This produced a right
shift by a negative number of bits, which is undefined in C.
2015-07-29 17:19:15 -05:00
DRC
cf0e58de53 Fix rare bug: right shift by a negative # of bits
Under very rare circumstances, decompressing specific corrupt JPEG
images would create a situation whereby GET_BITS(1) was invoked
from within HUFF_DECODE_FAST() when bits_left=0. This produced a right
shift by a negative number of bits, which is undefined in C.
2015-07-29 17:18:18 -05:00
Ondřej Surý
b6590d67b3 Convert the BUILD stamp to AC_ARG_WITH argument, so we can make the build reproducible 2015-07-29 13:23:27 -05:00
DRC
22eb6c2bf3 Convert svn:ignore properties to .gitignore 2015-07-29 12:55:11 -05:00
DRC
9a2a42d8ee Convert svn:ignore properties to .gitignore 2015-07-29 12:55:53 -05:00
DRC
8c4c6d29e6 Convert svn:ignore properties to .gitignore 2015-07-29 12:56:16 -05:00
DRC
9993410e44 Convert svn:ignore properties to .gitignore 2015-07-29 12:54:44 -05:00
DRC
b3b9a213bf Convert svn:ignore properties to .gitignore 2015-07-29 12:53:02 -05:00
DRC
9bbf2b8551 Merge pull request #4 from oerdnj/master
Allow BUILD to be specified on the configure command line
2015-07-28 12:56:16 -05:00
Ondřej Surý
45a2369b44 Convert the BUILD stamp to AC_ARG_WITH argument, so we can make the build reproducible 2015-07-28 09:19:13 +02:00
Guido Vollbeding
5829cb2398 The Independent JPEG Group's JPEG software v8d 2015-07-27 13:50:34 -05:00
Guido Vollbeding
c39ec149e8 The Independent JPEG Group's JPEG software v8c 2015-07-27 13:49:31 -05:00
Guido Vollbeding
a4ecaacde6 The Independent JPEG Group's JPEG software v8b 2015-07-27 13:48:40 -05:00
Guido Vollbeding
f18f81b7e2 The Independent JPEG Group's JPEG software v8a 2015-07-27 13:46:36 -05:00
Guido Vollbeding
989630f70c The Independent JPEG Group's JPEG software v8 2015-07-27 13:45:31 -05:00
Guido Vollbeding
5996a25e2f The Independent JPEG Group's JPEG software v7 2015-07-27 13:44:25 -05:00
Guido Vollbeding
1e247ac854 The Independent JPEG Group's JPEG software v6b with arithmetic coding support 2015-07-27 14:40:46 -05:00
DRC
99f0289606 Convert svn:ignore properties to .gitignore 2015-07-27 03:52:35 -05:00
DRC
03e755bbd3 Further improvements to partial image decoding
When using context-based upsampling, use a dummy color conversion
routine instead of a dummy row buffer. This improves performance
(since the actual color conversion routine no longer has to be called),
and it also fixes valgrind errors when decompressing to RGB565.
Valgrind previously complained, because using the RGB565 color
converter with the dummy row buffer was causing a table lookup with
undefined indices.
2015-07-27 03:44:20 -05:00
DRC
74b9f609a2 Fix rare bug: right shift by a negative # of bits
Under very rare circumstances, decompressing specific corrupt JPEG
images would create a situation whereby GET_BITS(1) was invoked
from within HUFF_DECODE_FAST() when bits_left=0. This produced a right
shift by a negative number of bits, which is undefined in C.
2015-07-27 03:43:40 -05:00
DRC
739edeb8a6 Further exception cleanup
Use a new checked exception type (TJException) when passing through
errors from the underlying C library. This gives the application a
choice of catching all exceptions or just those from TurboJPEG.

Throw IllegalArgumentException at the JNI level when arguments to the
JNI function are incorrect, and when one of the TurboJPEG "utility"
functions returns an error (because, per the C API specification, those
functions will only return an error if one of their arguments is out of
range.)

Remove "throws Exception" from the signature of any methods that no
longer pass through an error from the TurboJPEG C library.

Credit Viktor for the new code

Code formatting tweaks
2015-07-27 03:40:58 -05:00
DRC
a3deac158b Fix build whenever IDCT_SCALING_SUPPORTED is undefined
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1597 632fc199-4ca6-4c93-a231-07263d6284db
2015-07-14 20:51:53 +00:00
DRC
10dc5cfeff Fix build whenever IDCT_SCALING_SUPPORTED is undefined
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1596 632fc199-4ca6-4c93-a231-07263d6284db
2015-07-14 20:51:20 +00:00
DRC
b3817dab86 Throw idiomatic unchecked exceptions from the Java classes and JNI wrapper if there is an unrecoverable error caused by incorrect API usage (such as illegal arguments, etc.), and throw Errors if there is an unrecoverable error at the C level (such as a failed malloc() call.)
Change the behavior of the bailif0() macro in the JNI wrapper so that it doesn't throw an exception for an unexpected NULL condition.  In fact, in all cases, the underlying JNI API function (such as GetFieldID(), etc.) will throw an Error on its own whenever it returns NULL, so our custom exceptions were never being thrown in that case anyhow.  All we need to do is just detect the error and bail out of the C code.

This also corrects a couple of formatting issues (semicolons aren't needed at the end of class definitions, and @Override should be specified for the methods we're overriding from super-classes, so the compiler can sanity-check that we're actually overriding a method and not declaring a new one.)


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1595 632fc199-4ca6-4c93-a231-07263d6284db
2015-07-14 20:42:52 +00:00
DRC
1a4778f8f0 Allow TJCompressor and TJDecompressor to be used with a try-with-resources statement in Java 7 and later.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1594 632fc199-4ca6-4c93-a231-07263d6284db
2015-07-07 16:39:03 +00:00
DRC
c23e36e800 Add additional protections against defining INT32 if another header has already defined it (code borrowed from libjpeg v8.) This isn't necessary when using the libjpeg-turbo build system on Windows, because the CMake generated jconfig.h defines INT32 and then defines XMD_H to trick jmorecfg.h into not redefining it. However, some projects build libjpeg-turbo using their own build systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1593 632fc199-4ca6-4c93-a231-07263d6284db
2015-07-06 16:04:04 +00:00
DRC
65c5ec2f0f Add additional protections against defining INT32 if another header has already defined it (code borrowed from libjpeg v8.) This isn't necessary when using the libjpeg-turbo build system on Windows, because the CMake generated jconfig.h defines INT32 and then defines XMD_H to trick jmorecfg.h into not redefining it. However, some projects build libjpeg-turbo using their own build systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1592 632fc199-4ca6-4c93-a231-07263d6284db
2015-07-06 16:02:57 +00:00
Tristan Matthews
0f87064d26 jpegyuv: drop write-only errno 2015-07-02 16:30:32 -04:00
Tristan Matthews
0fb7725000 Drop unused includes from jpegyuv and yuvjpeg 2015-07-02 16:29:07 -04:00
DRC
9cc597221e Fix a memory leak in jpeg_skip_scanlines()
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1591 632fc199-4ca6-4c93-a231-07263d6284db
2015-07-01 16:56:44 +00:00
DRC
6ed4d9d110 Increment SO_AGE to reflect the addition of a new interface to the libjpeg API
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1590 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-27 08:10:34 +00:00
DRC
306e1d2d77 Add jpeg_skip_scanlines() to the Windows DLL export list.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1589 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-27 08:10:33 +00:00
DRC
162c9985d6 Fix compiler warnings in jpeg_skip_scanlines() when building under Visual Studio.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1588 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-27 08:10:32 +00:00
DRC
7a7da9460a Add regression tests for jpeg_skip_scanlines(); change "stripe" to "strip" in djpeg; document -strip and -skip parameters in djpeg
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1587 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-27 08:10:31 +00:00
DRC
ac09954b1d Fix a couple of seg faults discovered when testing the new jpeg_skip_scanlines() function + remove comment that is no longer relevant.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1586 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-27 08:10:30 +00:00
DRC
6a25894472 Make sure that Java is disabled when 12-bit is enabled (Java requires TurboJPEG, which currently only supports 8-bit samples), and tabs-->spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1585 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-27 07:57:44 +00:00
DRC
ecc583682a Make sure that Java is disabled when 12-bit is enabled (Java requires TurboJPEG, which currently only supports 8-bit samples), and tabs-->spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1584 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-27 07:56:29 +00:00
DRC
07afe8a50f Add a -skip option to djpeg, which opens up further regression testing options.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1583 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-25 03:44:37 +00:00
DRC
eb32cc1e6d Add a new libjpeg API function (jpeg_skip_scanlines()) to allow for partially decoding a JPEG image.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1582 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-25 03:44:36 +00:00
DRC
691cd93383 Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1574 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-20 16:36:32 +00:00
DRC
54014d9c2a The Linux build machine has been upgraded to autoconf 2.69, automake 1.15, m4 1.4.17, and libtool 2.4.6, so it is no longer necessary to recommend running autoreconf prior to building the source.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1573 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-20 16:27:51 +00:00
DRC
06bf10d19e Studies show that GCC v5.1.0 performs as well as or better than v4.2, but v4.7.x-v4.9.x do not perform as well as v4.2.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1572 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-20 16:21:33 +00:00
DRC
89b5e06df5 Studies show that GCC v5.1.0 performs as well as or better than v4.2, but v4.7.x-v4.9.x do not perform as well as v4.2.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1571 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-20 16:20:53 +00:00
DRC
eea6424596 Typo
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1570 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-20 15:51:34 +00:00
DRC
7a8c53e4bd Clarify that the TurboJPEG API functions/methods do not modify the source buffer.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1567 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-19 16:07:14 +00:00
DRC
a8af72437e Now that the TurboJPEG API is reporting libjpeg warnings as errors, an "Invalid SOS parameters for sequential JPEG" warning surfaced in tjDecodeYUV*(). This was caused by the Se member of jpeg_decompress_struct being set to 0 (it is normally set to a non-zero value when the start-of-scan markers are read, but there are no SOS markers in this case, because we're not actually decompressing a JPEG file.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1564 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-08 18:31:34 +00:00
DRC
db6d8fca59 Now that the TurboJPEG API is reporting libjpeg warnings as errors, an "Invalid SOS parameters for sequential JPEG" warning surfaced in tjDecodeYUV*(). This was caused by the Se member of jpeg_decompress_struct being set to 0 (it is normally set to a non-zero value when the start-of-scan markers are read, but there are no SOS markers in this case, because we're not actually decompressing a JPEG file.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1564 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-08 18:31:34 +00:00
DRC
d0fc58eb15 Fix a segfault that occured in the MIPS DSPr2 fancy upsampling routine when downsampled_width==3. Because the DSPr2 code unrolls the loop for the middle columns (refer to jdsample.c), it has the effect of performing two column iterations, and that only works properly if the number of columns (minus the first and last) is >= 2. For the specific case of downsampled_width==3, this patch skips to the second iteration of the unrolled column loop.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1562 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-08 17:41:34 +00:00
DRC
f15ef33768 Fix a segfault that occured in the MIPS DSPr2 fancy upsampling routine when downsampled_width==3. Because the DSPr2 code unrolls the loop for the middle columns (refer to jdsample.c), it has the effect of performing two column iterations, and that only works properly if the number of columns (minus the first and last) is >= 2. For the specific case of downsampled_width==3, this patch skips to the second iteration of the unrolled column loop.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1562 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-08 17:41:34 +00:00
DRC
b3954883af If a warning (such as "Premature end of JPEG file") is triggered in the underlying libjpeg API, make sure that the TurboJPEG API function returns -1. Unlike errors, however, libjpeg warnings do not make the TurboJPEG functions abort.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1561 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-01 19:22:41 +00:00
DRC
1f79c7c8c8 If a warning (such as "Premature end of JPEG file") is triggered in the underlying libjpeg API, make sure that the TurboJPEG API function returns -1. Unlike errors, however, libjpeg warnings do not make the TurboJPEG functions abort.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1561 632fc199-4ca6-4c93-a231-07263d6284db
2015-06-01 19:22:41 +00:00
Josh Aas
5198654f73 Bump version number to 3.1. 2015-05-18 09:28:09 -05:00
DRC
f24385c465 Back out r1555 and r1548. Using setenv() didn't fix the iOS simulator issue. It just replaced an undefined _putenv$UNIX2003 symbol with an undefined _setenv$UNIX2003 symbol. The correct solution seems to be to use -D_NONSTD_SOURCE when generating our official builds.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1557 632fc199-4ca6-4c93-a231-07263d6284db
2015-05-17 15:56:18 +00:00
DRC
bec45b162b Back out r1555 and r1548. Using setenv() didn't fix the iOS simulator issue. It just replaced an undefined _putenv$UNIX2003 symbol with an undefined _setenv$UNIX2003 symbol. The correct solution seems to be to use -D_NONSTD_SOURCE when generating our official builds.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1557 632fc199-4ca6-4c93-a231-07263d6284db
2015-05-17 15:56:18 +00:00
DRC
a19f3a9c7a Fix the Windows build. I remember now why I used putenv() originally-- because Windows doesn't have setenv(). We could use _putenv_s(), but older versions of MinGW don't have that either. Fortunately, since all of the environment values we're setting in turbojpeg.c are static, we can just map setenv() to putenv() using a macro. NOTE: we still have to use _putenv_s() in turbojpeg-jni.c, but at least people who may need to build with an older version of MinGW can still do so by disabling the Java build.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1555 632fc199-4ca6-4c93-a231-07263d6284db
2015-05-16 04:18:21 +00:00
DRC
80bbd3908f Fix the Windows build. I remember now why I used putenv() originally-- because Windows doesn't have setenv(). We could use _putenv_s(), but older versions of MinGW don't have that either. Fortunately, since all of the environment values we're setting in turbojpeg.c are static, we can just map setenv() to putenv() using a macro. NOTE: we still have to use _putenv_s() in turbojpeg-jni.c, but at least people who may need to build with an older version of MinGW can still do so by disabling the Java build.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1555 632fc199-4ca6-4c93-a231-07263d6284db
2015-05-16 04:18:21 +00:00
DRC
c15c2d88ef Allow building only static or only shared libraries on Windows
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1553 632fc199-4ca6-4c93-a231-07263d6284db
2015-05-15 22:08:21 +00:00
DRC
665c96edaa Allow building only static or only shared libraries on Windows
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1553 632fc199-4ca6-4c93-a231-07263d6284db
2015-05-15 22:08:21 +00:00
DRC
63ba814364 __WORDSIZE doesn't seem to be available on platforms other than Mac or Linux, and best practices are for user-level code not to rely on it anyhow, since it's meant to be an internal macro. Fortunately, autoconf already has a way of determining the word size at configure time, so it can be passed into the compiler. This should work on any platform and has been tested on all of the Un*x platforms we support (Linux, Mac, FreeBSD, Solaris.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1550 632fc199-4ca6-4c93-a231-07263d6284db
2015-05-15 19:09:44 +00:00
DRC
3ebcc3206f __WORDSIZE doesn't seem to be available on platforms other than Mac or Linux, and best practices are for user-level code not to rely on it anyhow, since it's meant to be an internal macro. Fortunately, autoconf already has a way of determining the word size at configure time, so it can be passed into the compiler. This should work on any platform and has been tested on all of the Un*x platforms we support (Linux, Mac, FreeBSD, Solaris.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1550 632fc199-4ca6-4c93-a231-07263d6284db
2015-05-15 19:09:44 +00:00
DRC
83649cc19b Unless you define _ANSI_SOURCE, then putenv() on Mac is renamed to putenv$UNIX2003(), and this causes problems when trying to link an i386 iOS application (for the simulator) against the TurboJPEG static library. It's easiest to just use setenv() instead.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1548 632fc199-4ca6-4c93-a231-07263d6284db
2015-05-15 18:23:59 +00:00
DRC
44320a210b Unless you define _ANSI_SOURCE, then putenv() on Mac is renamed to putenv$UNIX2003(), and this causes problems when trying to link an i386 iOS application (for the simulator) against the TurboJPEG static library. It's easiest to just use setenv() instead.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1548 632fc199-4ca6-4c93-a231-07263d6284db
2015-05-15 18:23:59 +00:00
DRC
ed600dbb53 Fix a bug in the 64-bit Huffman encoder that Google discovered when encoding some very specific (and proprietary) aerial images using quality=98, an optimized Huffman table, and the ISLOW DCT. These images were causing the Huffman bit buffer to overflow, because the code for encoding the DC coefficient was using the equivalent of the 32-bit version of EMIT_BITS(). Thus, when 64-bit code was used, the DC coefficient code was not properly checking how many bits were in the buffer before attempting to add more bits to it. This issue appears to have existed in all versions of libjpeg-turbo.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1547 632fc199-4ca6-4c93-a231-07263d6284db
2015-05-06 22:41:12 +00:00
DRC
a8b6ea2f8d Fix a bug in the 64-bit Huffman encoder that Google discovered when encoding some very specific (and proprietary) aerial images using quality=98, an optimized Huffman table, and the ISLOW DCT. These images were causing the Huffman bit buffer to overflow, because the code for encoding the DC coefficient was using the equivalent of the 32-bit version of EMIT_BITS(). Thus, when 64-bit code was used, the DC coefficient code was not properly checking how many bits were in the buffer before attempting to add more bits to it. This issue appears to have existed in all versions of libjpeg-turbo.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1547 632fc199-4ca6-4c93-a231-07263d6284db
2015-05-06 22:41:12 +00:00
Kornel
0d2908a62b Merge pull request #173 from tmatth/jpegyuv_leak
jpegyuv: fix memory leak when path is invalid
2015-05-06 01:35:10 +02:00
Tristan Matthews
ee39375c85 jpegyuv: fix memory leak when path is invalid 2015-05-04 09:45:24 -04:00
Kornel
50d4088439 Merge pull request #172 from tmatth/jpegyuv_leak
jpegyuv: fix memory leak when @image_buffer allocation fails
2015-05-04 14:22:37 +02:00
Tristan Matthews
7e8ed0d448 jpegyuv: fix memory leak when @image_buffer allocation fails
Make sure @yuv_buffer is freed before return.
2015-05-03 21:35:39 -04:00
DRC
5698542e24 Restore backward compatibility with MSVC < 2010 (broken by r1541)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1543 632fc199-4ca6-4c93-a231-07263d6284db
2015-04-30 09:05:53 +00:00
DRC
96869f4b6e Restore backward compatibility with MSVC < 2010 (broken by r1541)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1543 632fc199-4ca6-4c93-a231-07263d6284db
2015-04-30 09:05:53 +00:00
Arjun Sreedharan
6c1538470f yuvjpeg: fix memory leak when @image_buffer allocation fails
Make sure @yuv_buffer is freed before return.

Signed-off-by: Arjun Sreedharan <arjun024@gmail.com>
2015-04-25 02:17:45 +05:30
DRC
e080e5d90b Oops. OS X doesn't define __WORDSIZE unless you include stdint.h, so apparently the Huffman codec hasn't ever been fully accelerated on 64-bit OS X.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1541 632fc199-4ca6-4c93-a231-07263d6284db
2015-04-22 08:43:04 +00:00
DRC
f64b36fd57 Oops. OS X doesn't define __WORDSIZE unless you include stdint.h, so apparently the Huffman codec hasn't ever been fully accelerated on 64-bit OS X.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1541 632fc199-4ca6-4c93-a231-07263d6284db
2015-04-22 08:43:04 +00:00
Vittorio Giovara
6b05623682 jpegtran: Do not leak the input and output buffers
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-04-16 16:30:34 +01:00
Frank Bossen
c716918d0a Fix previous commit
Define JERR_UNSUPPORTED_SUSPEND in correct header file
2015-04-08 01:36:02 +02:00
Frank Bossen
619c20d5e8 Scan optimization: return error when unable to copy data buffer
#166 describes an issue where I/O suspension is not properly handled in
scan optimization. Supporting I/O suspension may be difficult to
achieve here, thus return an error to make it explicit that I/O
suspension is unsupported.
2015-04-02 17:45:01 -05:00
Frank Bossen
f8a5b80cb0 cjpeg option for baseline quant tables
Add command line option -quant-baseline to cjpeg to force quantization
table entries to be in 1-255 range for JPEG baseline compatibility. See
related discussion in #145
2015-03-23 14:05:13 -05:00
Frank Bossen
cc11b90b22 Fix #153
Make sure BMP height and width don't exceed positive signed 32-bit
range even when 64-bit variables are being used.
2015-03-23 13:33:14 -05:00
DRC
48dde8baf1 Allow the executables and libraries outside of the sharedlib/ directory to be linked against msvcr*.dll instead of libcmt*.lib. This is reported to be necessary when building libjpeg-turbo for use with C#.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1539 632fc199-4ca6-4c93-a231-07263d6284db
2015-03-19 19:27:40 +00:00
DRC
89a3f970da Allow the executables and libraries outside of the sharedlib/ directory to be linked against msvcr*.dll instead of libcmt*.lib. This is reported to be necessary when building libjpeg-turbo for use with C#.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1539 632fc199-4ca6-4c93-a231-07263d6284db
2015-03-19 19:27:40 +00:00
Josh Aas
0629d2a00d Merge pull request #149 from pornel/constinput
Declare inbuffer `const`
2015-03-13 20:16:17 -07:00
Kornel
32ba839c57 Merge pull request #164 from tmatth/fix_16bit_input
rdpng: convert 16-bit input to 8-bit
2015-03-13 20:10:00 +00:00
Tristan Matthews
1da5cf4251 rdpng: convert 16-bit input to 8-bit
This is instead of assuming 8-bit input and producing borked images.
2015-03-13 13:23:45 -05:00
DRC
54e17215e6 Surround the usage of getenv() in the TurboJPEG API with #ifndef NO_GETENV so that developers can add -DNO_GETENV to the C flags when building for platforms that don't have getenv(). Currently this is known to be necessary when building for Windows Phone.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1537 632fc199-4ca6-4c93-a231-07263d6284db
2015-02-23 19:19:40 +00:00
DRC
feccdcf8c8 Surround the usage of getenv() in the TurboJPEG API with #ifndef NO_GETENV so that developers can add -DNO_GETENV to the C flags when building for platforms that don't have getenv(). Currently this is known to be necessary when building for Windows Phone.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1537 632fc199-4ca6-4c93-a231-07263d6284db
2015-02-23 19:19:40 +00:00
DRC
4e67edff34 If libjpeg-turbo is configured with a non-default prefix, such as /usr, then use the docdir variable defined by autoconf 2.60 and later, if available. This will, for instance, install the documentation under /usr/share/doc/libjpeg-turbo by default if prefix=/usr, unless docdir is overridden. When using earlier versions of autoconf, docdir is set to ${datadir}/doc, as it always has been.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1535 632fc199-4ca6-4c93-a231-07263d6284db
2015-02-23 19:06:44 +00:00
DRC
c69a1cd7a0 If libjpeg-turbo is configured with a non-default prefix, such as /usr, then use the docdir variable defined by autoconf 2.60 and later, if available. This will, for instance, install the documentation under /usr/share/doc/libjpeg-turbo by default if prefix=/usr, unless docdir is overridden. When using earlier versions of autoconf, docdir is set to ${datadir}/doc, as it always has been.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1535 632fc199-4ca6-4c93-a231-07263d6284db
2015-02-23 19:06:44 +00:00
DRC
cdd9ffb65b Enable silent build rules for the NASM objects, if the source is configured with automake 1.11 or later. NOTE: the build still spits out "error: ignoring unknown tag NASM" for each object, but unfortunately, if we remove "--tag NASM" from the command line, the build breaks under older versions of automake (it aborts with "unable to infer tagged configuration.")
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1534 632fc199-4ca6-4c93-a231-07263d6284db
2015-02-23 19:03:29 +00:00
DRC
3b7015d5d8 Enable silent build rules for the NASM objects, if the source is configured with automake 1.11 or later. NOTE: the build still spits out "error: ignoring unknown tag NASM" for each object, but unfortunately, if we remove "--tag NASM" from the command line, the build breaks under older versions of automake (it aborts with "unable to infer tagged configuration.")
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1534 632fc199-4ca6-4c93-a231-07263d6284db
2015-02-23 19:03:29 +00:00
DRC
39c8b666f9 Set the RPM and deb architecture properly on non-x86 platforms.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1531 632fc199-4ca6-4c93-a231-07263d6284db
2015-02-20 20:12:15 +00:00
DRC
cab2a8503e Set the RPM and deb architecture properly on non-x86 platforms.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1531 632fc199-4ca6-4c93-a231-07263d6284db
2015-02-20 20:12:15 +00:00
DRC
771ab19437 Extend the AltiVec VMX SIMD routines to support little endian PowerPC platforms.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1529 632fc199-4ca6-4c93-a231-07263d6284db
2015-02-20 19:57:21 +00:00
Frank Bossen
fbf0a5fbc5 Larger number of DC trellis candidates
See #147
Couldn't merge provided patch, so rewrote it. Also applies change to
quantize_trellis_arith()
2015-02-12 20:01:42 +01:00
fbossen
da75d56d6c Merge pull request #152 from jodiecunningham/master
Add pkg-config requirement to documentation
2015-02-12 19:31:49 +01:00
Frank Bossen
02939f53a0 Fix overflow issue #157
DCT coefficients are clipped when preprocessing for deringing is used
as they can overflow
2015-02-12 12:50:12 +01:00
Josh Aas
39b950076a Merge pull request #148 from pornel/libjpeg-turbo
Libjpeg turbo 1.4
2015-02-11 16:49:19 -08:00
Josh Aas
c0f5e0b702 Merge pull request #154 from pornel/gitignore
Expanded .gitignore
2015-02-11 16:47:13 -08:00
DRC
f5f176dd5d Come on, Cohaagen, you got what you want. Give these people air!
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1528 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-28 00:26:28 +00:00
DRC
eb319ed8a4 Come on, Cohaagen, you got what you want. Give these people air!
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1528 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-28 00:26:28 +00:00
DRC
3f7608348d Come on, Cohaagen, you got what you want. Give these people air!
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1527 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-28 00:25:43 +00:00
DRC
2e429094a4 Oops. Need to set the alpha channel when using TYPE_4BYTE_ABGR*. This has no bearing on the actual tests, but it prevents the PNG pre-encode reference images for those tests from being blank.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1526 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-27 21:00:22 +00:00
DRC
2c814300b5 Oops. Need to set the alpha channel when using TYPE_4BYTE_ABGR*. This has no bearing on the actual tests, but it prevents the PNG pre-encode reference images for those tests from being blank.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1525 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-27 20:59:16 +00:00
DRC
dcf9f15d6e Oops. Need to set the alpha channel when using TYPE_4BYTE_ABGR*. This has no bearing on the actual tests, but it prevents the PNG pre-encode reference images for those tests from being blank.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1525 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-27 20:59:16 +00:00
Kornel Lesiński
4966e1eec5 Const on getters 2015-01-24 16:28:31 +00:00
Kornel Lesiński
67753d1298 Const on simple getters and copy source 2015-01-24 16:28:29 +00:00
Kornel Lesiński
f446e5d5c7 Expanded .gitignore 2015-01-24 12:56:39 +00:00
Jodie Cunningham
0c8bf27a3c Add pkg-config requirement
Related to issue #99
2015-01-21 22:20:37 -06:00
DRC
5fc2839d45 Oops. The MIPS SIMD implementations of h2v1 and h2v2 upsampling were not checking for DSPr2 support, so running 'djpeg -nosmooth' on a non-DSPr2-enabled platform caused an "illegal instruction" error.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1523 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-21 17:42:28 +00:00
DRC
8b5a0093ee Oops. The MIPS SIMD implementations of h2v1 and h2v2 upsampling were not checking for DSPr2 support, so running 'djpeg -nosmooth' on a non-DSPr2-enabled platform caused an "illegal instruction" error.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1523 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-21 17:42:28 +00:00
DRC
701768b9c2 Introduce fast paths to speed up NULL color conversion somewhat, particularly when using 64-bit code; on the decompression side, the "slow path" also now use an approach similar to that of the compression side (with the component loop outside of the column loop rather than inside.) This is faster when using 32-bit code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1521 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-20 10:33:32 +00:00
DRC
0e94025ac7 Introduce fast paths to speed up NULL color conversion somewhat, particularly when using 64-bit code; on the decompression side, the "slow path" also now use an approach similar to that of the compression side (with the component loop outside of the column loop rather than inside.) This is faster when using 32-bit code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1521 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-20 10:33:32 +00:00
DRC
7a2bb989f2 Some clarifications (actually MIPS doesn't implement the float DCT/IDCT using SIMD instructions)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1517 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 07:16:53 +00:00
DRC
c60d662ee4 Some clarifications (actually MIPS doesn't implement the float DCT/IDCT using SIMD instructions)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1517 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 07:16:53 +00:00
DRC
a614b4af9f Make the floating point regression tests optional. It has been known for quite some time that these tests do not always generate the same results unless there is full SIMD coverage of the floating point algorithms in libjpeg-turbo. Further research reveals that there are basically three expected results: the results from our SSE SIMD extensions (which are slightly more accurate than the C code), results from the C code when running on a 32-bit FPU (or when using SSE instructions on an x86-64 CPU, which is the default with GCC), and results from the C code when running on a 64-bit FPU (which presumably uses double-precision arithmetic by default.) There is basically no way to determine which type of math will be used prior to run time, so it's best to just let the developers specify which result they expect on their particular system.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1515 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 06:53:36 +00:00
DRC
3af282df3c Make the floating point regression tests optional. It has been known for quite some time that these tests do not always generate the same results unless there is full SIMD coverage of the floating point algorithms in libjpeg-turbo. Further research reveals that there are basically three expected results: the results from our SSE SIMD extensions (which are slightly more accurate than the C code), results from the C code when running on a 32-bit FPU (or when using SSE instructions on an x86-64 CPU, which is the default with GCC), and results from the C code when running on a 64-bit FPU (which presumably uses double-precision arithmetic by default.) There is basically no way to determine which type of math will be used prior to run time, so it's best to just let the developers specify which result they expect on their particular system.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1515 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 06:53:36 +00:00
DRC
00eb5cdeab In the process of developing the AltiVec extensions, it was discovered that the normal regression tests aren't sufficient to test the behavior of the library with very small image sizes and when compressing from/decompressing to a subregion of a larger image buffer. Thus, an additional regression test was added that takes advantage of the tiled compression/decompression feature in tjbench. This is being back-ported to the 1.4.x branch primarily to verify that there are no lingering issues in the existing SIMD extensions.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1514 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 06:45:54 +00:00
DRC
dd7f03be56 In the process of developing the AltiVec extensions, it was discovered that the normal regression tests aren't sufficient to test the behavior of the library with very small image sizes and when compressing from/decompressing to a subregion of a larger image buffer. Thus, an additional regression test was added that takes advantage of the tiled compression/decompression feature in tjbench. This is being back-ported to the 1.4.x branch primarily to verify that there are no lingering issues in the existing SIMD extensions.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1514 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 06:45:54 +00:00
DRC
dc42b5460e Add separate pseudo-targets for the TurboJPEG and libjpeg regression tests, for those times when you just don't want to sit through 11 iterations of TJUnitTest to find out that your algorithm is broken.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1513 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 06:37:03 +00:00
DRC
cbc4b53169 Add separate pseudo-targets for the TurboJPEG and libjpeg regression tests, for those times when you just don't want to sit through 11 iterations of TJUnitTest to find out that your algorithm is broken.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1513 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 06:37:03 +00:00
DRC
ec86e2a9ad Bump copyright year
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1512 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 06:34:08 +00:00
DRC
ffd9d052f6 Bump copyright year
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1512 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 06:34:08 +00:00
DRC
999ba67714 Add the ability to benchmark YCCK JPEG compression/decompression. This is particularly useful since that is the only way to test the performance of the "plain" upsampling routines, which are accelerated on some platforms.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1511 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 06:29:52 +00:00
DRC
cbc9970ecb Add the ability to benchmark YCCK JPEG compression/decompression. This is particularly useful since that is the only way to test the performance of the "plain" upsampling routines, which are accelerated on some platforms.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1511 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 06:29:52 +00:00
DRC
4d1d6adfaa 1.4.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1510 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 06:17:05 +00:00
DRC
2b7a391672 1.4.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1510 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 06:17:05 +00:00
DRC
2e2ea8e02c Document AltiVec extensions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1508 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 03:21:05 +00:00
DRC
246b01bb0a Revert r1506 (we actually are generating columns with the IDCT, so the naming makes sense in retrospect); further de-confusification in the forward DCT
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1507 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-16 03:13:16 +00:00
DRC
c4e3c361d7 De-confusify the variable names a bit -- "out" represents the output of the IDCT kernel, so use "final" to represent the packed data that will be stored to memory.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1506 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-15 08:51:31 +00:00
DRC
2ab5ea6c48 Add the ability to benchmark YCCK JPEG compression/decompression. This is particularly useful since that is the only way to test the performance of the "plain" upsampling routines, which are accelerated on some platforms.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1505 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-14 19:39:01 +00:00
DRC
c641cddb80 AltiVec SIMD implementation of H2V1 and H2V2 plain upsampling (used only when decompressing YCCK images with fast upsampling enabled.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1504 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-14 15:41:11 +00:00
DRC
86af36aebc AltiVec SIMD implementation of H2V1 and H2V2 merged upsampling
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1503 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-14 13:27:32 +00:00
DRC
11c4010c3c Fix an overread detected by valgrind
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1502 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-14 13:07:06 +00:00
DRC
2517ef72ed Fix bugs in the AltiVec fancy upsampling routines uncovered during additional testing with small image sizes. Since the input width is half the output width, the upsampler should only write a second 16-byte chuck if there are more than 8 input columns left. Additionally, if the width is < 16, then we need to insert a dummy sample (the SSE2 code does this as well, but I neglected to port that portion of the code for some reason.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1501 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-14 10:45:31 +00:00
DRC
9ab2c1071b In the process of developing the AltiVec extensions, it was discovered that the normal regression tests aren't sufficient to test the behavior of the library with very small image sizes and when compressing from/decompressing to a subregion of a larger image buffer. Thus, an additional regression test was added that takes advantage of the tiled compression/decompression feature in tjbench.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1500 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-14 08:42:29 +00:00
DRC
cbcb53617b Fix a bug in the AltiVec downsampling routines uncovered during additional testing with small image sizes. Since the output width is half the input width, the downsampler should only read a second 16-byte chunk if there are more than 8 output columns left.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1499 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-14 08:31:54 +00:00
DRC
ada430bb3d Make the formatting and naming of variables and constants more consistent
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1498 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-13 11:49:15 +00:00
DRC
406bb01ca2 Make the formatting and naming of variables and constants more consistent
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1497 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-13 11:47:20 +00:00
DRC
a6a24c270e Make the formatting and naming of variables and constants more consistent
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1496 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-13 10:00:12 +00:00
DRC
52a4ec6c8a AltiVec SIMD implementation of H2V1 and H2V2 fancy upsampling
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1495 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-13 09:02:29 +00:00
Josh Aas
0aea1da9f0 Re-order links. 2015-01-12 12:18:58 -08:00
DRC
dde3b9e4be git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1494 632fc199-4ca6-4c93-a231-07263d6284db 2015-01-12 08:36:37 +00:00
DRC
8f7f49a014 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1494 632fc199-4ca6-4c93-a231-07263d6284db 2015-01-12 08:36:37 +00:00
DRC
cf78941db4 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1493 632fc199-4ca6-4c93-a231-07263d6284db 2015-01-12 08:36:25 +00:00
DRC
51eba06011 Minor code readability tweak
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1492 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-11 07:38:35 +00:00
DRC
d71a6e0c25 Use intrinsics for loading aligned data in the IDCT functions. This has no effect on performance, but it makes it more obvious what that code is doing.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1491 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-11 06:34:47 +00:00
DRC
f0abd46c3b Bump copyright year
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1490 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-11 00:58:44 +00:00
DRC
ac4daa7716 AltiVec SIMD implementation of YCC-to-RGB color conversion
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1489 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-10 22:56:26 +00:00
DRC
af69295d3f Fix minor issue in code comments
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1488 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-10 12:25:42 +00:00
DRC
6aed11293d Fix minor issue in code comments
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1487 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-10 12:10:08 +00:00
DRC
a5005751a3 Simplify the code somewhat. It actually wasn't necessary to have a "fast path" and a "medium path"-- they perform the same.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1486 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-10 12:09:11 +00:00
DRC
25347882ed Overhaul the AltiVec vector loading code in the compression-side colorspace conversion routines. The existing code was sometimes overreading the source buffer (at least according to valgrind), and it was necessary to increase the complexity of the code in order to prevent this without significantly compromising performance.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1485 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-10 11:32:36 +00:00
DRC
8de75d0f57 Fix minor issue in code comments
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1484 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-08 10:42:54 +00:00
DRC
22048207ea AltiVec SIMD implementation of 2x1 and 2x2 downsampling
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1483 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-08 06:18:33 +00:00
Kornel Lesiński
85e2e0f9c2 Declare inbuffer const 2015-01-08 00:53:35 +00:00
Kornel Lesiński
f2ec34de52 Merge branch 'libjpeg-turbo'
* libjpeg-turbo: (39 commits)
  Oops.  Delete the duplicate copy of [lib]turbojpeg.dll in the binary directory when uninstalling the package.
  AltiVec SIMD implementation of sample conversion and integer quantization
  Document the fact that the AltiVec implementation uses the same modified algorithms as the SSE2 implementation
  Use intrinsics for loading/storing data in the DCT/IDCT functions.  This has no effect on the performance of the aligned loads/stores, but it makes it more obvious what that code is doing.  Using intrinsics for the unaligned stores in the inverse DCT functions increases overall decompression performance by 1-2%.
  AltiVec SIMD implementation of RGB-to-Grayscale color conversion
  Remove unneeded code;  Make sure jccolor-altivec.o will be rebuilt if jccolext-altivec.c changes.
  AltiVec SIMD implementation of RGB-to-YCC color conversion
  Make test a phony target so things don't go haywire if there is a file named test.c in the current directory.
  Maintain the traditional order of the regression tests while allowing the TurboJPEG and libjpeg portions to be executed separately
  Make comments more consistent
  Add a "quicktest" pseudo-target, for those times when you just don't want to sit through 11 iterations of TJUnitTest.
  Cosmetic tweaks to the PowerPC SIMD stubs
  Split AltiVec algorithms into separate files for ease of maintenance;  Rename constants using lowercase so they are not confused with macros
  Optimizations to the AltiVec DCT algorithms (pre-compute constants and combine multiply/add operations)
  AltiVec SIMD implementation of slow integer inverse DCT
  Use macros to allocate constants statically, rather than reading them from a table using vec_splat*().  This improves code readability and probably improves performance a bit as well.
  Swap the order of the IFAST and ISLOW FDCT functions so that it matches the order of the prototypes in jsimd.h and the stubs in jsimd_powerpc.c.
  Include ARMv8 binaries when generating a combined OS X/iOS package using 'make iosdmg'
  In the output of the configure script, indicate whether gas-preprocessor.pl is being used along with the assembler.
  Modify the ARM64 assembly file so that it uses only syntax that the clang assembler in XCode 5.x can understand.  These changes should all be cosmetic in nature-- they do not change the meaning or readability of the code nor the ability to build it for Linux.  Actually, the code is now more in compliance with the ARM64 programming manual.  In addition to these changes, there were a couple of instructions that clang simply doesn't support, so gas-preprocessor.pl was modified so that it now converts those into equivalent instructions that clang can handle.
  ...

Conflicts:
	BUILDING.txt
	ChangeLog.txt
	cjpeg.c
	jpegtran.c
2015-01-07 23:33:49 +00:00
DRC
2b223a034b Oops. Delete the duplicate copy of [lib]turbojpeg.dll in the binary directory when uninstalling the package.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1482 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-07 05:47:08 +00:00
DRC
5e8fd24131 Oops. Delete the duplicate copy of [lib]turbojpeg.dll in the binary directory when uninstalling the package.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1482 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-07 05:47:08 +00:00
DRC
daab3e4ec4 Oops. Delete the duplicate copy of [lib]turbojpeg.dll in the binary directory when uninstalling the package.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1477 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-07 01:19:49 +00:00
DRC
c4930d8b0d Oops. Delete the duplicate copy of [lib]turbojpeg.dll in the binary directory when uninstalling the package.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1477 632fc199-4ca6-4c93-a231-07263d6284db
2015-01-07 01:19:49 +00:00
Josh Aas
71441f322e Get rid of changelog file that we don't update. 2014-12-30 13:59:44 -06:00
Josh Aas
aa20343efd Update README.md with 3.0 announcement 2014-12-30 13:58:28 -06:00
Frank Bossen
7faa703ebf Remove unused variables
Fixes #142
2014-12-30 08:31:42 +01:00
Josh Aas
e4189accd3 Add instructions for building from release tarball, no autoreconf required. 2014-12-29 18:55:10 -06:00
Frank Bossen
5ba6c7effb Check range of integer values in PPM text file
Add checks in PPM text file reading to make sure values are within the
specified range.
Fixes #141
2014-12-29 19:42:20 +01:00
Frank Bossen
bf506e11b7 Check image size when reading targa file
Throw an error when image width or height is 0 when reading a targa file
Solves #140
2014-12-29 18:38:36 +01:00
Frank Bossen
cdb6c34e1c Fix overflow issue in DCT
Replace add/sub with their saturating equivalent to avoid overflow.
Should resolve #139
2014-12-29 18:23:51 +01:00
Frank Bossen
576eef0509 Fix compilation issue
Issue arose when C_ARITH_CODING_SUPPORTED was undefined
2014-12-26 17:49:25 -05:00
DRC
577ecd93f1 AltiVec SIMD implementation of sample conversion and integer quantization
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1474 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-23 04:14:54 +00:00
DRC
f654cf0e2c AltiVec SIMD implementation of sample conversion and integer quantization
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1474 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-23 04:14:54 +00:00
DRC
ff30c63934 Document the fact that the AltiVec implementation uses the same modified algorithms as the SSE2 implementation
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1473 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-23 02:42:59 +00:00
DRC
70d831dc0d Document the fact that the AltiVec implementation uses the same modified algorithms as the SSE2 implementation
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1473 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-23 02:42:59 +00:00
DRC
45453085e7 Use intrinsics for loading/storing data in the DCT/IDCT functions. This has no effect on the performance of the aligned loads/stores, but it makes it more obvious what that code is doing. Using intrinsics for the unaligned stores in the inverse DCT functions increases overall decompression performance by 1-2%.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1472 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 16:04:17 +00:00
DRC
510e67c542 Use intrinsics for loading/storing data in the DCT/IDCT functions. This has no effect on the performance of the aligned loads/stores, but it makes it more obvious what that code is doing. Using intrinsics for the unaligned stores in the inverse DCT functions increases overall decompression performance by 1-2%.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1472 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 16:04:17 +00:00
DRC
b1fec4ff98 AltiVec SIMD implementation of RGB-to-Grayscale color conversion
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1471 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 14:10:33 +00:00
DRC
243aba148e AltiVec SIMD implementation of RGB-to-Grayscale color conversion
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1471 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 14:10:33 +00:00
DRC
5976e42550 Remove unneeded code; Make sure jccolor-altivec.o will be rebuilt if jccolext-altivec.c changes.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1470 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 13:57:30 +00:00
DRC
2a4e7f1bc3 Remove unneeded code; Make sure jccolor-altivec.o will be rebuilt if jccolext-altivec.c changes.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1470 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 13:57:30 +00:00
DRC
62bae204f4 AltiVec SIMD implementation of RGB-to-YCC color conversion
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1469 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 13:42:26 +00:00
DRC
6a244cb514 AltiVec SIMD implementation of RGB-to-YCC color conversion
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1469 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 13:42:26 +00:00
DRC
8163aad6cc Make test a phony target so things don't go haywire if there is a file named test.c in the current directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1468 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 13:41:18 +00:00
DRC
2ee9faef10 Make test a phony target so things don't go haywire if there is a file named test.c in the current directory.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1468 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 13:41:18 +00:00
DRC
99f125ec07 Maintain the traditional order of the regression tests while allowing the TurboJPEG and libjpeg portions to be executed separately
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1467 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 13:15:08 +00:00
DRC
a07787f423 Maintain the traditional order of the regression tests while allowing the TurboJPEG and libjpeg portions to be executed separately
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1467 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 13:15:08 +00:00
DRC
13af139624 Make comments more consistent
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1466 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 01:38:01 +00:00
DRC
ace9d06b9e Make comments more consistent
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1466 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 01:38:01 +00:00
DRC
87fd253bd0 Add a "quicktest" pseudo-target, for those times when you just don't want to sit through 11 iterations of TJUnitTest.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1465 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 01:32:51 +00:00
DRC
752ee33e86 Add a "quicktest" pseudo-target, for those times when you just don't want to sit through 11 iterations of TJUnitTest.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1465 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 01:32:51 +00:00
DRC
bf8a5feb79 Cosmetic tweaks to the PowerPC SIMD stubs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1464 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 01:10:11 +00:00
DRC
d44ffd9db0 Cosmetic tweaks to the PowerPC SIMD stubs
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1464 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 01:10:11 +00:00
DRC
535674b1b8 Split AltiVec algorithms into separate files for ease of maintenance; Rename constants using lowercase so they are not confused with macros
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1463 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 01:00:42 +00:00
DRC
598cd994f3 Split AltiVec algorithms into separate files for ease of maintenance; Rename constants using lowercase so they are not confused with macros
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1463 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-22 01:00:42 +00:00
Frank Bossen
fa628eff6a Refine rate estimation in trellis quant
Account for the more elaborate context modeling used for coding the DC
coefficient differences
2014-12-21 21:36:06 +01:00
Frank Bossen
933289f509 Clean up trellis code
Avoid code duplication in computation of DC delta rate in trellis
quantization for arithmetic coding
2014-12-21 12:46:43 +01:00
Frank Bossen
888d4075ee Refine rate estimate in trellis
Take into account cutoff parameter to switch between sets of contexts
for rate estimation in arithmetic coding version of trellis quantization
2014-12-21 10:38:50 +01:00
Frank Bossen
4802ddd7f7 Partial fix for #138
Initial implementation of trellis quantization for arithmetic coding.
The rate computation does not yet implement all rules of the entropy
coder and may thus be suboptimal.
2014-12-21 01:52:41 +01:00
Josh Aas
9d8efde83b Take upstream r1455 to fix issue #95. 2014-12-20 13:21:16 -06:00
DRC
c9da78525b Optimizations to the AltiVec DCT algorithms (pre-compute constants and combine multiply/add operations)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1462 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-20 03:32:59 +00:00
DRC
ddd54ff8a8 Optimizations to the AltiVec DCT algorithms (pre-compute constants and combine multiply/add operations)
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1462 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-20 03:32:59 +00:00
Frank Bossen
8a178239bd Partial fix for #138
Fix pass number computation in scan optimization to support case where
Huffman table optimization is not done, e.g. when arithmetic coding is
used
Enable combination of arithmetic coding and scan optimization
(previously disabled)
2014-12-20 04:23:39 +01:00
Frank Bossen
6c08ceb2ef Temp fix for #138
Disable scan optimization and trellis quantization when arithmetic
coding is used
2014-12-20 04:03:14 +01:00
DRC
0691162a8b AltiVec SIMD implementation of slow integer inverse DCT
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1461 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-20 01:17:39 +00:00
DRC
0d435698f4 AltiVec SIMD implementation of slow integer inverse DCT
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1461 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-20 01:17:39 +00:00
DRC
9cb418d221 Use macros to allocate constants statically, rather than reading them from a table using vec_splat*(). This improves code readability and probably improves performance a bit as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1460 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-20 01:16:26 +00:00
DRC
63c1674ebc Use macros to allocate constants statically, rather than reading them from a table using vec_splat*(). This improves code readability and probably improves performance a bit as well.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1460 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-20 01:16:26 +00:00
DRC
935d1d6398 Swap the order of the IFAST and ISLOW FDCT functions so that it matches the order of the prototypes in jsimd.h and the stubs in jsimd_powerpc.c.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1459 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-20 01:14:38 +00:00
DRC
864600d707 Swap the order of the IFAST and ISLOW FDCT functions so that it matches the order of the prototypes in jsimd.h and the stubs in jsimd_powerpc.c.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1459 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-20 01:14:38 +00:00
Frank Bossen
4ac7101056 No scan opt if custom scan
Disables scan pattern optimization (JBOOLEAN_OPTIMIZE_SCANS extension
parameter) if a custom scan pattern is provided.
Fixes #137
2014-12-20 00:48:07 +01:00
DRC
86ae5913b1 Include ARMv8 binaries when generating a combined OS X/iOS package using 'make iosdmg'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1458 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 18:28:00 +00:00
DRC
4efb529bb7 Include ARMv8 binaries when generating a combined OS X/iOS package using 'make iosdmg'
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1458 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 18:28:00 +00:00
DRC
f8e8039204 In the output of the configure script, indicate whether gas-preprocessor.pl is being used along with the assembler.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1457 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 18:25:03 +00:00
DRC
aa805bc89f Modify the ARM64 assembly file so that it uses only syntax that the clang assembler in XCode 5.x can understand. These changes should all be cosmetic in nature-- they do not change the meaning or readability of the code nor the ability to build it for Linux. Actually, the code is now more in compliance with the ARM64 programming manual. In addition to these changes, there were a couple of instructions that clang simply doesn't support, so gas-preprocessor.pl was modified so that it now converts those into equivalent instructions that clang can handle.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1456 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 18:23:52 +00:00
DRC
81a64020e3 Remove reference to install.txt, which we do not include from the IJG distribution
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1455 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 18:19:31 +00:00
DRC
1fd5232cb6 Document that the ARMv8/iOS issues are now fixed
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1454 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 18:18:46 +00:00
DRC
d51e6c2f6b Document that the ARMv8/iOS issues are now fixed
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1454 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 18:18:46 +00:00
DRC
9af41ac451 Remove reference to install.txt, which we do not include from the IJG distribution
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1453 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 18:07:04 +00:00
DRC
6842c7c023 Remove reference to install.txt, which we do not include from the IJG distribution
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1453 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 18:07:04 +00:00
Josh Aas
ed363b90ec Merge pull request #136 from tony2001/master
port upstream fix for local buffer overflow
2014-12-19 11:45:08 -06:00
DRC
6b4fa1bba7 Include ARMv8 binaries when generating a combined OS X/iOS package using 'make iosdmg'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1452 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 17:34:30 +00:00
DRC
6e6b28c3ce Include ARMv8 binaries when generating a combined OS X/iOS package using 'make iosdmg'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1452 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 17:34:30 +00:00
DRC
376fac2dc8 In the output of the configure script, indicate whether gas-preprocessor.pl is being used along with the assembler.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1451 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 15:40:21 +00:00
DRC
b9c4b58ab2 In the output of the configure script, indicate whether gas-preprocessor.pl is being used along with the assembler.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1451 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 15:40:21 +00:00
DRC
a05011ddbc Modify the ARM64 assembly file so that it uses only syntax that the clang assembler in XCode 5.x can understand. These changes should all be cosmetic in nature-- they do not change the meaning or readability of the code nor the ability to build it for Linux. Actually, the code is now more in compliance with the ARM64 programming manual. In addition to these changes, there were a couple of instructions that clang simply doesn't support, so gas-preprocessor.pl was modified so that it now converts those into equivalent instructions that clang can handle.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1450 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 15:36:39 +00:00
DRC
62999d7708 Modify the ARM64 assembly file so that it uses only syntax that the clang assembler in XCode 5.x can understand. These changes should all be cosmetic in nature-- they do not change the meaning or readability of the code nor the ability to build it for Linux. Actually, the code is now more in compliance with the ARM64 programming manual. In addition to these changes, there were a couple of instructions that clang simply doesn't support, so gas-preprocessor.pl was modified so that it now converts those into equivalent instructions that clang can handle.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1450 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 15:36:39 +00:00
DRC
a546be5141 Add iOS architectures to the shared libraries generated by the Mac/iOS packaging system. I have no idea how useful this is for "standard" iOS application development, but it is useful in a jailbreak environment, and iOS 8 supposedly allows shared libs in "official" apps as well.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1448 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 10:46:00 +00:00
DRC
b4ecf9c867 Add iOS architectures to the shared libraries generated by the Mac/iOS packaging system. I have no idea how useful this is for "standard" iOS application development, but it is useful in a jailbreak environment, and iOS 8 supposedly allows shared libs in "official" apps as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1447 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 10:44:09 +00:00
DRC
ceb552a9c9 Add iOS architectures to the shared libraries generated by the Mac/iOS packaging system. I have no idea how useful this is for "standard" iOS application development, but it is useful in a jailbreak environment, and iOS 8 supposedly allows shared libs in "official" apps as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1447 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 10:44:09 +00:00
DRC
75ca8cf867 1.4.0
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1446 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 09:35:11 +00:00
DRC
e59196dbdf 1.4.0
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1446 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-19 09:35:11 +00:00
DRC
6cb7f40a18 AltiVec SIMD implementation of fast integer inverse DCT
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1445 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-18 10:12:29 +00:00
DRC
c7dadd2d0b AltiVec SIMD implementation of fast integer inverse DCT
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1445 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-18 10:12:29 +00:00
DRC
040435afb9 Further cleanup of the AltiVec forward DCT code:
-- Use macros to represent the fast FDCT constants, to facilitate comparing the AltiVec implementation of the algorithm with the SSE2 implementation.
-- Rename slow FDCT constants for consistency.
-- Use vec_sra() in all cases in the slow FDCT code.  The SSE2 implementation uses psraw, which is an arithmetic shift, so we need to do likewise with AltiVec.  Using vec_sr() hasn't caused any problems yet, but it is conceivable that it might cause different behavior in certain corner cases.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1444 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-18 09:49:39 +00:00
DRC
7475e59637 Further cleanup of the AltiVec forward DCT code:
-- Use macros to represent the fast FDCT constants, to facilitate comparing the AltiVec implementation of the algorithm with the SSE2 implementation.
-- Rename slow FDCT constants for consistency.
-- Use vec_sra() in all cases in the slow FDCT code.  The SSE2 implementation uses psraw, which is an arithmetic shift, so we need to do likewise with AltiVec.  Using vec_sr() hasn't caused any problems yet, but it is conceivable that it might cause different behavior in certain corner cases.


git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1444 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-18 09:49:39 +00:00
DRC
fb0c394037 AltiVec SIMD implementation of slow integer forward DCT; Clean up fast integer forward DCT code so that it is easier to see how it derives from the SSE2 code and to make it play more nicely with the slow FDCT code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1443 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-17 08:04:39 +00:00
DRC
25e40dc42c AltiVec SIMD implementation of slow integer forward DCT; Clean up fast integer forward DCT code so that it is easier to see how it derives from the SSE2 code and to make it play more nicely with the slow FDCT code.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1443 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-17 08:04:39 +00:00
DRC
e1ac40104c Fix cosmetic issues in AltiVec comments
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1442 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-17 08:00:29 +00:00
DRC
296c8bad7e Fix cosmetic issues in AltiVec comments
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1442 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-17 08:00:29 +00:00
Frank Bossen
8b7ffebe42 Fix filename in C file header 2014-12-17 07:53:18 +09:00
Frank Bossen
a6b1bda094 Consider vertical gradient in DC trellis
Add extension parameter JFLOAT_TRELLIS_DELTA_DC_WEIGHT that controls
how distortion is calculated in DC trellis quantization. The parameter
defines weighting between actual distortion of DC and distortion of
vertical gradient of DC.
By default the parameter is 0.0 and has no effect.
Addresses #117
2014-12-17 07:51:12 +09:00
Antony Dovgal
a06aeb25f2 port upstream fix for local buffer overflow
r1425

Fix Huffman local buffer overrun discovered by Debian developers when
attempting to transform a junk image using ImageMagick:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768369
2014-12-16 13:52:33 +03:00
DRC
fa01dcb519 Partially fix 'make dist'
This incorporates an upstream fix to add jdmrg565.c to the tarball created
by 'make dist', as well as a fix to add the new jcmaster.h file to same.  There
are still some mozjpeg-specific files that aren't added when doing 'make dist'.
I'll let someone else worry about those.  This patch mainly ensures that any
files that might be eventually adopted upstream are included.
2014-12-14 06:00:40 -06:00
DRC
166aa51f5f Merge pull request #134 from dcommander/unit_test_fixes
Unit test fixes
2014-12-14 05:52:36 -06:00
DRC
37d08441ab Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1441 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-14 11:47:49 +00:00
DRC
3f764b7253 Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1441 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-14 11:47:49 +00:00
DRC
1e2f49619e Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1440 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-14 11:47:08 +00:00
DRC
6b99f99b88 Fix 'make dist'
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1440 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-14 11:47:08 +00:00
DRC
3bc0839d7f Restore full bitwise compatibility with libjpeg-turbo when -revert is used
mozjpeg should produce identical output to libjpeg-turbo when the JCP_FASTEST
compression profile is used.  That means that that profile needs to revert to
the default libjpeg quantization/Huffman tables as well as disable mozjpeg's
duplicate table checking feature.  This patch also adds -revert to any instance
of cjpeg and jpegtran called by 'make test' (or ctest on Windows), so that
those tests actually work again.  The tests aren't useful for regression
testing the mozjpeg extensions, but at least they can now be used to regression
test the underlying code.
2014-12-14 05:31:57 -06:00
DRC
7432a53e2b Introduce a TJ_REVERT environment variable, which reverts the behavior of the TurboJPEG API to libjpeg[-turbo] defaults.
This serves the same purpose as the -revert switch in cjpeg.  It is primarily
included for testing purposes.
2014-12-14 04:43:02 -06:00
DRC
f645002fb6 Fix double free of cinfo->master caused by the extension framework modifications
There was an oversight in the extension framework.  jpeg_start_compress() can
be called multiple times between the time that a compress structure is created
and the time it is destroyed.  If this happened, then the following sequence
would occur:

-- heap alloc of master struct within jpeg_create_compress()
-- heap free of master struct within jinit_c_master_control()
-- static alloc of extended master struct (JPOOL_IMAGE) within
   jinit_c_master_control()
-- free extended master struct in jpeg_finish_compress()
-- jinit_c_master_control() now sees that cinfo->master is set and tries to
   free it, even though it has already been freed.  Chaos ensues.

The fix involved breaking out the extended master struct into a header so that
jpeg_create_compress() can go ahead and allocate it to the correct size, thus
eliminating the need to free and reallocate it in jinit_c_master_control().
Further, the master struct is now created in the permanent pool, so it will
survive until the compression struct is destroyed.  Further,
jinit_c_master_control() now resets all fields in the master struct that
are not related to the extension parameters.
2014-12-14 03:59:44 -06:00
fbossen
0123dd2472 Merge pull request #133 from dcommander/jpeg_set_compress_profile
Change JBOOLEAN_USE_MOZ_DEFAULTS to an integer parameter
2014-12-14 17:21:21 +09:00
DRC
668bb847d5 Rename jccompat.c to jcext.c
"jcext" is a bit more descriptive, since this code is primarily intended to
extend the libjpeg API.  It does so in a backward-ABI-compatible manner, but
"jccompat" could be misinterpreted to mean that the code is providing backward
compatibility at the code level..
2014-12-14 02:02:26 -06:00
DRC
3e2cf6909c Convert JBOOLEAN_USE_MOZ_DEFAULTS into an integer "compression profile" parameter
This eliminates JBOOLEAN_USE_MOZ_DEFAULTS and replaces it with
JINT_COMPRESS_PROFILE, a more flexible and descriptive parameter.  Currently,
this new parameter works in much the same way as the old-- it changes the
behavior of jpeg_set_defaults().  It currently supports only two values
(max. compression, i.e. mozjpeg defaults, and fastest, i.e. libjpeg-turbo
defaults), but it can be extended in the future with additional profiles that
balance compression ratio with performance.
2014-12-14 01:56:26 -06:00
Frank Bossen
f8dd3830eb Fix trellis / no Huffman opt combination
Enabling trellis and disabling Huffman table optimization was causing a
"Bogus buffer control mode" error as reported in #111
2014-12-09 21:24:53 -05:00
Frank Bossen
c51334f4d0 Add clarification re usage of scan optimization 2014-12-09 16:22:40 -05:00
DRC
da6b7c2ede Fix typos in test names
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1439 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-08 23:23:41 +00:00
DRC
4c773cff16 Fix typos in test names
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1439 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-08 23:23:41 +00:00
DRC
779f5622aa Fix typos in test names
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1438 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-08 23:22:53 +00:00
Josh Aas
6d172465cc Drop executable bit for README-turbo.txt 2014-12-08 13:28:32 -06:00
Frank Bossen
fa6d5a29da Check quantization table index
Fixes #130
2014-12-07 23:10:52 -05:00
Frank Bossen
79929eae12 Fix argument name mismatch #128 2014-12-07 23:10:52 -05:00
Josh Aas
ef62d51374 Merge pull request #126 from dcommander/doc-tweaks
Tweak mozjpeg README file
2014-12-07 11:18:20 -06:00
Josh Aas
2c19e8cb79 Merge pull request #131 from tmatth/unused_but_set
jpegyuv: fix unused but set warning
2014-12-07 10:30:52 -06:00
Josh Aas
00ace7679a Bump mozjpeg version to 3.0 2014-12-07 10:15:45 -06:00
Tristan Matthews
775862809b jpegyuv: fix unused but set warning 2014-12-07 02:49:17 -05:00
Kornel Lesiński
0cbef40560 Remove unused code
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1436 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-05 01:36:34 +00:00
Kornel Lesiński
aed7d4661e Fix build when INPUT_SMOOTHING_SUPPORTED is undefined
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1434 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-05 01:36:27 +00:00
DRC
bbaa3afe23 Wordsmith mozjpeg README file
This includes more descriptive text for the project summary (the same
text that is in the package descriptions), a more thorough description of the
libjpeg API extensibility framework, reformatting to improve readability
(particularly on 80-column terminals), and numerous grammar tweaks.
2014-12-01 15:50:00 -06:00
DRC
727fbf0183 Remove unused code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1437 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-01 20:13:12 +00:00
DRC
a29d6b4113 Remove unused code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1437 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-01 20:13:12 +00:00
DRC
41d4acba88 Fix build when INPUT_SMOOTHING_SUPPORTED is undefined
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1435 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-01 19:54:15 +00:00
DRC
b329697ded Fix build when INPUT_SMOOTHING_SUPPORTED is undefined
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1435 632fc199-4ca6-4c93-a231-07263d6284db
2014-12-01 19:54:15 +00:00
Frank Bossen
413ac73d98 Add documentation for mozjpeg
A brief explanation is provided for the parameters introduced in
mozjpeg
2014-11-29 19:20:33 -05:00
Frank Bossen
faa4c44453 Use single parameter for DC scan opt mode
JBOOLEAN_ONE_DC_SCAN and JBOOLEAN_SEP_DC_SCAN are merged into a single
parameter JINT_DC_SCAN_OPT_MODE
Default behavior is modified to use one DC scan per component
2014-11-29 19:15:46 -05:00
Frank Bossen
5dae26de7c Remove access to parameter that shouldn't be exposed 2014-11-28 15:06:30 -05:00
Frank Bossen
2a41c84487 Fix C comment style 2014-11-28 08:10:20 -05:00
Frank Bossen
675ad04262 Merge branch 'qtable'
Conflicts:
	jcparam.c (resolved)
2014-11-27 16:16:35 -05:00
Frank Bossen
30ef0977be Clean up qtable code and change defaults 2014-11-27 16:11:57 -05:00
DRC
de852420c0 Some software also needs the FAR macro. Ugh. Also wordsmithing.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1433 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-25 10:09:33 +00:00
DRC
f854e668e6 Some software also needs the FAR macro. Ugh. Also wordsmithing.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1432 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-25 10:07:43 +00:00
DRC
2a6b8316fc Some software also needs the FAR macro. Ugh. Also wordsmithing.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1432 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-25 10:07:43 +00:00
DRC
c1afc7921d Restore the JPP() and JMETHOD() macros. Even though libjpeg-turbo doesn't use them anymore, other software apparently does:
https://bugzilla.redhat.com/show_bug.cgi?id=1164815
https://bugs.kde.org/show_bug.cgi?id=340944
https://bugzilla.mozilla.org/show_bug.cgi?id=1093615


git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1431 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-25 09:48:54 +00:00
DRC
86496e9b58 Restore the JPP() and JMETHOD() macros. Even though libjpeg-turbo doesn't use them anymore, other software apparently does:
https://bugzilla.redhat.com/show_bug.cgi?id=1164815
https://bugs.kde.org/show_bug.cgi?id=340944
https://bugzilla.mozilla.org/show_bug.cgi?id=1093615


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1430 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-25 09:48:15 +00:00
DRC
e2dd3e3e5c Restore the JPP() and JMETHOD() macros. Even though libjpeg-turbo doesn't use them anymore, other software apparently does:
https://bugzilla.redhat.com/show_bug.cgi?id=1164815
https://bugs.kde.org/show_bug.cgi?id=340944
https://bugzilla.mozilla.org/show_bug.cgi?id=1093615


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1430 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-25 09:48:15 +00:00
fbossen
c5c47edfd2 Merge pull request #123 from dcommander/cjpeg-djpeg-jpegtran-version
Print the library version and exit whenever -version is passed to cjpeg, djpeg, or jpegtran
2014-11-24 16:59:54 -05:00
DRC
9fb04f5945 Oops. Include the tjPlane*() functions in the mapfile so that they are exposed in the shared library on ELF systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1429 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 23:56:26 +00:00
DRC
0f4469c52f Oops. Include the tjPlane*() functions in the mapfile so that they are exposed in the shared library on ELF systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1429 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 23:56:26 +00:00
DRC
a9cad80d19 Oops. Include the tjPlane*() functions in the mapfile so that they are exposed in the shared library on ELF systems.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1428 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 23:55:25 +00:00
DRC
bb383b4175 Fix Huffman local buffer overrun discovered by Debian developers when attempting to transform a junk image using ImageMagick:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768369


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1427 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 22:24:41 +00:00
DRC
1d3037ebe1 Fix Huffman local buffer overrun discovered by Debian developers when attempting to transform a junk image using ImageMagick:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768369


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1426 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 22:09:30 +00:00
DRC
3d30031772 Fix Huffman local buffer overrun discovered by Debian developers when attempting to transform a junk image using ImageMagick:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768369


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1427 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 22:24:41 +00:00
DRC
402a715f82 Fix Huffman local buffer overrun discovered by Debian developers when attempting to transform a junk image using ImageMagick:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768369


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1426 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 22:09:30 +00:00
DRC
f03d5df238 Fix Huffman local buffer overrun discovered by Debian developers when attempting to transform a junk image using ImageMagick:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768369


git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1425 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 22:07:05 +00:00
DRC
f20cba1bb0 Print the library version and exit whenever -version is passed to cjpeg, djpeg, or jpegtran. 2014-11-21 22:26:15 -06:00
DRC
0e9c14e1bb Fix whitespace issues introduced with previous commit.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1424 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 04:25:42 +00:00
DRC
b7178cee71 Fix whitespace issues introduced with previous commit.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1423 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 04:25:04 +00:00
DRC
306add8b78 Fix whitespace issues introduced with previous commit.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1423 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 04:25:04 +00:00
DRC
63645d9161 Print the library version and exit whenever -version is passed to cjpeg, djpeg, or jpegtran.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1422 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 04:04:38 +00:00
DRC
9665f5e3f9 Print the library version and exit whenever -version is passed to cjpeg, djpeg, or jpegtran.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1422 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 04:04:38 +00:00
DRC
602f5bea74 Print the library version and exit whenever -version is passed to cjpeg, djpeg, or jpegtran.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1421 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-22 04:03:21 +00:00
DRC
ef263e3e83 Make TJCompressor.close() and TJDecompressor.close() idempotent
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1420 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-21 15:35:33 +00:00
DRC
10c3e5d44e Make TJCompressor.close() and TJDecompressor.close() idempotent
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1420 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-21 15:35:33 +00:00
DRC
0426cd3441 Sometimes the sampling factors in grayscale images can be > 1 (for instance, if compressing using 'cjpeg -sample 2x2 -grayscale'.) Technically, sampling factors have no meaning with grayscale JPEGs, and the libjpeg decompressor ignores them in that case. Thus, the TurboJPEG decompressor should ignore them as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1419 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-21 15:33:19 +00:00
DRC
ea3df2f662 Sometimes the sampling factors in grayscale images can be > 1 (for instance, if compressing using 'cjpeg -sample 2x2 -grayscale'.) Technically, sampling factors have no meaning with grayscale JPEGs, and the libjpeg decompressor ignores them in that case. Thus, the TurboJPEG decompressor should ignore them as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1419 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-21 15:33:19 +00:00
fbossen
f46c7875dd Merge pull request #122 from dcommander/mozjpeg-defaults
Use mozjpeg defaults by default
2014-11-20 15:38:58 -05:00
DRC
9cb270a216 Use mozjpeg defaults by default
Since mozjpeg is now backward ABI-compatible with libjpeg[-turbo], it is now
possible to temporarily load mozjpeg into a binary application and cause that
application to generate uber-compressed JPEGs (at the expense of an extreme
performance loss, of course.)  For instance, someone could do

LD_LIBRARY_PATH=/opt/mozjpeg/lib convert blah_blah_blah

to make ImageMagick use mozjpeg instead of the system's pre-installed JPEG
library (libjpeg-turbo, in most cases.)  However, this only makes sense if
mozjpeg is actually producing different behavior by default than libjpeg-turbo.
Currently it isn't.  Currently it requires the application to set
JBOOLEAN_USE_MOZ_DEFAULTS to TRUE in order to enable the mozjpeg-specific
behavior, but of course applications that were built to use libjpeg[-turbo]
won't do that.  Thus, this patch sets use_moz_defaults to TRUE by default,
requiring an application to explicitly set it to FALSE in order to revert to
the libjpeg[-turbo] behavior (makes sense, since the only applications that
would need to revert to the libjpeg[-turbo] behavior would be mozjpeg-aware
applications.)

Note that we discussed the possibility of adding a function
(jpeg_revert_defaults()), which would act the same as jpeg_set_defaults() does
in libjpeg[-turbo].  This is a good solution for implementing the -revert
switch in cjpeg, but unfortunately it doesn't work for jpegtran.  The reason
is that jpeg_set_defaults() is called within the body of
jpeg_copy_critical_parameters(), which is part of the API.  So yet again,
if mozjpeg were loaded into a non-mozjpeg-aware application at run time, it
would be desirable for jpeg_copy_critical_parameters() to set the parameters
to mozjpeg defaults.  That means that, in order to implement the -revert
switch in jpegtran, it would be necessary to introduce a new function
(jpeg_revert_critical_parameters(), perhaps).  It seems cleaner to just keep
using the JBOOLEAN_USE_MOZ_DEFAULTS parameter to control the behavior of
jpeg_set_defaults(), even though this represents a minor abuse of the libjpeg
API (jpeg_set_defaults() is technically supposed to set all of the parameters
to defaults, irrespective of any previous state.  However, as long as we
document that JBOOLEAN_USE_MOZ_DEFAULTS works differently, then it should be
OK.)
2014-11-19 23:31:20 -06:00
DRC
d1e39740b2 Sometimes the sampling factors in grayscale images can be > 1 (for instance, if compressing using 'cjpeg -sample 2x2 -grayscale'.) Technically, sampling factors have no meaning with grayscale JPEGs, and the libjpeg decompressor ignores them in that case. Thus, the TurboJPEG decompressor should ignore them as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1418 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-19 00:55:28 +00:00
DRC
ea1eea4742 Sometimes the sampling factors in grayscale images can be > 1 (for instance, if compressing using 'cjpeg -sample 2x2 -grayscale'.) Technically, sampling factors have no meaning with grayscale JPEGs, and the libjpeg decompressor ignores them in that case. Thus, the TurboJPEG decompressor should ignore them as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1418 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-19 00:55:28 +00:00
DRC
24ad6a0179 Sometimes the sampling factors in grayscale images can be > 1 (for instance, if compressing using 'cjpeg -sample 2x2 -grayscale'.) Technically, sampling factors have no meaning with grayscale JPEGs, and the libjpeg decompressor ignores them in that case. Thus, the TurboJPEG decompressor should ignore them as well.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1417 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-19 00:54:39 +00:00
Josh Aas
e6dd72874e Merge pull request #121 from dcommander/libjpeg-turbo-diff-review
Documentation and code cleanup from DRC
2014-11-18 17:58:36 -06:00
DRC
c77eb27cb1 Make TJCompressor.close() and TJDecompressor.close() idempotent
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1416 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-18 21:45:34 +00:00
DRC
3ebcf7cf86 Make TJCompressor.close() and TJDecompressor.close() idempotent
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1416 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-18 21:45:34 +00:00
DRC
60ba1963fe Make TJCompressor.close() and TJDecompressor.close() idempotent
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1415 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-18 21:45:02 +00:00
DRC
7139f6c961 Uses clz and bsr instructions for bit counting on ARM64 platforms as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1414 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-18 15:56:43 +00:00
DRC
803b5d24a8 Uses clz and bsr instructions for bit counting on ARM64 platforms as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1414 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-18 15:56:43 +00:00
DRC
f7067a9e73 Uses clz and bsr instructions for bit counting on ARM64 platforms as well.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1413 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-18 15:53:34 +00:00
Josh Aas
445d9b4196 Merge pull request #120 from pornel/libjpeg-turbo
Libjpeg turbo sync
2014-11-17 22:52:38 -06:00
Frank Bossen
f3db724c2d Merge branch 'master' into qtable
Conflicts:
	cjpeg.c
	jcdctmgr.c
	jcparam.c
	jpeglib.h
	rdswitch.c
2014-11-12 14:15:12 -10:00
Frank Bossen
a8e56d39e5 Merge pull request #119
Define constant for number of DC trellis candidates
2014-11-12 13:37:53 -10:00
fbossen
1c5a481dfa Merge pull request #118 from dcommander/master
Backward ABI compatibility with libjpeg-turbo
2014-11-12 13:31:34 -10:00
Kornel Lesiński
3554fdb9cf Merge branch 'libjpeg-turbo'
* libjpeg-turbo:
  Remove trailing spaces
  Another oops.  tjBufSizeYUV2() should return -1 if width < 1.
  Oops.  tjPlaneSizeYUV() should return -1 if componentID > 0 and subsamp==TJSAMP_GRAY.
  The AltiVec code actually works on 32-bit PowerPC platforms as well, so change the "powerpc64" token to "powerpc".  Also clean up the shift code, which wasn't building properly on OS X.
  AltiVec SIMD implementation of fast forward DCT
  Bump version to 1.5 alpha1 to prepare for new features
  When building libjpeg-turbo on Un*x systems, INT32 is usually typedef'ed to long, not int, so we need to specify an int pointer when doing a 4-byte write to the RGB565 output buffer.  On little endian systems, this doesn't matter, but when you write a 32-bit int to a 64-bit long pointer address on a big endian system, you are writing to the upper 4 bytes, not the lower 4 bytes.  NOTE: this will probably break on big endian systems that use 16-bit ints (are there any of those still around?)
  Fix Windows build
  Fix issues with RGB565 color conversion on big endian machines.  The RGB565 routines are now abstracted in a separate file, with separate little-endian and big-endian versions defined at compile time through the use of macros (this is similar to how the colorspace extension routines work.)  This allows big-endian machines to take advantage of the same performance optimizations as little-endian machines, and it retains the performance on little-endian machines, since the conditional branch for endianness is at a very coarse-grained level.
  Fix build on OS X PowerPC platforms
  Oops.  Forgot to alter the version header in the change log to indicate the release of 1.4 beta.
2014-11-08 16:36:45 +00:00
DRC
eca0637c81 Remove trailing spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1412 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-06 09:32:38 +00:00
DRC
da5d474c11 Remove trailing spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1412 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-06 09:32:38 +00:00
DRC
e3ce6852a6 Remove trailing spaces
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1411 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-06 09:32:06 +00:00
DRC
3c85fc4bb1 Document the fact that the "age number" of the mozjpeg version of libjpeg is one higher (because it introduces new functions into the API) 2014-11-06 01:49:14 -06:00
DRC
017339f715 Change name of Mac package to com.mozilla.mozjpeg to avoid conflicts with libjpeg-turbo Mac package 2014-11-06 01:40:12 -06:00
DRC
63eb69de62 Remove unused code in TJBench
The merge from libjpeg-turbo 1.4 somehow failed here, and this function from
1.3 was left hanging.
2014-11-06 01:30:06 -06:00
DRC
ebc7c3a760 Reconcile indentation, whitespace, and other code formatting with libjpeg-turbo.
For whatever reason, some of these files didn't get fully merged from
libjpeg-turbo 1.4.  They still contained tab characters and other formatting
conventions from libjpeg-turbo 1.3.  This patch also fixes some obvious
indentation errors in the mozjpeg-specific code.  There is more formatting work
that needs to be done to the mozjpeg-specific code, to fix line overruns,
incorrect operator whitespace, and other issues that make it not consistent
with the libjpeg/libjpeg-turbo code.
2014-11-06 01:14:11 -06:00
DRC
5f1960f38c Fix a buglet introduced in the libjpeg-turbo changelog by mozjpeg 2014-11-05 20:54:20 -06:00
DRC
6b236241d2 Change "libmozjpeg" to "mozjpeg" in packaging and install functions
This might be slightly more controversial, since it changes the CMake and
autotools project names and the binaty package names to "mozjpeg", and it
changes the default install directory to /opt/mozjpeg.  To me, this makes much
more sense, but it does represent a change in operational behavior, which is
why I put it in a separate commit.
2014-11-05 20:47:54 -06:00
DRC
4618c247df Various wordsmithing and cosmetic changes to remove libjpeg-turbo-specific information
This patch does the following:
-- Implements some (hopefully non-controversial) changes to the package
descriptions, in order to prevent confusion (the existing descriptions from
libjpeg-turbo are not appropriate for mozjpeg.)
-- Replaces "libmozjpeg" with "mozjpeg" in all documentation and comments.  The project is called "mozjpeg", and it doesn't actually generate a library called
"libmozjpeg", so it doesn't make sense to use "libmozjpeg" to describe it.
-- Replaces "MozJPEG" with "TurboJPEG" in all documentation and comments.
"MozJPEG" appears to have been the product of blindly searching/replacing
instances of "Turbo".  TurboJPEG is the name of the API, and that name still
applies to the implementation in mozjpeg.  Furthermore, the TurboJPEG libraries
are still called "libturbojpeg" in mozjpeg.
-- Attempts to remove build instructions that are irrelevant or not applicable
to mozjpeg.  Further work possibly needs to be done here-- for instance, it
doesn't make much sense to have build instructions for mobile devices when the
library is not intended to be used for decoding.
-- Changes the vendor in the DEB and RPM files from "The libmozjpeg Project" to
"Mozilla Research".
-- Changes the source tarball location in the RPM spec file to correctly point
to the release tarball on github.
-- Changes the source directory in the RPM spec file to "mozjpeg-%{version}",
which is the actual name of the source directory in the mozjpeg tarballs.
2014-11-05 20:10:37 -06:00
DRC
7e27264523 Use tabs in the DLL definition files, per Microsoft conventions. 2014-11-05 17:17:04 -06:00
DRC
644fbcef01 Update the example code to demonstrate the use of the new extension parameter
accessor function.
2014-11-05 10:57:25 -06:00
DRC
90f94c9ec8 Rebase the DLL function ordinals for the ABI compatibility accessor functions.
The ABI compatibility feature was developed by the current maintainer of
libjpeg-turbo with an eye toward eventual inclusion in libjpeg-turbo (once
other features are added to libjpeg-turbo that necessitate the inclusion.)
Thus, it is easy to ensure that the DLL function ordinals will be synchronized
between libjpeg-turbo and mozjpeg.  However, it still makes sense to allow for
a little bit of breathing room, just in case.  Thus, this patch uses ordinals
starting at 200 for the accessor functions.  It would probably make sense to
start the equivalent decompressor get/set functions at ordinal 300, once they
are implemented.
2014-11-05 02:37:41 -06:00
DRC
29165500c9 Fix build error encountered when using MS Visual C++ (it doesn't support C99) -- at least not the version of MSVC++ I'm using.) 2014-11-04 01:59:19 -06:00
DRC
db2986c96f Restore backward ABI compatibility with libjpeg/libjpeg-turbo by moving the mozjpeg-specific parameters into the opaque jpeg_comp_master struct and implementing generic accessor functions for getting/setting those parameters. These functions can be used upstream, if the need for them arises in libjpeg-turbo, and they can also be easily extended to cover future extensions to the decompressor. Note that, in order to use jpeg_comp_master as a repository for extension parameters, cinfo->master is now allocated within the body of jpeg_CreateCompress(). It is later re-allocated in jinit_c_master_control(), because that function (and others in jcmaster.c) use an extended form of jpeg_comp_master, but the existing extension parameters are copied into the new master instance. Similar modifications would need to be made to the decompressor to support the same type of extension framework. 2014-11-04 01:58:52 -06:00
Frank Bossen
7b008bdf12 Add switch to cjpeg to select quant table
Replace -flat command line argument with more generic -quant_table
argument that selects one of several predefined quantization tables
2014-10-30 15:13:13 +01:00
Frank Bossen
8a12b6a6a0 Adjust lambda parameters
Parameters were retuned for grayscale and quality range 0-100
2014-10-30 14:52:41 +01:00
Frank Bossen
02fc068dc8 Add quantization tables
Add various quantization tables suggested in #84
Still need to do chroma
2014-10-29 16:10:48 +01:00
DRC
55620c6ef2 Another oops. tjBufSizeYUV2() should return -1 if width < 1.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1410 632fc199-4ca6-4c93-a231-07263d6284db
2014-10-23 19:08:14 +00:00
DRC
c42b9ca3ef Another oops. tjBufSizeYUV2() should return -1 if width < 1.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1410 632fc199-4ca6-4c93-a231-07263d6284db
2014-10-23 19:08:14 +00:00
DRC
338ac421d7 Another oops. tjBufSizeYUV2() should return -1 if width < 1.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1409 632fc199-4ca6-4c93-a231-07263d6284db
2014-10-23 19:07:25 +00:00
DRC
2240974d5d Oops. tjPlaneSizeYUV() should return -1 if componentID > 0 and subsamp==TJSAMP_GRAY.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1408 632fc199-4ca6-4c93-a231-07263d6284db
2014-10-23 18:54:42 +00:00
DRC
86d57c6787 Oops. tjPlaneSizeYUV() should return -1 if componentID > 0 and subsamp==TJSAMP_GRAY.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1408 632fc199-4ca6-4c93-a231-07263d6284db
2014-10-23 18:54:42 +00:00
DRC
1083a3bffb Oops. tjPlaneSizeYUV() should return -1 if componentID > 0 and subsamp==TJSAMP_GRAY.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1407 632fc199-4ca6-4c93-a231-07263d6284db
2014-10-23 18:53:20 +00:00
Frank Bossen
e581ede148 Fix mixed code/declarations 2014-09-30 11:22:08 -04:00
Frank Bossen
36b2fecd0c Merge branch 'floatovershoot' of https://github.com/pornel/mozjpeg into pornel-floatovershoot
Conflicts:
	jcdctmgr.c (resolved)
2014-09-30 10:57:09 -04:00
Frank Bossen
83d6a8e643 Add new quantization tables
New quantization tables tuned for PSNR-HVS are added.
Per-coefficient lambda weights are now derived based on the
quantization table entries.
2014-09-30 10:24:52 -04:00
Josh Aas
9de0e03f2f Merge pull request #108 from pornel/c89
C89 compat
2014-09-25 13:51:43 -05:00
Kornel Lesiński
873b390172 C89 compat 2014-09-25 10:11:45 -07:00
Kornel
6948e6c2bf Merge pull request #105 from dwbuiten/windowsfixes
Windows Fixes
2014-09-16 11:45:55 +01:00
Derek Buitenhuis
d81d671d36 Windows: Add jpeg_float_quality_scaling to exported symbols
Windows requires exported symbols to be explicitly declared.

Also, use a very large ordinal number so that any future symbols
added by IJG or TurboJPEG will not break ABI.

Fixes #104.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-09-16 10:45:45 +01:00
Derek Buitenhuis
7434b5eb2f Fix permissions on Windows-only files
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-09-16 10:43:43 +01:00
fbossen
bf061b4a1c Merge pull request #101 from pornel/splinederinging
Deringing via overshoot clipping
2014-09-15 08:18:34 -04:00
Kornel Lesiński
d0755fa501 Estimate maximum useful overshoot from quantization table 2014-09-15 00:11:29 +01:00
Josh Aas
c88ce1aa16 Merge pull request #103 from pornel/dctargfix
Added missing braces
2014-09-14 09:30:10 -05:00
Kornel Lesiński
c629ccd7d9 Added missing braces 2014-09-14 14:14:30 +01:00
Frank Bossen
41ebea736d Make provisions for more default quant tables 2014-09-09 16:06:32 -04:00
Kornel Lesiński
2db4ee73ff C89 compatibility 2014-09-08 20:08:08 +01:00
Kornel Lesiński
bda865e181 Merge remote-tracking branch 'mozilla/master' into HEAD 2014-09-08 20:07:46 +01:00
Josh Aas
a914cb2d9f Merge pull request #102 from pornel/turbo
Libjpeg-turbo merge
2014-09-08 10:31:21 -05:00
Kornel Lesiński
9f785697e4 Script for git-svn reinitialization 2014-09-07 20:50:07 +01:00
Kornel Lesiński
662bf6ba7b Merge libjpeg-turbo r1390
* commit '73edb3d734a628fd88994bc974dc6737a58bd956': (45 commits)
  Rename the ARM64 assembly file to match the C file
  Fix several mathematical issues discovered in the ARM64 NEON code while running the extended regression tests introduced in r1267.  Specific comments can be found in the original patches: https://sourceforge.net/p/libjpeg-turbo/patches/64/
  Reformat code per Siarhei's original patch (to clearly indicate that the offset instructions are completely independent) and add Siarhei as an individual author (he no longer works for Nokia.)
  Clarify forward compatibility of iOS/ARM builds
  ARM64 NEON SIMD support for YCC-to-RGB565 conversion
  ARM NEON SIMD support for YCC-to-RGB565 conversion, and optimizations to the existing YCC-to-RGB conversion code:
  Ensure that tjFree() is used for any JPEG buffers that might have been dynamically allocated by the compress/transform functions.  To keep things simple, we use tjAlloc() for the statically-allocated buffer as well, so that tjFree() can always be used to free the buffer, regardless of whether it was allocated by tjbench or by the TurboJPEG library.  This fixes crashes that occurred on Windows when running tjunittest or tjbench with the -alloc flag.
  Revert r1335 and r1336.  It was a valiant effort, but on Windows, xmm8-xmm15 are non-volatile, and the overhead of pushing them onto the stack at the beginning of each function and popping them at the end was causing worse performance (in the neighborhood of 3-5%) than just using the work areas and limiting the register usage to xmm0-xmm7.  Best to leave the SSE2 code alone.  We can optimize the register usage for AVX2, once that port takes place.
  Windows doesn't have setenv().  Go, go Gadget Macros.
  1.4 beta1
  Fix 'make dist'
  Don't use sudo when building a Debian package unless the user is non-root
  Add a set of undocumented environment variables and Java system properties that allow compression features of libjpeg that are not normally exposed in the TurboJPEG API to be enabled.  These features are not normally exposed because, for the most part, they aren't "turbo" features, but it is still useful to be able to benchmark them without modifying the code.
  .func/.endfunc are only necessary when generating STABS debug info, which basically went out of style with parachute pants and Rick Astley.  At any rate, none of the platforms for which we're building the ARM code use it (DWARF is the common format these days), and the .func/.endfunc directives cause the clang integrated assembler to fail (http://llvm.org/bugs/show_bug.cgi?id=20424).
  Extend tjbenchtest so that it tests the dynamic JPEG buffer allocation feature in TurboJPEG.  Disable the tiling feature in TJBench whenever dynamic buffer allocation is enabled (because the tiling feature requires a separate buffer for each tile, using it successfully with dynamic buffer allocation would require a separate TurboJPEG compressor instance for each tile, and it's not worth going to that trouble right now.)
  Run the TurboJPEG conformance tests out of a directory in /tmp (for improved performance, if the source directory is on a remote file share.)  Fix an issue in TJBench.java that prevented it from working properly if the source image resided in a directory with a dot in the name.
  Oops
  Subtle point, but dest->outbuffer is a pointer to the address of the JPEG buffer, which is stored in the calling program.  Thus, *(dest->outbuffer) will always equal *outbuffer.  We need to compare *outbuffer with dest->buffer instead to determine if the pointer is being reused.
  If the output buffer in the TurboJPEG destination manager was allocated by the destination manager and is being reused from a previous compression operation, then we need to get the buffer size from the previous operation, since the calling program doesn't know the actual buffer size.
  Actually, we need to increase the size of BUFSIZE, not just the size of _buffer.  The previous patch might have cause problems if, for instance, state->free_in_buffer was 127 but 129 bytes were compressed.  In that case, only 127 of the 129 bytes would have been written to the file.  Also document the fix.
  ...

Conflicts:
	CMakeLists.txt
	Makefile.am
	configure.ac
	jcdctmgr.c
	release/deb-control.tmpl
	sharedlib/CMakeLists.txt
	simd/CMakeLists.txt
	turbojpeg.c
2014-09-07 18:21:19 +01:00
Kornel Lesiński
a7eb278df1 Merge mozjpeg into libjpeg-turbo
* origin/master: (23 commits)
  Update .gitignore
  .func/.endfunc are only necessary when generating STABS debug info, which basically went out of style with parachute pants and Rick Astley.  At any rate, none of the platforms for which we're building the ARM code use it (DWARF is the common format these days), and the .func/.endfunc directives cause the clang integrated assembler to fail (http://llvm.org/bugs/show_bug.cgi?id=20424).
  Enable DC trellis by default
  Avoid double inline attribute
  Detect libpng
  Implement DHT Merging
  Add .gitignore for autotools files
  Check memory alloc success
  Update cjpeg usage text
  Implement DQT merging
  Fix issue with scan printout
  Get rid of unnecessary and obsolete platform configuration instructions.
  Add error checks for malloc calls that don't already have them. Issue #87.
  yuvjpeg: fix trivial leak
  Parse quality as float
  PNG reading support
  Fix issue with DC trellis
  Add option to split DC scans
  Add trellis for DC
  Bump version to 2.1.
  ...

Conflicts:
	BUILDING.txt
	cdjpeg.h
	jcdctmgr.c
	jchuff.h
	jcmarker.c
	jcmaster.c
	jconfig.txt
	jpeglib.h
	rdswitch.c
2014-09-07 18:20:38 +01:00
Kornel Lesiński
71539b3e13 Merge libjpeg-turbo r1325
* commit 'b8d044a666056d4d8d28d7a5d0805ac32b619b36': (58 commits)
  Big oops.  wrjpgcom on Windows was being built using the rdjpgcom source.
  Prevent a buffer overrun if the comment begins with a literal quote character and the string exceeds 65k characters.  Also prevent comments longer than 65k characters from being written, since this will produce an incorrect JPEG file.
  Remove VMS-specific code
  Our copyright string is longer than JMSG_LENGTH_MAX, and this was causing a buffer overrun if output_message() was called with msg_code set to JMSG_COPYRIGHT, or if format_message() was called with msg_code set to JMSG_COPYRIGHT and with a buffer of length JMSG_LENGTH_MAX.
  We don't support non-ANSI C compilers
  Allow for building the MIPS DSPr2 extensions if the host is mips-* as well as mipsel-*.  The DSPr2 extensions are little endian, so we still have to check that the compiler defines __MIPSEL__ before enabling them.  This paves the way for supporting big-endian MIPS, and in the near term, it allows the SIMD extensions to be built with Sourcery CodeBench.
  SIMD-accelerated int upsample routine for MIPS DSPr2
  Fix MIPS build
  libjpeg-turbo has never supported non-ANSI compilers, so get rid of the crufty SIZEOF() macro.  It was not being used consistently anyhow, so it would not have been possible to build prior releases of libjpeg-turbo using the broken compilers for which that macro was designed.
  Remove MS-DOS code and information, and adjust copyright headers to reflect the removal of features in r1307 and r1308.  libjpeg-turbo has never supported MS-DOS, nor is it even possible for us to do so.
  Further copyright header cleanup
  Further copyright header cleanup
  Get rid of the HAVE_PROTOTYPES configuration option, as well as the related JMETHOD and JPP macros.  libjpeg-turbo has never supported compilers that don't handle prototypes.  Doing so requires ansi2knr, which isn't even supported in the IJG code anymore.
  Remove all of the NEED_SHORT_EXTERNAL_NAMES stuff.  There is scant information available as to which linkers ever had a 15-character global symbol name limit.  AFAICT, it might have been a VMS and/or a.out BSD thing, but none of those platforms have ever been supported by libjpeg-turbo (nor are such systems supported by other open source libraries of this nature.)
  Clean up code formatting in the SIMD interface functions
  SIMD-accelerated NULL convert routine for MIPS DSPr2
  Fix build, which was broken by the checkin of the MIPS DSPr2 accelerated smooth downsampling routine.  Until/unless other platforms include SIMD support for that function, it's just easier to #ifdef around it rather than adding stubs for the other platforms.
  Fix error in MIPS DSPr2 accelerated smooth downsample routine
  SIMD-accelerated h2v2 smooth downsampling routine for MIPS DSPr2
  Minor tweak to improve code readability
  ...

Conflicts:
	BUILDING.txt
	CMakeLists.txt
	Makefile.am
	cdjpeg.h
	cjpeg.1
	cjpeg.c
	configure.ac
	djpeg.1
	example.c
	jccoefct.c
	jcdctmgr.c
	jchuff.c
	jchuff.h
	jcinit.c
	jcmaster.c
	jcparam.c
	jcphuff.c
	jidctflt.c
	jpegint.h
	jpeglib.h
	jversion.h
	libjpeg.txt
	rdswitch.c
	simd/CMakeLists.txt
	tjbench.c
	turbojpeg.c
	usage.txt
	wrjpgcom.c
2014-09-07 16:59:11 +01:00
Kornel Lesiński
564022ebda Merge mozjpeg into libjpeg-turbo
* commit '1aa50b71d9453328ad30cce85baaf7ef87864197':
  Use precomputed table
  Improve floating point DCT
  Update doc re: various DCT implementations
  Fix build for wrjpgcom

Conflicts:
	jchuff.c
2014-09-07 16:51:55 +01:00
Kornel Lesiński
f9d1fcdf6f Merge libjpeg-turbo r1220
* commit '93ddfcfc1a814789ed64d967a6118616753bb9d5': (65 commits)
  Use clz/bsr instructions on ARM for bit counting rather than the lookup table (reduces memory footprint and can improve performance in some cases.)
  Make iOS build instructions more generic and applicable to all versions of Xcode;  modify iOS build procedure for Xcode 5.0 and later to fix a build issue with Xcode 5.1.
  Update build instructions to reflect the use of pkgbuild/productbuild
  Remove any claims of support for OS X 10.4 "Tiger" (the packaging system overhaul produces packages that require Leopard or later, and I haven't been able to test Tiger for years anyhow.)  Update TurboJPEG shared library version.
  Migrate Mac packaging system to pkgbuild, since PackageMaker is no longer supported.
  Remove the sections about replacing libjpeg at run time and compile time.  These were written before O/S distributions started shipping libjpeg-turbo, and they are either pedantic or no longer relevant.  Also remove any text that assumes the use of our official project binaries.  Notes specific to the official binaries have been moved into the project wiki.
  Fix Windows build
  Since we're now maintaining our own Cygwin pseudo-repository directories instead of recommending that users install these packages from a local source, it makes more sense to name the packages according to Cygwin specs, so they can be copied as-is into the pseudo-repository.
  39dbc2db9718f9af2f62eb486fd73328fe8bf5e8
  Fix 'make dist'
  RHEL 6 (and probably other platforms as well) sets _defaultdocdir=%{_datadir}/doc, which screws things up, since we're overriding _datadir.  Since we intend _defaultdocdir to be /usr/share/doc, just be explicit about it.
  Fix compiler warning about unused function when building with the libjpeg v6b API/ABI
  Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC
  Enable silent build (can be overridden with 'make V=1') if the version of autotools being used is new enough.
  Extend YUVImage class to allow reuse of the same buffer with different metadata;  port TJBench changes that treat YUV encoding/decoding as an intermediate step of the JPEG compression/decompression pipeline rather than a separate test case;  add YUV encode/decode tests to the Java version of tjbenchtest
  formatting tweaks
  Fix an error that occurred when trying to use the lossless transform feature without specifying -quiet;  formatting tweak
  Move the garbage collection of the JPEG tiles into the decompression function to increase the chances that tiled decompression of large images will succeed without an OutOfMemoryError.
  Generate the Java documentation using javadoc 7, to improve readability.
  This should have been checked in with the previous commit.
  ...

Conflicts:
	BUILDING.txt
	configure.ac
	jversion.h
	release/Info.plist.in
	release/ReadMe.rtf
	tjbench.c
	turbojpeg.c
2014-09-07 16:50:54 +01:00
Kornel Lesiński
5d2d1d4c47 Merge mozjpeg into libjpeg-turbo
* mozjpeg: (94 commits)
  Disable scan optimization if no scan given
  Fixed mozjpeg build with Visual C++ 2010
  Added few error messages in cjpeg
  Fix trellis for nonprogressive mode (#69)
  Bugfix: AM_PROG_AR is not recognized by older automake, so only use it when defined
  Bump version number for 2.0, make this version 2.0.1.
  Update MS-SSIM tuning
  Fix #64
  Updating yuvjpeg and jpegyuv to match Daala tools.
  Fix #56
  Silence compiler warning
  Silence compiler warning
  Improve support of JPEG input in cjpeg
  Fix issue with JPEG read in cjpeg
  Add support for JPEG input in cjpeg
  Fix #50
  Disable trellis in jpegtran
  Update version to 2.0pre.
  Use single DC scan by default
  Add configure check for libm/pow. Fixes Linux build issue.
  ...
2014-09-07 16:06:59 +01:00
Kornel Lesiński
bdbb0138b9 Merge mozjpeg into libjpeg-turbo
* commit '72b66f9c77b3e4ae363b21e48145f635cec0b193':
  Initial commit of libjpeg-turbo plus readme edits.
2014-09-07 14:31:24 +01:00
DRC
78c2093bd4 The AltiVec code actually works on 32-bit PowerPC platforms as well, so change the "powerpc64" token to "powerpc". Also clean up the shift code, which wasn't building properly on OS X.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1406 632fc199-4ca6-4c93-a231-07263d6284db
2014-09-05 07:23:12 +00:00
DRC
7affbfc241 The AltiVec code actually works on 32-bit PowerPC platforms as well, so change the "powerpc64" token to "powerpc". Also clean up the shift code, which wasn't building properly on OS X.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1406 632fc199-4ca6-4c93-a231-07263d6284db
2014-09-05 07:23:12 +00:00
DRC
a2cc95b827 AltiVec SIMD implementation of fast forward DCT
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1405 632fc199-4ca6-4c93-a231-07263d6284db
2014-09-05 06:33:42 +00:00
DRC
cd2d8e1cc7 AltiVec SIMD implementation of fast forward DCT
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1405 632fc199-4ca6-4c93-a231-07263d6284db
2014-09-05 06:33:42 +00:00
DRC
7129fc6299 Bump version to 1.5 alpha1 to prepare for new features
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1404 632fc199-4ca6-4c93-a231-07263d6284db
2014-09-04 18:51:31 +00:00
DRC
f72f1f2e94 Bump version to 1.5 alpha1 to prepare for new features
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1404 632fc199-4ca6-4c93-a231-07263d6284db
2014-09-04 18:51:31 +00:00
DRC
bbd9b71171 When building libjpeg-turbo on Un*x systems, INT32 is usually typedef'ed to long, not int, so we need to specify an int pointer when doing a 4-byte write to the RGB565 output buffer. On little endian systems, this doesn't matter, but when you write a 32-bit int to a 64-bit long pointer address on a big endian system, you are writing to the upper 4 bytes, not the lower 4 bytes. NOTE: this will probably break on big endian systems that use 16-bit ints (are there any of those still around?)
This patch also removes an unneeded macro from jdmerge.c.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1403 632fc199-4ca6-4c93-a231-07263d6284db
2014-09-04 17:35:22 +00:00
DRC
a97939ec77 When building libjpeg-turbo on Un*x systems, INT32 is usually typedef'ed to long, not int, so we need to specify an int pointer when doing a 4-byte write to the RGB565 output buffer. On little endian systems, this doesn't matter, but when you write a 32-bit int to a 64-bit long pointer address on a big endian system, you are writing to the upper 4 bytes, not the lower 4 bytes. NOTE: this will probably break on big endian systems that use 16-bit ints (are there any of those still around?)
This patch also removes an unneeded macro from jdmerge.c.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1403 632fc199-4ca6-4c93-a231-07263d6284db
2014-09-04 17:35:22 +00:00
DRC
16db1b3f76 When building libjpeg-turbo on Un*x systems, INT32 is usually typedef'ed to long, not int, so we need to specify an int pointer when doing a 4-byte write to the RGB565 output buffer. On little endian systems, this doesn't matter, but when you write a 32-bit int to a 64-bit long pointer address on a big endian system, you are writing to the upper 4 bytes, not the lower 4 bytes. NOTE: this will probably break on big endian systems that use 16-bit ints (are there any of those still around?)
This patch also removes an unneeded macro from jdmerge.c.


git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1402 632fc199-4ca6-4c93-a231-07263d6284db
2014-09-04 17:28:28 +00:00
DRC
c0a8256a92 When building libjpeg-turbo on Un*x systems, INT32 is usually typedef'ed to long, not int, so we need to specify an int pointer when doing a 4-byte write to the RGB565 output buffer. On little endian systems, this doesn't matter, but when you write a 32-bit int to a 64-bit long pointer address on a big endian system, you are writing to the upper 4 bytes, not the lower 4 bytes. NOTE: this will probably break on big endian systems that use 16-bit ints (are there any of those still around?)
This patch also removes an unneeded macro from jdmerge.c.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1402 632fc199-4ca6-4c93-a231-07263d6284db
2014-09-04 17:28:28 +00:00
Kornel Lesiński
fdbbf10e90 Use more integers in Catmull-Rom 2014-09-03 16:31:28 +01:00
Kornel Lesiński
ecb17510f0 Deringing via overshoot clipping 2014-09-02 02:42:59 +01:00
DRC
1d4c51a0ac Fix Windows build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1401 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 22:01:05 +00:00
DRC
bc649a29c0 Fix Windows build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1401 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 22:01:05 +00:00
DRC
33a9675dd3 Fix Windows build
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1400 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 22:00:33 +00:00
DRC
72a3cc0ecd Fix issues with RGB565 color conversion on big endian machines. The RGB565 routines are now abstracted in a separate file, with separate little-endian and big-endian versions defined at compile time through the use of macros (this is similar to how the colorspace extension routines work.) This allows big-endian machines to take advantage of the same performance optimizations as little-endian machines, and it retains the performance on little-endian machines, since the conditional branch for endianness is at a very coarse-grained level.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1399 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 20:37:50 +00:00
DRC
82d2050470 Fix issues with RGB565 color conversion on big endian machines. The RGB565 routines are now abstracted in a separate file, with separate little-endian and big-endian versions defined at compile time through the use of macros (this is similar to how the colorspace extension routines work.) This allows big-endian machines to take advantage of the same performance optimizations as little-endian machines, and it retains the performance on little-endian machines, since the conditional branch for endianness is at a very coarse-grained level.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1399 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 20:37:50 +00:00
DRC
a4d5a6bb1c Fix issues with RGB565 color conversion on big endian machines. The RGB565 routines are now abstracted in a separate file, with separate little-endian and big-endian versions defined at compile time through the use of macros (this is similar to how the colorspace extension routines work.) This allows big-endian machines to take advantage of the same performance optimizations as little-endian machines, and it retains the performance on little-endian machines, since the conditional branch for endianness is at a very coarse-grained level.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1398 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 20:33:49 +00:00
DRC
339589f3cd Fix build on OS X PowerPC platforms
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1397 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 13:55:08 +00:00
DRC
7cd94b7ef9 Fix build on OS X PowerPC platforms
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1397 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 13:55:08 +00:00
DRC
eb8d096ba6 Fix build on OS X PowerPC platforms
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1396 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 13:52:09 +00:00
DRC
730ddfba3d Fix build on OS X PowerPC platforms
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1396 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 13:52:09 +00:00
DRC
3f97ede419 Fix build on OS X PowerPC platforms
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1395 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 13:51:18 +00:00
DRC
fe77fa22d9 Oops. Forgot to alter the version header in the change log to indicate the release of 1.4 beta.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1394 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 13:48:45 +00:00
DRC
12513c1340 Oops. Forgot to alter the version header in the change log to indicate the release of 1.4 beta.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1394 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 13:48:45 +00:00
DRC
ba88b106d5 Oops. Forgot to alter the version header in the change log to indicate the release of 1.4 beta.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1393 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-30 13:47:51 +00:00
DRC
88b6c97568 Create 1.4.x branch
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1391 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-29 02:39:35 +00:00
DRC
11ceef67d5 Create 1.4.x branch
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1391 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-29 02:39:35 +00:00
DRC
0a9a252654 Rename the ARM64 assembly file to match the C file
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1390 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-29 01:53:17 +00:00
DRC
2ef1bec37f Rename the ARM64 assembly file to match the C file
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1390 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-29 01:53:17 +00:00
DRC
e9ea853284 Rename the ARM64 assembly file to match the C file
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1390 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-29 01:53:17 +00:00
DRC
de26249a99 Fix several mathematical issues discovered in the ARM64 NEON code while running the extended regression tests introduced in r1267. Specific comments can be found in the original patches:
https://sourceforge.net/p/libjpeg-turbo/patches/64/


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1389 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-29 01:49:59 +00:00
DRC
a1cea09935 Fix several mathematical issues discovered in the ARM64 NEON code while running the extended regression tests introduced in r1267. Specific comments can be found in the original patches:
https://sourceforge.net/p/libjpeg-turbo/patches/64/


git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1389 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-29 01:49:59 +00:00
DRC
efeca65349 Fix several mathematical issues discovered in the ARM64 NEON code while running the extended regression tests introduced in r1267. Specific comments can be found in the original patches:
https://sourceforge.net/p/libjpeg-turbo/patches/64/


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1389 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-29 01:49:59 +00:00
Frank Bossen
c0756e6119 Update .gitignore 2014-08-28 14:17:20 -04:00
Josh Aas
8b9eb07a36 Merge pull request #100 from ehsan/clang-as
.func/.endfunc are only necessary when generating STABS debug info, whic...
2014-08-26 14:10:48 -05:00
dcommander
2a21ae7463 .func/.endfunc are only necessary when generating STABS debug info, which basically went out of style with parachute pants and Rick Astley. At any rate, none of the platforms for which we're building the ARM code use it (DWARF is the common format these days), and the .func/.endfunc directives cause the clang integrated assembler to fail (http://llvm.org/bugs/show_bug.cgi?id=20424).
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1375 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-26 14:56:33 -04:00
Josh Aas
cd1bee49e1 Merge pull request #96 from dwbuiten/gitignore
Add .gitignore for autotools files
2014-08-26 12:32:58 -05:00
fbossen
df3ace7e9c Merge pull request #97 from dwbuiten/dhtmerge
Implement DHT Merging
2014-08-25 21:49:16 +02:00
DRC
a6efae1488 Reformat code per Siarhei's original patch (to clearly indicate that the offset instructions are completely independent) and add Siarhei as an individual author (he no longer works for Nokia.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1388 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-25 15:26:09 +00:00
DRC
33a4b3d400 Reformat code per Siarhei's original patch (to clearly indicate that the offset instructions are completely independent) and add Siarhei as an individual author (he no longer works for Nokia.)
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1388 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-25 15:26:09 +00:00
DRC
c8b99a298e Reformat code per Siarhei's original patch (to clearly indicate that the offset instructions are completely independent) and add Siarhei as an individual author (he no longer works for Nokia.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1388 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-25 15:26:09 +00:00
DRC
e947139c7c Clarify forward compatibility of iOS/ARM builds
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1387 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-23 17:48:17 +00:00
DRC
fe0750f0d2 Clarify forward compatibility of iOS/ARM builds
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1387 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-23 17:48:17 +00:00
DRC
82070439ab Clarify forward compatibility of iOS/ARM builds
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1387 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-23 17:48:17 +00:00
DRC
bdc7650b9e ARM64 NEON SIMD support for YCC-to-RGB565 conversion
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1386 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-23 15:57:38 +00:00
DRC
a92d31df00 ARM64 NEON SIMD support for YCC-to-RGB565 conversion
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1386 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-23 15:57:38 +00:00
DRC
1dbceb51c9 ARM64 NEON SIMD support for YCC-to-RGB565 conversion
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1386 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-23 15:57:38 +00:00
DRC
d729f4da9c ARM NEON SIMD support for YCC-to-RGB565 conversion, and optimizations to the existing YCC-to-RGB conversion code:
-----

aee36252be.patch

From aee36252be20054afce371a92406fc66ba6627b5 Mon Sep 17 00:00:00 2001
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Date: Wed, 13 Aug 2014 03:50:22 +0300
Subject: [PATCH] ARM: Faster NEON yuv->rgb conversion for Krait and Cortex-A15

The older code was developed and tested only on ARM Cortex-A8 and ARM Cortex-A9.
Tuning it for newer ARM processors can introduce some speed-up (up to 20%).

The performance of the inner loop (conversion of 8 pixels) improves from
~27 cycles down to ~22 cycles on Qualcomm Krait 300, and from ~20 cycles
down to ~18 cycles on ARM Cortex-A15.

The performance remains exactly the same on ARM Cortex-A7 (~58 cycles),
ARM Cortex-A8 (~25 cycles) and ARM Cortex-A9 (~30 cycles) processors.

Also use larger indentation in the source code for separating two independent
instruction streams.

-----

a5efdbf22c.patch

From a5efdbf22ce9c1acd4b14a353cec863c2c57557e Mon Sep 17 00:00:00 2001
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Date: Wed, 13 Aug 2014 07:23:09 +0300
Subject: [PATCH] ARM: NEON optimized yuv->rgb565 conversion

The performance of the inner loop (conversion of 8 pixels):
* ARM Cortex-A7:  ~55 cycles
* ARM Cortex-A8:  ~28 cycles
* ARM Cortex-A9:  ~32 cycles
* ARM Cortex-A15: ~20 cycles
* Qualcomm Krait: ~24 cycles

Based on the Linaro rgb565 patch from
    https://sourceforge.net/p/libjpeg-turbo/patches/24/
but implements better instructions scheduling.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1385 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-23 15:47:51 +00:00
DRC
b052d67eb1 ARM NEON SIMD support for YCC-to-RGB565 conversion, and optimizations to the existing YCC-to-RGB conversion code:
-----

aee36252be.patch

From aee36252be20054afce371a92406fc66ba6627b5 Mon Sep 17 00:00:00 2001
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Date: Wed, 13 Aug 2014 03:50:22 +0300
Subject: [PATCH] ARM: Faster NEON yuv->rgb conversion for Krait and Cortex-A15

The older code was developed and tested only on ARM Cortex-A8 and ARM Cortex-A9.
Tuning it for newer ARM processors can introduce some speed-up (up to 20%).

The performance of the inner loop (conversion of 8 pixels) improves from
~27 cycles down to ~22 cycles on Qualcomm Krait 300, and from ~20 cycles
down to ~18 cycles on ARM Cortex-A15.

The performance remains exactly the same on ARM Cortex-A7 (~58 cycles),
ARM Cortex-A8 (~25 cycles) and ARM Cortex-A9 (~30 cycles) processors.

Also use larger indentation in the source code for separating two independent
instruction streams.

-----

a5efdbf22c.patch

From a5efdbf22ce9c1acd4b14a353cec863c2c57557e Mon Sep 17 00:00:00 2001
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Date: Wed, 13 Aug 2014 07:23:09 +0300
Subject: [PATCH] ARM: NEON optimized yuv->rgb565 conversion

The performance of the inner loop (conversion of 8 pixels):
* ARM Cortex-A7:  ~55 cycles
* ARM Cortex-A8:  ~28 cycles
* ARM Cortex-A9:  ~32 cycles
* ARM Cortex-A15: ~20 cycles
* Qualcomm Krait: ~24 cycles

Based on the Linaro rgb565 patch from
    https://sourceforge.net/p/libjpeg-turbo/patches/24/
but implements better instructions scheduling.


git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1385 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-23 15:47:51 +00:00
DRC
d166012ae3 ARM NEON SIMD support for YCC-to-RGB565 conversion, and optimizations to the existing YCC-to-RGB conversion code:
-----

aee36252be.patch

From aee36252be20054afce371a92406fc66ba6627b5 Mon Sep 17 00:00:00 2001
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Date: Wed, 13 Aug 2014 03:50:22 +0300
Subject: [PATCH] ARM: Faster NEON yuv->rgb conversion for Krait and Cortex-A15

The older code was developed and tested only on ARM Cortex-A8 and ARM Cortex-A9.
Tuning it for newer ARM processors can introduce some speed-up (up to 20%).

The performance of the inner loop (conversion of 8 pixels) improves from
~27 cycles down to ~22 cycles on Qualcomm Krait 300, and from ~20 cycles
down to ~18 cycles on ARM Cortex-A15.

The performance remains exactly the same on ARM Cortex-A7 (~58 cycles),
ARM Cortex-A8 (~25 cycles) and ARM Cortex-A9 (~30 cycles) processors.

Also use larger indentation in the source code for separating two independent
instruction streams.

-----

a5efdbf22c.patch

From a5efdbf22ce9c1acd4b14a353cec863c2c57557e Mon Sep 17 00:00:00 2001
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Date: Wed, 13 Aug 2014 07:23:09 +0300
Subject: [PATCH] ARM: NEON optimized yuv->rgb565 conversion

The performance of the inner loop (conversion of 8 pixels):
* ARM Cortex-A7:  ~55 cycles
* ARM Cortex-A8:  ~28 cycles
* ARM Cortex-A9:  ~32 cycles
* ARM Cortex-A15: ~20 cycles
* Qualcomm Krait: ~24 cycles

Based on the Linaro rgb565 patch from
    https://sourceforge.net/p/libjpeg-turbo/patches/24/
but implements better instructions scheduling.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1385 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-23 15:47:51 +00:00
DRC
eb66974f3a Ensure that tjFree() is used for any JPEG buffers that might have been dynamically allocated by the compress/transform functions. To keep things simple, we use tjAlloc() for the statically-allocated buffer as well, so that tjFree() can always be used to free the buffer, regardless of whether it was allocated by tjbench or by the TurboJPEG library. This fixes crashes that occurred on Windows when running tjunittest or tjbench with the -alloc flag.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1384 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 19:59:51 +00:00
DRC
578c3f67d7 Ensure that tjFree() is used for any JPEG buffers that might have been dynamically allocated by the compress/transform functions. To keep things simple, we use tjAlloc() for the statically-allocated buffer as well, so that tjFree() can always be used to free the buffer, regardless of whether it was allocated by tjbench or by the TurboJPEG library. This fixes crashes that occurred on Windows when running tjunittest or tjbench with the -alloc flag.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1384 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 19:59:51 +00:00
DRC
f5644c3498 Ensure that tjFree() is used for any JPEG buffers that might have been dynamically allocated by the compress/transform functions. To keep things simple, we use tjAlloc() for the statically-allocated buffer as well, so that tjFree() can always be used to free the buffer, regardless of whether it was allocated by tjbench or by the TurboJPEG library. This fixes crashes that occurred on Windows when running tjunittest or tjbench with the -alloc flag.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1383 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 19:27:28 +00:00
DRC
7ff92d811b Ensure that tjFree() is used for any JPEG buffers that might have been dynamically allocated by the compress/transform functions. To keep things simple, we use tjAlloc() for the statically-allocated buffer as well, so that tjFree() can always be used to free the buffer, regardless of whether it was allocated by tjbench or by the TurboJPEG library. This fixes crashes that occurred on Windows when running tjunittest or tjbench with the -alloc flag.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1383 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 19:27:28 +00:00
DRC
3eed295c43 Ensure that tjFree() is used for any JPEG buffers that might have been dynamically allocated by the compress/transform functions. To keep things simple, we use tjAlloc() for the statically-allocated buffer as well, so that tjFree() can always be used to free the buffer, regardless of whether it was allocated by tjbench or by the TurboJPEG library. This fixes crashes that occurred on Windows when running tjunittest or tjbench with the -alloc flag.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1383 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 19:27:28 +00:00
DRC
55e328ecb8 Revert r1335 and r1336. It was a valiant effort, but on Windows, xmm8-xmm15 are non-volatile, and the overhead of pushing them onto the stack at the beginning of each function and popping them at the end was causing worse performance (in the neighborhood of 3-5%) than just using the work areas and limiting the register usage to xmm0-xmm7. Best to leave the SSE2 code alone. We can optimize the register usage for AVX2, once that port takes place.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1382 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 18:30:44 +00:00
DRC
d0d81e9c3a Revert r1335 and r1336. It was a valiant effort, but on Windows, xmm8-xmm15 are non-volatile, and the overhead of pushing them onto the stack at the beginning of each function and popping them at the end was causing worse performance (in the neighborhood of 3-5%) than just using the work areas and limiting the register usage to xmm0-xmm7. Best to leave the SSE2 code alone. We can optimize the register usage for AVX2, once that port takes place.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1382 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 18:30:44 +00:00
DRC
19a5f802bc Revert r1335 and r1336. It was a valiant effort, but on Windows, xmm8-xmm15 are non-volatile, and the overhead of pushing them onto the stack at the beginning of each function and popping them at the end was causing worse performance (in the neighborhood of 3-5%) than just using the work areas and limiting the register usage to xmm0-xmm7. Best to leave the SSE2 code alone. We can optimize the register usage for AVX2, once that port takes place.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1382 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 18:30:44 +00:00
DRC
3d5189891b Don't use sudo when building a Debian package unless the user is non-root
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1381 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 17:21:09 +00:00
DRC
7930a77eaa Don't use sudo when building a Debian package unless the user is non-root
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1381 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 17:21:09 +00:00
DRC
bdb36e1a14 Windows doesn't have setenv(). Go, go Gadget Macros.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1380 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 15:39:32 +00:00
DRC
00696236df Windows doesn't have setenv(). Go, go Gadget Macros.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1380 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 15:39:32 +00:00
DRC
29875d2597 Windows doesn't have setenv(). Go, go Gadget Macros.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1380 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 15:39:32 +00:00
DRC
022a9016df 1.4 beta1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1379 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 14:22:00 +00:00
DRC
2d055dc7c7 1.4 beta1
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1379 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 14:22:00 +00:00
DRC
810aa1f188 1.4 beta1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1379 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 14:22:00 +00:00
DRC
e408761dda Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1378 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 14:19:12 +00:00
DRC
50a3df621e Fix 'make dist'
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1378 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 14:19:12 +00:00
DRC
d0b65844c2 Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1378 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 14:19:12 +00:00
DRC
9b012bd026 Don't use sudo when building a Debian package unless the user is non-root
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1377 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 14:15:08 +00:00
DRC
ea0f2c2811 Don't use sudo when building a Debian package unless the user is non-root
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1377 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 14:15:08 +00:00
DRC
5c5de61c13 Don't use sudo when building a Debian package unless the user is non-root
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1377 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 14:15:08 +00:00
DRC
0713c1bb54 Add a set of undocumented environment variables and Java system properties that allow compression features of libjpeg that are not normally exposed in the TurboJPEG API to be enabled. These features are not normally exposed because, for the most part, they aren't "turbo" features, but it is still useful to be able to benchmark them without modifying the code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1376 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 13:43:33 +00:00
DRC
04962caf3a Add a set of undocumented environment variables and Java system properties that allow compression features of libjpeg that are not normally exposed in the TurboJPEG API to be enabled. These features are not normally exposed because, for the most part, they aren't "turbo" features, but it is still useful to be able to benchmark them without modifying the code.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1376 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 13:43:33 +00:00
DRC
004427c071 Add a set of undocumented environment variables and Java system properties that allow compression features of libjpeg that are not normally exposed in the TurboJPEG API to be enabled. These features are not normally exposed because, for the most part, they aren't "turbo" features, but it is still useful to be able to benchmark them without modifying the code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1376 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 13:43:33 +00:00
DRC
2e2ce5a1da .func/.endfunc are only necessary when generating STABS debug info, which basically went out of style with parachute pants and Rick Astley. At any rate, none of the platforms for which we're building the ARM code use it (DWARF is the common format these days), and the .func/.endfunc directives cause the clang integrated assembler to fail (http://llvm.org/bugs/show_bug.cgi?id=20424).
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1375 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 11:31:46 +00:00
DRC
83052612d0 .func/.endfunc are only necessary when generating STABS debug info, which basically went out of style with parachute pants and Rick Astley. At any rate, none of the platforms for which we're building the ARM code use it (DWARF is the common format these days), and the .func/.endfunc directives cause the clang integrated assembler to fail (http://llvm.org/bugs/show_bug.cgi?id=20424).
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1375 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 11:31:46 +00:00
DRC
c079546d32 .func/.endfunc are only necessary when generating STABS debug info, which basically went out of style with parachute pants and Rick Astley. At any rate, none of the platforms for which we're building the ARM code use it (DWARF is the common format these days), and the .func/.endfunc directives cause the clang integrated assembler to fail (http://llvm.org/bugs/show_bug.cgi?id=20424).
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1375 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 11:31:46 +00:00
DRC
684ace1924 Extend tjbenchtest so that it tests the dynamic JPEG buffer allocation feature in TurboJPEG. Disable the tiling feature in TJBench whenever dynamic buffer allocation is enabled (because the tiling feature requires a separate buffer for each tile, using it successfully with dynamic buffer allocation would require a separate TurboJPEG compressor instance for each tile, and it's not worth going to that trouble right now.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1374 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 03:04:06 +00:00
DRC
2bbe593b31 Extend tjbenchtest so that it tests the dynamic JPEG buffer allocation feature in TurboJPEG. Disable the tiling feature in TJBench whenever dynamic buffer allocation is enabled (because the tiling feature requires a separate buffer for each tile, using it successfully with dynamic buffer allocation would require a separate TurboJPEG compressor instance for each tile, and it's not worth going to that trouble right now.)
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1374 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 03:04:06 +00:00
DRC
328e088030 Extend tjbenchtest so that it tests the dynamic JPEG buffer allocation feature in TurboJPEG. Disable the tiling feature in TJBench whenever dynamic buffer allocation is enabled (because the tiling feature requires a separate buffer for each tile, using it successfully with dynamic buffer allocation would require a separate TurboJPEG compressor instance for each tile, and it's not worth going to that trouble right now.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1374 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 03:04:06 +00:00
DRC
d92949b0ac Run the TurboJPEG conformance tests out of a directory in /tmp (for improved performance, if the source directory is on a remote file share.) Fix an issue in TJBench.java that prevented it from working properly if the source image resided in a directory with a dot in the name.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1373 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 03:00:37 +00:00
DRC
c62f3f40be Run the TurboJPEG conformance tests out of a directory in /tmp (for improved performance, if the source directory is on a remote file share.) Fix an issue in TJBench.java that prevented it from working properly if the source image resided in a directory with a dot in the name.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1373 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 03:00:37 +00:00
DRC
d37548299f Run the TurboJPEG conformance tests out of a directory in /tmp (for improved performance, if the source directory is on a remote file share.) Fix an issue in TJBench.java that prevented it from working properly if the source image resided in a directory with a dot in the name.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1373 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 03:00:37 +00:00
DRC
43513893f0 Extend tjbenchtest so that it tests the dynamic JPEG buffer allocation feature in TurboJPEG. Disable the tiling feature in TJBench whenever dynamic buffer allocation is enabled (because the tiling feature requires a separate buffer for each tile, using it successfully with dynamic buffer allocation would require a separate TurboJPEG compressor instance for each tile, and it's not worth going to that trouble right now.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1372 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 02:57:34 +00:00
DRC
cdeb7db034 Extend tjbenchtest so that it tests the dynamic JPEG buffer allocation feature in TurboJPEG. Disable the tiling feature in TJBench whenever dynamic buffer allocation is enabled (because the tiling feature requires a separate buffer for each tile, using it successfully with dynamic buffer allocation would require a separate TurboJPEG compressor instance for each tile, and it's not worth going to that trouble right now.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1372 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 02:57:34 +00:00
DRC
a1a920cc51 Run the TurboJPEG conformance tests out of a directory in /tmp (for improved performance, if the source directory is on a remote file share.) Fix an issue in TJBench.java that prevented it from working properly if the source image resided in a directory with a dot in the name.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1371 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 02:51:16 +00:00
DRC
d66dc1084c Run the TurboJPEG conformance tests out of a directory in /tmp (for improved performance, if the source directory is on a remote file share.) Fix an issue in TJBench.java that prevented it from working properly if the source image resided in a directory with a dot in the name.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1371 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 02:51:16 +00:00
DRC
88b90bdc07 Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1370 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 22:16:25 +00:00
DRC
ebfee8203a Oops
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1370 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 22:16:25 +00:00
DRC
0a8555ea59 Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1370 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 22:16:25 +00:00
DRC
cce13c767e Subtle point, but dest->outbuffer is a pointer to the address of the JPEG buffer, which is stored in the calling program. Thus, *(dest->outbuffer) will always equal *outbuffer. We need to compare *outbuffer with dest->buffer instead to determine if the pointer is being reused.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1369 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 22:15:19 +00:00
DRC
4dec5210ef Subtle point, but dest->outbuffer is a pointer to the address of the JPEG buffer, which is stored in the calling program. Thus, *(dest->outbuffer) will always equal *outbuffer. We need to compare *outbuffer with dest->buffer instead to determine if the pointer is being reused.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1369 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 22:15:19 +00:00
DRC
ae9446b98f Subtle point, but dest->outbuffer is a pointer to the address of the JPEG buffer, which is stored in the calling program. Thus, *(dest->outbuffer) will always equal *outbuffer. We need to compare *outbuffer with dest->buffer instead to determine if the pointer is being reused.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1369 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 22:15:19 +00:00
DRC
fe80ec2275 If the output buffer in the TurboJPEG destination manager was allocated by the destination manager and is being reused from a previous compression operation, then we need to get the buffer size from the previous operation, since the calling program doesn't know the actual buffer size.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1368 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 15:51:47 +00:00
DRC
bc4d369b49 If the output buffer in the TurboJPEG destination manager was allocated by the destination manager and is being reused from a previous compression operation, then we need to get the buffer size from the previous operation, since the calling program doesn't know the actual buffer size.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1368 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 15:51:47 +00:00
DRC
334b1963f7 If the output buffer in the TurboJPEG destination manager was allocated by the destination manager and is being reused from a previous compression operation, then we need to get the buffer size from the previous operation, since the calling program doesn't know the actual buffer size.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1368 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 15:51:47 +00:00
DRC
2261e1e408 Actually, we need to increase the size of BUFSIZE, not just the size of _buffer. The previous patch might have cause problems if, for instance, state->free_in_buffer was 127 but 129 bytes were compressed. In that case, only 127 of the 129 bytes would have been written to the file. Also document the fix.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1367 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 03:40:37 +00:00
DRC
d4a32f71d4 Actually, we need to increase the size of BUFSIZE, not just the size of _buffer. The previous patch might have cause problems if, for instance, state->free_in_buffer was 127 but 129 bytes were compressed. In that case, only 127 of the 129 bytes would have been written to the file. Also document the fix.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1367 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 03:40:37 +00:00
DRC
f63d1609dc Actually, we need to increase the size of BUFSIZE, not just the size of _buffer. The previous patch might have cause problems if, for instance, state->free_in_buffer was 127 but 129 bytes were compressed. In that case, only 127 of the 129 bytes would have been written to the file. Also document the fix.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1367 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 03:40:37 +00:00
DRC
eddc355d18 Actually, we need to increase the size of BUFSIZE, not just the size of _buffer. The previous patch might have cause problems if, for instance, state->free_in_buffer was 127 but 129 bytes were compressed. In that case, only 127 of the 129 bytes would have been written to the file. Also document the fix.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1366 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 03:38:14 +00:00
DRC
0e5f88dbe1 Actually, we need to increase the size of BUFSIZE, not just the size of _buffer. The previous patch might have cause problems if, for instance, state->free_in_buffer was 127 but 129 bytes were compressed. In that case, only 127 of the 129 bytes would have been written to the file. Also document the fix.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1366 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 03:38:14 +00:00
DRC
29823fa9a6 Fix an extremely rare crash that can occur when compressing a very high-frequency MCU using quality 100 and no subsampling, and when dynamically allocating the JPEG buffer in the destination manager. Even with a test program designed specifically to reproduce the crash, it only occurred once in about 25 million iterations. More details here: https://sourceforge.net/p/libjpeg-turbo/bugs/64
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1365 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 01:55:22 +00:00
DRC
c4ac1e2b15 Fix an extremely rare crash that can occur when compressing a very high-frequency MCU using quality 100 and no subsampling, and when dynamically allocating the JPEG buffer in the destination manager. Even with a test program designed specifically to reproduce the crash, it only occurred once in about 25 million iterations. More details here: https://sourceforge.net/p/libjpeg-turbo/bugs/64
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1365 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 01:55:22 +00:00
DRC
9c168ad23b Fix an extremely rare crash that can occur when compressing a very high-frequency MCU using quality 100 and no subsampling, and when dynamically allocating the JPEG buffer in the destination manager. Even with a test program designed specifically to reproduce the crash, it only occurred once in about 25 million iterations. More details here: https://sourceforge.net/p/libjpeg-turbo/bugs/64
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1364 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 01:53:47 +00:00
DRC
6bce2c22c7 Fix an extremely rare crash that can occur when compressing a very high-frequency MCU using quality 100 and no subsampling, and when dynamically allocating the JPEG buffer in the destination manager. Even with a test program designed specifically to reproduce the crash, it only occurred once in about 25 million iterations. More details here: https://sourceforge.net/p/libjpeg-turbo/bugs/64
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1364 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 01:53:47 +00:00
DRC
4d117e06bc Fix an extremely rare crash that can occur when compressing a very high-frequency MCU using quality 100 and no subsampling, and when dynamically allocating the JPEG buffer in the destination manager. Even with a test program designed specifically to reproduce the crash, it only occurred once in about 25 million iterations. More details here: https://sourceforge.net/p/libjpeg-turbo/bugs/64
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1364 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-21 01:53:47 +00:00
DRC
f6d7b7768b Wordsmithing & clarifications
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1363 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-20 16:02:49 +00:00
DRC
bbe6136281 Wordsmithing & clarifications
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1363 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-20 16:02:49 +00:00
DRC
9c318c0884 Wordsmithing & clarifications
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1363 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-20 16:02:49 +00:00
DRC
bc3c1685a7 Document the existence of the new ARM64 SIMD code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1362 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-20 15:40:43 +00:00
DRC
7c0efc8589 Document the existence of the new ARM64 SIMD code
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1362 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-20 15:40:43 +00:00
DRC
25651f6eb5 Document the existence of the new ARM64 SIMD code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1362 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-20 15:40:43 +00:00
DRC
19224b2252 Properly detect the need for gas-preprocessor.pl when building for ARM64
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1361 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-20 13:14:46 +00:00
DRC
f4543c7379 Properly detect the need for gas-preprocessor.pl when building for ARM64
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1361 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-20 13:14:46 +00:00
DRC
dfe0538662 Properly detect the need for gas-preprocessor.pl when building for ARM64
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1361 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-20 13:14:46 +00:00
DRC
40dd3146cd Refactored YUVImage Java class so that it supports both unified YUV image buffers as well as separate YUV image planes; modified the JNI functions accordingly and added new helper functions to the TurboJPEG C API (tjPlaneWidth(), tjPlaneHeight(), tjPlaneSizeYUV()) to facilitate those modifications; changed potentially confusing "component width" and "component height" terms to "plane width" and "plane height" and modified variable names in turbojpeg.c to reflect this; numerous other documentation tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1360 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-17 12:23:49 +00:00
DRC
ce6f3d8cd2 Refactored YUVImage Java class so that it supports both unified YUV image buffers as well as separate YUV image planes; modified the JNI functions accordingly and added new helper functions to the TurboJPEG C API (tjPlaneWidth(), tjPlaneHeight(), tjPlaneSizeYUV()) to facilitate those modifications; changed potentially confusing "component width" and "component height" terms to "plane width" and "plane height" and modified variable names in turbojpeg.c to reflect this; numerous other documentation tweaks
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1360 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-17 12:23:49 +00:00
DRC
3d037a5c72 Refactored YUVImage Java class so that it supports both unified YUV image buffers as well as separate YUV image planes; modified the JNI functions accordingly and added new helper functions to the TurboJPEG C API (tjPlaneWidth(), tjPlaneHeight(), tjPlaneSizeYUV()) to facilitate those modifications; changed potentially confusing "component width" and "component height" terms to "plane width" and "plane height" and modified variable names in turbojpeg.c to reflect this; numerous other documentation tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1360 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-17 12:23:49 +00:00
Frank Bossen
5f27ff790b Enable DC trellis by default 2014-08-17 10:43:59 +02:00
Josh Aas
d3c8cde986 Merge pull request #89 from pornel/floatq
Parse quality as float
2014-08-15 14:18:36 -05:00
DRC
5d87f6ddff Make the wrapped functions static
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1359 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:40:56 +00:00
DRC
804440b2e1 Make the wrapped functions static
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1359 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:40:56 +00:00
DRC
ef5d1ea229 Make the wrapped functions static
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1359 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:40:56 +00:00
DRC
d2a7495012 Make the wrapped functions static
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1358 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:40:34 +00:00
DRC
150b5c4a90 Make the wrapped functions static
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1358 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:40:34 +00:00
DRC
b7c8c86d6a Whitespace formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1357 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:20:59 +00:00
DRC
a86aee5113 Whitespace formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1357 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:20:59 +00:00
DRC
e31e49478c Allow the int pixel versions of the various TurboJPEG JNI functions to share the same code as the byte pixel versions.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1356 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:20:06 +00:00
DRC
f79cc2214e Allow the int pixel versions of the various TurboJPEG JNI functions to share the same code as the byte pixel versions.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1356 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:20:06 +00:00
DRC
80cb26444a Whitespace formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1355 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:08:12 +00:00
DRC
608dfddd22 Whitespace formatting tweaks
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1355 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:08:12 +00:00
DRC
948d9d0492 Whitespace formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1355 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:08:12 +00:00
DRC
a4940d1396 Add descriptions to help sort out which function goes with which version of the API.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1354 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:07:15 +00:00
DRC
370aaa61fd Add descriptions to help sort out which function goes with which version of the API.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1354 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:07:15 +00:00
DRC
f58a0d4174 Add descriptions to help sort out which function goes with which version of the API.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1354 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 16:07:15 +00:00
DRC
32760451fe Add descriptions to help sort out which function goes with which version of the API.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1353 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 15:40:02 +00:00
DRC
870d4403eb Add descriptions to help sort out which function goes with which version of the API.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1353 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 15:40:02 +00:00
DRC
fa8bcb825c Compiler warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1352 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 14:44:09 +00:00
DRC
e9897e4200 Compiler warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1352 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 14:44:09 +00:00
DRC
580f391537 Fix build broken by r1349
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1351 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 14:40:36 +00:00
DRC
ba67ec6270 Fix build broken by r1349
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1351 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 14:40:36 +00:00
DRC
0c28bca095 Fix build broken by r1349
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1351 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 14:40:36 +00:00
DRC
46a0392cf3 Compiler warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1350 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 14:40:05 +00:00
DRC
b83bfa68a9 Compiler warnings
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1350 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 14:40:05 +00:00
DRC
efd7674c11 Compiler warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1350 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 14:40:05 +00:00
DRC
26dd86bd89 Restore backward compatibility between libjpeg-turbo 1.3.x JAR and the new JNI library
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1349 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 14:01:21 +00:00
DRC
7def1fcf5b Restore backward compatibility between libjpeg-turbo 1.3.x JAR and the new JNI library
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1349 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 14:01:21 +00:00
DRC
c6262663b5 Restore backward compatibility between libjpeg-turbo 1.3.x JAR and the new JNI library
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1349 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 14:01:21 +00:00
DRC
927a10db05 Allow the int pixel versions of the various TurboJPEG JNI functions to share the same code as the byte pixel versions.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1348 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 13:18:58 +00:00
DRC
91c739f541 Allow the int pixel versions of the various TurboJPEG JNI functions to share the same code as the byte pixel versions.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1348 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 13:18:58 +00:00
DRC
aac7f6575a Allow the int pixel versions of the various TurboJPEG JNI functions to share the same code as the byte pixel versions.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1348 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 13:18:58 +00:00
Josh Aas
fc76d48701 Merge pull request #98 from pornel/inlineinline
Avoid double inline attribute
2014-08-14 21:57:44 -05:00
Josh Aas
df9b78ab5c Merge pull request #90 from pornel/png
PNG reading support
2014-08-14 21:54:31 -05:00
Kornel Lesiński
2e08021a9f Avoid double inline attribute 2014-08-14 22:16:31 +01:00
Kornel Lesiński
ad67be3b36 Detect libpng 2014-08-14 22:16:10 +01:00
DRC
cdcac99f6d Clean up exception handling in the JNI code. The exception is actually not thrown until the function exits, so we can let the code fall through to bailout: if the TurboJPEG C function fails. Also, per the JNI spec, no other JNI functions can be called between GetPrimitiveArrayCritical() and ReleasePrimitiveArrayCritical(). This hasn't caused any problems thus far, but better safe than sorry.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1347 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-14 17:24:01 +00:00
DRC
b94560c4a8 Clean up exception handling in the JNI code. The exception is actually not thrown until the function exits, so we can let the code fall through to bailout: if the TurboJPEG C function fails. Also, per the JNI spec, no other JNI functions can be called between GetPrimitiveArrayCritical() and ReleasePrimitiveArrayCritical(). This hasn't caused any problems thus far, but better safe than sorry.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1347 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-14 17:24:01 +00:00
Derek Buitenhuis
873a32e8d0 Implement DHT Merging
The current way multipass works, write_scan_header() seems to be called
multiple times, so only DC tables get merged, however, this will still
merge AC tables if possible.

Implements the second half of #30.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-08-14 18:19:29 +01:00
DRC
8951cf01fe Clean up exception handling in the JNI code. The exception is actually not thrown until the function exits, so we can let the code fall through to bailout: if the TurboJPEG C function fails. Also, per the JNI spec, no other JNI functions can be called between GetPrimitiveArrayCritical() and ReleasePrimitiveArrayCritical(). This hasn't caused any problems thus far, but better safe than sorry.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1346 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-14 16:54:04 +00:00
DRC
e9ccb2ff22 Clean up exception handling in the JNI code. The exception is actually not thrown until the function exits, so we can let the code fall through to bailout: if the TurboJPEG C function fails. Also, per the JNI spec, no other JNI functions can be called between GetPrimitiveArrayCritical() and ReleasePrimitiveArrayCritical(). This hasn't caused any problems thus far, but better safe than sorry.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1346 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-14 16:54:04 +00:00
DRC
4209d3496d Clean up exception handling in the JNI code. The exception is actually not thrown until the function exits, so we can let the code fall through to bailout: if the TurboJPEG C function fails. Also, per the JNI spec, no other JNI functions can be called between GetPrimitiveArrayCritical() and ReleasePrimitiveArrayCritical(). This hasn't caused any problems thus far, but better safe than sorry.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1346 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-14 16:54:04 +00:00
Derek Buitenhuis
6ab56c195e Add .gitignore for autotools files
This makes development work less error prone when committing.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-08-14 15:45:18 +01:00
Frank Bossen
2e7c6109ff Check memory alloc success 2014-08-13 16:33:45 +02:00
Frank Bossen
b2092f33c3 Update cjpeg usage text 2014-08-13 16:29:12 +02:00
Frank Bossen
c87576eb09 Merge branch 'dctrellis' 2014-08-13 16:21:39 +02:00
fbossen
fbff4b9500 Merge pull request #88 from dwbuiten/dqtmerge
Implement DQT merging
2014-08-13 16:15:09 +02:00
Derek Buitenhuis
d3a58a33cd Implement DQT merging
See #30.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-08-13 15:07:08 +01:00
Frank Bossen
05a5f4a9cc Fix issue with scan printout
Incorrect values of scan parameter Al were printed out in verbose mode
2014-08-13 15:35:29 +02:00
DRC
f7c11051de Oops. Parameter name is "strides", not "stride"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1345 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-12 15:52:51 +00:00
DRC
4db50792eb Oops. Parameter name is "strides", not "stride"
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1345 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-12 15:52:51 +00:00
DRC
8c2c415847 Reformat TurboJPEG C API documentation to improve ease of maintenance and to make it more consistent with the javadoc formatting; fix minor error in tjCompressFromYUV() prototype.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1344 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-18 01:40:23 +01:00
DRC
1475ca8fe2 Oops. Parameter name is "strides", not "stride"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1345 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-12 15:52:51 +00:00
DRC
9d77dad4c9 Reformat TurboJPEG C API documentation to improve ease of maintenance and to make it more consistent with the javadoc formatting; fix minor error in tjCompressFromYUV() prototype.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1344 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-12 15:06:30 +00:00
DRC
f7b5dd1e41 Reformat TurboJPEG C API documentation to improve ease of maintenance and to make it more consistent with the javadoc formatting; fix minor error in tjCompressFromYUV() prototype.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1344 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-12 15:06:30 +00:00
Josh Aas
5b9d498fa0 Get rid of unnecessary and obsolete platform configuration instructions. 2014-08-11 14:09:11 -05:00
DRC
ab62cf7ba5 Extend the TurboJPEG C API to support handling YUV images stored in separate image planes instead of a unified buffer 2014-08-11 18:05:41 +00:00
DRC
aecea388c7 Extend the TurboJPEG C API to support handling YUV images stored in separate image planes instead of a unified buffer
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1343 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-11 18:05:41 +00:00
DRC
257745ba05 Extend the TurboJPEG C API to support handling YUV images stored in separate image planes instead of a unified buffer
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1343 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-11 18:05:41 +00:00
DRC
22505838cb Clean up and consolidate notes regarding the YUV image format. This also corrects a factual error regarding the padding of the luminance plane-- because we now support 4:1:1, the component width is not necessarily padded to the nearest multiple of 2 if horizontal subsampling is used. 2014-08-10 20:12:17 +00:00
DRC
493be61707 Clean up and consolidate notes regarding the YUV image format. This also corrects a factual error regarding the padding of the luminance plane-- because we now support 4:1:1, the component width is not necessarily padded to the nearest multiple of 2 if horizontal subsampling is used.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1342 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-10 20:12:17 +00:00
DRC
66f830135f Clean up and consolidate notes regarding the YUV image format. This also corrects a factual error regarding the padding of the luminance plane-- because we now support 4:1:1, the component width is not necessarily padded to the nearest multiple of 2 if horizontal subsampling is used.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1342 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-10 20:12:17 +00:00
DRC
11fe81d0df Clean up notes using the doxygen @note command 2014-08-10 18:30:52 +00:00
DRC
779bd68d20 Clean up notes using the doxygen @note command
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1341 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-10 18:30:52 +00:00
DRC
ed028a6575 Clean up notes using the doxygen @note command
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1341 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-10 18:30:52 +00:00
DRC
d13df21341 Clean up notes using the doxygen @note command
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1340 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-10 17:25:51 +00:00
DRC
63c66d2131 Clean up notes using the doxygen @note command
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1340 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-10 17:25:51 +00:00
DRC
0b8d990cef Make the documentation more readable by displaying fixed-width text (which is used to refer to variables and functions) in a different color. 2014-08-10 16:43:31 +00:00
DRC
c71ab2f7c2 Make the documentation more readable by displaying fixed-width text (which is used to refer to variables and functions) in a different color.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1339 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-10 16:43:31 +00:00
DRC
0b58a07f5e Make the documentation more readable by displaying fixed-width text (which is used to refer to variables and functions) in a different color.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1339 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-10 16:43:31 +00:00
DRC
983503eddf Fix a display issue in the documentation for tjDecompress2() (doxygen treats a star at the beginning of the line as a list bullet); make the documentation more readable by displaying fixed-width text (which is used to refer to variables and functions) in a different color.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1338 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-10 16:39:32 +00:00
DRC
108f603748 Fix a display issue in the documentation for tjDecompress2() (doxygen treats a star at the beginning of the line as a list bullet); make the documentation more readable by displaying fixed-width text (which is used to refer to variables and functions) in a different color.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1338 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-10 16:39:32 +00:00
DRC
ceb4712807 12-bit JPEG support 2014-08-09 23:06:07 +00:00
DRC
aee4f72160 12-bit JPEG support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1337 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-09 23:06:07 +00:00
DRC
6304683a66 12-bit JPEG support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1337 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-09 23:06:07 +00:00
DRC
3c50582e77 Oops. The Windows version of collect_args/uncollect_args uses rsp, so we still need the rsp prologue/epilogue, despite the fact that we aren't using the stack as a work area. This fixes a segfault on Windows caused by r1335. 2014-08-09 22:58:18 +00:00
DRC
8a74848a23 Oops. The Windows version of collect_args/uncollect_args uses rsp, so we still need the rsp prologue/epilogue, despite the fact that we aren't using the stack as a work area. This fixes a segfault on Windows caused by r1335.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1336 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-09 22:58:18 +00:00
DRC
6ca1aab2f7 Oops. The Windows version of collect_args/uncollect_args uses rsp, so we still need the rsp prologue/epilogue, despite the fact that we aren't using the stack as a work area. This fixes a segfault on Windows caused by r1335.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1336 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-09 22:58:18 +00:00
DRC
b7efc273a0 Attempt to improve performance by refactoring the compression-side color conversion and DCT algorithms so that they take full advantage of the additional registers available with 64-bit SSE2. This produces a somewhat yawn-worthy speedup of 2-3%, but at least the code is a lot more readable now. 2014-08-09 14:30:28 +00:00
DRC
a8ab3424c7 Attempt to improve performance by refactoring the compression-side color conversion and DCT algorithms so that they take full advantage of the additional registers available with 64-bit SSE2. This produces a somewhat yawn-worthy speedup of 2-3%, but at least the code is a lot more readable now.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1335 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-09 14:30:28 +00:00
DRC
f493ae8ff3 Attempt to improve performance by refactoring the compression-side color conversion and DCT algorithms so that they take full advantage of the additional registers available with 64-bit SSE2. This produces a somewhat yawn-worthy speedup of 2-3%, but at least the code is a lot more readable now.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1335 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-09 14:30:28 +00:00
Josh Aas
39bd663c71 Add error checks for malloc calls that don't already have them. Issue #87. 2014-08-07 22:42:08 -05:00
Josh Aas
1dc81a3bae Merge pull request #92 from tmatth/fix_yuvjpeg_leak
yuvjpeg: fix trivial leak
2014-08-07 10:23:25 -05:00
Tristan Matthews
3a379eda44 yuvjpeg: fix trivial leak
Cherry-picked from daala 91c1dfd8ec30fda886c31f00678eaf074e3e4a6c
2014-08-06 20:52:23 -04:00
Kornel Lesiński
5f434e6053 Parse quality as float 2014-08-04 21:35:51 +01:00
Kornel Lesiński
d11fc3c7c8 PNG reading support 2014-08-04 01:18:00 +01:00
Frank Bossen
7464e5fe76 Fix issue with DC trellis 2014-08-01 16:03:26 -04:00
Frank Bossen
33f39a2818 Add option to split DC scans
Command line option -split-dc-scan is added to code DC scans
independently (instead of interleaved). It should be determined whether
this option introduces any decoder compatibility issues ( see #83 )
Option -multidcscan is renamed to -opt-dc-scan
2014-07-31 15:26:38 -04:00
Frank Bossen
049e5c80b9 Add trellis for DC
Add option to apply trellis quantization to the DC coefficients ( see
#57 ). May need further refinement to make sure block order during
trellis optimization matches order during coding.
2014-07-31 12:11:36 -04:00
Josh Aas
594b7258cc Bump version to 2.1. 2014-07-29 09:12:48 -05:00
fbossen
0533b31891 Merge pull request #79 from arjun024/devel
more logical flow of control if trellis_quant enabled
2014-07-25 09:02:45 -04:00
Arjun Sreedharan
cca53c920d more logical flow of control if trellis_quant enabled
if trellis_quant is enabled, increment total number of
passes by optimization beginning pass number.

Signed-off-by: Arjun Sreedharan <arjun024@gmail.com>
2014-07-25 17:33:35 +05:30
Josh Aas
5901802871 Update README.md with link to 2.0 announcement and mailing list. 2014-07-24 16:39:26 -05:00
Frank Bossen
fbef31f76d Add option to disable progressive coding in cjpeg
Redefine baseline option in cjpeg to actually create a baseline JPEG
file by disabling progressive coding
2014-07-24 17:09:27 -04:00
Frank Bossen
1aa50b71d9 Use precomputed table
From jpeglib-turbo r1221:
Integrate a slightly modified version of Mozilla's patch for
precomputing the bit-counting LUT.  This is useful if the table needs
to be shared among multiple processes, although the primary reason for
doing that is reduced footprint on mobile devices, which are probably
already covered by the clz intrinsic code.
2014-07-24 10:50:59 -04:00
Frank Bossen
3adc64a4cb Improve floating point DCT
From libjpeg-turbo r1288
Port the more accurate (and slightly faster) floating point IDCT
implementation from jpeg-8a and later.  New research revealed that the
SSE/SSE2 floating point IDCT implementation was actually more accurate
than the jpeg-6b implementation, not less, which is why its
mathematical results have always differed from those of the jpeg-6b
implementation.  This patch brings the accuracy of the C code in line
with that of the SSE/SSE2 code.
2014-07-23 10:26:46 -04:00
Frank Bossen
ccb1d12f53 Update doc re: various DCT implementations
From libjpeg-turbo r1287
2014-07-23 10:23:24 -04:00
DRC
82b8751482 Fix performance and other issues uncovered in testing with actual ARM64 hardware; formatting tweaks; remove NEON platform check (NEON is always available with ARMv8) 2014-07-23 14:14:14 +00:00
DRC
3728aa01d8 Fix performance and other issues uncovered in testing with actual ARM64 hardware; formatting tweaks; remove NEON platform check (NEON is always available with ARMv8)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1333 632fc199-4ca6-4c93-a231-07263d6284db
2014-07-23 14:14:14 +00:00
DRC
838e00fd54 Fix performance and other issues uncovered in testing with actual ARM64 hardware; formatting tweaks; remove NEON platform check (NEON is always available with ARMv8)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1333 632fc199-4ca6-4c93-a231-07263d6284db
2014-07-23 14:14:14 +00:00
Frank Bossen
c73a82c6aa Fix build for wrjpgcom
See r1325 in libjpeg-turbo
2014-07-23 09:22:55 -04:00
Frank Bossen
b9f25333f6 Disable scan optimization if no scan given
Addresses segmentation fault issue in #69
2014-07-21 20:11:46 +02:00
Josh Aas
0f6b96c68e Merge pull request #73 from pornel/master
Added few error messages in cjpeg
2014-07-21 11:23:20 -05:00
Josh Aas
eeea9ed397 Merge pull request #72 from jlongman/master
Bugfix: AM_PROG_AR is not recognized by older automake, so only use it w...
2014-07-21 11:21:30 -05:00
Josh Aas
b95528727f Merge pull request #75 from pmed/master
Fixed mozjpeg build with Visual C++ 2010
2014-07-21 11:18:33 -05:00
Pavel Medvedev
d9605b0560 Fixed mozjpeg build with Visual C++ 2010
Moved several variable declarations out of inner scopes to the function scope to compile C code with Visual C++ 2010
2014-07-21 15:32:54 +04:00
Kornel Lesiński
40e6e8b2a2 Added few error messages in cjpeg 2014-07-20 16:11:59 +01:00
Frank Bossen
514307e9e6 Fix trellis for nonprogressive mode (#69)
Correct number of trellis passes when in nonprogressive mode
2014-07-18 18:10:56 +02:00
jlongman
7388a54647 Bugfix: AM_PROG_AR is not recognized by older automake, so only use it when defined 2014-07-17 14:16:24 -04:00
DRC
821455542c Include "Installed-Size" field in the deb-control file to prevent Ubuntu from complaining
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1330 632fc199-4ca6-4c93-a231-07263d6284db
2014-07-17 08:25:32 +00:00
DRC
e1abc9a7ac Include "Installed-Size" field in the deb-control file to prevent Ubuntu from complaining
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1330 632fc199-4ca6-4c93-a231-07263d6284db
2014-07-17 08:25:32 +00:00
DRC
24aeccff3e Include "Installed-Size" field in the deb-control file to prevent Ubuntu from complaining 2014-07-17 08:24:58 +00:00
DRC
d762c19b98 Include "Installed-Size" field in the deb-control file to prevent Ubuntu from complaining
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1329 632fc199-4ca6-4c93-a231-07263d6284db
2014-07-17 08:24:58 +00:00
DRC
0409942a02 Include "Installed-Size" field in the deb-control file to prevent Ubuntu from complaining
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1329 632fc199-4ca6-4c93-a231-07263d6284db
2014-07-17 08:24:58 +00:00
Josh Aas
e7a135b930 Bump version number for 2.0, make this version 2.0.1. 2014-07-15 13:55:55 -05:00
Frank Bossen
62300280b5 Update MS-SSIM tuning
Change optimization parameters when tuning for MS-SSIM for better
performance
2014-07-10 16:55:53 +09:00
Frank Bossen
55e3e7e819 Fix #64
Setting a user-defined quality level in cjpeg was incorrectly setting
quantization table
2014-07-09 11:37:36 +09:00
Josh Aas
0c59a4daf6 Merge pull request #62 from negge/master
Updating yuvjpeg and jpegyuv to match Daala tools.
2014-07-07 13:07:07 -05:00
Nathan E. Egge
d47fa82ae8 Updating yuvjpeg and jpegyuv to match Daala tools.
Add support for jpeg images with non-multiple of 16 sizes.
2014-07-07 13:46:59 -04:00
Frank Bossen
c3b7375ad8 Fix #56 2014-06-26 12:45:03 -04:00
DRC
e2f5c7cab3 Add proper support for Borland compilers (Borland needs section names to be prefixed with an underscore, and it needs OMF object files.) 2014-06-22 21:14:39 +00:00
DRC
2472bc7119 Add proper support for Borland compilers (Borland needs section names to be prefixed with an underscore, and it needs OMF object files.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1328 632fc199-4ca6-4c93-a231-07263d6284db
2014-06-22 21:14:39 +00:00
DRC
001189cb7a Add proper support for Borland compilers (Borland needs section names to be prefixed with an underscore, and it needs OMF object files.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1328 632fc199-4ca6-4c93-a231-07263d6284db
2014-06-22 21:14:39 +00:00
DRC
a81f542726 Big oops. wrjpgcom on Windows was being built using the rdjpgcom source.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1327 632fc199-4ca6-4c93-a231-07263d6284db
2014-06-22 20:50:14 +00:00
DRC
3da10338c6 Big oops. wrjpgcom on Windows was being built using the rdjpgcom source.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1326 632fc199-4ca6-4c93-a231-07263d6284db
2014-06-22 20:48:38 +00:00
DRC
24899de84c Big oops. wrjpgcom on Windows was being built using the rdjpgcom source.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1326 632fc199-4ca6-4c93-a231-07263d6284db
2014-06-22 20:48:38 +00:00
DRC
73821bff78 Big oops. wrjpgcom on Windows was being built using the rdjpgcom source.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1325 632fc199-4ca6-4c93-a231-07263d6284db
2014-06-22 20:46:48 +00:00
DRC
8d4544b7bc Big oops. wrjpgcom on Windows was being built using the rdjpgcom source. 2014-06-22 20:46:48 +00:00
DRC
60fe8fe525 Big oops. wrjpgcom on Windows was being built using the rdjpgcom source.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1325 632fc199-4ca6-4c93-a231-07263d6284db
2014-06-22 20:46:48 +00:00
DRC
23843313eb Prevent a buffer overrun if the comment begins with a literal quote character and the string exceeds 65k characters. Also prevent comments longer than 65k characters from being written, since this will produce an incorrect JPEG file.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1324 632fc199-4ca6-4c93-a231-07263d6284db
2014-06-22 20:38:54 +00:00
DRC
fc742e8e19 Prevent a buffer overrun if the comment begins with a literal quote character and the string exceeds 65k characters. Also prevent comments longer than 65k characters from being written, since this will produce an incorrect JPEG file.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1324 632fc199-4ca6-4c93-a231-07263d6284db
2014-06-22 20:38:54 +00:00
DRC
b7d6e84d6a Prevent a buffer overrun if the comment begins with a literal quote character and the string exceeds 65k characters. Also prevent comments longer than 65k characters from being written, since this will produce an incorrect JPEG file.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1323 632fc199-4ca6-4c93-a231-07263d6284db
2014-06-22 20:36:50 +00:00
DRC
e3d3cc073d Prevent a buffer overrun if the comment begins with a literal quote character and the string exceeds 65k characters. Also prevent comments longer than 65k characters from being written, since this will produce an incorrect JPEG file. 2014-06-22 20:36:50 +00:00
DRC
4272eec761 Prevent a buffer overrun if the comment begins with a literal quote character and the string exceeds 65k characters. Also prevent comments longer than 65k characters from being written, since this will produce an incorrect JPEG file.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1323 632fc199-4ca6-4c93-a231-07263d6284db
2014-06-22 20:36:50 +00:00
Frank Bossen
b8c8ef9851 Silence compiler warning
gcc 4.8 was throwing 'foo' may be used uninitialized in this function
[-Wmaybe-uninitialized]
2014-06-04 16:31:27 +02:00
Frank Bossen
a9356f18b4 Silence compiler warning 2014-05-30 03:18:37 +02:00
Frank Bossen
5dc78b3681 Merge branch 'jpegin' 2014-05-30 03:15:46 +02:00
Frank Bossen
66bf3abec7 Improve support of JPEG input in cjpeg
Add macro JPEG_RAW_READER that defines whether to pass RAW sample data
from input to output JPEG files (hence preserving color space and
sampling). Macro is now disabled by default.
Add code to copy metadata from input to output JPEG, hence preserving
color profiles and other important information
2014-05-30 03:14:09 +02:00
DRC
a8fb48b528 Remove VMS-specific code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1322 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-29 19:31:45 +00:00
DRC
b8f2b72acb Remove VMS-specific code 2014-05-29 19:31:45 +00:00
DRC
0175589d46 Remove VMS-specific code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1322 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-29 19:31:45 +00:00
DRC
88c7e30045 Our copyright string is longer than JMSG_LENGTH_MAX, and this was causing a buffer overrun if output_message() was called with msg_code set to JMSG_COPYRIGHT, or if format_message() was called with msg_code set to JMSG_COPYRIGHT and with a buffer of length JMSG_LENGTH_MAX.
We can't simply increase JMSG_LENGTH_MAX, because it is part of the libjpeg API, and it is generally assumed that a buffer of this length will be passed to format_message().  Thus, the easiest solution is simply to use a shorter copyright string for JMSG_COPYRIGHT.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1320 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-28 20:28:30 +00:00
DRC
d7a25595ce Our copyright string is longer than JMSG_LENGTH_MAX, and this was causing a buffer overrun if output_message() was called with msg_code set to JMSG_COPYRIGHT, or if format_message() was called with msg_code set to JMSG_COPYRIGHT and with a buffer of length JMSG_LENGTH_MAX.
We can't simply increase JMSG_LENGTH_MAX, because it is part of the libjpeg API, and it is generally assumed that a buffer of this length will be passed to format_message().  Thus, the easiest solution is simply to use a shorter copyright string for JMSG_COPYRIGHT.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1319 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-28 20:27:42 +00:00
DRC
12c8d0c891 Our copyright string is longer than JMSG_LENGTH_MAX, and this was causing a buffer overrun if output_message() was called with msg_code set to JMSG_COPYRIGHT, or if format_message() was called with msg_code set to JMSG_COPYRIGHT and with a buffer of length JMSG_LENGTH_MAX.
We can't simply increase JMSG_LENGTH_MAX, because it is part of the libjpeg API, and it is generally assumed that a buffer of this length will be passed to format_message().  Thus, the easiest solution is simply to use a shorter copyright string for JMSG_COPYRIGHT.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1319 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-28 20:27:42 +00:00
DRC
cf55f0b533 Our copyright string is longer than JMSG_LENGTH_MAX, and this was causing a buffer overrun if output_message() was called with msg_code set to JMSG_COPYRIGHT, or if format_message() was called with msg_code set to JMSG_COPYRIGHT and with a buffer of length JMSG_LENGTH_MAX.
We can't simply increase JMSG_LENGTH_MAX, because it is part of the libjpeg API, and it is generally assumed that a buffer of this length will be passed to format_message().  Thus, the easiest solution is simply to use a shorter copyright string for JMSG_COPYRIGHT.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1318 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-28 20:19:54 +00:00
DRC
7e6f1ee2d4 Our copyright string is longer than JMSG_LENGTH_MAX, and this was causing a buffer overrun if output_message() was called with msg_code set to JMSG_COPYRIGHT, or if format_message() was called with msg_code set to JMSG_COPYRIGHT and with a buffer of length JMSG_LENGTH_MAX.
We can't simply increase JMSG_LENGTH_MAX, because it is part of the libjpeg API, and it is generally assumed that a buffer of this length will be passed to format_message().  Thus, the easiest solution is simply to use a shorter copyright string for JMSG_COPYRIGHT.
2014-05-28 20:19:54 +00:00
DRC
4bd97823d3 Our copyright string is longer than JMSG_LENGTH_MAX, and this was causing a buffer overrun if output_message() was called with msg_code set to JMSG_COPYRIGHT, or if format_message() was called with msg_code set to JMSG_COPYRIGHT and with a buffer of length JMSG_LENGTH_MAX.
We can't simply increase JMSG_LENGTH_MAX, because it is part of the libjpeg API, and it is generally assumed that a buffer of this length will be passed to format_message().  Thus, the easiest solution is simply to use a shorter copyright string for JMSG_COPYRIGHT.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1318 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-28 20:19:54 +00:00
DRC
fced14c7b4 We don't support non-ANSI C compilers
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1317 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-21 04:13:09 +00:00
DRC
360ffd4441 We don't support non-ANSI C compilers 2014-05-21 04:13:09 +00:00
DRC
9b1ca0816c We don't support non-ANSI C compilers
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1317 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-21 04:13:09 +00:00
DRC
495e43426e Allow for building the MIPS DSPr2 extensions if the host is mips-* as well as mipsel-*. The DSPr2 extensions are little endian, so we still have to check that the compiler defines __MIPSEL__ before enabling them. This paves the way for supporting big-endian MIPS, and in the near term, it allows the SIMD extensions to be built with Sourcery CodeBench.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1316 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-19 19:13:22 +00:00
DRC
76ef3c5dda Allow for building the MIPS DSPr2 extensions if the host is mips-* as well as mipsel-*. The DSPr2 extensions are little endian, so we still have to check that the compiler defines __MIPSEL__ before enabling them. This paves the way for supporting big-endian MIPS, and in the near term, it allows the SIMD extensions to be built with Sourcery CodeBench. 2014-05-19 19:13:22 +00:00
DRC
0045d0072b Allow for building the MIPS DSPr2 extensions if the host is mips-* as well as mipsel-*. The DSPr2 extensions are little endian, so we still have to check that the compiler defines __MIPSEL__ before enabling them. This paves the way for supporting big-endian MIPS, and in the near term, it allows the SIMD extensions to be built with Sourcery CodeBench.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1316 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-19 19:13:22 +00:00
DRC
5ef463056a SIMD-accelerated int upsample routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1315 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 20:04:47 +00:00
DRC
6263c1fc1b SIMD-accelerated int upsample routine for MIPS DSPr2 2014-05-18 20:04:47 +00:00
DRC
7bd7012c98 SIMD-accelerated int upsample routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1315 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 20:04:47 +00:00
DRC
c728cfd8f2 Fix MIPS build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1314 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 19:36:05 +00:00
DRC
ecfbabdbf3 Fix MIPS build 2014-05-18 19:36:05 +00:00
DRC
3c9850814b Fix MIPS build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1314 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 19:36:05 +00:00
DRC
5de454b291 libjpeg-turbo has never supported non-ANSI compilers, so get rid of the crufty SIZEOF() macro. It was not being used consistently anyhow, so it would not have been possible to build prior releases of libjpeg-turbo using the broken compilers for which that macro was designed.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1313 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 19:04:03 +00:00
DRC
46611eb0ee libjpeg-turbo has never supported non-ANSI compilers, so get rid of the crufty SIZEOF() macro. It was not being used consistently anyhow, so it would not have been possible to build prior releases of libjpeg-turbo using the broken compilers for which that macro was designed. 2014-05-18 19:04:03 +00:00
DRC
66245aa735 libjpeg-turbo has never supported non-ANSI compilers, so get rid of the crufty SIZEOF() macro. It was not being used consistently anyhow, so it would not have been possible to build prior releases of libjpeg-turbo using the broken compilers for which that macro was designed.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1313 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 19:04:03 +00:00
DRC
5033f3e19a Remove MS-DOS code and information, and adjust copyright headers to reflect the removal of features in r1307 and r1308. libjpeg-turbo has never supported MS-DOS, nor is it even possible for us to do so.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1312 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 18:33:44 +00:00
DRC
144e7b79e4 Remove MS-DOS code and information, and adjust copyright headers to reflect the removal of features in r1307 and r1308. libjpeg-turbo has never supported MS-DOS, nor is it even possible for us to do so. 2014-05-18 18:33:44 +00:00
DRC
5ad13790c2 Remove MS-DOS code and information, and adjust copyright headers to reflect the removal of features in r1307 and r1308. libjpeg-turbo has never supported MS-DOS, nor is it even possible for us to do so.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1312 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 18:33:44 +00:00
DRC
7f4a81b769 Further copyright header cleanup
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1311 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 18:17:01 +00:00
DRC
814fb56282 Further copyright header cleanup 2014-05-18 18:17:01 +00:00
DRC
9f6bb55f67 Further copyright header cleanup
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1311 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 18:17:01 +00:00
DRC
da13af6b8d Further copyright header cleanup
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1310 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 17:52:06 +00:00
DRC
44e609fa3a Further copyright header cleanup 2014-05-18 17:52:06 +00:00
DRC
e383334c0a Further copyright header cleanup
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1310 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 17:52:06 +00:00
DRC
d88f7ddfbe Further copyright header cleanup
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1309 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 17:51:00 +00:00
DRC
7ad4962b66 Further copyright header cleanup
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1309 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-18 17:51:00 +00:00
Frank Bossen
535b1ee3ef Fix issue with JPEG read in cjpeg
Color space and sampling was not properly configured leading to errors
when encoding from a JPEG file.
2014-05-16 16:33:10 -04:00
Frank Bossen
e170b61137 Add support for JPEG input in cjpeg 2014-05-16 11:00:34 -04:00
DRC
bc56b754e1 Get rid of the HAVE_PROTOTYPES configuration option, as well as the related JMETHOD and JPP macros. libjpeg-turbo has never supported compilers that don't handle prototypes. Doing so requires ansi2knr, which isn't even supported in the IJG code anymore.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1308 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-16 10:43:44 +00:00
DRC
f8301c92dd Get rid of the HAVE_PROTOTYPES configuration option, as well as the related JMETHOD and JPP macros. libjpeg-turbo has never supported compilers that don't handle prototypes. Doing so requires ansi2knr, which isn't even supported in the IJG code anymore. 2014-05-16 10:43:44 +00:00
DRC
1aa56251a9 Get rid of the HAVE_PROTOTYPES configuration option, as well as the related JMETHOD and JPP macros. libjpeg-turbo has never supported compilers that don't handle prototypes. Doing so requires ansi2knr, which isn't even supported in the IJG code anymore.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1308 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-16 10:43:44 +00:00
DRC
52ded87680 Remove all of the NEED_SHORT_EXTERNAL_NAMES stuff. There is scant information available as to which linkers ever had a 15-character global symbol name limit. AFAICT, it might have been a VMS and/or a.out BSD thing, but none of those platforms have ever been supported by libjpeg-turbo (nor are such systems supported by other open source libraries of this nature.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1307 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-15 20:30:16 +00:00
DRC
2c0b793539 Remove all of the NEED_SHORT_EXTERNAL_NAMES stuff. There is scant information available as to which linkers ever had a 15-character global symbol name limit. AFAICT, it might have been a VMS and/or a.out BSD thing, but none of those platforms have ever been supported by libjpeg-turbo (nor are such systems supported by other open source libraries of this nature.) 2014-05-15 20:30:16 +00:00
DRC
3854b5ef59 Remove all of the NEED_SHORT_EXTERNAL_NAMES stuff. There is scant information available as to which linkers ever had a 15-character global symbol name limit. AFAICT, it might have been a VMS and/or a.out BSD thing, but none of those platforms have ever been supported by libjpeg-turbo (nor are such systems supported by other open source libraries of this nature.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1307 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-15 20:30:16 +00:00
DRC
64086281b3 Clean up code formatting in the SIMD interface functions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1306 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-15 19:46:48 +00:00
DRC
ef025d6c8c Clean up code formatting in the SIMD interface functions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1306 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-15 19:46:48 +00:00
DRC
1419852c42 Clean up code formatting in the SIMD interface functions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1305 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-15 19:45:11 +00:00
DRC
5d5b9a497b Clean up code formatting in the SIMD interface functions 2014-05-15 19:45:11 +00:00
DRC
b284a473f7 Clean up code formatting in the SIMD interface functions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1305 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-15 19:45:11 +00:00
DRC
1b3fd7eead SIMD-accelerated NULL convert routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1304 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-15 18:26:01 +00:00
DRC
99de998e2c SIMD-accelerated NULL convert routine for MIPS DSPr2 2014-05-15 18:26:01 +00:00
DRC
51b63d0931 SIMD-accelerated NULL convert routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1304 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-15 18:26:01 +00:00
DRC
a3c3bbc2f4 Fix build, which was broken by the checkin of the MIPS DSPr2 accelerated smooth downsampling routine. Until/unless other platforms include SIMD support for that function, it's just easier to #ifdef around it rather than adding stubs for the other platforms.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1303 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-15 18:22:24 +00:00
DRC
b70fe7221e Fix build, which was broken by the checkin of the MIPS DSPr2 accelerated smooth downsampling routine. Until/unless other platforms include SIMD support for that function, it's just easier to #ifdef around it rather than adding stubs for the other platforms. 2014-05-15 18:22:24 +00:00
DRC
f33b56330d Fix build, which was broken by the checkin of the MIPS DSPr2 accelerated smooth downsampling routine. Until/unless other platforms include SIMD support for that function, it's just easier to #ifdef around it rather than adding stubs for the other platforms.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1303 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-15 18:22:24 +00:00
DRC
0bf325b8ba Fix error in MIPS DSPr2 accelerated smooth downsample routine
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1302 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-15 17:10:39 +00:00
DRC
a37736dd43 Fix error in MIPS DSPr2 accelerated smooth downsample routine 2014-05-15 17:10:39 +00:00
DRC
ccee85d6e2 Fix error in MIPS DSPr2 accelerated smooth downsample routine
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1302 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-15 17:10:39 +00:00
DRC
6a61c1e6dc SIMD-accelerated h2v2 smooth downsampling routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1301 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-14 15:00:10 +00:00
DRC
c4c3ac6305 SIMD-accelerated h2v2 smooth downsampling routine for MIPS DSPr2 2014-05-14 15:00:10 +00:00
DRC
f069238be3 SIMD-accelerated h2v2 smooth downsampling routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1301 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-14 15:00:10 +00:00
DRC
1e9cbbad8a Minor tweak to improve code readability
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1300 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-14 14:57:43 +00:00
DRC
f66c307c2e Minor tweak to improve code readability 2014-05-14 14:57:43 +00:00
DRC
e7a9390725 Minor tweak to improve code readability
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1300 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-14 14:57:43 +00:00
DRC
3b489c3af7 Minor tweak to improve code readability
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1299 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-14 14:57:01 +00:00
DRC
147ae6f24c Minor tweak to improve code readability
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1299 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-14 14:57:01 +00:00
DRC
976fd9687e The x86/x86-64 SIMD extensions were originally designed to accommodate changing the value of RGB_*, but this apparently broke when RGB-to-gray colorspace conversion was accelerated. Further, the ARM NEON extensions have always assumed that JCS_RGB behaves identically to JCS_EXT_RGB. Rather than fix these issues, it makes more sense to just stop claiming that we support changing the values of RGB_*, since doing so is no longer necessary.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1298 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-13 18:41:33 +00:00
DRC
4464a39363 The x86/x86-64 SIMD extensions were originally designed to accommodate changing the value of RGB_*, but this apparently broke when RGB-to-gray colorspace conversion was accelerated. Further, the ARM NEON extensions have always assumed that JCS_RGB behaves identically to JCS_EXT_RGB. Rather than fix these issues, it makes more sense to just stop claiming that we support changing the values of RGB_*, since doing so is no longer necessary.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1298 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-13 18:41:33 +00:00
DRC
b844eaa360 SIMD-accelerated merged upsampling routines for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1297 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-13 18:40:14 +00:00
DRC
38bfd451d5 SIMD-accelerated merged upsampling routines for MIPS DSPr2 2014-05-13 18:40:14 +00:00
DRC
b530bd1f33 SIMD-accelerated merged upsampling routines for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1297 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-13 18:40:14 +00:00
DRC
3402a66a22 The x86/x86-64 SIMD extensions were originally designed to accommodate changing the value of RGB_*, but this apparently broke when RGB-to-gray colorspace conversion was accelerated. Further, the ARM NEON extensions have always assumed that JCS_RGB behaves identically to JCS_EXT_RGB. Rather than fix these issues, it makes more sense to just stop claiming that we support changing the values of RGB_*, since doing so is no longer necessary.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1296 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-13 18:38:36 +00:00
DRC
0297e2a61d The x86/x86-64 SIMD extensions were originally designed to accommodate changing the value of RGB_*, but this apparently broke when RGB-to-gray colorspace conversion was accelerated. Further, the ARM NEON extensions have always assumed that JCS_RGB behaves identically to JCS_EXT_RGB. Rather than fix these issues, it makes more sense to just stop claiming that we support changing the values of RGB_*, since doing so is no longer necessary. 2014-05-13 18:38:36 +00:00
DRC
486d2a028a The x86/x86-64 SIMD extensions were originally designed to accommodate changing the value of RGB_*, but this apparently broke when RGB-to-gray colorspace conversion was accelerated. Further, the ARM NEON extensions have always assumed that JCS_RGB behaves identically to JCS_EXT_RGB. Rather than fix these issues, it makes more sense to just stop claiming that we support changing the values of RGB_*, since doing so is no longer necessary.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1296 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-13 18:38:36 +00:00
DRC
78df2e6115 Add support for decompressing to RGB565 (16-bit) pixels
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1295 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-12 09:23:57 +00:00
DRC
cfbb147aad Add support for decompressing to RGB565 (16-bit) pixels 2014-05-12 09:23:57 +00:00
DRC
295df8bdad Add support for decompressing to RGB565 (16-bit) pixels
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1295 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-12 09:23:57 +00:00
DRC
6e8220eddc Document -rgb option in djpeg man page; "gray-scale"="grayscale"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1294 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-12 09:09:40 +00:00
DRC
e99d135774 Document -rgb option in djpeg man page; "gray-scale"="grayscale" 2014-05-12 09:09:40 +00:00
DRC
461283574a Document -rgb option in djpeg man page; "gray-scale"="grayscale"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1294 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-12 09:09:40 +00:00
DRC
90d6c3824b Document -rgb option in djpeg man page; "gray-scale"="grayscale"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1293 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-12 09:08:39 +00:00
DRC
646859004f Document -rgb option in djpeg man page; "gray-scale"="grayscale"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1293 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-12 09:08:39 +00:00
DRC
2a9f0cf36c Use 2-space indentation for the enums, to be consistent with the structs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1292 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-12 00:34:58 +00:00
DRC
f413bb5fb7 Use 2-space indentation for the enums, to be consistent with the structs 2014-05-12 00:34:58 +00:00
DRC
df3ff573cc Use 2-space indentation for the enums, to be consistent with the structs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1292 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-12 00:34:58 +00:00
DRC
333e9187c8 Use 2-space indentation for the enums, to be consistent with the structs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1291 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-12 00:34:08 +00:00
DRC
a72597b837 Use 2-space indentation for the enums, to be consistent with the structs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1291 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-12 00:34:08 +00:00
DRC
e3cb4eb05d Document the fact that the fast integer FDCT is not fully accelerated for quality levels above 97 + additional wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1290 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-11 23:15:52 +00:00
DRC
1d434bfdc9 Document the fact that the fast integer FDCT is not fully accelerated for quality levels above 97 + additional wordsmithing 2014-05-11 23:15:52 +00:00
DRC
64c1c3b7ec Document the fact that the fast integer FDCT is not fully accelerated for quality levels above 97 + additional wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1290 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-11 23:15:52 +00:00
DRC
05524e671e Document the fact that the fast integer FDCT is not fully accelerated for quality levels above 97 + additional wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1289 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-11 23:14:43 +00:00
DRC
c55d3622c8 Document the fact that the fast integer FDCT is not fully accelerated for quality levels above 97 + additional wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1289 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-11 23:14:43 +00:00
DRC
715bb41ead Port the more accurate (and slightly faster) floating point IDCT implementation from jpeg-8a and later. New research revealed that the SSE/SSE2 floating point IDCT implementation was actually more accurate than the jpeg-6b implementation, not less, which is why its mathematical results have always differed from those of the jpeg-6b implementation. This patch brings the accuracy of the C code in line with that of the SSE/SSE2 code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1288 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-11 10:09:07 +00:00
DRC
8b11360a8b Port the more accurate (and slightly faster) floating point IDCT implementation from jpeg-8a and later. New research revealed that the SSE/SSE2 floating point IDCT implementation was actually more accurate than the jpeg-6b implementation, not less, which is why its mathematical results have always differed from those of the jpeg-6b implementation. This patch brings the accuracy of the C code in line with that of the SSE/SSE2 code. 2014-05-11 10:09:07 +00:00
DRC
7f3a5c18e6 Port the more accurate (and slightly faster) floating point IDCT implementation from jpeg-8a and later. New research revealed that the SSE/SSE2 floating point IDCT implementation was actually more accurate than the jpeg-6b implementation, not less, which is why its mathematical results have always differed from those of the jpeg-6b implementation. This patch brings the accuracy of the C code in line with that of the SSE/SSE2 code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1288 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-11 10:09:07 +00:00
DRC
a758460175 Provide a more thorough description of the trade-offs between the various DCT/IDCT algorithms, based on new resarch
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1287 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-11 09:48:11 +00:00
DRC
e7fe0653e5 Provide a more thorough description of the trade-offs between the various DCT/IDCT algorithms, based on new resarch 2014-05-11 09:48:11 +00:00
DRC
eb590a6e25 Provide a more thorough description of the trade-offs between the various DCT/IDCT algorithms, based on new resarch
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1287 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-11 09:48:11 +00:00
DRC
8940e6ca86 Provide a more thorough description of the trade-offs between the various DCT/IDCT algorithms, based on new resarch
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1286 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-11 09:46:28 +00:00
DRC
6b48fbd229 Provide a more thorough description of the trade-offs between the various DCT/IDCT algorithms, based on new resarch
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1286 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-11 09:46:28 +00:00
DRC
b775351012 Convert tabs to spaces in the libjpeg code and the SIMD code (TurboJPEG retains the use of tabs for historical reasons. They were annoying in the libjpeg code primarily because they were not consistently used and because they were used to format as well as indent the code. In the case of TurboJPEG, tabs are used just to indent the code, so even if the editor assumes a different tab width, the code will still be readable.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1285 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-11 09:36:25 +00:00
DRC
311f16e848 Convert tabs to spaces in the libjpeg code and the SIMD code (TurboJPEG retains the use of tabs for historical reasons. They were annoying in the libjpeg code primarily because they were not consistently used and because they were used to format as well as indent the code. In the case of TurboJPEG, tabs are used just to indent the code, so even if the editor assumes a different tab width, the code will still be readable.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1285 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-11 09:36:25 +00:00
Frank Bossen
ea4fad9aec Fix #50
Make trellis work with DCT implementations other than the default:
scale and store transform coefficients for trellis
2014-05-10 14:59:58 -04:00
Frank Bossen
4b1094cc3a Disable trellis in jpegtran
Trellis quantization is not supposed to be enabled in the jpegtran
application as it does not perform transform and quantization.
Should fix #49
2014-05-10 08:19:31 -04:00
DRC
e47364ac56 Modify Windows build system to take into account new assembly file names
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1283 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-10 10:10:03 +00:00
DRC
84f9fbfe3e Modify Windows build system to take into account new assembly file names 2014-05-10 10:10:03 +00:00
DRC
3b85b4e1bd Modify Windows build system to take into account new assembly file names
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1283 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-10 10:10:03 +00:00
DRC
24e92e9fc0 Using subdirectories unfortunately opened up a can of worms. In order to prevent object name conflicts, it is necessary to use the subdir-objects automake directive, but it simply doesn't work right on some of the versions of automake we still have to support. Another option would be to add a separate Makefile.am file to each subdirectory, but that requires maintaining a completely different set of build rules for each one. Fortunately, however, we're in the 21st century now, so we can use filenames longer than 8.3.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1282 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-10 09:53:34 +00:00
DRC
1bd801a872 Using subdirectories unfortunately opened up a can of worms. In order to prevent object name conflicts, it is necessary to use the subdir-objects automake directive, but it simply doesn't work right on some of the versions of automake we still have to support. Another option would be to add a separate Makefile.am file to each subdirectory, but that requires maintaining a completely different set of build rules for each one. Fortunately, however, we're in the 21st century now, so we can use filenames longer than 8.3. 2014-05-10 09:53:34 +00:00
DRC
4528256c56 Using subdirectories unfortunately opened up a can of worms. In order to prevent object name conflicts, it is necessary to use the subdir-objects automake directive, but it simply doesn't work right on some of the versions of automake we still have to support. Another option would be to add a separate Makefile.am file to each subdirectory, but that requires maintaining a completely different set of build rules for each one. Fortunately, however, we're in the 21st century now, so we can use filenames longer than 8.3.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1282 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-10 09:53:34 +00:00
Josh Aas
3f1e5d6842 Update version to 2.0pre. 2014-05-09 22:11:12 -05:00
Frank Bossen
93da07241d Merge branch 'trellis' 2014-05-09 18:28:26 -04:00
DRC
72130be99f Re-organize the x86/x86-64 SIMD routines into separate folders by instruction set so we can name each routine similarly to its corresponding C file. This also makes it easier to add support for new instruction sets.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1280 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-09 20:14:26 +00:00
DRC
6af3f00efa Re-organize the x86/x86-64 SIMD routines into separate folders by instruction set so we can name each routine similarly to its corresponding C file. This also makes it easier to add support for new instruction sets. 2014-05-09 20:14:26 +00:00
DRC
eeace92a35 Re-organize the x86/x86-64 SIMD routines into separate folders by instruction set so we can name each routine similarly to its corresponding C file. This also makes it easier to add support for new instruction sets.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1280 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-09 20:14:26 +00:00
DRC
1a45b81fa2 Remove trailing spaces (+ one additional tab in TJUnitTest.java that was missed in the previous commit)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1279 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-09 18:06:58 +00:00
DRC
0d25e86574 Remove trailing spaces (+ one additional tab in TJUnitTest.java that was missed in the previous commit) 2014-05-09 18:06:58 +00:00
DRC
b7a30f1186 Remove trailing spaces (+ one additional tab in TJUnitTest.java that was missed in the previous commit)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1279 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-09 18:06:58 +00:00
DRC
e5eaf37440 Convert tabs to spaces in the libjpeg code and the SIMD code (TurboJPEG retains the use of tabs for historical reasons. They were annoying in the libjpeg code primarily because they were not consistently used and because they were used to format as well as indent the code. In the case of TurboJPEG, tabs are used just to indent the code, so even if the editor assumes a different tab width, the code will still be readable.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1278 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-09 18:00:32 +00:00
DRC
e45363d7c2 Convert tabs to spaces in the libjpeg code and the SIMD code (TurboJPEG retains the use of tabs for historical reasons. They were annoying in the libjpeg code primarily because they were not consistently used and because they were used to format as well as indent the code. In the case of TurboJPEG, tabs are used just to indent the code, so even if the editor assumes a different tab width, the code will still be readable.) 2014-05-09 18:00:32 +00:00
DRC
16d7eeb944 Convert tabs to spaces in the libjpeg code and the SIMD code (TurboJPEG retains the use of tabs for historical reasons. They were annoying in the libjpeg code primarily because they were not consistently used and because they were used to format as well as indent the code. In the case of TurboJPEG, tabs are used just to indent the code, so even if the editor assumes a different tab width, the code will still be readable.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1278 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-09 18:00:32 +00:00
Frank Bossen
87254c1c44 Use single DC scan by default
Value of cinfo->one_dc_scan is set to true by default to use a single
DC scan for all components.
Option -onedcscan is replaced by -multidcscan to enable multiple DC
scans.
While this change appears to degrade compression performance it
improves compatibility with a wider range of JPEG decoders.
2014-05-09 10:46:00 -04:00
DRC
771886c192 Fix an error in the MIPS DSPr2 fancy upsampling routine
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1277 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-09 14:45:55 +00:00
DRC
ef1c66701a Fix an error in the MIPS DSPr2 fancy upsampling routine 2014-05-09 14:45:55 +00:00
DRC
9a4231edfe Fix an error in the MIPS DSPr2 fancy upsampling routine
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1277 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-09 14:45:55 +00:00
Josh Aas
a5195816f6 Add configure check for libm/pow. Fixes Linux build issue. 2014-05-08 22:25:29 -05:00
Frank Bossen
13e2115054 Add option to have single DC scan
Add option to have a single DC scan wherein all components are
interleaved when using progressive mode. This may resolve compatibility
issues raised in #29 and #48.
This option is available through -onedcscan in cjpeg
2014-05-08 17:33:14 -04:00
Frank Bossen
8a99fcac80 Correct comment 2014-05-08 17:00:53 -04:00
Frank Bossen
061d42c272 Fix #47
When specifying -debug or -verbose in the cjpeg application the scans
selected by the scan optimization process are printed to stderr
2014-05-08 16:44:33 -04:00
Frank Bossen
d236890325 Update copyright headers/statements 2014-05-08 16:42:51 -04:00
Frank Bossen
c8e03dbda5 Fix issue with trellis and no scan opt
Disabling scan optimization with trellis enabled was leading to
incorrect results
2014-05-08 15:50:22 -04:00
DRC
a32b3eca99 Fix regression that caused 'make test' to fail with non-x86 SIMD code. The round-off error in the SIMD float DCT/IDCT routines only exists in the SSE and SSE2 implementations.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1276 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-07 06:02:57 +00:00
DRC
f017a5de0f Fix regression that caused 'make test' to fail with non-x86 SIMD code. The round-off error in the SIMD float DCT/IDCT routines only exists in the SSE and SSE2 implementations. 2014-05-07 06:02:57 +00:00
DRC
ffcbd29084 Fix regression that caused 'make test' to fail with non-x86 SIMD code. The round-off error in the SIMD float DCT/IDCT routines only exists in the SSE and SSE2 implementations.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1276 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-07 06:02:57 +00:00
DRC
29d30cb855 Shared the rm commands to reduce as much output noise as possible
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1275 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 22:49:02 +00:00
DRC
e77bd79dc2 Shared the rm commands to reduce as much output noise as possible 2014-05-06 22:49:02 +00:00
DRC
b9e50a2b57 Shared the rm commands to reduce as much output noise as possible
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1275 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 22:49:02 +00:00
DRC
35db75ea3c Redesign the libjpeg regression tests so that they fully cover all of the SIMD-accelerated algorithms (and most of the other ones as well)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1274 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 22:44:46 +00:00
DRC
943adfb1fe Redesign the libjpeg regression tests so that they fully cover all of the SIMD-accelerated algorithms (and most of the other ones as well) 2014-05-06 22:44:46 +00:00
DRC
8a13ae9f25 Redesign the libjpeg regression tests so that they fully cover all of the SIMD-accelerated algorithms (and most of the other ones as well)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1274 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 22:44:46 +00:00
DRC
393bac6de4 Android build instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1273 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 21:59:31 +00:00
DRC
67972b4ea0 Android build instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1273 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 21:59:31 +00:00
DRC
b0a9cca1e3 Replace our custom version of Android.mk with instructions on how to build a libjpeg-turbo SDK for Android using autotools. Upon consulting with AOSP, it appears that Android.mk isn't really necessary except when building libjpeg-turbo for use by the Android platform itself, and it makes more sense for them to maintain the makefile for that purpose rather than for it to be upstreamed. ndk-build has serious limitations that prevent it from being used to generate static libjpeg-turbo libraries (mainly, it isn't possible to combine pre-built objects from one module into a static library for another module, which is necessary because the SIMD extensions sometimes have to be built with different CFLAGS than the rest of the code.) In general, it's just better not to introduce a new build system.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1272 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 21:03:35 +00:00
DRC
43e9cee4b2 Replace our custom version of Android.mk with instructions on how to build a libjpeg-turbo SDK for Android using autotools. Upon consulting with AOSP, it appears that Android.mk isn't really necessary except when building libjpeg-turbo for use by the Android platform itself, and it makes more sense for them to maintain the makefile for that purpose rather than for it to be upstreamed. ndk-build has serious limitations that prevent it from being used to generate static libjpeg-turbo libraries (mainly, it isn't possible to combine pre-built objects from one module into a static library for another module, which is necessary because the SIMD extensions sometimes have to be built with different CFLAGS than the rest of the code.) In general, it's just better not to introduce a new build system. 2014-05-06 21:03:35 +00:00
DRC
3f4fb1a62d Replace our custom version of Android.mk with instructions on how to build a libjpeg-turbo SDK for Android using autotools. Upon consulting with AOSP, it appears that Android.mk isn't really necessary except when building libjpeg-turbo for use by the Android platform itself, and it makes more sense for them to maintain the makefile for that purpose rather than for it to be upstreamed. ndk-build has serious limitations that prevent it from being used to generate static libjpeg-turbo libraries (mainly, it isn't possible to combine pre-built objects from one module into a static library for another module, which is necessary because the SIMD extensions sometimes have to be built with different CFLAGS than the rest of the code.) In general, it's just better not to introduce a new build system.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1272 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 21:03:35 +00:00
DRC
425c5a57cf Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1271 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 20:56:01 +00:00
DRC
59326a1491 Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1271 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 20:56:01 +00:00
DRC
dab6b8a1a3 Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1270 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 20:53:25 +00:00
DRC
3b78447867 Wordsmithing 2014-05-06 20:53:25 +00:00
DRC
8a1f94b7b8 Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1270 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 20:53:25 +00:00
DRC
343478622d SIMD-accelerated slow integer IDCT routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1269 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 09:53:21 +00:00
DRC
7824f70008 SIMD-accelerated slow integer IDCT routine for MIPS DSPr2 2014-05-06 09:53:21 +00:00
DRC
fbde10ef57 SIMD-accelerated slow integer IDCT routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1269 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 09:53:21 +00:00
DRC
f57b8a6357 Phrasing. Boom.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1268 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 09:41:08 +00:00
DRC
361192b972 Phrasing. Boom. 2014-05-06 09:41:08 +00:00
DRC
4ed09b89cf Phrasing. Boom.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1268 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 09:41:08 +00:00
DRC
66129dc660 Redesign the libjpeg regression tests so that they fully cover all of the SIMD-accelerated algorithms (and most of the other ones as well)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1267 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 08:58:11 +00:00
DRC
1c6030799d Redesign the libjpeg regression tests so that they fully cover all of the SIMD-accelerated algorithms (and most of the other ones as well) 2014-05-06 08:58:11 +00:00
DRC
c0e5229b23 Redesign the libjpeg regression tests so that they fully cover all of the SIMD-accelerated algorithms (and most of the other ones as well)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1267 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-06 08:58:11 +00:00
DRC
06296e80c9 First pass at an Android makefile
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1265 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-05 20:55:24 +00:00
DRC
6fc85ff960 First pass at an Android makefile 2014-05-05 20:55:24 +00:00
DRC
063d3128a8 First pass at an Android makefile
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1265 632fc199-4ca6-4c93-a231-07263d6284db
2014-05-05 20:55:24 +00:00
Frank Bossen
8b8d88c850 Improve cjpeg help text
List options related to trellis quantization in cjpeg help text
2014-05-05 11:38:43 -04:00
Frank Bossen
a5403fda93 Remove outdated and incorrect comment 2014-05-05 11:31:34 -04:00
Frank Bossen
c88aade31c Revert type change
Revert type of use_moz_defaults to boolean
2014-04-30 14:54:18 -04:00
Frank Bossen
101df25fde Modify trellis parameter defaults
Modify trellis parameters to optimize for PSNR-HVS by default
2014-04-29 14:03:34 -04:00
Frank Bossen
21b2f11a42 Fix issue with quantization matrix optimization
Update quantization matrix in trellis loop
2014-04-29 13:00:50 -04:00
Frank Bossen
cd3c32f15d Update trellis optimization parameters
Slightly improved parameters are provided when optimizing for SSIM
metric
2014-04-29 12:33:46 -04:00
Frank Bossen
87d506416f Fix issue when trellis is disabled
master->pass_number_scan_opt_base needs to be set to appropriate value
when trellis is disabled
2014-04-29 12:32:05 -04:00
Frank Bossen
b03b5797f4 Add optimization of quantization matrix
Optimizes quantization matrix by minimizing reconstruction error based
on quantized coefficients.
Feature is controlled by cinfo->trellis_q_opt; disabled by default.
2014-04-28 16:28:05 -04:00
Frank Bossen
e5f8575776 Add option to tune for MS-SSIM
Added -tune-ms-ssim option to cjpeg to tune for multiscale SSIM metric
2014-04-27 22:01:40 -04:00
Josh Aas
b36bec4d71 Merge pull request #44 from h0r14/master
turbojpeg warning [-Wattributes]
2014-04-27 20:47:01 -05:00
Horia Racoviceanu
62003f9ae5 turbojpeg warning [-Wattributes]
warning: always_inline function might not be inlinable
Patch from http://sourceforge.net/p/libjpeg-turbo/patches/56/
2014-04-27 02:39:59 +00:00
Josh Aas
7d7e24c60a Merge pull request #43 from reubenhwk/cleanup_v2
Cleanup v2
2014-04-24 08:22:24 -05:00
Reuben Hawkins
b4c7d90b3f bump version to v1.0.2 2014-04-23 20:19:47 -05:00
Reuben Hawkins
e4fa772b58 adjust_exif_parameters only needed in JPEG_LIB_VER > 70
The invocation of this function is wrapped in an ifdef JPEGLIB >70
but the definition of the function wasn't.  This change adds the
ifdef around the function definition.
2014-04-23 20:19:47 -05:00
Reuben Hawkins
2086f28340 tjbench.c: return retval in funcs defining it
the throw macros set retval, but not all functions use/return this
value.  This change, mainly to clean up compiler warnings, makes
those functions return a value.
2014-04-23 20:19:47 -05:00
DRC
61976bd8a9 We use __CHAR_UNSIGNED__ (automatically defined by the AC_C_CHAR_UNSIGNED macro) rather than CHAR_IS_UNSIGNED (defined by custom autoconf code in libjpeg that we didn't port over), although I doubt it matters on any of the platforms we support.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1264 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 19:13:10 +00:00
DRC
f317d8fe84 We use __CHAR_UNSIGNED__ (automatically defined by the AC_C_CHAR_UNSIGNED macro) rather than CHAR_IS_UNSIGNED (defined by custom autoconf code in libjpeg that we didn't port over), although I doubt it matters on any of the platforms we support.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1264 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 19:13:10 +00:00
DRC
4dae78f498 We use __CHAR_UNSIGNED__ (automatically defined by the AC_C_CHAR_UNSIGNED macro) rather than CHAR_IS_UNSIGNED (defined by custom autoconf code in libjpeg that we didn't port over), although I doubt it matters on any of the platforms we support.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1263 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 19:11:52 +00:00
DRC
a0908f87a5 We use __CHAR_UNSIGNED__ (automatically defined by the AC_C_CHAR_UNSIGNED macro) rather than CHAR_IS_UNSIGNED (defined by custom autoconf code in libjpeg that we didn't port over), although I doubt it matters on any of the platforms we support. 2014-04-20 19:11:52 +00:00
DRC
fda32bfb93 We use __CHAR_UNSIGNED__ (automatically defined by the AC_C_CHAR_UNSIGNED macro) rather than CHAR_IS_UNSIGNED (defined by custom autoconf code in libjpeg that we didn't port over), although I doubt it matters on any of the platforms we support.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1263 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 19:11:52 +00:00
DRC
230d09dbed Fix crashes and bogus output in the CMYK and decode-to-YUV features that occurred if JCS_EXTENSIONS wasn't defined.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1260 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 09:42:49 +00:00
DRC
4c778664d0 Fix crashes and bogus output in the CMYK and decode-to-YUV features that occurred if JCS_EXTENSIONS wasn't defined. 2014-04-20 09:42:49 +00:00
DRC
fc6c8738e3 Fix crashes and bogus output in the CMYK and decode-to-YUV features that occurred if JCS_EXTENSIONS wasn't defined.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1260 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 09:42:49 +00:00
DRC
6887f05d19 Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1259 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 09:23:01 +00:00
DRC
2732926d8d Fix 'make dist' 2014-04-20 09:23:01 +00:00
DRC
fc42227f55 Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1259 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 09:23:01 +00:00
DRC
ff6961f3d2 This patch accomplishes the following:
-- Auto-generates HAVE_LOCALE_H macro and adds it to jconfig.h (this is used by rdjpgcom.c.)
-- Reconciles the description and ordering of macros between config.h.in and jconfig.h.in, so the two files can be easily diffed.
-- Eliminates the use of the autoheader-generated config.h in the project and moves relevant internal-only macros into a new file, jconfigint.h.  This is to avoid "already defined" warnings in files that were including both config.h (to get the internal autotools package information or the INLINE definition) and jconfig.h.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1258 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 09:17:11 +00:00
DRC
dec1abe515 This patch accomplishes the following:
-- Auto-generates HAVE_LOCALE_H macro and adds it to jconfig.h (this is used by rdjpgcom.c.)
-- Reconciles the description and ordering of macros between config.h.in and jconfig.h.in, so the two files can be easily diffed.
-- Eliminates the use of the autoheader-generated config.h in the project and moves relevant internal-only macros into a new file, jconfigint.h.  This is to avoid "already defined" warnings in files that were including both config.h (to get the internal autotools package information or the INLINE definition) and jconfig.h.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1258 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 09:17:11 +00:00
DRC
714839d402 This patch accomplishes the following:
-- Auto-generates HAVE_LOCALE_H macro and adds it to jconfig.h (this is used by rdjpgcom.c.)
-- Reconciles the description and ordering of macros between config.h.in and jconfig.h.in, so the two files can be easily diffed.
-- Eliminates the use of the autoheader-generated config.h in the project and moves relevant internal-only macros into a new file, jconfigint.h.  This is to avoid "already defined" warnings in files that were including both config.h (to get the internal autotools package information or the INLINE definition) and jconfig.h.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1257 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 09:13:37 +00:00
DRC
8c1d7c702e This patch accomplishes the following:
-- Auto-generates HAVE_LOCALE_H macro and adds it to jconfig.h (this is used by rdjpgcom.c.)
-- Reconciles the description and ordering of macros between config.h.in and jconfig.h.in, so the two files can be easily diffed.
-- Eliminates the use of the autoheader-generated config.h in the project and moves relevant internal-only macros into a new file, jconfigint.h.  This is to avoid "already defined" warnings in files that were including both config.h (to get the internal autotools package information or the INLINE definition) and jconfig.h.
2014-04-20 09:13:37 +00:00
DRC
6f7100360e This patch accomplishes the following:
-- Auto-generates HAVE_LOCALE_H macro and adds it to jconfig.h (this is used by rdjpgcom.c.)
-- Reconciles the description and ordering of macros between config.h.in and jconfig.h.in, so the two files can be easily diffed.
-- Eliminates the use of the autoheader-generated config.h in the project and moves relevant internal-only macros into a new file, jconfigint.h.  This is to avoid "already defined" warnings in files that were including both config.h (to get the internal autotools package information or the INLINE definition) and jconfig.h.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1257 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 09:13:37 +00:00
DRC
beb0b33764 Work around an issue in Visual C++ 2010 and 2013 that was causing the 256-bit bitmap test in the regression tests to fail. More specifically, when optimization is enabled in these versions of Visual C++, the optimizer seems to get confused by the following code block:
delta = cur0 * 2;
       cur0 += delta;          /* form error * 3 */
       errorptr[0] = (FSERROR) (bpreverr0 + cur0);
       cur0 += delta;          /* form error * 5 */
       bpreverr0 = belowerr0 + cur0;
       cur0 += delta;          /* form error * 7 */

Each time cur0 is incremented by delta, the compiled code doubles the value of delta (WTF?!)  Thus, by the time the end of the block is reached, cur0 is equal to 15 times its former self, not 7 times its former self as it should be.  At any rate, it was a lot simpler to just refactor the code so that it uses multiplication.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1255 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 07:36:33 +00:00
DRC
b1398cba43 Prevent svn:mergeinfo from being modified on Makefile.am and simd/jsimd*.c every time a merge is done.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1254 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 07:35:16 +00:00
DRC
ac9a92ebbd Work around an issue in Visual C++ 2010 and 2013 that was causing the 256-bit bitmap test in the regression tests to fail. More specifically, when optimization is enabled in these versions of Visual C++, the optimizer seems to get confused by the following code block:
delta = cur0 * 2;
       cur0 += delta;          /* form error * 3 */
       errorptr[0] = (FSERROR) (bpreverr0 + cur0);
       cur0 += delta;          /* form error * 5 */
       bpreverr0 = belowerr0 + cur0;
       cur0 += delta;          /* form error * 7 */

Each time cur0 is incremented by delta, the compiled code doubles the value of delta (WTF?!)  Thus, by the time the end of the block is reached, cur0 is equal to 15 times its former self, not 7 times its former self as it should be.  At any rate, it was a lot simpler to just refactor the code so that it uses multiplication.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1253 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 07:22:21 +00:00
DRC
18f4486b9a Work around an issue in Visual C++ 2010 and 2013 that was causing the 256-bit bitmap test in the regression tests to fail. More specifically, when optimization is enabled in these versions of Visual C++, the optimizer seems to get confused by the following code block:
delta = cur0 * 2;
       cur0 += delta;          /* form error * 3 */
       errorptr[0] = (FSERROR) (bpreverr0 + cur0);
       cur0 += delta;          /* form error * 5 */
       bpreverr0 = belowerr0 + cur0;
       cur0 += delta;          /* form error * 7 */

Each time cur0 is incremented by delta, the compiled code doubles the value of delta (WTF?!)  Thus, by the time the end of the block is reached, cur0 is equal to 15 times its former self, not 7 times its former self as it should be.  At any rate, it was a lot simpler to just refactor the code so that it uses multiplication.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1253 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 07:22:21 +00:00
DRC
06fa20d407 1.3.2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1252 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 07:20:31 +00:00
DRC
4326901a92 1.3.2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1252 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 07:20:31 +00:00
DRC
0816d086b5 Work around an issue in Visual C++ 2010 and 2013 that was causing the 256-bit bitmap test in the regression tests to fail. More specifically, when optimization is enabled in these versions of Visual C++, the optimizer seems to get confused by the following code block:
delta = cur0 * 2;
       cur0 += delta;          /* form error * 3 */
       errorptr[0] = (FSERROR) (bpreverr0 + cur0);
       cur0 += delta;          /* form error * 5 */
       bpreverr0 = belowerr0 + cur0;
       cur0 += delta;          /* form error * 7 */

Each time cur0 is incremented by delta, the compiled code doubles the value of delta (WTF?!)  Thus, by the time the end of the block is reached, cur0 is equal to 15 times its former self, not 7 times its former self as it should be.  At any rate, it was a lot simpler to just refactor the code so that it uses multiplication.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1251 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 06:57:52 +00:00
DRC
faac204f30 Work around an issue in Visual C++ 2010 and 2013 that was causing the 256-bit bitmap test in the regression tests to fail. More specifically, when optimization is enabled in these versions of Visual C++, the optimizer seems to get confused by the following code block:
delta = cur0 * 2;
       cur0 += delta;          /* form error * 3 */
       errorptr[0] = (FSERROR) (bpreverr0 + cur0);
       cur0 += delta;          /* form error * 5 */
       bpreverr0 = belowerr0 + cur0;
       cur0 += delta;          /* form error * 7 */

Each time cur0 is incremented by delta, the compiled code doubles the value of delta (WTF?!)  Thus, by the time the end of the block is reached, cur0 is equal to 15 times its former self, not 7 times its former self as it should be.  At any rate, it was a lot simpler to just refactor the code so that it uses multiplication.
2014-04-20 06:57:52 +00:00
DRC
944cf32d5a Work around an issue in Visual C++ 2010 and 2013 that was causing the 256-bit bitmap test in the regression tests to fail. More specifically, when optimization is enabled in these versions of Visual C++, the optimizer seems to get confused by the following code block:
delta = cur0 * 2;
       cur0 += delta;          /* form error * 3 */
       errorptr[0] = (FSERROR) (bpreverr0 + cur0);
       cur0 += delta;          /* form error * 5 */
       bpreverr0 = belowerr0 + cur0;
       cur0 += delta;          /* form error * 7 */

Each time cur0 is incremented by delta, the compiled code doubles the value of delta (WTF?!)  Thus, by the time the end of the block is reached, cur0 is equal to 15 times its former self, not 7 times its former self as it should be.  At any rate, it was a lot simpler to just refactor the code so that it uses multiplication.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1251 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-20 06:57:52 +00:00
DRC
fe9c907b45 Minor comment correction (we support the full range of IDCT scaling factors now.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1250 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-18 07:58:29 +00:00
DRC
473bc8edfc Minor comment correction (we support the full range of IDCT scaling factors now.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1250 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-18 07:58:29 +00:00
DRC
d76ba910e9 Minor comment correction (we support the full range of IDCT scaling factors now.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1249 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-18 07:57:48 +00:00
DRC
682c2b69f9 Minor comment correction (we support the full range of IDCT scaling factors now.) 2014-04-18 07:57:48 +00:00
DRC
52076a7015 Minor comment correction (we support the full range of IDCT scaling factors now.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1249 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-18 07:57:48 +00:00
DRC
d0c9f0cffd Clarify how to do a 64-bit build using the Visual Studio IDE
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1248 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-18 07:50:17 +00:00
DRC
23a5f07202 Clarify how to do a 64-bit build using the Visual Studio IDE
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1248 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-18 07:50:17 +00:00
DRC
8666f4f94c Clarify how to do a 64-bit build using the Visual Studio IDE
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1247 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-18 07:49:29 +00:00
DRC
2dc2bbde66 Clarify how to do a 64-bit build using the Visual Studio IDE 2014-04-18 07:49:29 +00:00
DRC
09d26479de Clarify how to do a 64-bit build using the Visual Studio IDE
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1247 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-18 07:49:29 +00:00
Reuben Hawkins
548aeb977d turbojpeg.c: clean up warnings around getinstance
This macro defined two local variables, cinfo and dinfo, but both
aren't always used.  Add a (void)cinfo; and (void)dinfo in there
to hush up the compiler.
2014-04-17 23:00:01 -05:00
Reuben Hawkins
b93b80b3aa jcmaster.c: fix compiler warnings
* remove unused variable size[8]
* initialize base_scan_idx
2014-04-17 23:00:01 -05:00
Reuben Hawkins
706f2a8881 configure.ac: fix INLINE definition
The inline attribute must still be prefixed with 'inline' to work
correctly.
2014-04-17 23:00:01 -05:00
Reuben Hawkins
abffeb8390 configure.ac: enable silent build rules
Silent build rules make it much less likely for warnings to go by
unnoticed.
2014-04-17 23:00:01 -05:00
Reuben Hawkins
bd845c8691 configure.ac: fix some autoconf warnings 2014-04-17 23:00:01 -05:00
Reuben Hawkins
4e5e4787e4 configure.ac: use AC_LANG_SOURCE where appropriate 2014-04-17 23:00:01 -05:00
Reuben Hawkins
100ed0a5f9 bump version to v1.0.1 2014-04-17 23:00:01 -05:00
DRC
4d2ff7dad7 Update Windows build instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1246 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-18 02:46:59 +00:00
DRC
af64ac105f Update Windows build instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1246 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-18 02:46:59 +00:00
DRC
9e5b681195 Update Windows build instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1245 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-17 20:05:03 +00:00
DRC
d895eac10e Update Windows build instructions 2014-04-17 20:05:03 +00:00
DRC
31bdb9940e Update Windows build instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1245 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-17 20:05:03 +00:00
DRC
0c989d9e90 Fix warnings about unused variables when building with GCC 4.8.x
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1242 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-17 00:47:18 +00:00
DRC
2d27a01e6d Fix warnings about unused variables when building with GCC 4.8.x
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1242 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-17 00:47:18 +00:00
DRC
4186162665 Fix warnings about unused variables when building with GCC 4.8.x
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1241 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-16 23:38:37 +00:00
DRC
378f4528ad Fix warnings about unused variables when building with GCC 4.8.x 2014-04-16 23:38:37 +00:00
DRC
abf87ed578 Fix warnings about unused variables when building with GCC 4.8.x
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1241 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-16 23:38:37 +00:00
DRC
c2caad07bc Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC; Unix EOL
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1240 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-16 23:37:23 +00:00
DRC
7c0f91e4e6 Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC; Unix EOL
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1240 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-16 23:37:23 +00:00
DRC
72a8ca0d8e Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC; Unix EOL
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1239 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-16 23:32:58 +00:00
DRC
e223a7ee9e Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC; Unix EOL 2014-04-16 23:32:58 +00:00
DRC
161abb182e Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC; Unix EOL
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1239 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-16 23:32:58 +00:00
DRC
9fe22dac31 Set the BUILD environment variable properly when building with MinGW implementations that lack a Unix shell (TDM-GCC, for instance); Only set CMP0022 if it is supported (older CMake implementations don't support it); Remove trailing spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1238 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-16 23:30:38 +00:00
DRC
8f4115dc8c Set the BUILD environment variable properly when building with MinGW implementations that lack a Unix shell (TDM-GCC, for instance); Only set CMP0022 if it is supported (older CMake implementations don't support it); Remove trailing spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1238 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-16 23:30:38 +00:00
DRC
ffb2b6e200 Set the BUILD environment variable properly when building with MinGW implementations that lack a Unix shell (TDM-GCC, for instance); Only set CMP0022 if it is supported (older CMake implementations don't support it); Remove trailing spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1237 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-16 23:29:38 +00:00
DRC
2e3f284fa5 Set the BUILD environment variable properly when building with MinGW implementations that lack a Unix shell (TDM-GCC, for instance); Only set CMP0022 if it is supported (older CMake implementations don't support it); Remove trailing spaces 2014-04-16 23:29:38 +00:00
DRC
8c4107ca00 Set the BUILD environment variable properly when building with MinGW implementations that lack a Unix shell (TDM-GCC, for instance); Only set CMP0022 if it is supported (older CMake implementations don't support it); Remove trailing spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1237 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-16 23:29:38 +00:00
Frank Bossen
45c800e2d6 Fix #40
Improve code portability to deal with cases where:
- right shift is always unsigned
- size of int is not 32 bits
2014-04-15 18:17:09 +02:00
Frank Bossen
3fd6eec30b Remove comment on portability
Derivation of sign value relies on shift right operator >> being an
arithmetic shift. It is thus not strictly portable since the C standard
defines the result of x >> y as "implementation-defined" when x is a
signed integer with a negative value.
2014-04-15 15:23:30 +02:00
Frank Bossen
d273dc190c Fix #39
Avoid declaring variable in middle of code block
2014-04-15 15:07:55 +02:00
DRC
9a341f803f Remove trailing spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1236 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-15 03:43:44 +00:00
DRC
94d0aa2e4c Remove trailing spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1236 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-15 03:43:44 +00:00
DRC
241ad88b7d Remove trailing spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1235 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-15 03:42:40 +00:00
DRC
2dac0fbd04 Remove trailing spaces 2014-04-15 03:42:40 +00:00
DRC
16cc1be7a6 Remove trailing spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1235 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-15 03:42:40 +00:00
DRC
990342cd57 wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1234 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-15 03:41:31 +00:00
DRC
9e74f518bd wordsmithing 2014-04-15 03:41:31 +00:00
DRC
f8ee35809f wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1234 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-15 03:41:31 +00:00
DRC
fdd625efa5 wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1233 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-15 03:07:44 +00:00
DRC
222279a4f0 wordsmithing 2014-04-15 03:07:44 +00:00
DRC
2f59b4eac1 wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1233 632fc199-4ca6-4c93-a231-07263d6284db
2014-04-15 03:07:44 +00:00
fbossen
5d4e113b06 Merge pull request #38 from pengvado/master
36% faster encode_mcu_AC_first(), by eliminating an unpredictable branch in the inner loop
2014-04-15 01:57:12 +02:00
Loren Merritt
8db334cde2 36% faster encode_mcu_AC_first(), by eliminating an unpredictable branch in the inner loop
Which corresponds to 15% faster overall encoding in "progressive scan optimization" mode.
(And a negligible speedup in -fastcrush mode.)
2014-04-13 05:30:44 +00:00
Frank Bossen
1733487e17 Add option to perform multiple trellis quantization iterations
Multiple trellis iterations may improve coding performance as Huffman
tables are updated with each iteration. In practice the benefit appears
to be very minimal
2014-04-01 23:14:29 +02:00
Frank Bossen
2012e32f19 Update trellis quantization to support progressive coding mode
Trellis quantization is modified:
- to work on the configurable spectral range Ss to Se
- to optionally optimize runs of EOBs
- to optionally split optimization between 2 spectral ranges
In trellis quantization passes Huffman table code optimization is
modified such as to generable a valid code length for each possible
symbol by resetting frequency counters to 1 instead of 0
2014-04-01 20:14:37 +02:00
Josh Aas
f4c556031c Merge pull request #32 from elfring/Complete_quoting_for_parameters_of_some_CMake_commands
Complete quoting for parameters of some CMake commands.
2014-04-01 11:46:48 -05:00
Markus Elfring
553e2cb89e Bug #17: Completed quoting for parameters of some CMake commands
A wiki article pointed out that whitespace will only be preserved for parameters
in CMake commands if passed strings will be appropriately quoted or escaped.
http://cmake.org/Wiki/CMake/Language_Syntax#CMake_splits_arguments_unless_you_use_quotation_marks_or_escapes.

Quoting was added so that more places should also handle file names correctly
which contain space characters or semicolons eventually.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2014-04-01 17:47:42 +02:00
DRC
ef9a4e05ba Integrate a slightly modified version of Mozilla's patch for precomputing the bit-counting LUT. This is useful if the table needs to be shared among multiple processes, although the primary reason for doing that is reduced footprint on mobile devices, which are probably already covered by the clz intrinsic code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1221 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-28 18:50:30 +00:00
DRC
038cf66ab2 Integrate a slightly modified version of Mozilla's patch for precomputing the bit-counting LUT. This is useful if the table needs to be shared among multiple processes, although the primary reason for doing that is reduced footprint on mobile devices, which are probably already covered by the clz intrinsic code. 2014-03-28 18:50:30 +00:00
DRC
8acdd385cb Integrate a slightly modified version of Mozilla's patch for precomputing the bit-counting LUT. This is useful if the table needs to be shared among multiple processes, although the primary reason for doing that is reduced footprint on mobile devices, which are probably already covered by the clz intrinsic code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1221 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-28 18:50:30 +00:00
DRC
0cfc4c17b7 Use clz/bsr instructions on ARM for bit counting rather than the lookup table (reduces memory footprint and can improve performance in some cases.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1220 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-28 18:33:25 +00:00
DRC
a60728cb34 Use clz/bsr instructions on ARM for bit counting rather than the lookup table (reduces memory footprint and can improve performance in some cases.) 2014-03-28 18:33:25 +00:00
DRC
80ececa081 Use clz/bsr instructions on ARM for bit counting rather than the lookup table (reduces memory footprint and can improve performance in some cases.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1220 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-28 18:33:25 +00:00
Frank Bossen
4d0329b235 Add option to disable trellis quantization 2014-03-28 18:16:46 +01:00
Frank Bossen
199fffb759 Enable combination of trellis quantization and scan optimization 2014-03-28 12:42:37 +01:00
DRC
51d6bb30cf Modify svn:ignore so that it lists only files generated in-tree by autoreconf -fiv. It's pretty much impossible to maintain an up-to-date list of files generated by the actual build, so we'll just assume that the user will do an out-of-tree build if they want to avoid cluttering up their 'svn status' display.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1219 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-27 20:47:39 +00:00
DRC
1d50153e84 Modify svn:ignore so that it lists only files generated in-tree by autoreconf -fiv. It's pretty much impossible to maintain an up-to-date list of files generated by the actual build, so we'll just assume that the user will do an out-of-tree build if they want to avoid cluttering up their 'svn status' display.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1219 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-27 20:47:39 +00:00
DRC
8bad4251a9 Modify svn:ignore so that it lists only files generated in-tree by autoreconf -fiv. It's pretty much impossible to maintain an up-to-date list of files generated by the actual build, so we'll just assume that the user will do an out-of-tree build if they want to avoid cluttering up their 'svn status' display.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1218 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-27 20:43:57 +00:00
DRC
69c5bea97a Modify svn:ignore so that it lists only files generated in-tree by autoreconf -fiv. It's pretty much impossible to maintain an up-to-date list of files generated by the actual build, so we'll just assume that the user will do an out-of-tree build if they want to avoid cluttering up their 'svn status' display.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1218 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-27 20:43:57 +00:00
Frank Bossen
0c7449c461 Fix #25
Scan pattern needs to be set again after changing colorspace
2014-03-27 14:31:35 +01:00
Frank Bossen
2906cbf6ed Fix issue with jpegtran and RGB/CMYK colorspaces
Fixes issues #23 #24 #31
Note that the original jpgcrush script optimizes scans only for YCbCr
and grayscale color spaces. Scan optimization is thus disabled for RGB
and CMYK color spaces and behavior reverts to the fast mode of jpgcrush
which uses predefined scans
2014-03-27 11:58:24 +01:00
DRC
26c6606772 Make iOS build instructions more generic and applicable to all versions of Xcode; modify iOS build procedure for Xcode 5.0 and later to fix a build issue with Xcode 5.1.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1217 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-27 03:36:04 +00:00
DRC
18edf4db70 Make iOS build instructions more generic and applicable to all versions of Xcode; modify iOS build procedure for Xcode 5.0 and later to fix a build issue with Xcode 5.1.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1217 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-27 03:36:04 +00:00
DRC
5610bb1fec Make iOS build instructions more generic and applicable to all versions of Xcode; modify iOS build procedure for Xcode 5.0 and later to fix a build issue with Xcode 5.1. 2014-03-27 03:35:21 +00:00
DRC
0d0705f445 Make iOS build instructions more generic and applicable to all versions of Xcode; modify iOS build procedure for Xcode 5.0 and later to fix a build issue with Xcode 5.1.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1216 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-27 03:35:21 +00:00
DRC
b190357c98 Make iOS build instructions more generic and applicable to all versions of Xcode; modify iOS build procedure for Xcode 5.0 and later to fix a build issue with Xcode 5.1.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1216 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-27 03:35:21 +00:00
Frank Bossen
2de8e97989 Add option to use lambda weighting table
Different lambda values may be used for each frequency in DCT domain.
The weighting table is currently not configurable but can be
enabled/disabled with cinfo-> use_lambda_weight_tbl
2014-03-26 00:06:07 +01:00
Frank Bossen
6f168e4f80 Add parameters to cjpeg to tune for different metrics
-tune-psnr, -tune-ssim and -tune-hvs-psnr are added to cjpeg to control
the trellis quantization process and optimize output for PSNR, SSIM and
HVS-PSNR distortion metrics
2014-03-25 11:48:30 +01:00
DRC
86612bf441 Update build instructions to reflect the use of pkgbuild/productbuild 2014-03-25 05:27:16 +00:00
DRC
377955e606 Update build instructions to reflect the use of pkgbuild/productbuild
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1215 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-25 05:27:16 +00:00
DRC
66b9aeb4f3 Update build instructions to reflect the use of pkgbuild/productbuild
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1215 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-25 05:27:16 +00:00
Frank Bossen
3e8afe7f94 Add option to control lambda parameter from command line
-lambda1 and -lambda2 command line parameters are added to cjpeg to
control trellis quantization
2014-03-24 20:51:46 +01:00
Josh Aas
7b66e2fa25 Merge pull request #26 from negge/rd
Adding scripts to generate rd-curves.
2014-03-24 14:07:29 -05:00
Frank Bossen
758ed27a05 Add option to use flat quantization table
Set cinfo->use_flat_quant_tbl to TRUE to use flat quantization table or
-flat option in cjpeg
2014-03-24 16:30:56 +01:00
Frank Bossen
d200b2c144 Initial implementation of trellis quantization
A new pass type trellis_pass is added. It defines a pass where trellis
quantization is done in the quantize_trellis() function.
Trellis quantization can be enabled by setting use_moz_defaults to 2 or
by using the -trellis option in cjpeg
Note that trellis does currently not work with scan optimization. Scan
optimization is disabled when trellis is enabled.
2014-03-23 21:06:01 +01:00
DRC
af19664571 Remove any claims of support for OS X 10.4 "Tiger" (the packaging system overhaul produces packages that require Leopard or later, and I haven't been able to test Tiger for years anyhow.) Update TurboJPEG shared library version. 2014-03-23 18:06:11 +00:00
DRC
79241e3415 Remove any claims of support for OS X 10.4 "Tiger" (the packaging system overhaul produces packages that require Leopard or later, and I haven't been able to test Tiger for years anyhow.) Update TurboJPEG shared library version.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1213 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-23 18:06:11 +00:00
DRC
b30b918b0f Remove any claims of support for OS X 10.4 "Tiger" (the packaging system overhaul produces packages that require Leopard or later, and I haven't been able to test Tiger for years anyhow.) Update TurboJPEG shared library version.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1213 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-23 18:06:11 +00:00
DRC
aa411b107f Migrate Mac packaging system to pkgbuild, since PackageMaker is no longer supported. 2014-03-23 17:53:07 +00:00
DRC
b1068fa2da Migrate Mac packaging system to pkgbuild, since PackageMaker is no longer supported.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1212 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-23 17:53:07 +00:00
DRC
0195c26b3b Migrate Mac packaging system to pkgbuild, since PackageMaker is no longer supported.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1212 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-23 17:53:07 +00:00
DRC
fdc2954e79 Remove the sections about replacing libjpeg at run time and compile time. These were written before O/S distributions started shipping libjpeg-turbo, and they are either pedantic or no longer relevant. Also remove any text that assumes the use of our official project binaries. Notes specific to the official binaries have been moved into the project wiki. 2014-03-23 15:21:20 +00:00
DRC
832b1fc5d3 Remove the sections about replacing libjpeg at run time and compile time. These were written before O/S distributions started shipping libjpeg-turbo, and they are either pedantic or no longer relevant. Also remove any text that assumes the use of our official project binaries. Notes specific to the official binaries have been moved into the project wiki.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1210 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-23 15:21:20 +00:00
DRC
3b8d4263fc Remove the sections about replacing libjpeg at run time and compile time. These were written before O/S distributions started shipping libjpeg-turbo, and they are either pedantic or no longer relevant. Also remove any text that assumes the use of our official project binaries. Notes specific to the official binaries have been moved into the project wiki.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1210 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-23 15:21:20 +00:00
DRC
87768cc42c Fix Windows build 2014-03-22 23:03:03 +00:00
DRC
6f92ff617a Fix Windows build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1206 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-22 23:03:03 +00:00
DRC
a3b8f11de4 Fix Windows build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1206 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-22 23:03:03 +00:00
DRC
166227c3c7 Since we're now maintaining our own Cygwin pseudo-repository directories instead of recommending that users install these packages from a local source, it makes more sense to name the packages according to Cygwin specs, so they can be copied as-is into the pseudo-repository. 2014-03-22 20:51:38 +00:00
DRC
f67c04c05e Since we're now maintaining our own Cygwin pseudo-repository directories instead of recommending that users install these packages from a local source, it makes more sense to name the packages according to Cygwin specs, so they can be copied as-is into the pseudo-repository.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1204 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-22 20:51:38 +00:00
DRC
305e0f1541 Since we're now maintaining our own Cygwin pseudo-repository directories instead of recommending that users install these packages from a local source, it makes more sense to name the packages according to Cygwin specs, so they can be copied as-is into the pseudo-repository.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1204 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-22 20:51:38 +00:00
DRC
1cf34093b9 2014-03-22 20:43:03 +00:00
DRC
de23dd8068 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1203 632fc199-4ca6-4c93-a231-07263d6284db 2014-03-22 20:43:03 +00:00
DRC
30a62f472f git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1203 632fc199-4ca6-4c93-a231-07263d6284db 2014-03-22 20:43:03 +00:00
DRC
c8b0226d91 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1202 632fc199-4ca6-4c93-a231-07263d6284db 2014-03-22 20:42:01 +00:00
DRC
f33798a34d git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1202 632fc199-4ca6-4c93-a231-07263d6284db 2014-03-22 20:42:01 +00:00
DRC
d10edbc1ee Fix 'make dist' 2014-03-22 20:22:52 +00:00
DRC
79df67debb Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1201 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-22 20:22:52 +00:00
DRC
6a9cbe75ed Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1201 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-22 20:22:52 +00:00
DRC
7a9faaefb4 Since we're now maintaining our own Cygwin pseudo-repository directories instead of recommending that users install these packages from a local source, it makes more sense to name the packages according to Cygwin specs, so they can be copied as-is into the pseudo-repository.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1195 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 23:34:53 +00:00
DRC
af49fce8d3 Since we're now maintaining our own Cygwin pseudo-repository directories instead of recommending that users install these packages from a local source, it makes more sense to name the packages according to Cygwin specs, so they can be copied as-is into the pseudo-repository.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1195 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 23:34:53 +00:00
DRC
67599a5dc6 RHEL 6 (and probably other platforms as well) sets _defaultdocdir=%{_datadir}/doc, which screws things up, since we're overriding _datadir. Since we intend _defaultdocdir to be /usr/share/doc, just be explicit about it. 2014-03-21 11:01:00 +00:00
DRC
d794360250 RHEL 6 (and probably other platforms as well) sets _defaultdocdir=%{_datadir}/doc, which screws things up, since we're overriding _datadir. Since we intend _defaultdocdir to be /usr/share/doc, just be explicit about it.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1194 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 11:01:00 +00:00
DRC
4862b64557 RHEL 6 (and probably other platforms as well) sets _defaultdocdir=%{_datadir}/doc, which screws things up, since we're overriding _datadir. Since we intend _defaultdocdir to be /usr/share/doc, just be explicit about it.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1194 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 11:01:00 +00:00
DRC
3064cf7410 RHEL 6 (and probably other platforms as well) sets _defaultdocdir=%{_datadir}/doc, which screws things up, since we're overriding _datadir. Since we intend _defaultdocdir to be /usr/share/doc, just be explicit about it.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1193 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 11:00:00 +00:00
DRC
396e070825 RHEL 6 (and probably other platforms as well) sets _defaultdocdir=%{_datadir}/doc, which screws things up, since we're overriding _datadir. Since we intend _defaultdocdir to be /usr/share/doc, just be explicit about it.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1193 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 11:00:00 +00:00
DRC
fc9995e4c9 Prevent svn:mergeinfo from being modified on Makefile.am and simd/jsimd*.c every time a merge is done.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1192 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 09:35:53 +00:00
DRC
ea070355f5 Prevent svn:mergeinfo from being modified on Makefile.am and simd/jsimd*.c every time a merge is done.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1192 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 09:35:53 +00:00
DRC
dd12a235c5 Fix compiler warning about unused function when building with the libjpeg v6b API/ABI 2014-03-21 09:35:02 +00:00
DRC
2b03fe2710 Fix compiler warning about unused function when building with the libjpeg v6b API/ABI
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1191 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 09:35:02 +00:00
DRC
5dc419c6bc Fix compiler warning about unused function when building with the libjpeg v6b API/ABI
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1191 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 09:35:02 +00:00
DRC
17882fd8cc Prevent svn:mergeinfo from being modified on Makefile.am and simd/jsimd*.c every time a merge is done.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1190 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 09:33:49 +00:00
DRC
97ba4bac6d Prevent svn:mergeinfo from being modified on Makefile.am and simd/jsimd*.c every time a merge is done.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1190 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 09:33:49 +00:00
DRC
506a742193 Fix compiler warning about unused function when building with the libjpeg v6b API/ABI
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1189 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 09:29:28 +00:00
DRC
f5b95b3201 Fix compiler warning about unused function when building with the libjpeg v6b API/ABI
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1189 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 09:29:28 +00:00
DRC
92c7ae8911 Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC 2014-03-21 09:23:41 +00:00
DRC
b52f3e69cb Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1188 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 09:23:41 +00:00
DRC
6e21536da0 Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1188 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 09:23:41 +00:00
DRC
ad64b5a4c9 Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1187 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 09:22:21 +00:00
DRC
fcb749d773 Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1187 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 09:22:21 +00:00
DRC
7bb4dbb81b Enable silent build (can be overridden with 'make V=1') if the version of autotools being used is new enough. 2014-03-21 08:36:58 +00:00
DRC
3c8238322f Enable silent build (can be overridden with 'make V=1') if the version of autotools being used is new enough.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1186 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 08:36:58 +00:00
DRC
2f79703e04 Enable silent build (can be overridden with 'make V=1') if the version of autotools being used is new enough.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1186 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 08:36:58 +00:00
DRC
c7e10b21e8 Enable silent build (can be overridden with 'make V=1') if the version of autotools being used is new enough.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1185 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 08:36:06 +00:00
DRC
7b499d682e Enable silent build (can be overridden with 'make V=1') if the version of autotools being used is new enough.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1185 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-21 08:36:06 +00:00
Nathan E. Egge
5d332e6447 Adding scripts to generate rd-curves. 2014-03-17 19:30:43 -04:00
DRC
c4f4d18352 Extend YUVImage class to allow reuse of the same buffer with different metadata; port TJBench changes that treat YUV encoding/decoding as an intermediate step of the JPEG compression/decompression pipeline rather than a separate test case; add YUV encode/decode tests to the Java version of tjbenchtest 2014-03-17 11:14:52 +00:00
DRC
7a6ed075ea Extend YUVImage class to allow reuse of the same buffer with different metadata; port TJBench changes that treat YUV encoding/decoding as an intermediate step of the JPEG compression/decompression pipeline rather than a separate test case; add YUV encode/decode tests to the Java version of tjbenchtest
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1184 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-17 11:14:52 +00:00
DRC
74437c2c0d Extend YUVImage class to allow reuse of the same buffer with different metadata; port TJBench changes that treat YUV encoding/decoding as an intermediate step of the JPEG compression/decompression pipeline rather than a separate test case; add YUV encode/decode tests to the Java version of tjbenchtest
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1184 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-17 11:14:52 +00:00
DRC
5e75573709 formatting tweaks 2014-03-17 10:40:10 +00:00
DRC
dd5fcdd007 formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1183 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-17 10:40:10 +00:00
DRC
60b35b8714 formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1183 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-17 10:40:10 +00:00
DRC
5bfddde8fd Fix an error that occurred when trying to use the lossless transform feature without specifying -quiet; formatting tweak 2014-03-17 10:19:42 +00:00
DRC
6e11d6899c Fix an error that occurred when trying to use the lossless transform feature without specifying -quiet; formatting tweak
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1182 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-17 10:19:42 +00:00
DRC
3c2910bc94 Fix an error that occurred when trying to use the lossless transform feature without specifying -quiet; formatting tweak
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1182 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-17 10:19:42 +00:00
DRC
2ae7918a8e Fix an error that occurred when trying to use the lossless transform feature without specifying -quiet; formatting tweak
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1181 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-17 10:14:18 +00:00
DRC
57a9436cec Fix an error that occurred when trying to use the lossless transform feature without specifying -quiet; formatting tweak
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1181 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-17 10:14:18 +00:00
DRC
b7d9250185 Move the garbage collection of the JPEG tiles into the decompression function to increase the chances that tiled decompression of large images will succeed without an OutOfMemoryError. 2014-03-17 10:13:17 +00:00
DRC
4dafea685d Move the garbage collection of the JPEG tiles into the decompression function to increase the chances that tiled decompression of large images will succeed without an OutOfMemoryError.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1180 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-17 10:13:17 +00:00
DRC
eee4d881c1 Move the garbage collection of the JPEG tiles into the decompression function to increase the chances that tiled decompression of large images will succeed without an OutOfMemoryError.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1180 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-17 10:13:17 +00:00
DRC
88f260c78c Move the garbage collection of the JPEG tiles into the decompression function to increase the chances that tiled decompression of large images will succeed without an OutOfMemoryError.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1179 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-17 10:12:11 +00:00
DRC
2d3974f117 Move the garbage collection of the JPEG tiles into the decompression function to increase the chances that tiled decompression of large images will succeed without an OutOfMemoryError.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1179 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-17 10:12:11 +00:00
DRC
821a20d0e8 Generate the Java documentation using javadoc 7, to improve readability. 2014-03-16 23:12:25 +00:00
DRC
6ffed933d7 Generate the Java documentation using javadoc 7, to improve readability.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1178 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 23:12:25 +00:00
DRC
9c37b59d48 Generate the Java documentation using javadoc 7, to improve readability.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1178 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 23:12:25 +00:00
DRC
a35cc3acf8 This should have been checked in with the previous commit. 2014-03-16 22:59:51 +00:00
DRC
ee44371925 This should have been checked in with the previous commit.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1177 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 22:59:51 +00:00
DRC
96f55a9797 This should have been checked in with the previous commit.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1177 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 22:59:51 +00:00
DRC
9e9df11625 Extend the YUV decode functionality to the TurboJPEG Java API, and port the TJUnitTest modifications that treat YUV encoding/decoding as an intermediate step of the JPEG compression/decompression pipeline rather than a separate test case; Add the ability to encode YUV images from an arbitrary position in a large image buffer; Significantly refactor the handling of YUV images; numerous doc tweaks; other Java API cleanup and usability improvements 2014-03-16 22:56:26 +00:00
DRC
fc26b6577a Extend the YUV decode functionality to the TurboJPEG Java API, and port the TJUnitTest modifications that treat YUV encoding/decoding as an intermediate step of the JPEG compression/decompression pipeline rather than a separate test case; Add the ability to encode YUV images from an arbitrary position in a large image buffer; Significantly refactor the handling of YUV images; numerous doc tweaks; other Java API cleanup and usability improvements
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1176 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 22:56:26 +00:00
DRC
2b910d60be Extend the YUV decode functionality to the TurboJPEG Java API, and port the TJUnitTest modifications that treat YUV encoding/decoding as an intermediate step of the JPEG compression/decompression pipeline rather than a separate test case; Add the ability to encode YUV images from an arbitrary position in a large image buffer; Significantly refactor the handling of YUV images; numerous doc tweaks; other Java API cleanup and usability improvements
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1176 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 22:56:26 +00:00
DRC
40a0a023fa Update (C) year
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1175 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 19:33:23 +00:00
DRC
5c04be8c3d Update (C) year
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1175 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 19:33:23 +00:00
DRC
695b6e8680 Don't use deprecated constructor
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1174 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 19:33:07 +00:00
DRC
3f40a7b13d Don't use deprecated constructor
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1174 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 19:33:07 +00:00
DRC
aa255e2946 Doc tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1173 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 18:43:42 +00:00
DRC
e1ed715c47 Doc tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1173 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 18:43:42 +00:00
DRC
bcb5f02392 Go ahead and deprecate the old constructor in 1.3.1 instead of in 1.4, since it uses a deprecated method
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1172 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 18:00:59 +00:00
DRC
29c00b45fa Go ahead and deprecate the old constructor in 1.3.1 instead of in 1.4, since it uses a deprecated method
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1172 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-16 18:00:59 +00:00
DRC
c33347c0aa Add @Deprecated to the deprecated Java methods, so javac will actually print deprecation warnings, as opposed to just listing the methods as deprecated in javadoc; remove the use of the deprecated methods by our own test programs.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1171 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-15 13:25:11 +00:00
DRC
985f8d3bf9 Add @Deprecated to the deprecated Java methods, so javac will actually print deprecation warnings, as opposed to just listing the methods as deprecated in javadoc; remove the use of the deprecated methods by our own test programs.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1171 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-15 13:25:11 +00:00
DRC
960ea8fb66 As with tjDecompressToYUV*(), tjCompressFromYUV() also conditionally uses an intermediate buffer if the source image dimensions do not fall on MCU boundaries. 2014-03-15 08:48:53 +00:00
DRC
1909c59bad As with tjDecompressToYUV*(), tjCompressFromYUV() also conditionally uses an intermediate buffer if the source image dimensions do not fall on MCU boundaries.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1170 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-15 08:48:53 +00:00
DRC
7db7c4b433 As with tjDecompressToYUV*(), tjCompressFromYUV() also conditionally uses an intermediate buffer if the source image dimensions do not fall on MCU boundaries.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1170 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-15 08:48:53 +00:00
DRC
d56079bc7e Remove unneeded/unused code 2014-03-14 08:59:27 +00:00
DRC
12c29c9a7f Remove unneeded/unused code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1169 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-14 08:59:27 +00:00
DRC
336154ad7e Remove unneeded/unused code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1169 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-14 08:59:27 +00:00
DRC
80d2fe24c8 Streamline the BufferedImage functionality in the compressor so that it works the same way as compressing a "normal" image, and deprecate the old BufferedImage methods and other redundant methods. Eliminate the use of deprecated features in the test programs. 2014-03-14 08:53:33 +00:00
DRC
b14813947e Streamline the BufferedImage functionality in the compressor so that it works the same way as compressing a "normal" image, and deprecate the old BufferedImage methods and other redundant methods. Eliminate the use of deprecated features in the test programs.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1168 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-14 08:53:33 +00:00
DRC
d657ebcc92 Streamline the BufferedImage functionality in the compressor so that it works the same way as compressing a "normal" image, and deprecate the old BufferedImage methods and other redundant methods. Eliminate the use of deprecated features in the test programs.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1168 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-14 08:53:33 +00:00
DRC
b0073a2851 Remove benchmarks. They were originally intended as a way of measuring overhead for small compress/decompress operations, but using TJBench with a small image is a better way to accomplish that. 2014-03-14 04:32:03 +00:00
DRC
d772f9ac45 Remove benchmarks. They were originally intended as a way of measuring overhead for small compress/decompress operations, but using TJBench with a small image is a better way to accomplish that.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1167 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-14 04:32:03 +00:00
DRC
9537c80920 Remove benchmarks. They were originally intended as a way of measuring overhead for small compress/decompress operations, but using TJBench with a small image is a better way to accomplish that.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1167 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-14 04:32:03 +00:00
DRC
68a89e0170 Formatting tweak 2014-03-14 04:27:03 +00:00
DRC
4f7b7b339c Formatting tweak
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1166 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-14 04:27:03 +00:00
DRC
03d7b0bd81 Formatting tweak
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1166 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-14 04:27:03 +00:00
DRC
5d4f2feeed Oops. This code should not have been removed. It is necessary for generating the error images. 2014-03-14 04:15:43 +00:00
DRC
78b227e251 Oops. This code should not have been removed. It is necessary for generating the error images.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1165 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-14 04:15:43 +00:00
DRC
c4264cd007 Oops. This code should not have been removed. It is necessary for generating the error images.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1165 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-14 04:15:43 +00:00
DRC
3aa498b9e1 Actually, the issue with nightshot_iso_100 is unrelated to the image size. Reducing the size to 128x95, the same size as vgl_6548_0026, does not eliminate the problem. The issue seems to always occur when decompression scaling is enabled. It is unclear at this point whether this is a bug or expected behavior, but the pixels generated by the split decompression functions appear correct. They are just slightly different (but not visibly so) from the pixels generated by the monolithic decompression function. 2014-03-13 21:19:12 +00:00
DRC
b53f410228 Actually, the issue with nightshot_iso_100 is unrelated to the image size. Reducing the size to 128x95, the same size as vgl_6548_0026, does not eliminate the problem. The issue seems to always occur when decompression scaling is enabled. It is unclear at this point whether this is a bug or expected behavior, but the pixels generated by the split decompression functions appear correct. They are just slightly different (but not visibly so) from the pixels generated by the monolithic decompression function.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1164 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-13 21:19:12 +00:00
DRC
f568823115 Actually, the issue with nightshot_iso_100 is unrelated to the image size. Reducing the size to 128x95, the same size as vgl_6548_0026, does not eliminate the problem. The issue seems to always occur when decompression scaling is enabled. It is unclear at this point whether this is a bug or expected behavior, but the pixels generated by the split decompression functions appear correct. They are just slightly different (but not visibly so) from the pixels generated by the monolithic decompression function.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1164 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-13 21:19:12 +00:00
DRC
022952d37d Add a mode to tjbenchtest for testing the YUV encoding/decoding functions 2014-03-13 20:48:38 +00:00
DRC
823fbed414 Add a mode to tjbenchtest for testing the YUV encoding/decoding functions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1163 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-13 20:48:38 +00:00
DRC
1c510cf11a Add a mode to tjbenchtest for testing the YUV encoding/decoding functions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1163 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-13 20:48:38 +00:00
DRC
593bb84e41 If we have transformed a 4:2:2 or 4:4:0 image in any way that transposes the horizontal and vertical dimensions, then we need to inform the decompression function that the subsampling type has changed. Otherwise, tjDecodeYUV() will not produce correct results. 2014-03-13 20:33:43 +00:00
DRC
ce6891f048 If we have transformed a 4:2:2 or 4:4:0 image in any way that transposes the horizontal and vertical dimensions, then we need to inform the decompression function that the subsampling type has changed. Otherwise, tjDecodeYUV() will not produce correct results.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1162 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-13 20:33:43 +00:00
DRC
ae6746cab2 If we have transformed a 4:2:2 or 4:4:0 image in any way that transposes the horizontal and vertical dimensions, then we need to inform the decompression function that the subsampling type has changed. Otherwise, tjDecodeYUV() will not produce correct results.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1162 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-13 20:33:43 +00:00
Josh Aas
8d2a67c7dd Merge pull request #6 from negge/yuv
Adding yuvjpeg and jpegyuv utilities.
2014-03-13 10:25:05 -05:00
Josh Aas
a4871a16c6 Add link to announcement blog post in README. 2014-03-13 10:21:32 -05:00
Josh Aas
e59db4fad5 Add license file to top-level dir. 2014-03-13 10:18:12 -05:00
Josh Aas
d12ca848a2 Windows build fix. 2014-03-13 10:01:11 -05:00
DRC
dbebf635b0 Whitespace tweaks 2014-03-13 08:32:20 +00:00
DRC
f9baac9585 Whitespace tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1161 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-13 08:32:20 +00:00
DRC
28383e8001 Whitespace tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1161 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-13 08:32:20 +00:00
DRC
df42b3cdf5 Whitespace tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1160 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-13 08:32:11 +00:00
DRC
0a1775882f Whitespace tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1160 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-13 08:32:11 +00:00
DRC
2ed7138390 Execute warmup runs with tjTransform() as well 2014-03-12 07:17:23 +00:00
DRC
adf5551ba9 Execute warmup runs with tjTransform() as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1159 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-12 07:17:23 +00:00
DRC
eead7fe19b Execute warmup runs with tjTransform() as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1159 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-12 07:17:23 +00:00
DRC
88ae091ca1 Fix a couple of output formatting issues 2014-03-12 07:16:17 +00:00
DRC
e1efc8a0ef Fix a couple of output formatting issues
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1158 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-12 07:16:17 +00:00
DRC
1728190717 Fix a couple of output formatting issues
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1158 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-12 07:16:17 +00:00
DRC
009b6a50b5 Since we now have a complete set of YUV functions, TJBench can be greatly simplified. It now tests YUV encoding/decoding as an intermediate step of JPEG compression/decompression, which eliminates the need for a separate YUV mode. Several other things have been streamlined in the process. 2014-03-12 06:51:39 +00:00
DRC
95e4cb2060 Since we now have a complete set of YUV functions, TJBench can be greatly simplified. It now tests YUV encoding/decoding as an intermediate step of JPEG compression/decompression, which eliminates the need for a separate YUV mode. Several other things have been streamlined in the process.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1157 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-12 06:51:39 +00:00
DRC
f35c0b83c0 Since we now have a complete set of YUV functions, TJBench can be greatly simplified. It now tests YUV encoding/decoding as an intermediate step of JPEG compression/decompression, which eliminates the need for a separate YUV mode. Several other things have been streamlined in the process.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1157 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-12 06:51:39 +00:00
DRC
885da7cef9 Fix a segfault that would occur in decompress-only mode if -alloc was specified without -tile. 2014-03-12 06:17:12 +00:00
DRC
0e9bf6442b Fix a segfault that would occur in decompress-only mode if -alloc was specified without -tile.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1156 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-12 06:17:12 +00:00
DRC
efb347cf12 Fix a segfault that would occur in decompress-only mode if -alloc was specified without -tile.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1156 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-12 06:17:12 +00:00
DRC
dd59233dd4 Fix a segfault that would occur in decompress-only mode if -alloc was specified without -tile.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1155 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-12 06:15:51 +00:00
DRC
311e4b7cd1 Fix a segfault that would occur in decompress-only mode if -alloc was specified without -tile.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1155 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-12 06:15:51 +00:00
Josh Aas
030a805b5b Update project README to state goals and clarify re: general JPEG library use. 2014-03-11 09:03:53 -05:00
DRC
a15f19f2d2 Wordsmithing & formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1154 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 09:46:50 +00:00
DRC
395de92bd7 Wordsmithing & formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1154 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 09:46:50 +00:00
DRC
d4b453c26e Back-port the -subsamp option from 1.4 rather than use the hackish approach of replacing 4:2:2 with 4:4:0. This has the added advantage of allowing the user to test only a specific level of subsampling.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1153 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 08:28:47 +00:00
DRC
4bd85091a9 Back-port the -subsamp option from 1.4 rather than use the hackish approach of replacing 4:2:2 with 4:4:0. This has the added advantage of allowing the user to test only a specific level of subsampling.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1153 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 08:28:47 +00:00
DRC
db0e2791e0 Oops. This was apparently the victim of an overly aggressive search/replace.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1152 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 08:25:59 +00:00
DRC
6832bc2615 Oops. This was apparently the victim of an overly aggressive search/replace.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1152 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 08:25:59 +00:00
DRC
7f0bceb586 Silence warning in CMake 2.8.12 and later 2014-03-11 06:31:09 +00:00
DRC
aa367580e8 Silence warning in CMake 2.8.12 and later
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1151 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 06:31:09 +00:00
DRC
7dc5d31417 Silence warning in CMake 2.8.12 and later
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1151 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 06:31:09 +00:00
DRC
5eb1efa3d2 Silence warning in CMake 2.8.12 and later
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1150 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 06:30:21 +00:00
DRC
05142f3fa8 Silence warning in CMake 2.8.12 and later
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1150 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 06:30:21 +00:00
DRC
e4552b8143 Fix the build of the Java classes when using MSVC 2010 and later. Something in the recesses of my brain is telling me that I tried this before and it failed under some circumstances, but it must have been a bug in an older CMake implementation. CMake 2.8.8 and later seem to work fine with this patch. This patch also updates the minimum required version to 2.8.8, because 2.8.8 fixed another issue that was preventing the SIMD code from building under MSVC 2010 and later. 2014-03-11 06:24:46 +00:00
DRC
3bf21e05e1 Fix the build of the Java classes when using MSVC 2010 and later. Something in the recesses of my brain is telling me that I tried this before and it failed under some circumstances, but it must have been a bug in an older CMake implementation. CMake 2.8.8 and later seem to work fine with this patch. This patch also updates the minimum required version to 2.8.8, because 2.8.8 fixed another issue that was preventing the SIMD code from building under MSVC 2010 and later.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1149 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 06:24:46 +00:00
DRC
0c0d0bc5b1 Fix the build of the Java classes when using MSVC 2010 and later. Something in the recesses of my brain is telling me that I tried this before and it failed under some circumstances, but it must have been a bug in an older CMake implementation. CMake 2.8.8 and later seem to work fine with this patch. This patch also updates the minimum required version to 2.8.8, because 2.8.8 fixed another issue that was preventing the SIMD code from building under MSVC 2010 and later.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1149 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 06:24:46 +00:00
DRC
d45c54992b Fix the build of the Java classes when using MSVC 2010 and later. Something in the recesses of my brain is telling me that I tried this before and it failed under some circumstances, but it must have been a bug in an older CMake implementation. CMake 2.8.8 and later seem to work fine with this patch. This patch also updates the minimum required version to 2.8.8, because 2.8.8 fixed another issue that was preventing the SIMD code from building under MSVC 2010 and later.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1148 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 06:21:46 +00:00
DRC
624acb5168 Fix the build of the Java classes when using MSVC 2010 and later. Something in the recesses of my brain is telling me that I tried this before and it failed under some circumstances, but it must have been a bug in an older CMake implementation. CMake 2.8.8 and later seem to work fine with this patch. This patch also updates the minimum required version to 2.8.8, because 2.8.8 fixed another issue that was preventing the SIMD code from building under MSVC 2010 and later.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1148 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-11 06:21:46 +00:00
DRC
05d24e826d Fix Windows build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1147 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-10 21:38:11 +00:00
DRC
42af7fbde1 Fix Windows build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1147 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-10 21:38:11 +00:00
DRC
42aeac3ee2 Formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1146 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-10 21:37:54 +00:00
DRC
581c75f44c Formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1146 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-10 21:37:54 +00:00
DRC
1cdf41108b For now, punt on trying to support fancy upsampling in tjDecodeYUV(). Fancy upsampling requires context rows and other refinements, which are difficult to implement correctly with the algorithm we're using. Longer-term, supporting fancy upsampling would probably require using the main buffer that libjpeg allocates. 2014-03-10 20:14:53 +00:00
DRC
7d9f758e52 For now, punt on trying to support fancy upsampling in tjDecodeYUV(). Fancy upsampling requires context rows and other refinements, which are difficult to implement correctly with the algorithm we're using. Longer-term, supporting fancy upsampling would probably require using the main buffer that libjpeg allocates.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1145 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-10 20:14:53 +00:00
DRC
0d141f4844 For now, punt on trying to support fancy upsampling in tjDecodeYUV(). Fancy upsampling requires context rows and other refinements, which are difficult to implement correctly with the algorithm we're using. Longer-term, supporting fancy upsampling would probably require using the main buffer that libjpeg allocates.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1145 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-10 20:14:53 +00:00
DRC
adb33bb1a4 Fix additional uninitialized values reported by valgrind 2014-03-10 20:11:56 +00:00
DRC
15c0876191 Fix additional uninitialized values reported by valgrind
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1144 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-10 20:11:56 +00:00
DRC
4a9b7184e6 Fix additional uninitialized values reported by valgrind
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1144 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-10 20:11:56 +00:00
DRC
8419f05afa When tjDecodeYUV() is used with a "fresh" decompressor instance (one that hasn't been previously used to decompress a JPEG image), then it needs comps_in_scan, data_precision, and the quantization tables to be defined. This patch also extends TJUnitTest to check for this error. 2014-03-10 09:34:04 +00:00
DRC
c90144950f When tjDecodeYUV() is used with a "fresh" decompressor instance (one that hasn't been previously used to decompress a JPEG image), then it needs comps_in_scan, data_precision, and the quantization tables to be defined. This patch also extends TJUnitTest to check for this error.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1143 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-10 09:34:04 +00:00
DRC
c33bc1dab0 When tjDecodeYUV() is used with a "fresh" decompressor instance (one that hasn't been previously used to decompress a JPEG image), then it needs comps_in_scan, data_precision, and the quantization tables to be defined. This patch also extends TJUnitTest to check for this error.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1143 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-10 09:34:04 +00:00
DRC
435f18d902 Silence valgrind false positives about uninitialized values. Even with this patch, valgrind still complains about uninitialized values when decompressing or decoding to a buffer with an alpha-enabled colorspace. Not sure why this happens, but it occurs in libjpeg-turbo 1.3 as well, and only when the x86/x86-64 SIMD code is being used. It is my belief that these remaining warnings are also false positives, because if the output buffer is memset to all 0's prior to invoking tjDecodeYUV()/tjDecompress(), no errors are reported. If any of the alpha channel bits were in fact not being initialized, then they would still be 0 after invoking tjDecodeYUV()/tjDecompress(), and TJUnitTest would report an error. 2014-03-08 20:50:35 +00:00
DRC
20e158dcb7 Silence valgrind false positives about uninitialized values. Even with this patch, valgrind still complains about uninitialized values when decompressing or decoding to a buffer with an alpha-enabled colorspace. Not sure why this happens, but it occurs in libjpeg-turbo 1.3 as well, and only when the x86/x86-64 SIMD code is being used. It is my belief that these remaining warnings are also false positives, because if the output buffer is memset to all 0's prior to invoking tjDecodeYUV()/tjDecompress(), no errors are reported. If any of the alpha channel bits were in fact not being initialized, then they would still be 0 after invoking tjDecodeYUV()/tjDecompress(), and TJUnitTest would report an error.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1142 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-08 20:50:35 +00:00
DRC
bb70930aa8 Silence valgrind false positives about uninitialized values. Even with this patch, valgrind still complains about uninitialized values when decompressing or decoding to a buffer with an alpha-enabled colorspace. Not sure why this happens, but it occurs in libjpeg-turbo 1.3 as well, and only when the x86/x86-64 SIMD code is being used. It is my belief that these remaining warnings are also false positives, because if the output buffer is memset to all 0's prior to invoking tjDecodeYUV()/tjDecompress(), no errors are reported. If any of the alpha channel bits were in fact not being initialized, then they would still be 0 after invoking tjDecodeYUV()/tjDecompress(), and TJUnitTest would report an error.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1142 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-08 20:50:35 +00:00
DRC
bac0f31e7c Add a blank line before the alpha-enabled colorspace tests in order to improve readability 2014-03-08 20:32:37 +00:00
DRC
f27f38b02d Add a blank line before the alpha-enabled colorspace tests in order to improve readability
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1141 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-08 20:32:37 +00:00
DRC
89e1e74994 Add a blank line before the alpha-enabled colorspace tests in order to improve readability
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1141 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-08 20:32:37 +00:00
DRC
4798b7e806 Add a blank line before the alpha-enabled colorspace tests in order to improve readability
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1140 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-08 20:31:31 +00:00
DRC
b9b6a143b1 Add a blank line before the alpha-enabled colorspace tests in order to improve readability
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1140 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-08 20:31:31 +00:00
Josh Aas
0c48e5367b Compile fix. 2014-03-07 16:12:04 +00:00
DRC
897a525e3f Go ahead and call jinit_master_decompress() rather than trying to reproduce its functionality. That function does a few things that we were missing, including allocating the range limit table used by the plain C color conversion code. 2014-03-07 03:52:57 +00:00
DRC
2bdc0425df Go ahead and call jinit_master_decompress() rather than trying to reproduce its functionality. That function does a few things that we were missing, including allocating the range limit table used by the plain C color conversion code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1139 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-07 03:52:57 +00:00
DRC
61a2e1ed20 Go ahead and call jinit_master_decompress() rather than trying to reproduce its functionality. That function does a few things that we were missing, including allocating the range limit table used by the plain C color conversion code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1139 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-07 03:52:57 +00:00
DRC
2409fb9d03 Oops. We need to call start_pass() on the color converter in order to allocate the conversion tables used by the plain C code. 2014-03-06 20:07:03 +00:00
DRC
4d82ddb0c9 Oops. We need to call start_pass() on the color converter in order to allocate the conversion tables used by the plain C code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1138 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-06 20:07:03 +00:00
DRC
6bf156552e Oops. We need to call start_pass() on the color converter in order to allocate the conversion tables used by the plain C code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1138 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-06 20:07:03 +00:00
DRC
50cfc464b8 Oops. We need to call start_pass() on the color converter in order to allocate the conversion tables used by the plain C code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1137 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-06 20:03:37 +00:00
DRC
84c25cbec9 Oops. We need to call start_pass() on the color converter in order to allocate the conversion tables used by the plain C code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1136 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-06 19:51:29 +00:00
DRC
63c56225ff Oops. We need to call start_pass() on the color converter in order to allocate the conversion tables used by the plain C code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1136 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-06 19:51:29 +00:00
DRC
ea657b2f74 Fix regression introduced in r1128 that caused SIMD detection to malfunction for ARM platforms (and probably ARM64 and MIPS as well.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1135 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-06 09:29:25 +00:00
DRC
08b114849f Fix regression introduced in r1128 that caused SIMD detection to malfunction for ARM platforms (and probably ARM64 and MIPS as well.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1135 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-06 09:29:25 +00:00
DRC
89c9791c8e Fix regression introduced in r1122 that caused SIMD detection to malfunction for ARM platforms (and probably ARM64 and MIPS as well.) 2014-03-06 09:26:49 +00:00
DRC
f9c2dd2684 Fix regression introduced in r1122 that caused SIMD detection to malfunction for ARM platforms (and probably ARM64 and MIPS as well.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1134 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-06 09:26:49 +00:00
DRC
0a92189a38 Fix regression introduced in r1122 that caused SIMD detection to malfunction for ARM platforms (and probably ARM64 and MIPS as well.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1134 632fc199-4ca6-4c93-a231-07263d6284db
2014-03-06 09:26:49 +00:00
Nathan E. Egge
7448ab4e82 Adding yuvjpeg and jpegyuv utilities. 2014-03-05 14:01:25 -05:00
fbossen
febf3466d4 Optimize scans by default only if Mozilla defaults enabled 2014-03-06 01:28:44 +09:00
fbossen
5523494348 Fix issue with num_components not set
Calls to jpeg_simple_progression() should be made after num_components
is set in a function such as jpeg_default_colorspace()
2014-03-06 00:55:52 +09:00
fbossen
3287e09390 Fix issue with -revert option in jpegtran 2014-03-05 12:47:44 +01:00
fbossen
c31dea2118 Merge branch 'crush' 2014-03-02 23:18:00 +01:00
DRC
b861ef600c Fix unitialized value reported by valgrind (the upsampling routine used by 4:4:0 and 4:1:1 reads the value of component_index.) 2014-02-28 09:35:34 +00:00
DRC
895fd6d0d3 Fix unitialized value reported by valgrind (the upsampling routine used by 4:4:0 and 4:1:1 reads the value of component_index.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1133 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 09:35:34 +00:00
DRC
fa6e45a67f Fix unitialized value reported by valgrind (the upsampling routine used by 4:4:0 and 4:1:1 reads the value of component_index.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1133 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 09:35:34 +00:00
DRC
5c2f2cccb7 Implement a YUV decode function in the TurboJPEG API, to be symmetric with tjEncodeYUV(). 2014-02-28 09:17:14 +00:00
DRC
34dca05227 Implement a YUV decode function in the TurboJPEG API, to be symmetric with tjEncodeYUV().
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1132 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 09:17:14 +00:00
DRC
fc300f03f9 Implement a YUV decode function in the TurboJPEG API, to be symmetric with tjEncodeYUV().
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1132 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 09:17:14 +00:00
DRC
9961cd6aed Remove benchmarks. They were originally intended as a way of measuring overhead for small compress/decompress operations, but using TJBench with a small image is a better way to accomplish that. 2014-02-28 09:06:42 +00:00
DRC
2bdadb44a7 Remove benchmarks. They were originally intended as a way of measuring overhead for small compress/decompress operations, but using TJBench with a small image is a better way to accomplish that.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1131 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 09:06:42 +00:00
DRC
9649c114e6 Remove benchmarks. They were originally intended as a way of measuring overhead for small compress/decompress operations, but using TJBench with a small image is a better way to accomplish that.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1131 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 09:06:42 +00:00
DRC
6500625c07 Remove unused code (the destination manager is not used during YUV encoding, there are no virtual arrays to realize, and jinit_c_prep_controller() is unnecessary because we are not using smoothing.) 2014-02-28 05:34:02 +00:00
DRC
54918b37fc Remove unused code (the destination manager is not used during YUV encoding, there are no virtual arrays to realize, and jinit_c_prep_controller() is unnecessary because we are not using smoothing.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1130 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 05:34:02 +00:00
DRC
0eb9ce28ad Remove unused code (the destination manager is not used during YUV encoding, there are no virtual arrays to realize, and jinit_c_prep_controller() is unnecessary because we are not using smoothing.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1130 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 05:34:02 +00:00
DRC
e2ce3b5eb0 Remove unused code (the destination manager is not used during YUV encoding, there are no virtual arrays to realize, and jinit_c_prep_controller() is unnecessary because we are not using smoothing.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1129 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 05:27:55 +00:00
DRC
ffa5e59218 Fix autoconf warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1128 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 05:26:24 +00:00
DRC
4f40a52c8e Fix autoconf warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1128 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 05:26:24 +00:00
DRC
5aec4afc62 Use C-style comments
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1127 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 05:23:26 +00:00
DRC
16ecf16f90 Use C-style comments
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1127 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 05:23:26 +00:00
DRC
c7a32466a6 Remove unused code (the destination manager is not used during YUV encoding, there are no virtual arrays to realize, and jinit_c_prep_controller() is unnecessary because we are not using smoothing.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1126 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 05:19:43 +00:00
DRC
0fe79b8083 Remove unused code (the destination manager is not used during YUV encoding, there are no virtual arrays to realize, and jinit_c_prep_controller() is unnecessary because we are not using smoothing.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1126 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-28 05:19:43 +00:00
Josh Aas
c0aa2c01b7 Re-brand to libmozjpeg. 2014-02-27 15:26:48 -06:00
DRC
b7e14cbaca Use C-style comments 2014-02-27 21:22:54 +00:00
DRC
006bc58dd6 Use C-style comments
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1125 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-27 21:22:54 +00:00
DRC
b3106a1ec5 Use C-style comments
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1125 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-27 21:22:54 +00:00
fbossen
e8376f242d Fix indentation 2014-02-21 13:36:55 -05:00
fbossen
724d558ae3 Fix issue #2 clarify default status of options
With mozjpeg defaults, Huffman table optimisation and progressive
coding are enabled
2014-02-20 18:31:25 -05:00
DRC
005d7c52a7 Oops 2014-02-20 19:33:44 +00:00
DRC
6f75a351a3 Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1124 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-20 19:33:44 +00:00
DRC
4d98fc5d95 Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1124 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-20 19:33:44 +00:00
fbossen
e9bbf66627 Enable mozjpeg defaults in sample apps and turbojpeg 2014-02-20 10:20:45 -05:00
fbossen
c3e2b3c933 Fix issue with uninitialised variable 2014-02-19 18:56:58 -05:00
fbossen
60e6c633fa Fix condition for comparing with original size 2014-02-19 18:43:13 -05:00
fbossen
b6ddbefdd7 Update jpegtran to match jpgcrush behaviour
Modify jpegtran such as to revert to original file if scan optimisation
brings no compression benefit
2014-02-19 17:24:58 -05:00
fbossen
b346a5cc31 Move field 2014-02-19 16:49:57 -05:00
fbossen
c92da453f3 Implement pruning of search for best number of refinement layers 2014-02-19 16:42:38 -05:00
fbossen
8d0816e808 Reorder scan buffers to match jpgcrush order 2014-02-19 15:56:36 -05:00
fbossen
3d26a0a343 Regroup copying of scan buffers 2014-02-19 15:38:20 -05:00
fbossen
579d16b032 Add pruning of frequency split selection
Skip passes for frequency splitting if they are unlikely to provide
better results.
Moved related fields from cinfo to master object.
2014-02-19 15:12:23 -05:00
fbossen
5ca1602f2f Clean up scan optimisation code
Remove code that was casting const to non-const
2014-02-19 13:36:00 -05:00
fbossen
e64d7453e9 Resolve mismatch with jpgcrush
Add early termination to search for best Al parameter
2014-02-15 09:13:03 -05:00
DRC
b9e72234e1 Older versions of automake don't support AM_PROG_AR, so only execute that macro if it exists. 2014-02-15 07:14:58 +00:00
DRC
cccfdcb8ab Older versions of automake don't support AM_PROG_AR, so only execute that macro if it exists.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1123 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-15 07:14:58 +00:00
DRC
6762c622b3 Older versions of automake don't support AM_PROG_AR, so only execute that macro if it exists.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1123 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-15 07:14:58 +00:00
DRC
618fb42ff1 Fix autoconf warnings 2014-02-15 07:02:04 +00:00
DRC
c56cb476f6 Fix autoconf warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1122 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-15 07:02:04 +00:00
DRC
3c4b32337a Fix autoconf warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1122 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-15 07:02:04 +00:00
fbossen
dff12f6b87 Fix issues with chroma scan optimisation 2014-02-14 18:57:15 -05:00
fbossen
a4137a6c14 Add support for scan optimisation of monochrome pictures 2014-02-14 18:12:51 -05:00
fbossen
fa9569fcec Add command line parameter to control scan optimisation 2014-02-14 17:19:56 -05:00
fbossen
09fde9eaf6 Clean up scan optimisation code
Remove hard coded values and restructure code.
2014-02-14 17:11:56 -05:00
fbossen
71f953d0be Clean up scan optimisation code
Lessen use of hardcoded values in luma search
2014-02-13 19:09:32 -05:00
fbossen
16c3cdb956 Initial version of scan optimisation
First implementation of scan optimisation as done by jpgcrush. Many
parameters are currently hardcoded which should be changed.
Implementation is missing for monochrome.
2014-02-13 16:55:56 -05:00
fbossen
1d3533fea1 Add mozjpeg defaults to jpegtran application
Make mozjpeg settings the default in the jpegtran application.
Behaviour can be reverted to old default settings using the -revert
command line option
2014-02-11 12:52:07 -05:00
fbossen
8e876747c8 Update cjpeg usage
Add -revert to the list of displayed options in cjpeg help message
2014-02-11 12:30:13 -05:00
fbossen
52925cfff2 Add fast jpgcrush mode
Add the fast mode of jpgcrush where:
- Huffman table optimisation is enabled
- Progressive coding mode is enabled
- New default scans are defined for progressive coding
2014-02-11 11:09:37 -05:00
DRC
693f4a5600 Fix an issue that prevented tjEncodeYUV2() and TJCompressor.encodeYUV() from working properly if the source image was very tiny. Basically, jpeg_start_compress() was attempting to write the JPEG headers, which was overrunning the YUV buffer. This patch removes the call to jpeg_start_compress() in tjEncodeYUV2() and replaces it with calls to the individual routines that are necessary to initialize the color converter and downsampler. TJUnitTest has also been modified to test for this condition (the buffer size regression test now works in YUV mode.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1121 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-11 10:16:42 +00:00
DRC
2c0c807fcc Fix an issue that prevented tjEncodeYUV2() and TJCompressor.encodeYUV() from working properly if the source image was very tiny. Basically, jpeg_start_compress() was attempting to write the JPEG headers, which was overrunning the YUV buffer. This patch removes the call to jpeg_start_compress() in tjEncodeYUV2() and replaces it with calls to the individual routines that are necessary to initialize the color converter and downsampler. TJUnitTest has also been modified to test for this condition (the buffer size regression test now works in YUV mode.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1120 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-11 09:56:12 +00:00
DRC
2a10cbaa27 Fix an issue that prevented tjEncodeYUV2() and TJCompressor.encodeYUV() from working properly if the source image was very tiny. Basically, jpeg_start_compress() was attempting to write the JPEG headers, which was overrunning the YUV buffer. This patch removes the call to jpeg_start_compress() in tjEncodeYUV2() and replaces it with calls to the individual routines that are necessary to initialize the color converter and downsampler. TJUnitTest has also been modified to test for this condition (the buffer size regression test now works in YUV mode.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1120 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-11 09:56:12 +00:00
DRC
9ba6976321 Update copyright year in file header as well 2014-02-11 09:55:32 +00:00
DRC
ad2f618f0b Update copyright year in file header as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1119 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-11 09:55:32 +00:00
DRC
6ee8b5ce48 Update copyright year in file header as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1119 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-11 09:55:32 +00:00
DRC
040c688263 Fix an issue that prevented tjEncodeYUV3() and TJCompressor.encodeYUV() from working properly if the source image was very tiny. Basically, jpeg_start_compress() was attempting to write the JPEG headers, which was overrunning the YUV buffer. This patch removes the call to jpeg_start_compress() in tjEncodeYUV3() and replaces it with calls to the individual routines that are necessary to initialize the color converter and downsampler. TJUnitTest has also been modified to test for this condition (the buffer size regression test now works in YUV mode.) 2014-02-11 09:45:18 +00:00
DRC
38c9970b95 Fix an issue that prevented tjEncodeYUV3() and TJCompressor.encodeYUV() from working properly if the source image was very tiny. Basically, jpeg_start_compress() was attempting to write the JPEG headers, which was overrunning the YUV buffer. This patch removes the call to jpeg_start_compress() in tjEncodeYUV3() and replaces it with calls to the individual routines that are necessary to initialize the color converter and downsampler. TJUnitTest has also been modified to test for this condition (the buffer size regression test now works in YUV mode.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1118 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-11 09:45:18 +00:00
DRC
c05b10176d Fix an issue that prevented tjEncodeYUV3() and TJCompressor.encodeYUV() from working properly if the source image was very tiny. Basically, jpeg_start_compress() was attempting to write the JPEG headers, which was overrunning the YUV buffer. This patch removes the call to jpeg_start_compress() in tjEncodeYUV3() and replaces it with calls to the individual routines that are necessary to initialize the color converter and downsampler. TJUnitTest has also been modified to test for this condition (the buffer size regression test now works in YUV mode.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1118 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-11 09:45:18 +00:00
DRC
d3d06f42c1 Update copyright notice to reflect recent SIMD contributions 2014-02-09 14:12:12 +00:00
DRC
68550a7e99 Update copyright notice to reflect recent SIMD contributions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1117 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-09 14:12:12 +00:00
DRC
78dd697afb Update copyright notice to reflect recent SIMD contributions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1117 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-09 14:12:12 +00:00
DRC
2885cf5830 Further examination of the code reveals that this change is unnecessary. The histogram stores a count of each color in the image, so it will always contain at least one non-zero element, and thus the total can never be zero. Since the histogram is generated from the image data and not read from the header, there is no chance that header corruption would affect it.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1116 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-07 19:06:03 +00:00
DRC
994b9819ac Further examination of the code reveals that this change is unnecessary. The histogram stores a count of each color in the image, so it will always contain at least one non-zero element, and thus the total can never be zero. Since the histogram is generated from the image data and not read from the header, there is no chance that header corruption would affect it.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1116 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-07 19:06:03 +00:00
DRC
7d8ed9833e Further examination of the code reveals that this change is unnecessary. The histogram stores a count of each color in the image, so it will always contain at least one non-zero element, and thus the total can never be zero. Since the histogram is generated from the image data and not read from the header, there is no chance that header corruption would affect it. 2014-02-07 19:05:07 +00:00
DRC
d9712ed14b Further examination of the code reveals that this change is unnecessary. The histogram stores a count of each color in the image, so it will always contain at least one non-zero element, and thus the total can never be zero. Since the histogram is generated from the image data and not read from the header, there is no chance that header corruption would affect it.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1115 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-07 19:05:07 +00:00
DRC
039b6c8041 Further examination of the code reveals that this change is unnecessary. The histogram stores a count of each color in the image, so it will always contain at least one non-zero element, and thus the total can never be zero. Since the histogram is generated from the image data and not read from the header, there is no chance that header corruption would affect it.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1115 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-07 19:05:07 +00:00
DRC
d4ab63d191 Fix several potential overflow issues identified by the community.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1114 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-06 19:31:50 +00:00
DRC
72bad638c1 Fix several potential overflow issues identified by the community.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1114 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-06 19:31:50 +00:00
DRC
88dee5863a Formatting tweak
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1113 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-06 19:31:23 +00:00
DRC
3d9105bb76 Formatting tweak
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1113 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-06 19:31:23 +00:00
DRC
3317c65fb9 Fix several potential overflow issues identified by the community. 2014-02-06 19:30:32 +00:00
DRC
e26c687b21 Fix several potential overflow issues identified by the community.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1112 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-06 19:30:32 +00:00
DRC
1f3d15a32d Fix several potential overflow issues identified by the community.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1112 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-06 19:30:32 +00:00
DRC
e189ec7a48 Remove trailing space
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1111 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-06 19:15:03 +00:00
DRC
7544a924e3 Remove trailing space
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1111 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-06 19:15:03 +00:00
DRC
bf417e56e0 Remove trailing space 2014-02-06 19:13:24 +00:00
DRC
9397469012 Remove trailing space
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1110 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-06 19:13:24 +00:00
DRC
f6903faab4 Remove trailing space
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1110 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-06 19:13:24 +00:00
DRC
890f35098a Create a separate stub file for 64-bit ARM, since it currently implements only the decompression-related functions. 2014-02-05 19:03:41 +00:00
DRC
2d07ee519d Create a separate stub file for 64-bit ARM, since it currently implements only the decompression-related functions.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1109 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-05 19:03:41 +00:00
DRC
08b4ed7490 Create a separate stub file for 64-bit ARM, since it currently implements only the decompression-related functions.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1109 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-05 19:03:41 +00:00
DRC
1bb1e69186 First pass at ARMv8 64-bit NEON SIMD support 2014-02-05 08:15:44 +00:00
DRC
ba55b2cdfe First pass at ARMv8 64-bit NEON SIMD support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1108 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-05 08:15:44 +00:00
DRC
786bb7f8c9 First pass at ARMv8 64-bit NEON SIMD support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1108 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-05 08:15:44 +00:00
DRC
3e00f03aea Formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1107 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-05 07:40:00 +00:00
DRC
2935005850 Formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1107 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-05 07:40:00 +00:00
DRC
abb6a513fa Formatting tweaks 2014-02-05 07:39:38 +00:00
DRC
edc846f4fe Formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1106 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-05 07:39:38 +00:00
DRC
974aa1692a Formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1106 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-05 07:39:38 +00:00
DRC
671fea53d1 Remove trailing spaces 2014-02-01 06:17:31 +00:00
DRC
cc0733ad78 Remove trailing spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1105 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-01 06:17:31 +00:00
DRC
1aeba2fe5f Remove trailing spaces
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1105 632fc199-4ca6-4c93-a231-07263d6284db
2014-02-01 06:17:31 +00:00
DRC
857564d019 Some motion JPEG implementations generate "abbreviated JPEG streams" (JPEG images without the default tables included) for some or all of the video frames, in order to save space. When these are encountered, it is generally expected that they will be decompressed using the default Huffman tables, so libjpeg-turbo now does this unless the tables have been explicitly specified by an application. 2014-01-31 17:22:15 +00:00
DRC
a113506d17 Some motion JPEG implementations generate "abbreviated JPEG streams" (JPEG images without the default tables included) for some or all of the video frames, in order to save space. When these are encountered, it is generally expected that they will be decompressed using the default Huffman tables, so libjpeg-turbo now does this unless the tables have been explicitly specified by an application.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1104 632fc199-4ca6-4c93-a231-07263d6284db
2014-01-31 17:22:15 +00:00
DRC
07c0d68d9b Some motion JPEG implementations generate "abbreviated JPEG streams" (JPEG images without the default tables included) for some or all of the video frames, in order to save space. When these are encountered, it is generally expected that they will be decompressed using the default Huffman tables, so libjpeg-turbo now does this unless the tables have been explicitly specified by an application.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1104 632fc199-4ca6-4c93-a231-07263d6284db
2014-01-31 17:22:15 +00:00
DRC
8d55c88cda Include instructions for building iOS binaries using Xcode 4.6.x and Xcode 5.0.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1102 632fc199-4ca6-4c93-a231-07263d6284db
2014-01-29 19:32:23 +00:00
DRC
cbe20c302e Include instructions for building iOS binaries using Xcode 4.6.x and Xcode 5.0.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1102 632fc199-4ca6-4c93-a231-07263d6284db
2014-01-29 19:32:23 +00:00
DRC
4f4d870822 Include instructions for building iOS binaries using Xcode 4.6.x and Xcode 5.0. 2014-01-29 19:31:09 +00:00
DRC
a2f06448c8 Include instructions for building iOS binaries using Xcode 4.6.x and Xcode 5.0.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1101 632fc199-4ca6-4c93-a231-07263d6284db
2014-01-29 19:31:09 +00:00
DRC
55e240198d Include instructions for building iOS binaries using Xcode 4.6.x and Xcode 5.0.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1101 632fc199-4ca6-4c93-a231-07263d6284db
2014-01-29 19:31:09 +00:00
Josh Aas
72b66f9c77 Initial commit of libjpeg-turbo plus readme edits. 2014-01-13 18:28:20 -06:00
DRC
540789427c Per the conventions of the image compression and digital video communities, use "YCbCr" to describe the JPEG colorspace and "YUV" to describe an image format consisting of Y, Cb, and Cr planes (this partially reverts r960.) 2013-11-25 21:12:23 +00:00
DRC
7db5273ea7 Per the conventions of the image compression and digital video communities, use "YCbCr" to describe the JPEG colorspace and "YUV" to describe an image format consisting of Y, Cb, and Cr planes (this partially reverts r960.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1093 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-25 21:12:23 +00:00
DRC
48706bff01 Per the conventions of the image compression and digital video communities, use "YCbCr" to describe the JPEG colorspace and "YUV" to describe an image format consisting of Y, Cb, and Cr planes (this partially reverts r960.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1093 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-25 21:12:23 +00:00
DRC
b3a028e356 Per the conventions of the image compression and digital video communities, use "YCbCr" to describe the JPEG colorspace and "YUV" to describe an image format consisting of Y, Cb, and Cr planes (this partially reverts r959.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1092 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-25 21:08:47 +00:00
DRC
ac79e9b1ee Per the conventions of the image compression and digital video communities, use "YCbCr" to describe the JPEG colorspace and "YUV" to describe an image format consisting of Y, Cb, and Cr planes (this partially reverts r959.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1092 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-25 21:08:47 +00:00
DRC
5a7e9e5baa Per the conventions of the image compression and digital video communities, use "YCbCr" to describe the JPEG colorspace and "YUV" to describe an image format consisting of Y, Cb, and Cr planes (this partially reverts r959.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1091 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-25 20:30:12 +00:00
DRC
023ebb66c4 Per the conventions of the image compression and digital video communities, use "YCbCr" to describe the JPEG colorspace and "YUV" to describe an image format consisting of Y, Cb, and Cr planes (this partially reverts r959.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1091 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-25 20:30:12 +00:00
DRC
43d8cf4d45 Fix CVE-2013-6629 and CVE-2013-6630
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1090 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-21 18:34:39 +00:00
DRC
7ebf2941a9 Fix CVE-2013-6629 and CVE-2013-6630
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1089 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-21 18:32:48 +00:00
DRC
3c8a31c9b5 Fix CVE-2013-6629 and CVE-2013-6630
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1089 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-21 18:32:48 +00:00
DRC
c5aefc3659 Fix CVE-2013-6629 and CVE-2013-6630 2013-11-21 18:31:08 +00:00
DRC
9f9436ae23 Fix CVE-2013-6629 and CVE-2013-6630
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1088 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-21 18:31:08 +00:00
DRC
d1e8d536c8 Fix CVE-2013-6629 and CVE-2013-6630
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1088 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-21 18:31:08 +00:00
DRC
cb92dccf0d Make documentation viewable directly from http://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1086 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-19 02:08:23 +00:00
DRC
c85058008f Make documentation viewable directly from http://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1086 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-19 02:08:23 +00:00
DRC
b10aafb889 Make documentation viewable directly from http://svn.code.sf.net/p/libjpeg-turbo/code/trunk
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1085 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-19 01:59:05 +00:00
DRC
12d34929ba Make documentation viewable directly from http://svn.code.sf.net/p/libjpeg-turbo/code/trunk
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1085 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-19 01:59:05 +00:00
DRC
62eeefcb3d Make documentation viewable directly from http://svn.code.sf.net/p/libjpeg-turbo/code/trunk
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1084 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-19 01:53:13 +00:00
DRC
dca89b0e4a Make documentation viewable directly from http://svn.code.sf.net/p/libjpeg-turbo/code/trunk
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1084 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-19 01:53:13 +00:00
DRC
e163653f99 Back-port code from jpeg-8 that removes unpopulated (and unneeded) tables for AC and DC coefficients when generating progressive JPEG files with arithmetic coding. This should make such files bitwise compatible with jpeg-8, barring any other mathematical differences (such as the different subsampling algorithm used in jpeg-8.) Add regression tests for progressive+arithmetic JPEG files.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1082 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-06 07:45:39 +00:00
DRC
c44750e50e Fix an issue that resulted in an error ("Invalid SOS parameters for sequential JPEG. Didn't expect more than one scan.") when decoding progressive+arithmetic JPEGs generated by libjpeg-turbo.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1081 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-06 07:37:01 +00:00
DRC
4b509280ce Back-port code from jpeg-8 that removes unpopulated (and unneeded) tables for AC and DC coefficients when generating progressive JPEG files with arithmetic coding. This should make such files bitwise compatible with jpeg-8, barring any other mathematical differences listed in README-turbo.txt. Add regression tests for progressive+arithmetic JPEG files.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1080 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-06 06:55:28 +00:00
DRC
97fbe04323 Back-port code from jpeg-8 that removes unpopulated (and unneeded) tables for AC and DC coefficients when generating progressive JPEG files with arithmetic coding. This should make such files bitwise compatible with jpeg-8, barring any other mathematical differences listed in README-turbo.txt. Add regression tests for progressive+arithmetic JPEG files.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1080 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-06 06:55:28 +00:00
DRC
db6e007c44 Back-port code from jpeg-8 that removes unpopulated (and unneeded) tables for AC and DC coefficients when generating progressive JPEG files with arithmetic coding. This should make such files bitwise compatible with jpeg-8, barring any other mathematical differences listed in README-turbo.txt. Add regression tests for progressive+arithmetic JPEG files. 2013-11-06 06:50:38 +00:00
DRC
5430aa1863 Back-port code from jpeg-8 that removes unpopulated (and unneeded) tables for AC and DC coefficients when generating progressive JPEG files with arithmetic coding. This should make such files bitwise compatible with jpeg-8, barring any other mathematical differences listed in README-turbo.txt. Add regression tests for progressive+arithmetic JPEG files.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1079 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-06 06:50:38 +00:00
DRC
ac10ce0c8c Back-port code from jpeg-8 that removes unpopulated (and unneeded) tables for AC and DC coefficients when generating progressive JPEG files with arithmetic coding. This should make such files bitwise compatible with jpeg-8, barring any other mathematical differences listed in README-turbo.txt. Add regression tests for progressive+arithmetic JPEG files.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1079 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-06 06:50:38 +00:00
DRC
4ac8700537 Remove unnecessary whitespace
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1078 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-06 06:02:26 +00:00
DRC
bff45dffc1 Remove unnecessary whitespace
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1078 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-06 06:02:26 +00:00
DRC
5aa6c9a553 Remove unnecessary whitespace
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1077 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-06 05:58:38 +00:00
DRC
2d4ca5d710 Remove unnecessary whitespace 2013-11-06 05:51:03 +00:00
DRC
dbbef06227 Remove unnecessary whitespace
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1076 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-06 05:51:03 +00:00
DRC
69e08193f3 Remove unnecessary whitespace
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1076 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-06 05:51:03 +00:00
DRC
3b80b515fe Add the ability to test scaling when decompressing to YUV; compression from YUV to JPEG; and YUV padding. Replace clunky -411 and -440 parameters with a -subsamp parameter that allows any of the subsampling options to be tested in isolation. 2013-11-05 19:53:12 +00:00
DRC
2e8ff4b084 Add the ability to test scaling when decompressing to YUV; compression from YUV to JPEG; and YUV padding. Replace clunky -411 and -440 parameters with a -subsamp parameter that allows any of the subsampling options to be tested in isolation.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1075 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-05 19:53:12 +00:00
DRC
cb2b0d6670 Add the ability to test scaling when decompressing to YUV; compression from YUV to JPEG; and YUV padding. Replace clunky -411 and -440 parameters with a -subsamp parameter that allows any of the subsampling options to be tested in isolation.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1075 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-05 19:53:12 +00:00
DRC
61298968fa Add the ability to test scaling when decompressing to YUV; compression from YUV to JPEG; and YUV padding. Replace clunky -411 and -440 parameters with a -subsamp parameter that allows any of the subsampling options to be tested in isolation. 2013-11-04 23:07:54 +00:00
DRC
c6501f7f5f Add the ability to test scaling when decompressing to YUV; compression from YUV to JPEG; and YUV padding. Replace clunky -411 and -440 parameters with a -subsamp parameter that allows any of the subsampling options to be tested in isolation.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1074 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-04 23:07:54 +00:00
DRC
04508b8c4c Add the ability to test scaling when decompressing to YUV; compression from YUV to JPEG; and YUV padding. Replace clunky -411 and -440 parameters with a -subsamp parameter that allows any of the subsampling options to be tested in isolation.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1074 632fc199-4ca6-4c93-a231-07263d6284db
2013-11-04 23:07:54 +00:00
DRC
bd029eb0f7 Make environment variable syntax consistent between ARM and x86 code, and add an option to disable SIMD on x86 (this option will be added to the x86-64 code as well, but it makes more sense to add it when we add AVX support.) 2013-10-31 07:40:24 +00:00
DRC
19eeaa7908 Make environment variable syntax consistent between ARM and x86 code, and add an option to disable SIMD on x86 (this option will be added to the x86-64 code as well, but it makes more sense to add it when we add AVX support.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1073 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-31 07:40:24 +00:00
DRC
fabf58ed48 Make environment variable syntax consistent between ARM and x86 code, and add an option to disable SIMD on x86 (this option will be added to the x86-64 code as well, but it makes more sense to add it when we add AVX support.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1073 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-31 07:40:24 +00:00
DRC
b767b5e6bb Deprecate and undocument the FORCE{MMX|SSE|SSE2|SSE3} flags. These were originally introduced in TurboJPEG/IPP as a way to override the automatic CPU selection in the underlying IPP codec, which was closed source. They are not meaningful anymore, since libjpeg-turbo provides environment variables to accomplish the same thing and since it no longer necessarily uses x86 SIMD code behind the scenes. 2013-10-31 07:11:39 +00:00
DRC
07e982d9b4 Deprecate and undocument the FORCE{MMX|SSE|SSE2|SSE3} flags. These were originally introduced in TurboJPEG/IPP as a way to override the automatic CPU selection in the underlying IPP codec, which was closed source. They are not meaningful anymore, since libjpeg-turbo provides environment variables to accomplish the same thing and since it no longer necessarily uses x86 SIMD code behind the scenes.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1072 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-31 07:11:39 +00:00
DRC
7a0bc500e2 Deprecate and undocument the FORCE{MMX|SSE|SSE2|SSE3} flags. These were originally introduced in TurboJPEG/IPP as a way to override the automatic CPU selection in the underlying IPP codec, which was closed source. They are not meaningful anymore, since libjpeg-turbo provides environment variables to accomplish the same thing and since it no longer necessarily uses x86 SIMD code behind the scenes.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1072 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-31 07:11:39 +00:00
DRC
a7fa97cda5 Extend the TurboJPEG Java API to support compressing JPEG images from YUV planar images 2013-10-31 05:04:51 +00:00
DRC
1e67274bd7 Extend the TurboJPEG Java API to support compressing JPEG images from YUV planar images
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1071 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-31 05:04:51 +00:00
DRC
a2c32ce513 Extend the TurboJPEG Java API to support compressing JPEG images from YUV planar images
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1071 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-31 05:04:51 +00:00
DRC
98e6ffb50c Add 'tjunittest -yuv -alloc' test on Windows as well 2013-10-31 05:02:20 +00:00
DRC
faa868bbb6 Add 'tjunittest -yuv -alloc' test on Windows as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1070 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-31 05:02:20 +00:00
DRC
cda9ea1e3b Add 'tjunittest -yuv -alloc' test on Windows as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1070 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-31 05:02:20 +00:00
DRC
fca3a77590 r1065 broke the build on Windows, because getinstance() defines a variable. Thus, it needs to occur before the array initialization code. 2013-10-31 05:00:19 +00:00
DRC
b51ee895d8 r1065 broke the build on Windows, because getinstance() defines a variable. Thus, it needs to occur before the array initialization code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1069 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-31 05:00:19 +00:00
DRC
ee1111ae8a r1065 broke the build on Windows, because getinstance() defines a variable. Thus, it needs to occur before the array initialization code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1069 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-31 05:00:19 +00:00
DRC
2bdc88ba48 Clean up formatting code and rename the JPEG files generated during the YUV decode tests to reflect the fact that they are being generated from YUV source images. 2013-10-31 04:53:27 +00:00
DRC
fe739656f9 Clean up formatting code and rename the JPEG files generated during the YUV decode tests to reflect the fact that they are being generated from YUV source images.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1068 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-31 04:53:27 +00:00
DRC
c18c6f9fd6 Clean up formatting code and rename the JPEG files generated during the YUV decode tests to reflect the fact that they are being generated from YUV source images.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1068 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-31 04:53:27 +00:00
DRC
b3633e930b Extend the TurboJPEG C API to support compressing JPEG images from YUV planar images 2013-10-30 23:02:57 +00:00
DRC
910a35725c Extend the TurboJPEG C API to support compressing JPEG images from YUV planar images
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1067 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-30 23:02:57 +00:00
DRC
ad6e9649d5 Extend the TurboJPEG C API to support compressing JPEG images from YUV planar images
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1067 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-30 23:02:57 +00:00
DRC
8e4a07e20f Oops 2013-10-30 22:21:58 +00:00
DRC
eaa31f52b3 Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1066 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-30 22:21:58 +00:00
DRC
db5b90b145 Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1066 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-30 22:21:58 +00:00
DRC
07eadec225 Fix a really subtle issue whereby an invalid free() could occur if a program called tjInitDecompress() and then accidentally passed the handle to tjEncodeYUV3(), or if a program called tjInitCompress() and then accidentally passed the handle to tjDecompressToYUV2(). 2013-10-30 22:21:06 +00:00
DRC
e2f8e694d0 Fix a really subtle issue whereby an invalid free() could occur if a program called tjInitDecompress() and then accidentally passed the handle to tjEncodeYUV3(), or if a program called tjInitCompress() and then accidentally passed the handle to tjDecompressToYUV2().
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1065 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-30 22:21:06 +00:00
DRC
fbff05b11c Fix a really subtle issue whereby an invalid free() could occur if a program called tjInitDecompress() and then accidentally passed the handle to tjEncodeYUV3(), or if a program called tjInitCompress() and then accidentally passed the handle to tjDecompressToYUV2().
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1065 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-30 22:21:06 +00:00
DRC
6cef2b1059 Fix a really subtle issue whereby an invalid free() could occur if a program called tjInitDecompress() and then accidentally passed the handle to tjEncodeYUV2(), or if a program called tjInitCompress() and then accidentally passed the handle to tjDecompressToYUV().
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1064 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-30 22:12:37 +00:00
DRC
a601602d61 Fix a really subtle issue whereby an invalid free() could occur if a program called tjInitDecompress() and then accidentally passed the handle to tjEncodeYUV2(), or if a program called tjInitCompress() and then accidentally passed the handle to tjDecompressToYUV().
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1064 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-30 22:12:37 +00:00
DRC
f57a22de55 Fix logic error from r1039
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1063 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-26 00:32:23 +00:00
DRC
7d49d6c6b0 Fix logic error from r1039
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1063 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-26 00:32:23 +00:00
DRC
811d68b21b Fix logic error from r1037 2013-10-26 00:29:53 +00:00
DRC
596b96623f Fix logic error from r1037
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1062 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-26 00:29:53 +00:00
DRC
20a53a6419 Fix logic error from r1037
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1062 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-26 00:29:53 +00:00
DRC
c45653e471 Fix a couple of issues with return value checking. JFREAD(), which wraps fread(), will never return -1. fread() will instead return 0 or a short object count if an error occurs, and ferror() will return 1 in that case. The second issue was that we were assigning the return value of ftell() to an unsigned long prior to checking the value, so the value would never be < 0 if an error occurred. It would instead be (unsigned long)-1.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1061 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-12 21:52:48 +00:00
DRC
f3fb703909 Fix a couple of issues with return value checking. JFREAD(), which wraps fread(), will never return -1. fread() will instead return 0 or a short object count if an error occurs, and ferror() will return 1 in that case. The second issue was that we were assigning the return value of ftell() to an unsigned long prior to checking the value, so the value would never be < 0 if an error occurred. It would instead be (unsigned long)-1.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1061 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-12 21:52:48 +00:00
DRC
2bf81e8eb7 Fix a couple of issues with return value checking. JFREAD(), which wraps fread(), will never return -1. fread() will instead return 0 or a short object count if an error occurs, and ferror() will return 1 in that case. The second issue was that we were assigning the return value of ftell() to an unsigned long prior to checking the value, so the value would never be < 0 if an error occurred. It would instead be (unsigned long)-1. 2013-10-12 21:51:16 +00:00
DRC
490c7f955a Fix a couple of issues with return value checking. JFREAD(), which wraps fread(), will never return -1. fread() will instead return 0 or a short object count if an error occurs, and ferror() will return 1 in that case. The second issue was that we were assigning the return value of ftell() to an unsigned long prior to checking the value, so the value would never be < 0 if an error occurred. It would instead be (unsigned long)-1.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1060 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-12 21:51:16 +00:00
DRC
d40310f531 Fix a couple of issues with return value checking. JFREAD(), which wraps fread(), will never return -1. fread() will instead return 0 or a short object count if an error occurs, and ferror() will return 1 in that case. The second issue was that we were assigning the return value of ftell() to an unsigned long prior to checking the value, so the value would never be < 0 if an error occurred. It would instead be (unsigned long)-1.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1060 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-12 21:51:16 +00:00
DRC
c6c8c7911f SIMD-accelerated integer convsamp routine for MIPS DSPr2 2013-10-12 21:39:20 +00:00
DRC
fff6c23a65 SIMD-accelerated integer convsamp routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1059 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-12 21:39:20 +00:00
DRC
3ea68ac65e SIMD-accelerated integer convsamp routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1059 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-12 21:39:20 +00:00
DRC
3c6b1ba545 SIMD-accelerated floating point quantize and convsamp routines for MIPS DSPr2 2013-10-09 18:39:44 +00:00
DRC
3d72728169 SIMD-accelerated floating point quantize and convsamp routines for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1058 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-09 18:39:44 +00:00
DRC
7b0d18f239 SIMD-accelerated floating point quantize and convsamp routines for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1058 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-09 18:39:44 +00:00
DRC
b4832c620f adjust DSPr2 performance claims 2013-10-08 02:32:07 +00:00
DRC
d64e23e6f8 adjust DSPr2 performance claims
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1057 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-08 02:32:07 +00:00
DRC
e6a43d1aa5 adjust DSPr2 performance claims
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1057 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-08 02:32:07 +00:00
DRC
10138c9d35 SIMD-accelerated fast integer inverse DCT routine for MIPS DSPr2 2013-10-08 02:18:59 +00:00
DRC
d3131c1b3d SIMD-accelerated fast integer inverse DCT routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1056 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-08 02:18:59 +00:00
DRC
838af42eaf SIMD-accelerated fast integer inverse DCT routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1056 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-08 02:18:59 +00:00
DRC
6addfed58b SIMD-accelerated fast integer forward DCT routine for MIPS DSPr2 2013-10-08 02:11:21 +00:00
DRC
71e06a7d81 SIMD-accelerated fast integer forward DCT routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1055 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-08 02:11:21 +00:00
DRC
d4d76b46c8 SIMD-accelerated fast integer forward DCT routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1055 632fc199-4ca6-4c93-a231-07263d6284db
2013-10-08 02:11:21 +00:00
DRC
01f46504ee SIMD-accelerated slow integer forward DCT and quantize routines for MIPS DSPr2 2013-09-30 18:13:27 +00:00
DRC
a6b7fbd352 SIMD-accelerated slow integer forward DCT and quantize routines for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1054 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-30 18:13:27 +00:00
DRC
d820c88ab2 SIMD-accelerated slow integer forward DCT and quantize routines for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1054 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-30 18:13:27 +00:00
DRC
a6ef282a49 Some of the IJG headers say "Modified by", so clarify that our "Modifications" are not referring to these.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1053 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-28 03:23:49 +00:00
DRC
472ecea71e Some of the IJG headers say "Modified by", so clarify that our "Modifications" are not referring to these.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1053 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-28 03:23:49 +00:00
DRC
e2563adb2e Some of the IJG headers say "Modified by", so clarify that our "Modifications" are not referring to these. 2013-09-28 03:22:53 +00:00
DRC
ecc9560822 Some of the IJG headers say "Modified by", so clarify that our "Modifications" are not referring to these.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1052 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-28 03:22:53 +00:00
DRC
c7e306f883 Some of the IJG headers say "Modified by", so clarify that our "Modifications" are not referring to these.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1052 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-28 03:22:53 +00:00
DRC
fa4e9b5926 Actually, the second bug was hidden by the first, so the initial ChangeLog entry was correct from the user's point of view. 2013-09-28 03:11:46 +00:00
DRC
982e2099a4 Actually, the second bug was hidden by the first, so the initial ChangeLog entry was correct from the user's point of view.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1051 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-28 03:11:46 +00:00
DRC
33721ced53 Actually, the second bug was hidden by the first, so the initial ChangeLog entry was correct from the user's point of view.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1051 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-28 03:11:46 +00:00
DRC
cadabd4239 Actually, the second bug was hidden by the first, so the initial ChangeLog entry was correct from the user's point of view.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1050 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-28 03:10:31 +00:00
DRC
3b0a4b86ac Actually, the second bug was hidden by the first, so the initial ChangeLog entry was correct from the user's point of view.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1050 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-28 03:10:31 +00:00
DRC
e8be2c612a Fix an issue that resulted in an error ("Invalid SOS parameters for sequential JPEG. Didn't expect more than one scan.") when decoding progressive+arithmetic JPEGs generated by libjpeg-turbo.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1049 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-28 03:04:01 +00:00
DRC
dc0f3c179e Fix an issue that resulted in an error ("Invalid SOS parameters for sequential JPEG. Didn't expect more than one scan.") when decoding progressive+arithmetic JPEGs generated by libjpeg-turbo.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1049 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-28 03:04:01 +00:00
DRC
0ccc581b8c Fix an issue that resulted in an error ("Invalid SOS parameters for sequential JPEG. Didn't expect more than one scan.") when decoding progressive+arithmetic JPEGs generated by libjpeg-turbo. 2013-09-28 03:03:04 +00:00
DRC
56e017d71a Fix an issue that resulted in an error ("Invalid SOS parameters for sequential JPEG. Didn't expect more than one scan.") when decoding progressive+arithmetic JPEGs generated by libjpeg-turbo.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1048 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-28 03:03:04 +00:00
DRC
fbc4f5fdd4 Fix an issue that resulted in an error ("Invalid SOS parameters for sequential JPEG. Didn't expect more than one scan.") when decoding progressive+arithmetic JPEGs generated by libjpeg-turbo.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1048 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-28 03:03:04 +00:00
DRC
198cc7c161 SIMD-accelerated 3/4 and 3/2 decompression scaling for MIPS DSPr2 2013-09-27 17:51:08 +00:00
DRC
e500591710 SIMD-accelerated 3/4 and 3/2 decompression scaling for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1047 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-27 17:51:08 +00:00
DRC
95257c488f SIMD-accelerated 3/4 and 3/2 decompression scaling for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1047 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-27 17:51:08 +00:00
DRC
f934fc621e SIMD-accelerated 1/2 and 1/4 decompression scaling for MIPS DSPr2 2013-09-27 17:43:23 +00:00
DRC
2ccf4d1a70 SIMD-accelerated 1/2 and 1/4 decompression scaling for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1046 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-27 17:43:23 +00:00
DRC
e2da0467a6 SIMD-accelerated 1/2 and 1/4 decompression scaling for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1046 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-27 17:43:23 +00:00
DRC
154c2dc749 SIMD-optimized RGB-to-grayscale conversion for MIPS DSPr2 2013-09-27 17:39:57 +00:00
DRC
49eaa7572d SIMD-optimized RGB-to-grayscale conversion for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1045 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-27 17:39:57 +00:00
DRC
101197d2a2 SIMD-optimized RGB-to-grayscale conversion for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1045 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-27 17:39:57 +00:00
DRC
afb8fce223 Name the package *cygwin64.tar.bz2 when building on Cygwin64. 2013-09-26 07:29:20 +00:00
DRC
7308ffee43 Name the package *cygwin64.tar.bz2 when building on Cygwin64.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1044 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-26 07:29:20 +00:00
DRC
1c51826a70 Name the package *cygwin64.tar.bz2 when building on Cygwin64.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1044 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-26 07:29:20 +00:00
DRC
94b6c02d7d Name the package *cygwin64.tar.bz2 when building on Cygwin64.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1043 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-26 07:27:56 +00:00
DRC
ac5b9e8b78 Name the package *cygwin64.tar.bz2 when building on Cygwin64.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1043 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-26 07:27:56 +00:00
DRC
8abacdbd4b Fix segfault in MIPS DSPr2 upsample routines that occurred when doing 'make test' 2013-09-25 17:33:37 +00:00
DRC
922b14b8d8 Fix segfault in MIPS DSPr2 upsample routines that occurred when doing 'make test'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1040 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-25 17:33:37 +00:00
DRC
159f02b3a9 Fix segfault in MIPS DSPr2 upsample routines that occurred when doing 'make test'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1040 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-25 17:33:37 +00:00
DRC
f369f17f8a Due to the way in which the configure script silently falls back to a non-SIMD build if SIMD can't be enabled, we accidentally released iOS ARM v7 and v7s binaries in 1.3.0 that did not contain NEON SIMD code, because gas-preprocessor.pl wasn't in the PATH. In order to prevent this from happening again, specifying --with-simd now has the effect of forcing a SIMD build, and if this argument is specified, any issues encountered while enabling SIMD are treated as fatal.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1039 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-25 05:24:46 +00:00
DRC
7452d682ef Due to the way in which the configure script silently falls back to a non-SIMD build if SIMD can't be enabled, we accidentally released iOS ARM v7 and v7s binaries in 1.3.0 that did not contain NEON SIMD code, because gas-preprocessor.pl wasn't in the PATH. In order to prevent this from happening again, specifying --with-simd now has the effect of forcing a SIMD build, and if this argument is specified, any issues encountered while enabling SIMD are treated as fatal.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1039 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-25 05:24:46 +00:00
DRC
0a90c5d778 Due to the way in which the configure script silently falls back to a non-SIMD build if SIMD can't be enabled, we accidentally released iOS ARM v7 and v7s binaries in 1.3.0 that did not contain NEON SIMD code, because gas-preprocessor.pl wasn't in the PATH. In order to prevent this from happening again, specifying --with-simd now has the effect of forcing a SIMD build, and if this argument is specified, any issues encountered while enabling SIMD are treated as fatal. 2013-09-25 04:36:44 +00:00
DRC
8ca34d4b33 Due to the way in which the configure script silently falls back to a non-SIMD build if SIMD can't be enabled, we accidentally released iOS ARM v7 and v7s binaries in 1.3.0 that did not contain NEON SIMD code, because gas-preprocessor.pl wasn't in the PATH. In order to prevent this from happening again, specifying --with-simd now has the effect of forcing a SIMD build, and if this argument is specified, any issues encountered while enabling SIMD are treated as fatal.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1037 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-25 04:36:44 +00:00
DRC
20b1b0c547 Due to the way in which the configure script silently falls back to a non-SIMD build if SIMD can't be enabled, we accidentally released iOS ARM v7 and v7s binaries in 1.3.0 that did not contain NEON SIMD code, because gas-preprocessor.pl wasn't in the PATH. In order to prevent this from happening again, specifying --with-simd now has the effect of forcing a SIMD build, and if this argument is specified, any issues encountered while enabling SIMD are treated as fatal.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1037 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-25 04:36:44 +00:00
DRC
5d2514b86f We can't enable optimized entropy coding unless we're using Huffman coding. This fixes a bug whereby attempting to create a progressive JPEG with arithmetic coding would fail.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1036 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-24 03:39:51 +00:00
DRC
2c63c003be Clarify that the bug affects cjpeg as well as jpegtran.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1035 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-24 03:38:32 +00:00
DRC
4b7c15f709 Clarify that the bug affects cjpeg as well as jpegtran.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1035 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-24 03:38:32 +00:00
DRC
1719c57186 Clarify that the bug affects cjpeg as well as jpegtran. 2013-09-24 03:37:29 +00:00
DRC
27df2a4c03 Clarify that the bug affects cjpeg as well as jpegtran.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1034 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-24 03:37:29 +00:00
DRC
73dae02512 Clarify that the bug affects cjpeg as well as jpegtran.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1034 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-24 03:37:29 +00:00
DRC
ba923a8529 Fix I/O suspension. This little nugget of code was introduced in r30 as part of an early attempt to make buffered I/O work with the optimized Huffman codec. Ultimately, r32 reverted a lot of that mess and introduced much of the logic we now use, rendering this code unnecessary, but it was never reverted because it only causes problems when I/O suspension is used, and apparently no one has tried to do that with libjpeg-turbo until now.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1033 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-24 03:26:47 +00:00
DRC
1370f10326 We can't enable optimized entropy coding unless we're using Huffman coding. This fixes a bug whereby attempting to create a progressive JPEG with arithmetic coding would fail.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1032 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-24 03:21:38 +00:00
DRC
792daa8548 We can't enable optimized entropy coding unless we're using Huffman coding. This fixes a bug whereby attempting to create a progressive JPEG with arithmetic coding would fail.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1032 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-24 03:21:38 +00:00
DRC
4aa11c8bb4 We can't enable optimized entropy coding unless we're using Huffman coding. This fixes a bug whereby attempting to create a progressive JPEG with arithmetic coding would fail. 2013-09-24 03:18:27 +00:00
DRC
216cc641c9 We can't enable optimized entropy coding unless we're using Huffman coding. This fixes a bug whereby attempting to create a progressive JPEG with arithmetic coding would fail.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1031 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-24 03:18:27 +00:00
DRC
aef8973ec7 We can't enable optimized entropy coding unless we're using Huffman coding. This fixes a bug whereby attempting to create a progressive JPEG with arithmetic coding would fail.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1031 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-24 03:18:27 +00:00
DRC
24f11a73f2 The connect.apple.com alias has apparently been down for about a month
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1030 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-23 18:38:20 +00:00
DRC
36b5ca24d3 The connect.apple.com alias has apparently been down for about a month
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1030 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-23 18:38:20 +00:00
DRC
59aa40fa79 The connect.apple.com alias has apparently been down for about a month 2013-09-23 18:37:34 +00:00
DRC
3a25f7b1d7 The connect.apple.com alias has apparently been down for about a month
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1029 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-23 18:37:34 +00:00
DRC
9f0b4a4bd3 The connect.apple.com alias has apparently been down for about a month
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1029 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-23 18:37:34 +00:00
DRC
6eb29ddb6f Oops. We need to delete the new copy of turbojpeg.dll in the binary directory. Also add quotes to InstDir to allow installing under "c:\Program Files\", and remove unnecessary quotes in the Delete directives.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1028 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-20 01:11:40 +00:00
DRC
54fffed01a Oops. We need to delete the new copy of turbojpeg.dll in the binary directory. Also add quotes to InstDir to allow installing under "c:\Program Files\", and remove unnecessary quotes in the Delete directives.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1028 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-20 01:11:40 +00:00
DRC
11b9c8802c In the Windows installer packages, place a duplicate copy of turbojpeg.dll in c:\libjpeg-turbo[-gcc][64]\bin. This is mainly to give installers an easy way to find the DLL for the purposes of bundling it. Specifically, this was necessary for TurboVNC, becuase 32-bit CMake running on 64-bit Windows cannot ever access the "real" c:\windows\system32 directory. 2013-09-19 22:57:18 +00:00
DRC
ae8d0dc35f In the Windows installer packages, place a duplicate copy of turbojpeg.dll in c:\libjpeg-turbo[-gcc][64]\bin. This is mainly to give installers an easy way to find the DLL for the purposes of bundling it. Specifically, this was necessary for TurboVNC, becuase 32-bit CMake running on 64-bit Windows cannot ever access the "real" c:\windows\system32 directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1027 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-19 22:57:18 +00:00
DRC
475ae72b0b In the Windows installer packages, place a duplicate copy of turbojpeg.dll in c:\libjpeg-turbo[-gcc][64]\bin. This is mainly to give installers an easy way to find the DLL for the purposes of bundling it. Specifically, this was necessary for TurboVNC, becuase 32-bit CMake running on 64-bit Windows cannot ever access the "real" c:\windows\system32 directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1027 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-19 22:57:18 +00:00
DRC
4d877931ab In the Windows installer packages, place a duplicate copy of turbojpeg.dll in c:\libjpeg-turbo[-gcc][64]\bin. This is mainly to give installers an easy way to find the DLL for the purposes of bundling it. Specifically, this was necessary for TurboVNC, becuase 32-bit CMake running on 64-bit Windows cannot ever access the "real" c:\windows\system32 directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1026 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-19 22:55:57 +00:00
DRC
87d6e984ff In the Windows installer packages, place a duplicate copy of turbojpeg.dll in c:\libjpeg-turbo[-gcc][64]\bin. This is mainly to give installers an easy way to find the DLL for the purposes of bundling it. Specifically, this was necessary for TurboVNC, becuase 32-bit CMake running on 64-bit Windows cannot ever access the "real" c:\windows\system32 directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1026 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-19 22:55:57 +00:00
DRC
7ef26165cc 1.3.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1025 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-19 09:36:03 +00:00
DRC
fa408f82d8 1.3.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1025 632fc199-4ca6-4c93-a231-07263d6284db
2013-09-19 09:36:03 +00:00
DRC
0213d619bf Fix 'make dist' 2013-08-23 07:57:21 +00:00
DRC
371b420ecf Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1024 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-23 07:57:21 +00:00
DRC
446d58f4de Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1024 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-23 07:57:21 +00:00
DRC
04a34ea5bf 2013-08-23 07:46:07 +00:00
DRC
ce84fc8eed git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1023 632fc199-4ca6-4c93-a231-07263d6284db 2013-08-23 07:46:07 +00:00
DRC
d60317df82 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1023 632fc199-4ca6-4c93-a231-07263d6284db 2013-08-23 07:46:07 +00:00
DRC
ae0631474a Oops. Forgot to implement access method for the colorspace & extend TJBench 2013-08-23 07:13:59 +00:00
DRC
aba7ceda4f Oops. Forgot to implement access method for the colorspace & extend TJBench
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1022 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-23 07:13:59 +00:00
DRC
f368bcab26 Oops. Forgot to implement access method for the colorspace & extend TJBench
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1022 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-23 07:13:59 +00:00
DRC
ff3d754f29 Wordsmithing 2013-08-23 06:38:59 +00:00
DRC
b2c4745aa3 Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1021 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-23 06:38:59 +00:00
DRC
81d02327c8 Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1021 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-23 06:38:59 +00:00
DRC
0fb3247f9a Add CMYK support to the TurboJPEG Java API & clean up a few things in the C API 2013-08-23 04:45:43 +00:00
DRC
38cb1ec2a7 Add CMYK support to the TurboJPEG Java API & clean up a few things in the C API
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1020 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-23 04:45:43 +00:00
DRC
c0e571289a Add CMYK support to the TurboJPEG Java API & clean up a few things in the C API
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1020 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-23 04:45:43 +00:00
DRC
24668df1df Add CMYK support to the TurboJPEG C API 2013-08-23 02:49:25 +00:00
DRC
cd7c3e6672 Add CMYK support to the TurboJPEG C API
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1019 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-23 02:49:25 +00:00
DRC
ee1972febe Add CMYK support to the TurboJPEG C API
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1019 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-23 02:49:25 +00:00
DRC
9ad7a4c6ca 2013-08-20 00:17:26 +00:00
DRC
7185b719cc git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1018 632fc199-4ca6-4c93-a231-07263d6284db 2013-08-20 00:17:26 +00:00
DRC
f625bf7117 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1018 632fc199-4ca6-4c93-a231-07263d6284db 2013-08-20 00:17:26 +00:00
DRC
45b2cca4c0 Add 4:1:1 subsampling support in the TurboJPEG Java API 2013-08-18 11:04:21 +00:00
DRC
a5830628b9 Add 4:1:1 subsampling support in the TurboJPEG Java API
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1017 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 11:04:21 +00:00
DRC
7bd1cf2566 Add 4:1:1 subsampling support in the TurboJPEG Java API
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1017 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 11:04:21 +00:00
DRC
ae92418cc1 Add note regarding the fact that 4:4:0 lacks full SIMD support; Add an option for benchmarking 4:4:0 subsampling in TJBench; Wordsmithing; Disable timestamp in generated HTML files to make diffing and merging easier
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1016 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 10:47:07 +00:00
DRC
423b7d78f0 Add note regarding the fact that 4:4:0 lacks full SIMD support; Add an option for benchmarking 4:4:0 subsampling in TJBench; Wordsmithing; Disable timestamp in generated HTML files to make diffing and merging easier
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1016 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 10:47:07 +00:00
DRC
2296d513c1 Add note regarding the fact that 4:4:0 lacks full SIMD support; Add an option for benchmarking 4:4:0 subsampling in TJBench; Wordsmithing; Disable timestamp in generated HTML files to make diffing and merging easier 2013-08-18 10:39:30 +00:00
DRC
f82b9f968b Add note regarding the fact that 4:4:0 lacks full SIMD support; Add an option for benchmarking 4:4:0 subsampling in TJBench; Wordsmithing; Disable timestamp in generated HTML files to make diffing and merging easier
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1015 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 10:39:30 +00:00
DRC
af914fe8f6 Add note regarding the fact that 4:4:0 lacks full SIMD support; Add an option for benchmarking 4:4:0 subsampling in TJBench; Wordsmithing; Disable timestamp in generated HTML files to make diffing and merging easier
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1015 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 10:39:30 +00:00
DRC
5ca8bf8738 Add 4:1:1 subsampling support in the TurboJPEG C API 2013-08-18 10:19:00 +00:00
DRC
1f3635c496 Add 4:1:1 subsampling support in the TurboJPEG C API
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1014 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 10:19:00 +00:00
DRC
6f58a183fa Add 4:1:1 subsampling support in the TurboJPEG C API
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1014 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 10:19:00 +00:00
DRC
6bcd8f8345 Disable timestamp in generated HTML files to make diffing and merging easier. 2013-08-18 09:38:52 +00:00
DRC
7bd24b26e0 Disable timestamp in generated HTML files to make diffing and merging easier.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1013 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:38:52 +00:00
DRC
d5641a02e8 Disable timestamp in generated HTML files to make diffing and merging easier.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1013 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:38:52 +00:00
DRC
ca866c48f0 Disable timestamp in generated HTML files to make diffing and merging easier.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1012 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:37:48 +00:00
DRC
81082f5929 Disable timestamp in generated HTML files to make diffing and merging easier.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1012 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:37:48 +00:00
DRC
f4cdf5e8a2 Wordsmithing 2013-08-18 09:31:45 +00:00
DRC
3b21982b60 Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1011 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:31:45 +00:00
DRC
633934f421 Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1011 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:31:45 +00:00
DRC
7657726d38 Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1010 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:28:09 +00:00
DRC
c25257c4ea Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1010 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:28:09 +00:00
DRC
b34b2ad711 Add note regarding the fact that 4:4:0 lacks full SIMD support; Add an option for benchmarking 4:4:0 subsampling in tjbench. 2013-08-18 09:15:37 +00:00
DRC
d081fd728c Add note regarding the fact that 4:4:0 lacks full SIMD support; Add an option for benchmarking 4:4:0 subsampling in tjbench.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1009 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:15:37 +00:00
DRC
e338413d35 Add note regarding the fact that 4:4:0 lacks full SIMD support; Add an option for benchmarking 4:4:0 subsampling in tjbench.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1009 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:15:37 +00:00
DRC
07796da4e5 Add note regarding the fact that 4:4:0 lacks full SIMD support; Add an option for benchmarking 4:4:0 subsampling in tjbench.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1008 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:13:00 +00:00
DRC
ec61f52d87 Add note regarding the fact that 4:4:0 lacks full SIMD support; Add an option for benchmarking 4:4:0 subsampling in tjbench.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1008 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:13:00 +00:00
DRC
bcda6834d6 Upgrade to Doxygen 1.8.3.1; Add note regarding the fact that 4:4:0 lacks full SIMD support.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1007 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:02:42 +00:00
DRC
39b9801063 Upgrade to Doxygen 1.8.3.1; Add note regarding the fact that 4:4:0 lacks full SIMD support.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1007 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:02:42 +00:00
DRC
71ccb39d1e Upgrade to Doxygen 1.8.3.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1006 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:00:15 +00:00
DRC
3fab7e7a13 Upgrade to Doxygen 1.8.3.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1006 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 09:00:15 +00:00
DRC
458a2dd64e Upgrade to Doxygen 1.8.3.1 2013-08-18 08:47:03 +00:00
DRC
a4a48ed06c Upgrade to Doxygen 1.8.3.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1005 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 08:47:03 +00:00
DRC
ed8ca2cc6c Upgrade to Doxygen 1.8.3.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1005 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-18 08:47:03 +00:00
DRC
1520ee2986 Remove stray closing bracket that prevented the use of this header in a C++ application
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1003 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-12 21:36:10 +00:00
DRC
73aed2c20a Remove stray closing bracket that prevented the use of this header in a C++ application
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1003 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-12 21:36:10 +00:00
DRC
e99b408fe6 Remove stray closing bracket that prevented the use of this header in a C++ application 2013-08-12 21:35:46 +00:00
DRC
8cda1c32ec Remove stray closing bracket that prevented the use of this header in a C++ application
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1002 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-12 21:35:46 +00:00
DRC
f5a6d63edc Remove stray closing bracket that prevented the use of this header in a C++ application
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1002 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-12 21:35:46 +00:00
DRC
0442d164dc By default, install the libraries into /opt/libjpeg-turbo/lib32 on any 32-bit system, not just x86, and into /opt/libjpeg-turbo/lib64 on any 64-bit system, not just x86-64. In particular, this addresses an issue with building TurboVNC and VirtualGL on ARM systems. 2013-08-11 23:23:41 +00:00
DRC
96573d05b5 By default, install the libraries into /opt/libjpeg-turbo/lib32 on any 32-bit system, not just x86, and into /opt/libjpeg-turbo/lib64 on any 64-bit system, not just x86-64. In particular, this addresses an issue with building TurboVNC and VirtualGL on ARM systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1001 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-11 23:23:41 +00:00
DRC
0437a8f335 By default, install the libraries into /opt/libjpeg-turbo/lib32 on any 32-bit system, not just x86, and into /opt/libjpeg-turbo/lib64 on any 64-bit system, not just x86-64. In particular, this addresses an issue with building TurboVNC and VirtualGL on ARM systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1001 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-11 23:23:41 +00:00
DRC
dadebe97e4 Document previous commit in the change log
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1000 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-11 23:04:34 +00:00
DRC
75cbacff26 Document previous commit in the change log
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1000 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-11 23:04:34 +00:00
DRC
c32e0c23c0 By default, install the libraries into /opt/libjpeg-turbo/lib32 on any 32-bit system, not just x86, and into /opt/libjpeg-turbo/lib64 on any 64-bit system, not just x86-64. In particular, this addresses an issue with building TurboVNC and VirtualGL on ARM systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@999 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-11 22:57:19 +00:00
DRC
b05f1f177e By default, install the libraries into /opt/libjpeg-turbo/lib32 on any 32-bit system, not just x86, and into /opt/libjpeg-turbo/lib64 on any 64-bit system, not just x86-64. In particular, this addresses an issue with building TurboVNC and VirtualGL on ARM systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@999 632fc199-4ca6-4c93-a231-07263d6284db
2013-08-11 22:57:19 +00:00
DRC
aa5a1808fe SIMD support for performing upsampling using MIPS DSPr2 instructions 2013-07-27 21:50:02 +00:00
DRC
16962c1132 SIMD support for performing upsampling using MIPS DSPr2 instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@996 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-27 21:50:02 +00:00
DRC
c10837d8a8 SIMD support for performing upsampling using MIPS DSPr2 instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@996 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-27 21:50:02 +00:00
DRC
3f2e3b11f0 SIMD support for performing downsampling using MIPS DSPr2 instructions 2013-07-27 21:48:18 +00:00
DRC
6f2d3c2c97 SIMD support for performing downsampling using MIPS DSPr2 instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@995 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-27 21:48:18 +00:00
DRC
b481543bc7 SIMD support for performing downsampling using MIPS DSPr2 instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@995 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-27 21:48:18 +00:00
DRC
41e3657631 SIMD support for performing fancy upsampling using MIPS DSPr2 instructions 2013-07-27 21:44:14 +00:00
DRC
86fbf35fb6 SIMD support for performing fancy upsampling using MIPS DSPr2 instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@994 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-27 21:44:14 +00:00
DRC
31087f88c7 SIMD support for performing fancy upsampling using MIPS DSPr2 instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@994 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-27 21:44:14 +00:00
DRC
64da9d6ba8 SIMD support for performing color conversion using MIPS DSPr2 instructions 2013-07-24 21:50:20 +00:00
DRC
0be9fa5735 SIMD support for performing color conversion using MIPS DSPr2 instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@993 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-24 21:50:20 +00:00
DRC
5c4338be32 SIMD support for performing color conversion using MIPS DSPr2 instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@993 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-24 21:50:20 +00:00
DRC
b92710377b Fix lintian warning about missing maintainer address when installing on recent Debian-based systems
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@992 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-07 04:43:49 +00:00
DRC
9172810d28 Fix lintian warning about missing maintainer address when installing on recent Debian-based systems
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@992 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-07 04:43:49 +00:00
DRC
6accd550fd Fix lintian warning about missing maintainer address when installing on recent Debian-based systems 2013-07-07 04:42:56 +00:00
DRC
822c8507bb Fix lintian warning about missing maintainer address when installing on recent Debian-based systems
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@991 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-07 04:42:56 +00:00
DRC
4432f84185 Fix lintian warning about missing maintainer address when installing on recent Debian-based systems
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@991 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-07 04:42:56 +00:00
DRC
d3eb40b97a Use ELF64 object format on 64-bit kFreeBSD systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@990 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-03 14:22:09 +00:00
DRC
fb7587dad3 Use ELF64 object format on 64-bit kFreeBSD systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@990 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-03 14:22:09 +00:00
DRC
7421f92041 Use ELF64 object format on 64-bit kFreeBSD systems. 2013-07-03 14:21:49 +00:00
DRC
c8843a0b14 Use ELF64 object format on 64-bit kFreeBSD systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@989 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-03 14:21:49 +00:00
DRC
df6799e3b8 Use ELF64 object format on 64-bit kFreeBSD systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@989 632fc199-4ca6-4c93-a231-07263d6284db
2013-07-03 14:21:49 +00:00
DRC
6e0bbbf7e6 1.3.0
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@983 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-10 22:08:53 +00:00
DRC
9905afa24b 1.3.0
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@983 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-10 22:08:53 +00:00
DRC
22be928d5a Fix incorrect data output and buffer overruns in the new tjDecompressToYUV2() function whenever scaling is used along with a 4:2:0 JPEG image; extend tjunittest and TJUnitTest to test for these issues. 2013-05-07 21:17:35 +00:00
DRC
418fe286c2 Fix incorrect data output and buffer overruns in the new tjDecompressToYUV2() function whenever scaling is used along with a 4:2:0 JPEG image; extend tjunittest and TJUnitTest to test for these issues.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@982 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-07 21:17:35 +00:00
DRC
a3dd57c615 Fix incorrect data output and buffer overruns in the new tjDecompressToYUV2() function whenever scaling is used along with a 4:2:0 JPEG image; extend tjunittest and TJUnitTest to test for these issues.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@982 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-07 21:17:35 +00:00
DRC
6586b254ee Clean up the output of tjunittest and TJUnitTest 2013-05-04 23:41:33 +00:00
DRC
b7c41932ed Clean up the output of tjunittest and TJUnitTest
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@981 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-04 23:41:33 +00:00
DRC
d4b8d9c33b Clean up the output of tjunittest and TJUnitTest
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@981 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-04 23:41:33 +00:00
DRC
49df783743 Clean up the output of tjunittest and TJUnitTest
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@980 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-04 23:31:32 +00:00
DRC
4986652604 Clean up the output of tjunittest and TJUnitTest
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@980 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-04 23:31:32 +00:00
DRC
cd5c8559d6 Make sure the RPM provides "libjpeg-turbo" as well, for backward compatibility (the TurboVNC RPM build, in particular, checks for this.) 2013-05-04 04:48:27 +00:00
DRC
fca3e72600 Make sure the RPM provides "libjpeg-turbo" as well, for backward compatibility (the TurboVNC RPM build, in particular, checks for this.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@979 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-04 04:48:27 +00:00
DRC
af57f6f5f9 Make sure the RPM provides "libjpeg-turbo" as well, for backward compatibility (the TurboVNC RPM build, in particular, checks for this.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@979 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-04 04:48:27 +00:00
DRC
04e0a0293a Make sure the RPM provides "libjpeg-turbo" as well, for backward compatibility (the TurboVNC RPM build, in particular, checks for this.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@978 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-01 06:03:53 +00:00
DRC
48f620c4f0 Make sure the RPM provides "libjpeg-turbo" as well, for backward compatibility (the TurboVNC RPM build, in particular, checks for this.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@978 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-01 06:03:53 +00:00
DRC
ca4751d1df Fix 'make rpm' 2013-05-01 05:48:22 +00:00
DRC
9495a94490 Fix 'make rpm'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@977 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-01 05:48:22 +00:00
DRC
3e21a7a9b2 Fix 'make rpm'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@977 632fc199-4ca6-4c93-a231-07263d6284db
2013-05-01 05:48:22 +00:00
DRC
4fcdeb795d Extend the TurboJPEG Java API to support generating YUV images with arbitrary padding and to support image scaling when decompressing to YUV 2013-04-28 01:32:52 +00:00
DRC
fef9852da3 Extend the TurboJPEG Java API to support generating YUV images with arbitrary padding and to support image scaling when decompressing to YUV
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@975 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-28 01:32:52 +00:00
DRC
084c4c039a Extend the TurboJPEG Java API to support generating YUV images with arbitrary padding and to support image scaling when decompressing to YUV
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@975 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-28 01:32:52 +00:00
DRC
771fbdeb99 Fix backward compatibility between the Java classes and the 1.2.x JNI library (as long as the 1.3 Java features are not used.) 2013-04-27 23:25:17 +00:00
DRC
d0ad5a9447 Fix backward compatibility between the Java classes and the 1.2.x JNI library (as long as the 1.3 Java features are not used.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@974 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 23:25:17 +00:00
DRC
2d25f449a5 Fix backward compatibility between the Java classes and the 1.2.x JNI library (as long as the 1.3 Java features are not used.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@974 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 23:25:17 +00:00
DRC
bb9e147872 Fix backward compatibility between the Java classes and the 1.2.x JNI library (as long as the 1.3 Java features are not used.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@973 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 22:48:08 +00:00
DRC
7858477652 Fix backward compatibility between the Java classes and the 1.2.x JNI library (as long as the 1.3 Java features are not used.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@973 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 22:48:08 +00:00
DRC
52559c88b4 Bump the age number of the TurboJPEG DSO, because interfaces have been added. 2013-04-27 22:18:29 +00:00
DRC
24211153fa Bump the age number of the TurboJPEG DSO, because interfaces have been added.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@972 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 22:18:29 +00:00
DRC
04b5b27bc8 Bump the age number of the TurboJPEG DSO, because interfaces have been added.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@972 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 22:18:29 +00:00
DRC
7440604f2b Correct misuse of the word "pitch" + more code formatting tweaks 2013-04-27 20:55:45 +00:00
DRC
d6c06349ed Correct misuse of the word "pitch" + more code formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@971 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 20:55:45 +00:00
DRC
bfa613b9a6 Correct misuse of the word "pitch" + more code formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@971 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 20:55:45 +00:00
DRC
1d29c5f97b Correct misuse of the word "pitch" + more code formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@970 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 20:54:44 +00:00
DRC
30822f98f7 Correct misuse of the word "pitch" + more code formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@970 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 20:54:44 +00:00
DRC
aaa5ae742a Code formatting tweaks 2013-04-27 12:38:20 +00:00
DRC
ee20edd645 Code formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@969 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 12:38:20 +00:00
DRC
207b31b1c5 Code formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@969 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 12:38:20 +00:00
DRC
67bee8683d Code formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@968 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 12:36:07 +00:00
DRC
08fcac01e6 Code formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@968 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 12:36:07 +00:00
DRC
2f83944e9b Java doc tweaks 2013-04-27 01:08:55 +00:00
DRC
7a2f3a4edf Java doc tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@967 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 01:08:55 +00:00
DRC
89f8671eb0 Java doc tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@967 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 01:08:55 +00:00
DRC
65d4a46d3b Java doc tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@966 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 01:06:52 +00:00
DRC
aba6c404c3 Java doc tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@966 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-27 01:06:52 +00:00
DRC
5bede571dd Not that it matters, because JNI uses dlopen()/dlsym() to load symbols, but for bookkeeping purposes, move the JNI symbols introduced in libjpeg-turbo 1.3 into a new section. 2013-04-26 23:43:15 +00:00
DRC
fc5c0c645a Not that it matters, because JNI uses dlopen()/dlsym() to load symbols, but for bookkeeping purposes, move the JNI symbols introduced in libjpeg-turbo 1.3 into a new section.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@965 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 23:43:15 +00:00
DRC
37915a690c Not that it matters, because JNI uses dlopen()/dlsym() to load symbols, but for bookkeeping purposes, move the JNI symbols introduced in libjpeg-turbo 1.3 into a new section.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@965 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 23:43:15 +00:00
DRC
c6eedebc6a Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@964 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 23:41:51 +00:00
DRC
bd096ba10d Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@964 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 23:41:51 +00:00
DRC
0c83e5af00 Not that it matters, because JNI uses dlopen()/dlsym() to load symbols, but for bookkeeping purposes, move the JNI symbols introduced in libjpeg-turbo 1.3 into a new section.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@963 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 23:39:23 +00:00
DRC
e280cc2afd Not that it matters, because JNI uses dlopen()/dlsym() to load symbols, but for bookkeeping purposes, move the JNI symbols introduced in libjpeg-turbo 1.3 into a new section.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@963 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 23:39:23 +00:00
DRC
da64629c62 Extend the TurboJPEG C API to support generating YUV images with arbitrary padding and to support image scaling when decompressing to YUV 2013-04-26 10:33:29 +00:00
DRC
f610d61fcc Extend the TurboJPEG C API to support generating YUV images with arbitrary padding and to support image scaling when decompressing to YUV
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@962 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 10:33:29 +00:00
DRC
cce0ccc931 Extend the TurboJPEG C API to support generating YUV images with arbitrary padding and to support image scaling when decompressing to YUV
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@962 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 10:33:29 +00:00
DRC
d8522a7587 Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@961 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 08:54:10 +00:00
DRC
02cb7b444e Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@961 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 08:54:10 +00:00
DRC
afa79bd62f Further doc tweaks 2013-04-26 08:46:46 +00:00
DRC
c49694a34a Further doc tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@960 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 08:46:46 +00:00
DRC
6e84abb54e Further doc tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@960 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 08:46:46 +00:00
DRC
01fdcc391a Further doc tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@959 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 08:41:25 +00:00
DRC
f0fe7e9603 Further doc tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@959 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 08:41:25 +00:00
DRC
c8a3df184e Subtle point, but since libjpeg-turbo 1.3 now supports scaling factors > 1, the width and height specified in tjDecompress2() are not necessarily smaller than the JPEG width/height. 2013-04-26 05:35:22 +00:00
DRC
17c3755f9a Subtle point, but since libjpeg-turbo 1.3 now supports scaling factors > 1, the width and height specified in tjDecompress2() are not necessarily smaller than the JPEG width/height.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@958 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 05:35:22 +00:00
DRC
dcc68c41aa Subtle point, but since libjpeg-turbo 1.3 now supports scaling factors > 1, the width and height specified in tjDecompress2() are not necessarily smaller than the JPEG width/height.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@958 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 05:35:22 +00:00
DRC
9ce1a21ea7 Subtle point, but since libjpeg-turbo 1.3 now supports scaling factors > 1, the width and height specified in tjDecompress2() are not necessarily smaller than the JPEG width/height.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@957 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 05:32:32 +00:00
DRC
c39f2aa88f Subtle point, but since libjpeg-turbo 1.3 now supports scaling factors > 1, the width and height specified in tjDecompress2() are not necessarily smaller than the JPEG width/height.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@957 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-26 05:32:32 +00:00
DRC
45b9c02bd7 Bump version to prepare for new features 2013-04-25 09:45:50 +00:00
DRC
17745ddd86 Bump version to prepare for new features
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@956 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-25 09:45:50 +00:00
DRC
94d6c1054f Bump version to prepare for new features
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@956 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-25 09:45:50 +00:00
DRC
0bb37a5d5f Create 1.3.x branch
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@955 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-25 09:37:19 +00:00
DRC
f64f027bae Create 1.3.x branch
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@955 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-25 09:37:19 +00:00
DRC
9431d5c677 Fix I/O suspension. This little nugget of code was introduced in r30 as part of an early attempt to make buffered I/O work with the optimized Huffman codec. Ultimately, r32 reverted a lot of that mess and introduced much of the logic we now use, rendering this code unnecessary, but it was never reverted because it only causes problems when I/O suspension is used, and apparently no one has tried to do that with libjpeg-turbo until now. 2013-04-25 08:55:31 +00:00
DRC
4c17a453d1 Fix I/O suspension. This little nugget of code was introduced in r30 as part of an early attempt to make buffered I/O work with the optimized Huffman codec. Ultimately, r32 reverted a lot of that mess and introduced much of the logic we now use, rendering this code unnecessary, but it was never reverted because it only causes problems when I/O suspension is used, and apparently no one has tried to do that with libjpeg-turbo until now.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@954 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-25 08:55:31 +00:00
DRC
99f9678f02 Fix I/O suspension. This little nugget of code was introduced in r30 as part of an early attempt to make buffered I/O work with the optimized Huffman codec. Ultimately, r32 reverted a lot of that mess and introduced much of the logic we now use, rendering this code unnecessary, but it was never reverted because it only causes problems when I/O suspension is used, and apparently no one has tried to do that with libjpeg-turbo until now.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@954 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-25 08:55:31 +00:00
DRC
8e4bc5dfb0 For consistency, allow the name of the Mac and Cygwin packages to be overridden as well. 2013-04-24 23:39:37 +00:00
DRC
4578953843 For consistency, allow the name of the Mac and Cygwin packages to be overridden as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@953 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-24 23:39:37 +00:00
DRC
048f264cb1 For consistency, allow the name of the Mac and Cygwin packages to be overridden as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@953 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-24 23:39:37 +00:00
DRC
0803520704 Minor doc tweaks + ChangeLog update 2013-04-24 06:40:25 +00:00
DRC
d7a642b571 Minor doc tweaks + ChangeLog update
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@951 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-24 06:40:25 +00:00
DRC
3fc75a5734 Minor doc tweaks + ChangeLog update
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@951 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-24 06:40:25 +00:00
DRC
61130e332a In order to avoid a functional regression with previous releases, the JAR file needs to be able to load either the 64-bit or 32-bit JNI library on Un*x systems. 2013-04-24 06:21:24 +00:00
DRC
00400a0a58 In order to avoid a functional regression with previous releases, the JAR file needs to be able to load either the 64-bit or 32-bit JNI library on Un*x systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@950 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-24 06:21:24 +00:00
DRC
c436a02bb1 In order to avoid a functional regression with previous releases, the JAR file needs to be able to load either the 64-bit or 32-bit JNI library on Un*x systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@950 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-24 06:21:24 +00:00
DRC
3d625746d4 Move the TurboJPEG DLLs back into the system directory on Windows platforms. For Windows, it doesn't really simplify the build system to install these libraries in c:\libjpeg-turbo*, and it introduces potential problems with loading the JNI library. Specifically, if a user linked their Java app against the 64-bit libjpeg-turbo SDK and then used a 32-bit JVM at run time, they would not be able to load the 32-bit turbojpeg.dll without manipulating java.library.path or the PATH environment (and vice versa for building against the 32-bit libjpeg-turbo SDK and using a 64-bit JVM at run time.) 2013-04-24 05:26:42 +00:00
DRC
441308cffa Move the TurboJPEG DLLs back into the system directory on Windows platforms. For Windows, it doesn't really simplify the build system to install these libraries in c:\libjpeg-turbo*, and it introduces potential problems with loading the JNI library. Specifically, if a user linked their Java app against the 64-bit libjpeg-turbo SDK and then used a 32-bit JVM at run time, they would not be able to load the 32-bit turbojpeg.dll without manipulating java.library.path or the PATH environment (and vice versa for building against the 32-bit libjpeg-turbo SDK and using a 64-bit JVM at run time.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@949 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-24 05:26:42 +00:00
DRC
4c0c6ffee0 Move the TurboJPEG DLLs back into the system directory on Windows platforms. For Windows, it doesn't really simplify the build system to install these libraries in c:\libjpeg-turbo*, and it introduces potential problems with loading the JNI library. Specifically, if a user linked their Java app against the 64-bit libjpeg-turbo SDK and then used a 32-bit JVM at run time, they would not be able to load the 32-bit turbojpeg.dll without manipulating java.library.path or the PATH environment (and vice versa for building against the 32-bit libjpeg-turbo SDK and using a 64-bit JVM at run time.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@949 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-24 05:26:42 +00:00
DRC
b8614f5d9f Older versions of automake don't support multiple _JAVA primaries, but we don't actually have to specify a "dist" primary, since the Java sources are already included under EXTRA_DIST. 2013-04-24 03:36:30 +00:00
DRC
4b357abb6d Older versions of automake don't support multiple _JAVA primaries, but we don't actually have to specify a "dist" primary, since the Java sources are already included under EXTRA_DIST.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@948 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-24 03:36:30 +00:00
DRC
9e646118bc Older versions of automake don't support multiple _JAVA primaries, but we don't actually have to specify a "dist" primary, since the Java sources are already included under EXTRA_DIST.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@948 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-24 03:36:30 +00:00
DRC
931a4929bb Fix 'make dist' 2013-04-24 03:15:23 +00:00
DRC
94f7ac929a Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@947 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-24 03:15:23 +00:00
DRC
2bf41d5534 Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@947 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-24 03:15:23 +00:00
DRC
2de2cf9e54 Further enhancements/fixes to the packaging system:
-- The Mac and Cygwin packages will now be created with the directory structure defined by the configure variables "prefix", "bindir", "libdir", etc., with the exception that the docs are always installed under /usr/share/doc/{package_name}-{version} on Cygwin and /Library/Documentation/{package_name} on Mac.
-- Fixed a duplicate filename warning when generating RPMs with the default prefix of /opt/libjpeg-turbo.
-- Moved the TurboJPEG libraries out of the system directory on Windows and Mac.  It is no longer necessary to put them there, since we are not trying to be backward compatible with TurboJPEG/IPP anymore.
-- Fixed an issue whereby building the "installer" target on Windows would not build the Java JAR file, thus causing an error if the JAR had not been previously built.
-- Building the "install" target on Windows will now install libjpeg-turbo into c:\libjpeg-turbo[-gcc][64] (the same directories used by the installers.)  This can be overridden by setting CMAKE_INSTALL_PREFIX.
-- The Java classes on all platforms will now look for the JNI library in the directory under which the build/packaging system installs it.
2013-04-23 22:29:00 +00:00
DRC
7175e51792 Further enhancements/fixes to the packaging system:
-- The Mac and Cygwin packages will now be created with the directory structure defined by the configure variables "prefix", "bindir", "libdir", etc., with the exception that the docs are always installed under /usr/share/doc/{package_name}-{version} on Cygwin and /Library/Documentation/{package_name} on Mac.
-- Fixed a duplicate filename warning when generating RPMs with the default prefix of /opt/libjpeg-turbo.
-- Moved the TurboJPEG libraries out of the system directory on Windows and Mac.  It is no longer necessary to put them there, since we are not trying to be backward compatible with TurboJPEG/IPP anymore.
-- Fixed an issue whereby building the "installer" target on Windows would not build the Java JAR file, thus causing an error if the JAR had not been previously built.
-- Building the "install" target on Windows will now install libjpeg-turbo into c:\libjpeg-turbo[-gcc][64] (the same directories used by the installers.)  This can be overridden by setting CMAKE_INSTALL_PREFIX.
-- The Java classes on all platforms will now look for the JNI library in the directory under which the build/packaging system installs it.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@946 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-23 22:29:00 +00:00
DRC
fb0ef0019b Further enhancements/fixes to the packaging system:
-- The Mac and Cygwin packages will now be created with the directory structure defined by the configure variables "prefix", "bindir", "libdir", etc., with the exception that the docs are always installed under /usr/share/doc/{package_name}-{version} on Cygwin and /Library/Documentation/{package_name} on Mac.
-- Fixed a duplicate filename warning when generating RPMs with the default prefix of /opt/libjpeg-turbo.
-- Moved the TurboJPEG libraries out of the system directory on Windows and Mac.  It is no longer necessary to put them there, since we are not trying to be backward compatible with TurboJPEG/IPP anymore.
-- Fixed an issue whereby building the "installer" target on Windows would not build the Java JAR file, thus causing an error if the JAR had not been previously built.
-- Building the "install" target on Windows will now install libjpeg-turbo into c:\libjpeg-turbo[-gcc][64] (the same directories used by the installers.)  This can be overridden by setting CMAKE_INSTALL_PREFIX.
-- The Java classes on all platforms will now look for the JNI library in the directory under which the build/packaging system installs it.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@946 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-23 22:29:00 +00:00
DRC
f42e2be51a Overhaul Linux/Unix packaging system, primarily to avoid conflicts with vendor-supplied libjpeg-turbo packages (such as in Fedora and RHEL 6.) This also streamlines the packaging system somewhat, since it is no longer necessary to move the TurboJPEG libraries into the system library directory. Relocating those libraries was originally done to provide backward compatibility with TurboJPEG/IPP, but that package is long obsolete, and the software that formerly used it has been linking statically with libjpeg-turbo for quite some time.
If the default prefix (/opt/libjpeg-turbo) is used, then we now always install 32-bit libraries in /opt/libjpeg-turbo/lib32 and 64-bit libraries in /opt/libjpeg-turbo/lib64 instead of trying to conform to the Debian or Red Hat conventions.  The RPM and DEB packages will now be created with the directory structure defined by the configure variables "prefix", "bindir", "libdir", etc., with the exception that the docs are always installed under /usr/share/doc/{package_name}-{version}.
2013-04-19 04:25:14 +00:00
DRC
764e1e23aa Overhaul Linux/Unix packaging system, primarily to avoid conflicts with vendor-supplied libjpeg-turbo packages (such as in Fedora and RHEL 6.) This also streamlines the packaging system somewhat, since it is no longer necessary to move the TurboJPEG libraries into the system library directory. Relocating those libraries was originally done to provide backward compatibility with TurboJPEG/IPP, but that package is long obsolete, and the software that formerly used it has been linking statically with libjpeg-turbo for quite some time.
If the default prefix (/opt/libjpeg-turbo) is used, then we now always install 32-bit libraries in /opt/libjpeg-turbo/lib32 and 64-bit libraries in /opt/libjpeg-turbo/lib64 instead of trying to conform to the Debian or Red Hat conventions.  The RPM and DEB packages will now be created with the directory structure defined by the configure variables "prefix", "bindir", "libdir", etc., with the exception that the docs are always installed under /usr/share/doc/{package_name}-{version}.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@944 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-19 04:25:14 +00:00
DRC
073c49ed39 Overhaul Linux/Unix packaging system, primarily to avoid conflicts with vendor-supplied libjpeg-turbo packages (such as in Fedora and RHEL 6.) This also streamlines the packaging system somewhat, since it is no longer necessary to move the TurboJPEG libraries into the system library directory. Relocating those libraries was originally done to provide backward compatibility with TurboJPEG/IPP, but that package is long obsolete, and the software that formerly used it has been linking statically with libjpeg-turbo for quite some time.
If the default prefix (/opt/libjpeg-turbo) is used, then we now always install 32-bit libraries in /opt/libjpeg-turbo/lib32 and 64-bit libraries in /opt/libjpeg-turbo/lib64 instead of trying to conform to the Debian or Red Hat conventions.  The RPM and DEB packages will now be created with the directory structure defined by the configure variables "prefix", "bindir", "libdir", etc., with the exception that the docs are always installed under /usr/share/doc/{package_name}-{version}.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@944 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-19 04:25:14 +00:00
DRC
9f804a5590 Formatting tweaks 2013-04-11 05:17:53 +00:00
DRC
0ddff3b059 Formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@943 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-11 05:17:53 +00:00
DRC
fe52f5efa5 Formatting tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@943 632fc199-4ca6-4c93-a231-07263d6284db
2013-04-11 05:17:53 +00:00
DRC
0af70afcea Remove unneeded headers (cdef.h isn't available on all platforms) and change u_int32_t to unsigned int, since u_int32_t isn't available on all platforms. This fixes build issues on Solaris. 2013-03-30 20:54:15 +00:00
DRC
7eced19feb Remove unneeded headers (cdef.h isn't available on all platforms) and change u_int32_t to unsigned int, since u_int32_t isn't available on all platforms. This fixes build issues on Solaris.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@942 632fc199-4ca6-4c93-a231-07263d6284db
2013-03-30 20:54:15 +00:00
DRC
26ddbf432d Remove unneeded headers (cdef.h isn't available on all platforms) and change u_int32_t to unsigned int, since u_int32_t isn't available on all platforms. This fixes build issues on Solaris.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@942 632fc199-4ca6-4c93-a231-07263d6284db
2013-03-30 20:54:15 +00:00
DRC
22c11c2e20 Grammar police 2013-03-23 21:35:41 +00:00
DRC
08769b32f6 Grammar police
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@941 632fc199-4ca6-4c93-a231-07263d6284db
2013-03-23 21:35:41 +00:00
DRC
52e26f6330 Grammar police
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@941 632fc199-4ca6-4c93-a231-07263d6284db
2013-03-23 21:35:41 +00:00
DRC
9d0c277115 Document issues encountered when building on OS X 10.7 and later. 2013-03-23 09:57:03 +00:00
DRC
f32640e8cb Document issues encountered when building on OS X 10.7 and later.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@939 632fc199-4ca6-4c93-a231-07263d6284db
2013-03-23 09:57:03 +00:00
DRC
4d9d01c146 Document issues encountered when building on OS X 10.7 and later.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@939 632fc199-4ca6-4c93-a231-07263d6284db
2013-03-23 09:57:03 +00:00
DRC
c543f1b6f9 It's more correct to say "The Independent JPEG Group's software", since libjpeg-turbo emulates both the command-line and application programming interfaces. 2013-03-23 05:35:37 +00:00
DRC
6cd1ec4b09 It's more correct to say "The Independent JPEG Group's software", since libjpeg-turbo emulates both the command-line and application programming interfaces.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@932 632fc199-4ca6-4c93-a231-07263d6284db
2013-03-23 05:35:37 +00:00
DRC
3a034760e0 It's more correct to say "The Independent JPEG Group's software", since libjpeg-turbo emulates both the command-line and application programming interfaces.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@932 632fc199-4ca6-4c93-a231-07263d6284db
2013-03-23 05:35:37 +00:00
DRC
5f55e384a9 Add note about how to obtain PackageMaker if using recent Xcode releases. 2013-02-24 20:39:30 +00:00
DRC
7ed0aebdba Add note about how to obtain PackageMaker if using recent Xcode releases.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@931 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-24 20:39:30 +00:00
DRC
9ec9d98b4b Add note about how to obtain PackageMaker if using recent Xcode releases.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@931 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-24 20:39:30 +00:00
DRC
70d2cc0e04 Bump version for post-beta pre-releases 2013-02-22 06:58:31 +00:00
DRC
5e96c9bfe0 Bump version for post-beta pre-releases
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@930 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-22 06:58:31 +00:00
DRC
8d0f7753c6 Bump version for post-beta pre-releases
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@930 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-22 06:58:31 +00:00
DRC
7f90cedc40 2013-02-14 07:31:35 +00:00
DRC
5a84a0e1b3 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@929 632fc199-4ca6-4c93-a231-07263d6284db 2013-02-14 07:31:35 +00:00
DRC
39ac1cfc79 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@929 632fc199-4ca6-4c93-a231-07263d6284db 2013-02-14 07:31:35 +00:00
DRC
be2b542bba Trying to build ARM v7/v7s iOS binaries from the "official" libjpeg-turbo tarball (generated on RHEL4/autoconf 2.59/automake 1.9.2/libtool 1.5.6) using either Xcode 3.2.x or 4.5.x produces an error: "libtool: compile: unable to infer tagged configuration". Further study is warranted, but the most expedient way around it at the moment is to re-run autoconf on the OS X machine that is being used to generate the iOS binaries. 2013-02-11 03:38:53 +00:00
DRC
fde862ba1d Trying to build ARM v7/v7s iOS binaries from the "official" libjpeg-turbo tarball (generated on RHEL4/autoconf 2.59/automake 1.9.2/libtool 1.5.6) using either Xcode 3.2.x or 4.5.x produces an error: "libtool: compile: unable to infer tagged configuration". Further study is warranted, but the most expedient way around it at the moment is to re-run autoconf on the OS X machine that is being used to generate the iOS binaries.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@928 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-11 03:38:53 +00:00
DRC
adfac40859 Trying to build ARM v7/v7s iOS binaries from the "official" libjpeg-turbo tarball (generated on RHEL4/autoconf 2.59/automake 1.9.2/libtool 1.5.6) using either Xcode 3.2.x or 4.5.x produces an error: "libtool: compile: unable to infer tagged configuration". Further study is warranted, but the most expedient way around it at the moment is to re-run autoconf on the OS X machine that is being used to generate the iOS binaries.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@928 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-11 03:38:53 +00:00
DRC
22c2e01d7a Fix 'make dist' 2013-02-06 23:55:59 +00:00
DRC
292fb8425e Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@927 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-06 23:55:59 +00:00
DRC
82512e05b0 Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@927 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-06 23:55:59 +00:00
DRC
8b3e32bf48 Include a C version of md5cmp rather than depending on an external md5sum binary, since md5sum is not available on all platforms (specifically, it doesn't exist on FreeBSD, and it has to be installed via MacPorts on OS X.) 2013-02-06 23:51:08 +00:00
DRC
0bf58f2145 Include a C version of md5cmp rather than depending on an external md5sum binary, since md5sum is not available on all platforms (specifically, it doesn't exist on FreeBSD, and it has to be installed via MacPorts on OS X.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@926 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-06 23:51:08 +00:00
DRC
3297fc34a0 Include a C version of md5cmp rather than depending on an external md5sum binary, since md5sum is not available on all platforms (specifically, it doesn't exist on FreeBSD, and it has to be installed via MacPorts on OS X.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@926 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-06 23:51:08 +00:00
DRC
1f63b8d9d1 Fix line break 2013-02-04 23:46:52 +00:00
DRC
a35de7cc08 Fix line break
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@925 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-04 23:46:52 +00:00
DRC
2dd1c6ca8d Fix line break
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@925 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-04 23:46:52 +00:00
DRC
0b818b4134 Include ARM v7s (iPhone 5, iPad 4) support in the universal libjpeg/libturbojpeg libraries distributed with our official binary package for OS X. 2013-02-04 22:29:57 +00:00
DRC
a2a2cd60e5 Include ARM v7s (iPhone 5, iPad 4) support in the universal libjpeg/libturbojpeg libraries distributed with our official binary package for OS X.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@923 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-04 22:29:57 +00:00
DRC
cd72e32e8c Include ARM v7s (iPhone 5, iPad 4) support in the universal libjpeg/libturbojpeg libraries distributed with our official binary package for OS X.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@923 632fc199-4ca6-4c93-a231-07263d6284db
2013-02-04 22:29:57 +00:00
DRC
e160ae113f Oops. Separate .def file is not needed when compiling with jpeg-8 API/ABI emulation. 2013-01-27 15:54:59 +00:00
DRC
189ee81b58 Oops. Separate .def file is not needed when compiling with jpeg-8 API/ABI emulation.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@922 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-27 15:54:59 +00:00
DRC
84aee73599 Oops. Separate .def file is not needed when compiling with jpeg-8 API/ABI emulation.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@922 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-27 15:54:59 +00:00
DRC
a0d29e0364 Wordsmith the project description 2013-01-23 01:32:25 +00:00
DRC
0f7ff719a1 Wordsmith the project description
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@921 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-23 01:32:25 +00:00
DRC
8e43940920 Wordsmith the project description
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@921 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-23 01:32:25 +00:00
DRC
cc4145ce2f Actually, turbojpeg.c works with libjpeg as well 2013-01-22 13:56:34 +00:00
DRC
bdfcb74d50 Actually, turbojpeg.c works with libjpeg as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@920 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-22 13:56:34 +00:00
DRC
e94b3a80f2 Actually, turbojpeg.c works with libjpeg as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@920 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-22 13:56:34 +00:00
DRC
9f8a003137 Eliminated the awkward and confusing "TurboJPEG/OSS" designation, since there are no other active implementations of the TurboJPEG API anymore; don't refer to the libjpeg API library as "libjpeg-turbo" anymore, since that can be confusing; ARM v7s build instructions 2013-01-21 23:42:12 +00:00
DRC
5039d734d5 Eliminated the awkward and confusing "TurboJPEG/OSS" designation, since there are no other active implementations of the TurboJPEG API anymore; don't refer to the libjpeg API library as "libjpeg-turbo" anymore, since that can be confusing; ARM v7s build instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@919 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-21 23:42:12 +00:00
DRC
34be67477f Eliminated the awkward and confusing "TurboJPEG/OSS" designation, since there are no other active implementations of the TurboJPEG API anymore; don't refer to the libjpeg API library as "libjpeg-turbo" anymore, since that can be confusing; ARM v7s build instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@919 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-21 23:42:12 +00:00
DRC
fc9fec465f ImageIO.read() returns null if the input image type is not supported (which occurs when trying to read a PPM file), so output a friendly error instead of letting the next line throw a null pointer exception. 2013-01-19 06:43:27 +00:00
DRC
98ca1c35d7 ImageIO.read() returns null if the input image type is not supported (which occurs when trying to read a PPM file), so output a friendly error instead of letting the next line throw a null pointer exception.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@918 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-19 06:43:27 +00:00
DRC
515fece330 ImageIO.read() returns null if the input image type is not supported (which occurs when trying to read a PPM file), so output a friendly error instead of letting the next line throw a null pointer exception.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@918 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-19 06:43:27 +00:00
DRC
3252455c3f New year, new copyright message 2013-01-19 01:16:38 +00:00
DRC
2e22eb6ea2 New year, new copyright message
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@917 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-19 01:16:38 +00:00
DRC
4965fd0a7c New year, new copyright message
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@917 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-19 01:16:38 +00:00
DRC
a1c870d302 Fix several issues with SRPM generation: (1) ensure that all relevant configure arguments get passed down to the configure command line in the generated spec file, (2) adjust the file manifest in the spec to accommodate the differing "age" version whenever the in-memory source/dest managers are used, and (3) fix an issue with the value of SO_MAJOR_VERSION passed down to the configure command line in the generated spec file (SO_MAJOR_VERSION has to remain pure, so we use a different variable to pass down the combined "current+age" value to libtool in Makefile.am.) 2013-01-19 01:06:46 +00:00
DRC
6da61db278 Fix several issues with SRPM generation: (1) ensure that all relevant configure arguments get passed down to the configure command line in the generated spec file, (2) adjust the file manifest in the spec to accommodate the differing "age" version whenever the in-memory source/dest managers are used, and (3) fix an issue with the value of SO_MAJOR_VERSION passed down to the configure command line in the generated spec file (SO_MAJOR_VERSION has to remain pure, so we use a different variable to pass down the combined "current+age" value to libtool in Makefile.am.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@916 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-19 01:06:46 +00:00
DRC
d67d122db0 Fix several issues with SRPM generation: (1) ensure that all relevant configure arguments get passed down to the configure command line in the generated spec file, (2) adjust the file manifest in the spec to accommodate the differing "age" version whenever the in-memory source/dest managers are used, and (3) fix an issue with the value of SO_MAJOR_VERSION passed down to the configure command line in the generated spec file (SO_MAJOR_VERSION has to remain pure, so we use a different variable to pass down the combined "current+age" value to libtool in Makefile.am.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@916 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-19 01:06:46 +00:00
DRC
81de93c8a5 Since Windows doesn't use lazy loading, clarify that a Windows application that uses jpeg_mem_dest() or jpeg_mem_src() must use the DLL containing those functions at run time. Other wordsmithing 2013-01-19 00:13:57 +00:00
DRC
dc4645d422 Since Windows doesn't use lazy loading, clarify that a Windows application that uses jpeg_mem_dest() or jpeg_mem_src() must use the DLL containing those functions at run time. Other wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@915 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-19 00:13:57 +00:00
DRC
a30a027128 Since Windows doesn't use lazy loading, clarify that a Windows application that uses jpeg_mem_dest() or jpeg_mem_src() must use the DLL containing those functions at run time. Other wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@915 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-19 00:13:57 +00:00
DRC
f46db556e3 Compiler warnings on Windows 2013-01-18 23:45:06 +00:00
DRC
736fb06278 Compiler warnings on Windows
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@914 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-18 23:45:06 +00:00
DRC
afb0dcf565 Compiler warnings on Windows
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@914 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-18 23:45:06 +00:00
DRC
ba4a6c32f8 Implement in-memory source/destination managers even when not emulating the libjpeg v8 API/ABI 2013-01-18 23:42:31 +00:00
DRC
ab70623eb2 Implement in-memory source/destination managers even when not emulating the libjpeg v8 API/ABI
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@913 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-18 23:42:31 +00:00
DRC
dc3556a0a1 Implement in-memory source/destination managers even when not emulating the libjpeg v8 API/ABI
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@913 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-18 23:42:31 +00:00
DRC
6a9229ae96 Include justification for not supporting SmartScale, DCT scaling, and the libjpeg v9 ABI 2013-01-18 06:12:51 +00:00
DRC
b87136c2c7 Include justification for not supporting SmartScale, DCT scaling, and the libjpeg v9 ABI
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@912 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-18 06:12:51 +00:00
DRC
0d605d57f4 Include justification for not supporting SmartScale, DCT scaling, and the libjpeg v9 ABI
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@912 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-18 06:12:51 +00:00
DRC
8adaa68d4b Subtle point, but the libjpeg v7+ API is not backward incompatible. That is, programs that were built against jpeg-6b can still build against jpeg-7+ with no issues. It's only the ABI that is backward incompatible, so the primary justification for implementing the emulation feature was to provide run-time (ABI) compatibility. 2013-01-18 06:02:10 +00:00
DRC
eff4f956fe Subtle point, but the libjpeg v7+ API is not backward incompatible. That is, programs that were built against jpeg-6b can still build against jpeg-7+ with no issues. It's only the ABI that is backward incompatible, so the primary justification for implementing the emulation feature was to provide run-time (ABI) compatibility.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@911 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-18 06:02:10 +00:00
DRC
6ae33e0848 Subtle point, but the libjpeg v7+ API is not backward incompatible. That is, programs that were built against jpeg-6b can still build against jpeg-7+ with no issues. It's only the ABI that is backward incompatible, so the primary justification for implementing the emulation feature was to provide run-time (ABI) compatibility.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@911 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-18 06:02:10 +00:00
DRC
e2394fc58a Subtle point, but the libjpeg v7+ API is not backward incompatible. That is, programs that were built against jpeg-6b can still build against jpeg-7+ with no issues. It's only the ABI that is backward incompatible, so the primary justification for implementing the emulation feature was to provide run-time (ABI) compatibility.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@910 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-18 05:54:06 +00:00
DRC
670d50d910 Say "do not include" rather than "omit", to be consistent with the CMake build system and the output of the configure script. 2013-01-17 21:48:11 +00:00
DRC
cb2036fd11 Say "do not include" rather than "omit", to be consistent with the CMake build system and the output of the configure script.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@909 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-17 21:48:11 +00:00
DRC
096a63bc8e Say "do not include" rather than "omit", to be consistent with the CMake build system and the output of the configure script.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@909 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-17 21:48:11 +00:00
DRC
00113423f9 Include full readme for nightshot_iso_100 2013-01-13 21:11:50 +00:00
DRC
7c39e3a766 Include full readme for nightshot_iso_100
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@908 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 21:11:50 +00:00
DRC
f59e5301a5 Include full readme for nightshot_iso_100
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@908 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 21:11:50 +00:00
DRC
647786ee51 The GNU version of md5sum is picky about the spacing 2013-01-13 12:49:57 +00:00
DRC
1f4cc446fe The GNU version of md5sum is picky about the spacing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@907 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 12:49:57 +00:00
DRC
4b3e749f0f The GNU version of md5sum is picky about the spacing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@907 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 12:49:57 +00:00
DRC
b87a0b4687 Fix the x86 build with NASM 0.98. Since NASM 0.98 is the default version on OS X, we want to at least allow people to build 32-bit code with it, even though it can't properly build 64-bit code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@906 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 12:15:58 +00:00
DRC
c4c137f5e9 Fix the x86 build with NASM 0.98. Since NASM 0.98 is the default version on OS X, we want to at least allow people to build 32-bit code with it, even though it can't properly build 64-bit code. 2013-01-13 12:12:53 +00:00
DRC
00c2cf3632 Fix the x86 build with NASM 0.98. Since NASM 0.98 is the default version on OS X, we want to at least allow people to build 32-bit code with it, even though it can't properly build 64-bit code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@905 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 12:12:53 +00:00
DRC
d7201e7dbe Fix the x86 build with NASM 0.98. Since NASM 0.98 is the default version on OS X, we want to at least allow people to build 32-bit code with it, even though it can't properly build 64-bit code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@905 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 12:12:53 +00:00
DRC
eebb09941b Fix 'make dist' 2013-01-13 11:40:58 +00:00
DRC
0f43551e08 Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@904 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 11:40:58 +00:00
DRC
a1d135912d Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@904 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 11:40:58 +00:00
DRC
fdaa047891 Acknowledge the source of nightshot_iso_100.bmp 2013-01-13 11:30:12 +00:00
DRC
c5052c7701 Acknowledge the source of nightshot_iso_100.bmp
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@903 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 11:30:12 +00:00
DRC
55a0e9175c Acknowledge the source of nightshot_iso_100.bmp
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@903 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 11:30:12 +00:00
DRC
ba01bcbbc5 Consolidate the MD5 sums into one location and add a --without-turbojpeg switch to the Un*x build to allow building libjpeg-turbo without the TurboJPEG/OSS wrapper library. These modifications were supposed to lay the ground work for adding compile-time-selectable 12-bit JPEG support, but unfortunately there are deeper issues that prevent the implementation of that feature right now (namely, some of the modifications made to the C code to support the SIMD code are apparently not 12-bit-friendly.) 2013-01-13 11:25:20 +00:00
DRC
211d1e7463 Consolidate the MD5 sums into one location and add a --without-turbojpeg switch to the Un*x build to allow building libjpeg-turbo without the TurboJPEG/OSS wrapper library. These modifications were supposed to lay the ground work for adding compile-time-selectable 12-bit JPEG support, but unfortunately there are deeper issues that prevent the implementation of that feature right now (namely, some of the modifications made to the C code to support the SIMD code are apparently not 12-bit-friendly.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@902 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 11:25:20 +00:00
DRC
71fb9568b9 Consolidate the MD5 sums into one location and add a --without-turbojpeg switch to the Un*x build to allow building libjpeg-turbo without the TurboJPEG/OSS wrapper library. These modifications were supposed to lay the ground work for adding compile-time-selectable 12-bit JPEG support, but unfortunately there are deeper issues that prevent the implementation of that feature right now (namely, some of the modifications made to the C code to support the SIMD code are apparently not 12-bit-friendly.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@902 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 11:25:20 +00:00
DRC
1e7853c0cc In all fairness, breaking backward ABI compatibility was necessary in jpeg-7 and jpeg-8 due to the fact that the caller allocates the struct. 2013-01-13 11:05:25 +00:00
DRC
5815699bff In all fairness, breaking backward ABI compatibility was necessary in jpeg-7 and jpeg-8 due to the fact that the caller allocates the struct.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@901 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 11:05:25 +00:00
DRC
ffdedb5963 In all fairness, breaking backward ABI compatibility was necessary in jpeg-7 and jpeg-8 due to the fact that the caller allocates the struct.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@901 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 11:05:25 +00:00
DRC
af67ada048 Modify 'make test' so that it uses MD5 sums instead of reference images. This eliminates the need to check most of the test images into the repository, which keeps the source tarball to a reasonable size. 2013-01-13 03:00:25 +00:00
DRC
f29ffd3eed Modify 'make test' so that it uses MD5 sums instead of reference images. This eliminates the need to check most of the test images into the repository, which keeps the source tarball to a reasonable size.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@900 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 03:00:25 +00:00
DRC
9c3d4cec36 Modify 'make test' so that it uses MD5 sums instead of reference images. This eliminates the need to check most of the test images into the repository, which keeps the source tarball to a reasonable size.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@900 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 03:00:25 +00:00
DRC
58c992a2ae Also remove mention of install.txt and filelist.txt in the build system and README. 2013-01-13 01:19:09 +00:00
DRC
2f12d7a486 Also remove mention of install.txt and filelist.txt in the build system and README.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@899 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 01:19:09 +00:00
DRC
c2328db52d Also remove mention of install.txt and filelist.txt in the build system and README.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@899 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 01:19:09 +00:00
DRC
cf55125611 install.txt contains no information relevant to libjpeg-turbo, and filelist.txt does not give any information that can't be gleaned by looking at the headers in the various source files. 2013-01-13 01:17:08 +00:00
DRC
6f96153c67 install.txt contains no information relevant to libjpeg-turbo, and filelist.txt does not give any information that can't be gleaned by looking at the headers in the various source files.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@898 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 01:17:08 +00:00
DRC
2f54a1f3cb install.txt contains no information relevant to libjpeg-turbo, and filelist.txt does not give any information that can't be gleaned by looking at the headers in the various source files.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@898 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-13 01:17:08 +00:00
DRC
e54d31affe git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@897 632fc199-4ca6-4c93-a231-07263d6284db 2013-01-12 07:30:58 +00:00
DRC
c27f55d6f9 2013-01-12 07:29:53 +00:00
DRC
6b638a6d58 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@896 632fc199-4ca6-4c93-a231-07263d6284db 2013-01-12 07:29:53 +00:00
DRC
59925ba3af git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@896 632fc199-4ca6-4c93-a231-07263d6284db 2013-01-12 07:29:53 +00:00
DRC
b684672502 2013-01-12 07:28:35 +00:00
DRC
d211effa01 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@895 632fc199-4ca6-4c93-a231-07263d6284db 2013-01-12 07:28:35 +00:00
DRC
0428dc2cdc git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@895 632fc199-4ca6-4c93-a231-07263d6284db 2013-01-12 07:28:35 +00:00
DRC
33fb70b328 2013-01-11 11:07:37 +00:00
DRC
dad4d2e76c git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@894 632fc199-4ca6-4c93-a231-07263d6284db 2013-01-11 11:07:37 +00:00
DRC
9fe128871e git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@894 632fc199-4ca6-4c93-a231-07263d6284db 2013-01-11 11:07:37 +00:00
DRC
ecc22a1007 Wordsmithing; Remove mention of TurboJPEG/IPP-- it is no longer a relevant comparison, since the version of IPP on which TurboJPEG/IPP was based is now quite old, and TurboJPEG/IPP is no longer distributed or supported by The VirtualGL Project; Include information about mathematical incompatibilities with jpeg-8 2013-01-10 11:47:39 +00:00
DRC
d5e964c980 Wordsmithing; Remove mention of TurboJPEG/IPP-- it is no longer a relevant comparison, since the version of IPP on which TurboJPEG/IPP was based is now quite old, and TurboJPEG/IPP is no longer distributed or supported by The VirtualGL Project; Include information about mathematical incompatibilities with jpeg-8
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@893 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-10 11:47:39 +00:00
DRC
b69f25841b Wordsmithing; Remove mention of TurboJPEG/IPP-- it is no longer a relevant comparison, since the version of IPP on which TurboJPEG/IPP was based is now quite old, and TurboJPEG/IPP is no longer distributed or supported by The VirtualGL Project; Include information about mathematical incompatibilities with jpeg-8
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@893 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-10 11:47:39 +00:00
DRC
c168d9641c Prevent compiler warning on Windows if jmorecfg.h is included after the Windows headers, which also define FAR.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@892 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-06 18:00:20 +00:00
DRC
5ae35d8a86 Prevent compiler warning on Windows if jmorecfg.h is included after the Windows headers, which also define FAR. 2013-01-06 17:59:42 +00:00
DRC
6a32d04d23 Prevent compiler warning on Windows if jmorecfg.h is included after the Windows headers, which also define FAR.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@891 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-06 17:59:42 +00:00
DRC
8ddd1ff301 Prevent compiler warning on Windows if jmorecfg.h is included after the Windows headers, which also define FAR.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@891 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-06 17:59:42 +00:00
DRC
6b041a9221 Spacing tweak 2013-01-01 11:41:44 +00:00
DRC
28701317d2 Spacing tweak
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@890 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 11:41:44 +00:00
DRC
2b6cc565d2 Spacing tweak
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@890 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 11:41:44 +00:00
DRC
d7ca17b73d We support arithmetic coding, which is a feature of libjpeg v7/v8
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@889 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 11:41:13 +00:00
DRC
13ac9e8554 Indicate our support for some of the jpeg-8d features, as well as arithmetic coding 2013-01-01 11:39:04 +00:00
DRC
ac51438b66 Indicate our support for some of the jpeg-8d features, as well as arithmetic coding
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@888 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 11:39:04 +00:00
DRC
2fbf7acccc Indicate our support for some of the jpeg-8d features, as well as arithmetic coding
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@888 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 11:39:04 +00:00
DRC
5b620429e5 Undocument ansi2knr.c, since we don't include it 2013-01-01 11:12:20 +00:00
DRC
966d8b77ef Undocument ansi2knr.c, since we don't include it
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@887 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 11:12:20 +00:00
DRC
0f1f5f822b Undocument ansi2knr.c, since we don't include it
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@887 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 11:12:20 +00:00
DRC
628b982497 Merge some of the README changes from jpeg-8d and change the copyright and version strings to reflect that we use some of that code. 2013-01-01 10:56:38 +00:00
DRC
c137f0f1cf Merge some of the README changes from jpeg-8d and change the copyright and version strings to reflect that we use some of that code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@886 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:56:38 +00:00
DRC
b5beb92a92 Merge some of the README changes from jpeg-8d and change the copyright and version strings to reflect that we use some of that code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@886 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:56:38 +00:00
DRC
41f0b53f18 Port RGB-to-Grayscale color transform from jpeg-8d 2013-01-01 10:52:29 +00:00
DRC
f37e4daf94 Port RGB-to-Grayscale color transform from jpeg-8d
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@885 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:52:29 +00:00
DRC
16ff890de7 Port RGB-to-Grayscale color transform from jpeg-8d
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@885 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:52:29 +00:00
DRC
251db636f8 Further changes to the copyright/attribution notices to make it clear that our modified files are not part of the IJG's software.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@884 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:51:16 +00:00
DRC
e14730f6cc Further changes to the copyright/attribution notices to make it clear that our modified files are not part of the IJG's software. 2013-01-01 10:50:59 +00:00
DRC
a9d39ce09d Further changes to the copyright/attribution notices to make it clear that our modified files are not part of the IJG's software.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@883 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:50:59 +00:00
DRC
383cd7265d Further changes to the copyright/attribution notices to make it clear that our modified files are not part of the IJG's software.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@883 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:50:59 +00:00
DRC
674a037ec7 We now support the additional decompression scaling factors from jpeg-7 2013-01-01 10:47:02 +00:00
DRC
e0634b15c3 We now support the additional decompression scaling factors from jpeg-7
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@882 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:47:02 +00:00
DRC
8e4f6724cb We now support the additional decompression scaling factors from jpeg-7
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@882 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:47:02 +00:00
DRC
f914eb1111 Port the width/height force feature from jpegtran v8d. 2013-01-01 10:44:00 +00:00
DRC
8cbf8939bb Port the width/height force feature from jpegtran v8d.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@881 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:44:00 +00:00
DRC
b04e41592c Port the width/height force feature from jpegtran v8d.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@881 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:44:00 +00:00
DRC
7d12636291 Add cjpeg -rgb option from jpeg-8d 2013-01-01 10:25:43 +00:00
DRC
f73a27ca5b Add cjpeg -rgb option from jpeg-8d
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@880 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:25:43 +00:00
DRC
19e408d256 Add cjpeg -rgb option from jpeg-8d
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@880 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:25:43 +00:00
DRC
f0f1ce1b7f Minor modifications from jpeg-8d 2013-01-01 10:17:03 +00:00
DRC
b5f2e450ac Minor modifications from jpeg-8d
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@879 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:17:03 +00:00
DRC
83925d0427 Minor modifications from jpeg-8d
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@879 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:17:03 +00:00
DRC
b24a7228ed Further changes to the copyright/attribution notices to make it clear that our modified files are not part of the IJG's software.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@878 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:13:34 +00:00
DRC
ee4c7d28ab Further changes to the copyright/attribution notices to make it clear that our modified files are not part of the IJG's software. 2013-01-01 10:12:34 +00:00
DRC
6d6e37df18 Further changes to the copyright/attribution notices to make it clear that our modified files are not part of the IJG's software.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@877 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:12:34 +00:00
DRC
6e5eac3ea7 Further changes to the copyright/attribution notices to make it clear that our modified files are not part of the IJG's software.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@877 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 10:12:34 +00:00
DRC
cf763c0cd8 Further changes to the copyright/attribution notices to make it clear that our modified files are not part of the IJG's software.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@876 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 09:51:37 +00:00
DRC
9c1aac4639 Further changes to the copyright/attribution notices to make it clear that our modified files are not part of the IJG's software. 2013-01-01 09:49:47 +00:00
DRC
03badeab66 Further changes to the copyright/attribution notices to make it clear that our modified files are not part of the IJG's software.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@875 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 09:49:47 +00:00
DRC
70796552c4 Further changes to the copyright/attribution notices to make it clear that our modified files are not part of the IJG's software.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@875 632fc199-4ca6-4c93-a231-07263d6284db
2013-01-01 09:49:47 +00:00
DRC
936ae5a813 1.2.90 (1.3 beta1) 2012-12-31 09:44:31 +00:00
DRC
84f7122ba6 1.2.90 (1.3 beta1)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@874 632fc199-4ca6-4c93-a231-07263d6284db
2012-12-31 09:44:31 +00:00
DRC
ee67b71238 1.2.90 (1.3 beta1)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@874 632fc199-4ca6-4c93-a231-07263d6284db
2012-12-31 09:44:31 +00:00
DRC
a73e870ad0 Change the copyright notices to make it clear that our modified files are not part of the IJG's software.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@873 632fc199-4ca6-4c93-a231-07263d6284db
2012-12-31 02:52:30 +00:00
DRC
de30fe9460 Change the copyright notices to make it clear that our modified files are not part of the IJG's software. 2012-12-31 02:42:18 +00:00
DRC
0bfb78051d Change the copyright notices to make it clear that our modified files are not part of the IJG's software.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@872 632fc199-4ca6-4c93-a231-07263d6284db
2012-12-31 02:42:18 +00:00
DRC
2cb8ab383d Change the copyright notices to make it clear that our modified files are not part of the IJG's software.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@872 632fc199-4ca6-4c93-a231-07263d6284db
2012-12-31 02:42:18 +00:00
DRC
2dcd4b5353 Fix bug in unused code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@871 632fc199-4ca6-4c93-a231-07263d6284db
2012-12-01 22:33:54 +00:00
DRC
6683a2411a Fix bug in unused code 2012-12-01 22:33:25 +00:00
DRC
152e4c5ee4 Fix bug in unused code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@870 632fc199-4ca6-4c93-a231-07263d6284db
2012-12-01 22:33:25 +00:00
DRC
8c5aa647d1 Fix bug in unused code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@870 632fc199-4ca6-4c93-a231-07263d6284db
2012-12-01 22:33:25 +00:00
DRC
5e3bb3e9c8 Use a more robust method of obtaining the build timestamp on Windows. 'wmic os get LocalDateTime' will always return the timestamp in the format we want (YYYYMMDD), whereas date /t is sensitive to locale. If wmic fails, then we fall back to using date /t, even though this means that the BUILD variable will end up in the incorrect format on some systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@869 632fc199-4ca6-4c93-a231-07263d6284db
2012-10-12 10:19:09 +00:00
DRC
75cf49798d Use a more robust method of obtaining the build timestamp on Windows. 'wmic os get LocalDateTime' will always return the timestamp in the format we want (YYYYMMDD), whereas date /t is sensitive to locale. If wmic fails, then we fall back to using date /t, even though this means that the BUILD variable will end up in the incorrect format on some systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@868 632fc199-4ca6-4c93-a231-07263d6284db
2012-10-12 10:18:37 +00:00
DRC
e456841c1c Use a more robust method of obtaining the build timestamp on Windows. 'wmic os get LocalDateTime' will always return the timestamp in the format we want (YYYYMMDD), whereas date /t is sensitive to locale. If wmic fails, then we fall back to using date /t, even though this means that the BUILD variable will end up in the incorrect format on some systems. 2012-10-12 09:29:44 +00:00
DRC
de924b8587 Use a more robust method of obtaining the build timestamp on Windows. 'wmic os get LocalDateTime' will always return the timestamp in the format we want (YYYYMMDD), whereas date /t is sensitive to locale. If wmic fails, then we fall back to using date /t, even though this means that the BUILD variable will end up in the incorrect format on some systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@867 632fc199-4ca6-4c93-a231-07263d6284db
2012-10-12 09:29:44 +00:00
DRC
8be6348add Use a more robust method of obtaining the build timestamp on Windows. 'wmic os get LocalDateTime' will always return the timestamp in the format we want (YYYYMMDD), whereas date /t is sensitive to locale. If wmic fails, then we fall back to using date /t, even though this means that the BUILD variable will end up in the incorrect format on some systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@867 632fc199-4ca6-4c93-a231-07263d6284db
2012-10-12 09:29:44 +00:00
DRC
1b9184db5b Fix MinGW build and remove duplication of effort 2012-10-02 06:47:37 +00:00
DRC
bc2e66cb43 Fix MinGW build and remove duplication of effort
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@864 632fc199-4ca6-4c93-a231-07263d6284db
2012-10-02 06:47:37 +00:00
DRC
2610cd4d4a Fix MinGW build and remove duplication of effort
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@864 632fc199-4ca6-4c93-a231-07263d6284db
2012-10-02 06:47:37 +00:00
DRC
8f94c2b084 2012-10-02 04:20:43 +00:00
DRC
d9d1d67d7c git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@863 632fc199-4ca6-4c93-a231-07263d6284db 2012-10-02 04:20:43 +00:00
DRC
92dd17f4c7 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@863 632fc199-4ca6-4c93-a231-07263d6284db 2012-10-02 04:20:43 +00:00
DRC
70d3c1aeec Add a Java version of TJBench and extend the TurboJPEG Java API to support it (this involved adding a polymorphic method in TJCompressor that accepts x and y offsets into a larger buffer, similar to the previous modification that had been done to TJDecompressor.) 2012-09-24 02:27:55 +00:00
DRC
fac3bea8da Add a Java version of TJBench and extend the TurboJPEG Java API to support it (this involved adding a polymorphic method in TJCompressor that accepts x and y offsets into a larger buffer, similar to the previous modification that had been done to TJDecompressor.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@862 632fc199-4ca6-4c93-a231-07263d6284db
2012-09-24 02:27:55 +00:00
DRC
e0c15701d4 Add a Java version of TJBench and extend the TurboJPEG Java API to support it (this involved adding a polymorphic method in TJCompressor that accepts x and y offsets into a larger buffer, similar to the previous modification that had been done to TJDecompressor.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@862 632fc199-4ca6-4c93-a231-07263d6284db
2012-09-24 02:27:55 +00:00
DRC
a6c9eaf155 If libturbojpeg.jnilib is not found on Mac systems, specifically look for it under /usr/lib, since /usr/lib isn't part of the default java.library.path on that platform. 2012-08-24 02:44:39 +00:00
DRC
61e1341f11 If libturbojpeg.jnilib is not found on Mac systems, specifically look for it under /usr/lib, since /usr/lib isn't part of the default java.library.path on that platform.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@861 632fc199-4ca6-4c93-a231-07263d6284db
2012-08-24 02:44:39 +00:00
DRC
3f0ffbc4b7 If libturbojpeg.jnilib is not found on Mac systems, specifically look for it under /usr/lib, since /usr/lib isn't part of the default java.library.path on that platform.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@861 632fc199-4ca6-4c93-a231-07263d6284db
2012-08-24 02:44:39 +00:00
DRC
29d8f253f8 Fix build issues that occurred whenever the source directory contained the letters "col", "mer", or "gra".
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@860 632fc199-4ca6-4c93-a231-07263d6284db
2012-08-07 21:59:59 +00:00
DRC
f506e2cbb5 Fix build issues that occurred whenever the source directory contained the letters "col", "mer", or "gra". 2012-08-07 21:59:28 +00:00
DRC
8fd7221dc1 Fix build issues that occurred whenever the source directory contained the letters "col", "mer", or "gra".
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@859 632fc199-4ca6-4c93-a231-07263d6284db
2012-08-07 21:59:28 +00:00
DRC
5553c54e26 Fix build issues that occurred whenever the source directory contained the letters "col", "mer", or "gra".
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@859 632fc199-4ca6-4c93-a231-07263d6284db
2012-08-07 21:59:28 +00:00
DRC
05cd6e6ea0 Allow the libjpeg-turbo32 package to be used on MultiArch-compatible systems without overriding the linker path or LD_LIBRARY_PATH. 2012-08-07 18:44:24 +00:00
DRC
a394bf752a Allow the libjpeg-turbo32 package to be used on MultiArch-compatible systems without overriding the linker path or LD_LIBRARY_PATH.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@858 632fc199-4ca6-4c93-a231-07263d6284db
2012-08-07 18:44:24 +00:00
DRC
d669ea731f Allow the libjpeg-turbo32 package to be used on MultiArch-compatible systems without overriding the linker path or LD_LIBRARY_PATH.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@858 632fc199-4ca6-4c93-a231-07263d6284db
2012-08-07 18:44:24 +00:00
DRC
0a0f8d14e2 Allow the libjpeg-turbo32 package to be used on MultiArch-compatible systems without overriding the linker path or LD_LIBRARY_PATH.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@857 632fc199-4ca6-4c93-a231-07263d6284db
2012-08-07 18:42:07 +00:00
DRC
0a9250c2c0 Oops. Add support for TJFLAG_FASTDCT to tjDecompressToYUV() as well. 2012-07-03 20:02:49 +00:00
DRC
2186809a45 Oops. Add support for TJFLAG_FASTDCT to tjDecompressToYUV() as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@856 632fc199-4ca6-4c93-a231-07263d6284db
2012-07-03 20:02:49 +00:00
DRC
7b1c86c3bd Oops. Add support for TJFLAG_FASTDCT to tjDecompressToYUV() as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@856 632fc199-4ca6-4c93-a231-07263d6284db
2012-07-03 20:02:49 +00:00
DRC
e0419b530b Oops. Add support for TJFLAG_FASTDCT to tjDecompressToYUV() as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@855 632fc199-4ca6-4c93-a231-07263d6284db
2012-07-03 20:01:31 +00:00
DRC
3367f407fe 1.2.2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@854 632fc199-4ca6-4c93-a231-07263d6284db
2012-07-03 20:00:35 +00:00
DRC
cc336e7bd2 Cosmetic fixes to argument lists
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@852 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-29 23:51:35 +00:00
DRC
019d51d4f1 Add 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. 2012-06-29 23:46:38 +00:00
DRC
73d74c132b Add 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.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@851 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-29 23:46:38 +00:00
DRC
3cde27c244 Add 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.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@851 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-29 23:46:38 +00:00
DRC
e0a0151761 Re-generate docs to pick up new API version
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@850 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-29 23:17:03 +00:00
DRC
fd3aba3590 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.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@849 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-29 23:14:48 +00:00
DRC
112a0bb968 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.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@848 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-28 23:25:34 +00:00
DRC
7b8366223a 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. 2012-06-28 23:24:29 +00:00
DRC
ea505e777a 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.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@847 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-28 23:24:29 +00:00
DRC
ce6c0e7ebd 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.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@847 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-28 23:24:29 +00:00
DRC
5950c5d4f9 Later versions of autoconf (specifically, the one shipped with Xcode 4.3) default to building x86-64, so it is necessary to override the host_alias to get a 32-bit build.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@846 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-28 23:22:03 +00:00
DRC
52ce04b193 Later versions of autoconf (specifically, the one shipped with Xcode 4.3) default to building x86-64, so it is necessary to override the host_alias to get a 32-bit build. 2012-06-28 23:21:13 +00:00
DRC
ea7bb7b651 Later versions of autoconf (specifically, the one shipped with Xcode 4.3) default to building x86-64, so it is necessary to override the host_alias to get a 32-bit build.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@845 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-28 23:21:13 +00:00
DRC
b4e2548e6b Later versions of autoconf (specifically, the one shipped with Xcode 4.3) default to building x86-64, so it is necessary to override the host_alias to get a 32-bit build.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@845 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-28 23:21:13 +00:00
DRC
98eecb8605 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 caused incorrect pixels on the right-hand side of images whose rows were not 16-byte aligned, whenever fancy upsampling was used and when decompressing to a 32-bit (RGBX, etc.) buffer.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@844 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-18 00:18:04 +00:00
DRC
13c318da4f 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 caused incorrect pixels on the right-hand side of images whose rows were not 16-byte aligned, whenever fancy upsampling was used and when decompressing to a 32-bit (RGBX, etc.) buffer.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@843 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-18 00:16:15 +00:00
DRC
b368b2f300 Provide further details about the regression 2012-06-18 00:09:19 +00:00
DRC
14e8225391 Provide further details about the regression
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@842 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-18 00:09:19 +00:00
DRC
97e5be2e2e Provide further details about the regression
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@842 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-18 00:09:19 +00:00
DRC
de37e07716 Provide further details about the regression
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@841 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-18 00:08:18 +00:00
DRC
0651ee366b Acknowledge the existence of 1.2.1 2012-06-15 22:00:47 +00:00
DRC
575317bb54 Acknowledge the existence of 1.2.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@840 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-15 22:00:47 +00:00
DRC
a8a481e690 Acknowledge the existence of 1.2.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@840 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-15 22:00:47 +00:00
DRC
791e9b4316 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 caused 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 r836. 2012-06-15 21:58:06 +00:00
DRC
df0babcfc2 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 caused 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 r836.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@839 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-15 21:58:06 +00:00
DRC
c394d503ae 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 caused 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 r836.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@839 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-15 21:58:06 +00:00
DRC
8126d0c5a5 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.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@838 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-15 21:54:45 +00:00
DRC
316617faf4 Accelerated 4:2:2 upsampling routine for ARM (improves performance ~20-30% when decompressing 4:2:2 JPEGs using fancy upsampling)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@837 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-13 05:17:03 +00:00
DRC
7702469e15 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.) 2012-06-13 01:23:09 +00:00
DRC
66fe68b0b2 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.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@836 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-13 01:23:09 +00:00
DRC
1379c92f87 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.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@836 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-13 01:23:09 +00:00
DRC
69799275be 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.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@835 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-13 01:21:29 +00:00
DRC
c19ea22c80 Add new JNI functions to mapfile so they will be visible on Linux 2012-06-08 08:25:17 +00:00
DRC
b2fc846e44 Add new JNI functions to mapfile so they will be visible on Linux
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@834 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-08 08:25:17 +00:00
DRC
94e873fe9e Add new JNI functions to mapfile so they will be visible on Linux
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@834 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-08 08:25:17 +00:00
DRC
b03457663d Fix array size calculations 2012-06-07 09:38:57 +00:00
DRC
dc31f0bc41 Fix array size calculations
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@833 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-07 09:38:57 +00:00
DRC
8c5d7e518d Fix array size calculations
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@833 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-07 09:38:57 +00:00
DRC
448d12d298 Add x, y parameters to TJDecompressor so that it can be used to decompress to an arbitrary position in the destination image (TurboVNC needs this.) 2012-06-06 08:41:06 +00:00
DRC
f659f43f93 Add x, y parameters to TJDecompressor so that it can be used to decompress to an arbitrary position in the destination image (TurboVNC needs this.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@832 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-06 08:41:06 +00:00
DRC
bd4c4babbd Add x, y parameters to TJDecompressor so that it can be used to decompress to an arbitrary position in the destination image (TurboVNC needs this.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@832 632fc199-4ca6-4c93-a231-07263d6284db
2012-06-06 08:41:06 +00:00
DRC
dd2b651243 Guard against num_components being a ridiculous value due to a corrupt header
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@831 632fc199-4ca6-4c93-a231-07263d6284db
2012-05-30 20:36:42 +00:00
DRC
8aab7a1dad Guard against num_components being a ridiculous value due to a corrupt header 2012-05-30 20:34:42 +00:00
DRC
e93d94b9ad Guard against num_components being a ridiculous value due to a corrupt header
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@830 632fc199-4ca6-4c93-a231-07263d6284db
2012-05-30 20:34:42 +00:00
DRC
1385e05209 Guard against num_components being a ridiculous value due to a corrupt header
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@830 632fc199-4ca6-4c93-a231-07263d6284db
2012-05-30 20:34:42 +00:00
DRC
4f24016bde Preserve all 128 bits of xmm6 and xmm7
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@829 632fc199-4ca6-4c93-a231-07263d6284db
2012-04-26 19:50:37 +00:00
DRC
ca423d39a3 Preserve all 128 bits of xmm6 and xmm7 2012-04-26 19:48:33 +00:00
DRC
4ef9c9549b Preserve all 128 bits of xmm6 and xmm7
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@828 632fc199-4ca6-4c93-a231-07263d6284db
2012-04-26 19:48:33 +00:00
DRC
835da9597c Preserve all 128 bits of xmm6 and xmm7
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@828 632fc199-4ca6-4c93-a231-07263d6284db
2012-04-26 19:48:33 +00:00
DRC
1086af6541 Fix memory leak in the colorspace emulation code 2012-04-26 03:18:49 +00:00
DRC
ea3396a945 Fix memory leak in the colorspace emulation code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@827 632fc199-4ca6-4c93-a231-07263d6284db
2012-04-26 03:18:49 +00:00
DRC
66f6b9b036 Fix memory leak in the colorspace emulation code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@827 632fc199-4ca6-4c93-a231-07263d6284db
2012-04-26 03:18:49 +00:00
DRC
7e768e9849 Provide the legacy unversioned libturbojpeg.so resource so that RPMs that dependended on older libjpeg-turbo distributions will still work. 2012-03-29 21:29:36 +00:00
DRC
9ba64bbbcf Provide the legacy unversioned libturbojpeg.so resource so that RPMs that dependended on older libjpeg-turbo distributions will still work.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@826 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-29 21:29:36 +00:00
DRC
e9081e7385 Provide the legacy unversioned libturbojpeg.so resource so that RPMs that dependended on older libjpeg-turbo distributions will still work.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@826 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-29 21:29:36 +00:00
DRC
9d7101c8f6 Emulate colorspace extensions if they are not present in the libjpeg API. This allows the TurboJPEG wrapper to be used with libjpeg rather than libjpeg-turbo. Not useful within the context of our project, but other projects prefer to include the TurboJPEG wrapper in-tree, and this allows them to be linked against either libjpeg-turbo or libjpeg. 2012-03-23 19:47:57 +00:00
DRC
afc06929e0 Emulate colorspace extensions if they are not present in the libjpeg API. This allows the TurboJPEG wrapper to be used with libjpeg rather than libjpeg-turbo. Not useful within the context of our project, but other projects prefer to include the TurboJPEG wrapper in-tree, and this allows them to be linked against either libjpeg-turbo or libjpeg.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@825 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 19:47:57 +00:00
DRC
7f52711afa Emulate colorspace extensions if they are not present in the libjpeg API. This allows the TurboJPEG wrapper to be used with libjpeg rather than libjpeg-turbo. Not useful within the context of our project, but other projects prefer to include the TurboJPEG wrapper in-tree, and this allows them to be linked against either libjpeg-turbo or libjpeg.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@825 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 19:47:57 +00:00
DRC
c2dab98ea0 Get rid of the Solaris packaging system. Solaris packages are obsolete, only a handful of people were downloading those binaries, and maintaining the system was proving to be a pain. 2012-03-23 19:44:54 +00:00
DRC
6dd6b3a74c Get rid of the Solaris packaging system. Solaris packages are obsolete, only a handful of people were downloading those binaries, and maintaining the system was proving to be a pain.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@824 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 19:44:54 +00:00
DRC
7cfbea858c Get rid of the Solaris packaging system. Solaris packages are obsolete, only a handful of people were downloading those binaries, and maintaining the system was proving to be a pain.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@824 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 19:44:54 +00:00
DRC
d4c15e103c Whitespace tweak
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@823 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 19:39:14 +00:00
DRC
c17aa549ab Ensure that tjDecompress2() exits cleanly if setDecompDefaults() fails 2012-03-23 19:37:40 +00:00
DRC
8ad24924ea Ensure that tjDecompress2() exits cleanly if setDecompDefaults() fails
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@822 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 19:37:40 +00:00
DRC
cfbf6426e7 Ensure that tjDecompress2() exits cleanly if setDecompDefaults() fails
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@822 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 19:37:40 +00:00
DRC
2eda8212e4 Ensure that tjDecompress2() exits cleanly if setDecompDefaults() fails
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@821 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 19:32:38 +00:00
DRC
c650f3c220 Add a dummy version number to the TurboJPEG dynamic library on Unix systems so Linux distro maintainers will not reject it out of hand. 2012-03-23 03:24:39 +00:00
DRC
fd407776ba Add a dummy version number to the TurboJPEG dynamic library on Unix systems so Linux distro maintainers will not reject it out of hand.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@820 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 03:24:39 +00:00
DRC
b217c71121 Add a dummy version number to the TurboJPEG dynamic library on Unix systems so Linux distro maintainers will not reject it out of hand.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@820 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 03:24:39 +00:00
DRC
25fc4cc39f Get rid of the Solaris packaging system. Solaris packages are obsolete, only a handful of people were downloading those binaries, and maintaining the system was proving to be a pain. 2012-03-23 03:17:41 +00:00
DRC
f52682e277 Get rid of the Solaris packaging system. Solaris packages are obsolete, only a handful of people were downloading those binaries, and maintaining the system was proving to be a pain.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@819 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 03:17:41 +00:00
DRC
5e46549148 Get rid of the Solaris packaging system. Solaris packages are obsolete, only a handful of people were downloading those binaries, and maintaining the system was proving to be a pain.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@819 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 03:17:41 +00:00
DRC
0559e94c72 "Sun Studio"="Oracle Solaris Studio"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@818 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 03:12:35 +00:00
DRC
fee19c375b "Sun Studio"="Oracle Solaris Studio" 2012-03-23 03:11:12 +00:00
DRC
21cc62bccb "Sun Studio"="Oracle Solaris Studio"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@817 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 03:11:12 +00:00
DRC
6423e4993c "Sun Studio"="Oracle Solaris Studio"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@817 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 03:11:12 +00:00
DRC
7c6ae034da Fix universal DMG build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@816 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 00:51:56 +00:00
DRC
65586bf2be Fix universal DMG build 2012-03-23 00:50:09 +00:00
DRC
c2f89f131d Fix universal DMG build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@815 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 00:50:09 +00:00
DRC
b9e9ca093a Fix universal DMG build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@815 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-23 00:50:09 +00:00
DRC
68071bd2e4 1.2.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@814 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-22 22:05:09 +00:00
DRC
8015a30308 Visual Studio 2010 doesn't like the wildcard at compile time, so let CMake expand it instead.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@813 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-17 14:32:38 +00:00
DRC
f3e8b02df5 Visual Studio 2010 doesn't like the wildcard, so let CMake expand it instead. 2012-03-17 14:32:05 +00:00
DRC
6bc5938482 Visual Studio 2010 doesn't like the wildcard, so let CMake expand it instead.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@812 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-17 14:32:05 +00:00
DRC
e8dac6d863 Visual Studio 2010 doesn't like the wildcard, so let CMake expand it instead.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@812 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-17 14:32:05 +00:00
DRC
cac105133e Fix the behavior of the alpha-enabled colorspace constants whenever libjpeg-turbo is built without SIMD support and merged upsampling is used.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@811 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-16 14:37:36 +00:00
DRC
6de1345133 Fix the behavior of the alpha-enabled colorspace constants whenever libjpeg-turbo is built without SIMD support and merged upsampling is used. 2012-03-16 14:30:46 +00:00
DRC
ffe4fc182f Fix the behavior of the alpha-enabled colorspace constants whenever libjpeg-turbo is built without SIMD support and merged upsampling is used.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@810 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-16 14:30:46 +00:00
DRC
2c607d528d Fix the behavior of the alpha-enabled colorspace constants whenever libjpeg-turbo is built without SIMD support and merged upsampling is used.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@810 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-16 14:30:46 +00:00
DRC
a9b646c202 Allow RGB JPEG files to be created/decoded when using the LJT colorspace extensions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@809 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-11 22:06:54 +00:00
DRC
2a74bcdce4 Allow RGB JPEG files to be created/decoded when using the LJT colorspace extensions 2012-03-11 22:05:25 +00:00
DRC
0586d41d1b Allow RGB JPEG files to be created/decoded when using the LJT colorspace extensions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@808 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-11 22:05:25 +00:00
DRC
cbe9d3a371 Allow RGB JPEG files to be created/decoded when using the LJT colorspace extensions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@808 632fc199-4ca6-4c93-a231-07263d6284db
2012-03-11 22:05:25 +00:00
DRC
c06e5f2928 Oops 2012-02-10 05:31:03 +00:00
DRC
09e4575789 Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@806 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 05:31:03 +00:00
DRC
cc90e31263 Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@806 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 05:31:03 +00:00
DRC
69c1408e9d Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@805 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 03:47:18 +00:00
DRC
9e7eb27686 Move build dir. variables back into makemacpkg to avoid messing up the Solaris packaging system.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@804 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 03:41:20 +00:00
DRC
2c6f3ed984 Move build dir. variables back into makemacpkg to avoid messing up the Solaris packaging system. 2012-02-10 03:39:43 +00:00
DRC
086c9ab549 Move build dir. variables back into makemacpkg to avoid messing up the Solaris packaging system.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@803 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 03:39:43 +00:00
DRC
6841bdbcdb Move build dir. variables back into makemacpkg to avoid messing up the Solaris packaging system.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@803 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 03:39:43 +00:00
DRC
b7af9a7762 Don't include documentation in 32-bit supplemental package 2012-02-10 03:18:41 +00:00
DRC
0989088530 Don't include documentation in 32-bit supplemental package
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@802 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 03:18:41 +00:00
DRC
93443d06a9 Don't include documentation in 32-bit supplemental package
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@802 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 03:18:41 +00:00
DRC
51d626ff9d Don't include documentation in 32-bit supplemental package
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@801 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 02:51:40 +00:00
DRC
f52a5670da Fix 'make dist' 2012-02-10 01:55:28 +00:00
DRC
ed839d5905 Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@800 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:55:28 +00:00
DRC
2b1d58c39f Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@800 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:55:28 +00:00
DRC
01bf9d9ccd Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@799 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:52:31 +00:00
DRC
33e613d948 iOS universal package was promoted to a 1.2 feature 2012-02-10 01:44:55 +00:00
DRC
c052646b34 iOS universal package was promoted to a 1.2 feature
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@798 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:44:55 +00:00
DRC
e666645535 iOS universal package was promoted to a 1.2 feature
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@798 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:44:55 +00:00
DRC
ef49f790bd git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@797 632fc199-4ca6-4c93-a231-07263d6284db 2012-02-10 01:44:23 +00:00
DRC
57bd84f435 RPM spec no longer uses %{_srcdir}
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@796 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:40:29 +00:00
DRC
a856d7bf70 RPM spec no longer uses %{_srcdir} 2012-02-10 01:39:28 +00:00
DRC
99bebdd0aa RPM spec no longer uses %{_srcdir}
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@795 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:39:28 +00:00
DRC
050ba6c841 RPM spec no longer uses %{_srcdir}
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@795 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:39:28 +00:00
DRC
5d0234739e Install docs when doing 'make install' on Unix; Fix 'install' target on Windows; Include wizard.txt, example.c, and structure.txt in installed docs 2012-02-10 01:37:20 +00:00
DRC
02cd567fb9 Install docs when doing 'make install' on Unix; Fix 'install' target on Windows; Include wizard.txt, example.c, and structure.txt in installed docs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@794 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:37:20 +00:00
DRC
cdf8deb55a Install docs when doing 'make install' on Unix; Fix 'install' target on Windows; Include wizard.txt, example.c, and structure.txt in installed docs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@794 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:37:20 +00:00
DRC
20b734e1c4 Infrastructure for producing a universal x86-64/i386/ARM version of libjpeg.a and libturbojpeg.a on OS X, so that the same library can be used to build OS X and iOS apps
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@793 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:30:37 +00:00
DRC
aad846c416 'make iosdmg' now works with 32-bit builds as well 2012-02-10 01:24:26 +00:00
DRC
bbaf4c94cd 'make iosdmg' now works with 32-bit builds as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@792 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:24:26 +00:00
DRC
d09fd835a3 'make iosdmg' now works with 32-bit builds as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@792 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:24:26 +00:00
DRC
ba12191cc8 Clean up the iOS packaging mechanism so that ARM architectures can be added to i386-only builds as well. 2012-02-10 01:07:59 +00:00
DRC
166c5ec0b9 Clean up the iOS packaging mechanism so that ARM architectures can be added to i386-only builds as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@791 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:07:59 +00:00
DRC
6f9fad72a2 Clean up the iOS packaging mechanism so that ARM architectures can be added to i386-only builds as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@791 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 01:07:59 +00:00
DRC
a1647c8412 Install docs when doing 'make install' on Unix; Fix 'install' target on Windows; Include wizard.txt, example.c, and structure.txt in installed docs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@790 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-10 00:39:05 +00:00
DRC
4a2fe27cb6 Infrastructure for producing a universal x86-64/i386/ARM version of libjpeg.a and libturbojpeg.a on OS X, so that the same library can be used to build OS X and iOS apps 2012-02-09 09:23:30 +00:00
DRC
1fbae8467f Infrastructure for producing a universal x86-64/i386/ARM version of libjpeg.a and libturbojpeg.a on OS X, so that the same library can be used to build OS X and iOS apps
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@789 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-09 09:23:30 +00:00
DRC
1c833ad8a5 Infrastructure for producing a universal x86-64/i386/ARM version of libjpeg.a and libturbojpeg.a on OS X, so that the same library can be used to build OS X and iOS apps
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@789 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-09 09:23:30 +00:00
DRC
f832eae5c2 Merge description from README-turbo.txt into packages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@788 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-08 09:56:04 +00:00
DRC
2aedbe637d Merge description from README-turbo.txt into packages 2012-02-08 09:18:42 +00:00
DRC
1256fbade9 Merge description from README-turbo.txt into packages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@787 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-08 09:18:42 +00:00
DRC
272a395514 Merge description from README-turbo.txt into packages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@787 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-08 09:18:42 +00:00
DRC
b39dfe7046 Merge description from README-turbo.txt into packages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@786 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-08 09:17:42 +00:00
DRC
be6d424626 Compiler warning
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@785 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-07 23:41:10 +00:00
DRC
0f0fd75125 Compiler warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@784 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-07 23:27:14 +00:00
DRC
760ea8dfb3 Merge documentation and wordsmithing changes from 1.2, including promotion of -arithmetic to a "switch for advanced users"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@783 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-07 23:25:19 +00:00
DRC
44a97e8fe7 Not necessary to save r10 and r11, since these are scratch registers
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@782 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-07 23:13:24 +00:00
DRC
c3ba39fc3b Merge copyright messages into one string and change the run-time messages to avoid confusion (we are not technically based on the latest libjpeg, although we do borrow some code from it)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@781 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-07 23:05:46 +00:00
DRC
7ed7b57203 Eliminate "main is usually a function" warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@780 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-07 22:51:49 +00:00
DRC
05c7b00f1d 2012-02-07 20:39:33 +00:00
DRC
3d40ad5f6e git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@779 632fc199-4ca6-4c93-a231-07263d6284db 2012-02-07 20:39:33 +00:00
DRC
57a402e02e git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@779 632fc199-4ca6-4c93-a231-07263d6284db 2012-02-07 20:39:33 +00:00
DRC
0441bdfd88 Wordsmithing and grammar 2012-02-07 00:15:42 +00:00
DRC
00b327b8f8 Wordsmithing and grammar
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@778 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-07 00:15:42 +00:00
DRC
cd90164f77 Wordsmithing and grammar
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@778 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-07 00:15:42 +00:00
DRC
11a122b2d6 Wordsmithing and grammar
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@777 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-07 00:14:53 +00:00
DRC
6916f87955 Several clarifications regarding v7/v8 API/ABI support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@776 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-03 08:59:21 +00:00
DRC
efbdb72ac3 Several clarifications regarding v7/v8 API/ABI support 2012-02-03 08:55:36 +00:00
DRC
bdbcd14057 Several clarifications regarding v7/v8 API/ABI support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@775 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-03 08:55:36 +00:00
DRC
f7737c3f76 Several clarifications regarding v7/v8 API/ABI support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@775 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-03 08:55:36 +00:00
DRC
92eb806f1d Fix issue whereby libjpeg-turbo would report "fractional sampling not implemented" when attempting to use decompression scaling with a non-power-of-2 scaling ratio and a JPEG file that was compressed using an odd form of subsampling, such as 3x2. 2012-02-03 06:55:26 +00:00
DRC
c8fb758bc2 Fix issue whereby libjpeg-turbo would report "fractional sampling not implemented" when attempting to use decompression scaling with a non-power-of-2 scaling ratio and a JPEG file that was compressed using an odd form of subsampling, such as 3x2.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@774 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-03 06:55:26 +00:00
DRC
a12d14eb90 Fix issue whereby libjpeg-turbo would report "fractional sampling not implemented" when attempting to use decompression scaling with a non-power-of-2 scaling ratio and a JPEG file that was compressed using an odd form of subsampling, such as 3x2.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@774 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-03 06:55:26 +00:00
DRC
dbfa2648d8 Accelerated 4:2:2 upsampling routine for ARM (improves performance ~20-30% when decompressing 4:2:2 JPEGs using fancy upsampling) 2012-02-02 22:32:45 +00:00
DRC
be12e1dec5 Accelerated 4:2:2 upsampling routine for ARM (improves performance ~20-30% when decompressing 4:2:2 JPEGs using fancy upsampling)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@773 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-02 22:32:45 +00:00
DRC
3ee09f164f Accelerated 4:2:2 upsampling routine for ARM (improves performance ~20-30% when decompressing 4:2:2 JPEGs using fancy upsampling)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@773 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-02 22:32:45 +00:00
DRC
50b6c75d9d Oops. Need to use -nosmooth so that the output matches the reference images generated by jpeg-8 2012-02-01 02:49:10 +00:00
DRC
cf775bf789 Oops. Need to use -nosmooth so that the output matches the reference images generated by jpeg-8
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@772 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-01 02:49:10 +00:00
DRC
53df93d14a Oops. Need to use -nosmooth so that the output matches the reference images generated by jpeg-8
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@772 632fc199-4ca6-4c93-a231-07263d6284db
2012-02-01 02:49:10 +00:00
DRC
e74d1c77ea Add more extensive TurboJPEG regression tests 2012-01-31 11:38:13 +00:00
DRC
cb6157be7a Add more extensive TurboJPEG regression tests
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@771 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 11:38:13 +00:00
DRC
5e2215842c Add more extensive TurboJPEG regression tests
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@771 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 11:38:13 +00:00
DRC
016f5cdbcf Add tests for the additional scaling factors 2012-01-31 11:09:11 +00:00
DRC
0af8d67bd5 Add tests for the additional scaling factors
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@770 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 11:09:11 +00:00
DRC
7ef20bf0a6 Add tests for the additional scaling factors
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@770 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 11:09:11 +00:00
DRC
40feae60f4 Fix 'make dist' 2012-01-31 10:49:23 +00:00
DRC
7ccb00701f Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@769 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 10:49:23 +00:00
DRC
e840aab1fa Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@769 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 10:49:23 +00:00
DRC
df1fccf695 Merge copyright messages into one string and change the run-time messages to avoid confusion (we are not technically based on the latest libjpeg, although we do borrow some code from it) 2012-01-31 10:47:02 +00:00
DRC
4a2cdc26be Merge copyright messages into one string and change the run-time messages to avoid confusion (we are not technically based on the latest libjpeg, although we do borrow some code from it)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@768 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 10:47:02 +00:00
DRC
f58669bc0d Merge copyright messages into one string and change the run-time messages to avoid confusion (we are not technically based on the latest libjpeg, although we do borrow some code from it)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@768 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 10:47:02 +00:00
DRC
2f7d48a87e Combine all of the scaling tests using a for loop 2012-01-31 10:43:56 +00:00
DRC
3a5e362bd3 Combine all of the scaling tests using a for loop
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@767 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 10:43:56 +00:00
DRC
ce2fed003b Combine all of the scaling tests using a for loop
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@767 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 10:43:56 +00:00
DRC
1d5b1cf320 Merge copyright messages into one string and change the run-time messages to avoid confusion (we are not technically based on the latest libjpeg, although we do borrow some code from it)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@766 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 10:39:29 +00:00
DRC
da2b560b34 Incorporate a few upstream doc changes; grammar police; wordsmithing; Move -arithmetic into "switches for advanced users"; Additional documentation for IDCT scaling extensions 2012-01-31 10:19:29 +00:00
DRC
66a69f04c6 Incorporate a few upstream doc changes; grammar police; wordsmithing; Move -arithmetic into "switches for advanced users"; Additional documentation for IDCT scaling extensions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@765 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 10:19:29 +00:00
DRC
9542ab205c Incorporate a few upstream doc changes; grammar police; wordsmithing; Move -arithmetic into "switches for advanced users"; Additional documentation for IDCT scaling extensions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@765 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 10:19:29 +00:00
DRC
ccd1bfdd31 Incorporate a few upstream doc changes; grammar police; wordsmithing; Move -arithmetic into "switches for advanced users"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@764 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 09:53:46 +00:00
DRC
866e6ffeca Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@763 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 08:00:50 +00:00
DRC
9cd4e4b026 Add more extensive TurboJPEG regression tests
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@762 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 07:56:44 +00:00
DRC
faff5f4891 Move test images into their own subdirectory 2012-01-31 05:47:07 +00:00
DRC
7ab0364a37 Move test images into their own subdirectory
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@761 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 05:47:07 +00:00
DRC
580cdcd9bb Move test images into their own subdirectory
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@761 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 05:47:07 +00:00
DRC
a112f12efd Compiler warnings 2012-01-31 05:27:41 +00:00
DRC
fb6c27e4e2 Compiler warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@760 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 05:27:41 +00:00
DRC
44ee340ab5 Compiler warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@760 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 05:27:41 +00:00
DRC
6ebf110355 Move test images into their own subdirectory
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@759 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 04:58:26 +00:00
DRC
d65d99a9f5 Compiler warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@758 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-31 03:39:23 +00:00
DRC
5e805d2f4b Expose new scaling factors in TurboJPEG API 2012-01-28 06:49:56 +00:00
DRC
ab2df6ea1b Expose new scaling factors in TurboJPEG API
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@757 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-28 06:49:56 +00:00
DRC
688a25c4cc Expose new scaling factors in TurboJPEG API
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@757 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-28 06:49:56 +00:00
DRC
030b6fc1c1 Document the new scaling factors 2012-01-28 06:49:22 +00:00
DRC
33eca7e4f2 Document the new scaling factors
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@756 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-28 06:49:22 +00:00
DRC
84d37a09b6 Document the new scaling factors
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@756 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-28 06:49:22 +00:00
DRC
e006f5c427 Oops. Height of output buffer should equal scaled height, not JPEG height.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@755 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-28 06:31:44 +00:00
DRC
88d2e0d792 Oops. Height of output buffer should equal scaled height, not JPEG height. 2012-01-28 06:31:21 +00:00
DRC
313a09b4b7 Oops. Height of output buffer should equal scaled height, not JPEG height.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@754 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-28 06:31:21 +00:00
DRC
ea1ca03b75 Oops. Height of output buffer should equal scaled height, not JPEG height.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@754 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-28 06:31:21 +00:00
DRC
8644ed2a04 Support additional scaling factors when decompressing 2012-01-28 01:48:07 +00:00
DRC
27fb3fc589 Support additional scaling factors when decompressing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@753 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-28 01:48:07 +00:00
DRC
67403cc55f Support additional scaling factors when decompressing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@753 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-28 01:48:07 +00:00
DRC
a6b5eab50f Oops. Need to handle cases in which num_components > n 2012-01-28 01:19:52 +00:00
DRC
8660bcba72 Oops. Need to handle cases in which num_components > n
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@752 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-28 01:19:52 +00:00
DRC
b7478432f5 Oops. Need to handle cases in which num_components > n
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@752 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-28 01:19:52 +00:00
DRC
8c8124bf51 Oops. Need to handle cases in which num_components > n
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@751 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-28 01:19:23 +00:00
DRC
9d14254225 Bump version to 1.2.80 (1.3 alpha1) to prepare for receiving new features 2012-01-27 22:12:49 +00:00
DRC
bf0bdac1d3 Bump version to 1.2.80 (1.3 alpha1) to prepare for receiving new features
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@750 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-27 22:12:49 +00:00
DRC
30913542c0 Be clear that we are only emulating the libjpeg v7/v8 API/ABI, not the library itself.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@749 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-27 09:53:33 +00:00
DRC
311728cd98 Be clear that we are only emulating the libjpeg v7/v8 API/ABI, not the library itself. 2012-01-27 09:52:20 +00:00
DRC
ed5430ce9a Be clear that we are only emulating the libjpeg v7/v8 API/ABI, not the library itself.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@748 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-27 09:52:20 +00:00
DRC
44e6c174ee 2012-01-27 09:42:51 +00:00
DRC
b6b30676a3 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@746 632fc199-4ca6-4c93-a231-07263d6284db 2012-01-27 09:42:26 +00:00
DRC
d657ba6093 Move -arithmetic into "switches for advanced users"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@745 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-27 09:41:20 +00:00
DRC
d2e0417960 Move -arithmetic into "switches for advanced users" 2012-01-27 09:39:46 +00:00
DRC
16c6e26e4b Update upstream e-mail address
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@743 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-27 09:28:14 +00:00
DRC
aa31d1d14b Update upstream e-mail address 2012-01-27 09:27:20 +00:00
DRC
a5dcab663a Create 1.2.x branch
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@741 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-27 05:46:31 +00:00
DRC
12781cb555 Properly decompress erroneous CMYK/YCCK images whose K component has an ID of 1 instead of 4 (this is to support SumatraPDF)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@740 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-27 01:23:20 +00:00
DRC
4cf0357c0f Properly decompress erroneous CMYK/YCCK images whose K component has an ID of 1 instead of 4 (this is to support SumatraPDF) 2012-01-27 01:23:20 +00:00
DRC
a7466c9d86 Move INLINE macro into config.h. That's really where it belongs anyhow, since it is used only internally, and putting it in jconfig.h was causing problems with DevIL.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@739 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-26 22:20:31 +00:00
DRC
0f654d4674 Move INLINE macro into config.h. That's really where it belongs anyhow, since it is used only internally, and putting it in jconfig.h was causing problems with DevIL. 2012-01-26 22:20:31 +00:00
DRC
2d4816591f Merge spacing changes from VirtualGL
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@738 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-17 23:11:06 +00:00
DRC
307156de33 Merge wordsmithing/grammar fixes from trunk
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@737 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-17 23:09:24 +00:00
DRC
81a50f71a3 Grammar police
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@736 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-17 22:56:22 +00:00
DRC
14faccfa93 Grammar police 2012-01-17 22:56:22 +00:00
DRC
2c62da3c6c Subtle point, but TurboJPEG is the API and TurboJPEG/OSS is the library implementing that API.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@735 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-17 22:55:03 +00:00
DRC
e420e3a19c Subtle point, but TurboJPEG is the API and TurboJPEG/OSS is the library implementing that API. 2012-01-17 22:55:03 +00:00
DRC
efe28cec4b Compiler warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@734 632fc199-4ca6-4c93-a231-07263d6284db
2012-01-17 11:48:38 +00:00
DRC
5bd7a89f6a Compiler warnings 2012-01-17 11:48:38 +00:00
DRC
b76c8404e3 Add program that demonstrates how to check for the existence of the colorspace extensions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@733 632fc199-4ca6-4c93-a231-07263d6284db
2011-12-19 15:01:55 +00:00
DRC
230440c8e7 Add program that demonstrates how to check for the existence of the colorspace extensions 2011-12-19 15:01:55 +00:00
DRC
67ce3b2352 Added new alpha channel colorspace constants/pixel formats, so applications can specify that they need the unused byte in a 4-component RGB output buffer set to 0xFF when decompressing.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@732 632fc199-4ca6-4c93-a231-07263d6284db
2011-12-19 02:21:03 +00:00
DRC
c1e4151607 Added new alpha channel colorspace constants/pixel formats, so applications can specify that they need the unused byte in a 4-component RGB output buffer set to 0xFF when decompressing. 2011-12-19 02:21:03 +00:00
DRC
ab64b62c6b Add LIBJPEG_TURBO_VERSION macro for checking the libjpeg-turbo version at compile time
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@731 632fc199-4ca6-4c93-a231-07263d6284db
2011-12-18 16:29:35 +00:00
DRC
67420f1fa1 Add LIBJPEG_TURBO_VERSION macro for checking the libjpeg-turbo version at compile time 2011-12-18 16:29:35 +00:00
DRC
80803ae5fe "which"="that"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@730 632fc199-4ca6-4c93-a231-07263d6284db
2011-12-15 13:12:59 +00:00
DRC
51b8cd674a "which"="that" 2011-12-15 13:12:59 +00:00
DRC
795e6ad334 Fixed non-fatal out-of-bounds read in SSE2 SIMD code reported by valgrind when decompressing a JPEG image to a bitmap buffer whose size was not a multiple of 16 bytes.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@729 632fc199-4ca6-4c93-a231-07263d6284db
2011-12-01 11:14:18 +00:00
DRC
c412184bd8 Fixed non-fatal out-of-bounds read in SSE2 SIMD code reported by valgrind when decompressing a JPEG image to a bitmap buffer whose size was not a multiple of 16 bytes.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@728 632fc199-4ca6-4c93-a231-07263d6284db
2011-12-01 11:11:29 +00:00
DRC
ebfe9e4a7b Fixed non-fatal out-of-bounds read in SSE2 SIMD code reported by valgrind when decompressing a JPEG image to a bitmap buffer whose size was not a multiple of 16 bytes.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@727 632fc199-4ca6-4c93-a231-07263d6284db
2011-12-01 10:58:36 +00:00
DRC
90d7c850fa Fixed non-fatal out-of-bounds read in SSE2 SIMD code reported by valgrind when decompressing a JPEG image to a bitmap buffer whose size was not a multiple of 16 bytes. 2011-12-01 10:58:36 +00:00
DRC
105f9a94ed Expose NASM variable in ccmake
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@726 632fc199-4ca6-4c93-a231-07263d6284db
2011-11-29 09:02:10 +00:00
DRC
0f905d35c2 Expose NASM variable in ccmake
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@725 632fc199-4ca6-4c93-a231-07263d6284db
2011-11-29 09:01:23 +00:00
DRC
8ec31e2fb2 Expose NASM variable in ccmake 2011-11-29 09:01:23 +00:00
DRC
1ca924a550 NASM automatically adds the current directory to the include path, but YASM doesn't, so we need to explicitly add it.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@724 632fc199-4ca6-4c93-a231-07263d6284db
2011-11-29 08:58:27 +00:00
DRC
e0eea893be NASM automatically adds the current directory to the include path, but YASM doesn't, so we need to explicitly add it. 2011-11-29 08:58:27 +00:00
DRC
b56ae3d7fa 1.2.0
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@723 632fc199-4ca6-4c93-a231-07263d6284db
2011-11-29 08:53:32 +00:00
DRC
f2e5e59720 1.2.0 2011-11-29 08:53:32 +00:00
DRC
77fee43a02 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@722 632fc199-4ca6-4c93-a231-07263d6284db 2011-11-01 17:14:22 +00:00
DRC
1df063383d 2011-11-01 17:14:22 +00:00
DRC
7bc3fb51e3 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@721 632fc199-4ca6-4c93-a231-07263d6284db 2011-10-28 06:45:53 +00:00
DRC
1b0a8cdd79 2011-10-28 06:45:53 +00:00
DRC
7080ea3c16 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@720 632fc199-4ca6-4c93-a231-07263d6284db 2011-10-28 06:45:06 +00:00
DRC
6fa79e5dbf 2011-10-28 06:45:06 +00:00
DRC
3c21b08ef1 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@718 632fc199-4ca6-4c93-a231-07263d6284db 2011-10-28 06:25:13 +00:00
DRC
ed6a876521 2011-10-28 06:25:13 +00:00
DRC
a006fbab0b Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@717 632fc199-4ca6-4c93-a231-07263d6284db
2011-10-27 23:25:28 +00:00
DRC
16b1fdf84d Fix 'make dist' 2011-10-27 23:25:28 +00:00
DRC
89c59dd669 iOS doesn't allow dynamic linking against non-system libs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@716 632fc199-4ca6-4c93-a231-07263d6284db
2011-10-27 20:40:21 +00:00
DRC
d8b3658cdf iOS doesn't allow dynamic linking against non-system libs 2011-10-27 20:40:21 +00:00
DRC
94755ceb05 ARM + iOS instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@715 632fc199-4ca6-4c93-a231-07263d6284db
2011-10-19 05:13:27 +00:00
DRC
d475ea928b ARM + iOS instructions 2011-10-19 05:13:27 +00:00
DRC
8e11a05bd6 Make sure we don't call jpeg_destroy_[de]compress() on an uninitialized struct, as bad mojo can ensue.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@714 632fc199-4ca6-4c93-a231-07263d6284db
2011-10-18 22:07:13 +00:00
DRC
c2e128f8c5 Make sure we don't call jpeg_destroy_[de]compress() on an uninitialized struct, as bad mojo can ensue. 2011-10-18 22:07:13 +00:00
DRC
20c7dbc64f Fix compiler warning
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@713 632fc199-4ca6-4c93-a231-07263d6284db
2011-10-18 22:06:22 +00:00
DRC
9b0741512e Fix compiler warning 2011-10-18 22:06:22 +00:00
DRC
06420c42c4 Oops. Don't try to use custom filter at the C level unless it is defined at the Java level.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@712 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-26 18:46:09 +00:00
DRC
211ab00fc4 Oops. Don't try to use custom filter at the C level unless it is defined at the Java level. 2011-09-26 18:46:09 +00:00
DRC
f69dc28888 Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@711 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-20 18:20:43 +00:00
DRC
de5d1ec4e4 Wordsmithing 2011-09-20 18:20:43 +00:00
DRC
4ad6003253 Always link tjbench against jpeg-static instead of the JPEG DLL, since we are only using libjpeg for bitmap I/O
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@710 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-20 05:41:54 +00:00
DRC
91ad5467ab Always link tjbench against jpeg-static instead of the JPEG DLL, since we are only using libjpeg for bitmap I/O 2011-09-20 05:41:54 +00:00
DRC
6b968b28ae Add TJCustomFilter to Windows build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@709 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-20 05:35:31 +00:00
DRC
5d1cec9a79 Add TJCustomFilter to Windows build 2011-09-20 05:35:31 +00:00
DRC
870fd8f1bb Add a couple of missing pages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@708 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-20 05:04:06 +00:00
DRC
bc1e5525b0 Add a couple of missing pages 2011-09-20 05:04:06 +00:00
DRC
f546711076 Implement custom filter callback in Java
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@707 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-20 05:02:19 +00:00
DRC
f343d7332a Implement custom filter callback in Java 2011-09-20 05:02:19 +00:00
DRC
835b76fb65 Fix 'make docs' with out-of-tree builds
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@706 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-19 18:58:21 +00:00
DRC
1109f68db6 Fix 'make docs' with out-of-tree builds 2011-09-19 18:58:21 +00:00
DRC
c6fa5ba028 Fix 'make headers' with out-of-tree builds
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@705 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-19 18:47:00 +00:00
DRC
50b3728013 Fix 'make headers' with out-of-tree builds 2011-09-19 18:47:00 +00:00
DRC
57a3736243 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@704 632fc199-4ca6-4c93-a231-07263d6284db 2011-09-17 00:41:14 +00:00
DRC
42df487a35 2011-09-17 00:41:14 +00:00
DRC
7bf04d399e Implement a custom DCT filter callback for lossless transforms
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@703 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-17 00:18:31 +00:00
DRC
85a878bf07 Implement a custom DCT filter callback for lossless transforms 2011-09-17 00:18:31 +00:00
DRC
9a4570a501 Eliminate "main is usually a function" warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@702 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-10 17:30:36 +00:00
DRC
4a87a4a6bd Eliminate "main is usually a function" warnings 2011-09-10 17:30:36 +00:00
DRC
3fbf08bb61 Fill unused byte with 0xFF on Windows as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@701 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-09 18:38:20 +00:00
DRC
066c44b341 Fill unused byte with 0xFF on Windows as well 2011-09-09 18:38:20 +00:00
DRC
d89e01f5ce Use 8-bit write to avoid potential pointer aliasing issues (also, at least on x86, it's faster than the previous approach.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@700 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-09 18:15:53 +00:00
DRC
ba8383452c Use 8-bit write to avoid potential pointer aliasing issues (also, at least on x86, it's faster than the previous approach.) 2011-09-09 18:15:53 +00:00
DRC
c08e8c15bc When decompressing to a 4-byte RGB buffer, set the unused byte to 0xFF so it can be interpreted as an opaque alpha channel.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@699 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-08 23:54:40 +00:00
DRC
d345306ecc When decompressing to a 4-byte RGB buffer, set the unused byte to 0xFF so it can be interpreted as an opaque alpha channel. 2011-09-08 23:54:40 +00:00
DRC
b4570bbf8c Improve performance of non-SIMD color conversion routines and use global constants to define colorspace extension parameters
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@698 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-07 06:31:00 +00:00
DRC
edf4d637e1 Improve performance of non-SIMD color conversion routines and use global constants to define colorspace extension parameters 2011-09-07 06:31:00 +00:00
DRC
f12bb305c2 Fix compile error when JCS_EXTENSIONS!=1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@697 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-07 05:03:18 +00:00
DRC
c02c1fa775 Fix compile error when JCS_EXTENSIONS!=1 2011-09-07 05:03:18 +00:00
DRC
22bfd9c40f Use descriptions from libjpeg v8
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@696 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-07 03:26:06 +00:00
DRC
a20f5d026a Use descriptions from libjpeg v8 2011-09-07 03:26:06 +00:00
DRC
36edad7a4e Back out CMYK-to-RGB conversions. There is really no way to properly do CMYK-to-RGB conversion without color management, which is out of scope for libjpeg-turbo. Applications wishing to do a trivial conversion, such as was implemented in these routines, can simply request CMYK output and do the trivial conversion themselves (or, even better, use an OSS color management library.) We should not encourage the use of in-library CMYK-to-RGB conversion as a substitute for color management.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@695 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-07 02:32:02 +00:00
DRC
d3aa5c9f94 Back out CMYK-to-RGB conversions. There is really no way to properly do CMYK-to-RGB conversion without color management, which is out of scope for libjpeg-turbo. Applications wishing to do a trivial conversion, such as was implemented in these routines, can simply request CMYK output and do the trivial conversion themselves (or, even better, use an OSS color management library.) We should not encourage the use of in-library CMYK-to-RGB conversion as a substitute for color management. 2011-09-07 02:32:02 +00:00
DRC
b071f01cbb Update Nokia contact info
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@694 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-06 18:58:22 +00:00
DRC
e808882c95 Update Nokia contact info 2011-09-06 18:58:22 +00:00
DRC
ad6955d46a Improve performance of IFAST iDCT by changing the order of transpose and descale steps
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@693 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-06 18:57:53 +00:00
DRC
a02a9af565 Improve performance of IFAST iDCT by changing the order of transpose and descale steps 2011-09-06 18:57:53 +00:00
DRC
5129e3960f Make ARM ISLOW iDCT faster on typical cases, and eliminate the possibility of 16-bit overflows when handling arbitrary coefficients.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@692 632fc199-4ca6-4c93-a231-07263d6284db
2011-09-06 18:55:45 +00:00
DRC
061f96dc7d Make ARM ISLOW iDCT faster on typical cases, and eliminate the possibility of 16-bit overflows when handling arbitrary coefficients. 2011-09-06 18:55:45 +00:00
DRC
98a44fe07b Improve the performance of YCbCr to RGB conversion on ARM
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@691 632fc199-4ca6-4c93-a231-07263d6284db
2011-08-24 23:27:44 +00:00
DRC
00e258dedd Improve the performance of YCbCr to RGB conversion on ARM 2011-08-24 23:27:44 +00:00
DRC
ce4e3e8690 NEON-accelerated slow integer inverse DCT
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@690 632fc199-4ca6-4c93-a231-07263d6284db
2011-08-22 13:48:01 +00:00
DRC
7672bd3ac5 NEON-accelerated slow integer inverse DCT 2011-08-22 13:48:01 +00:00
DRC
82bd52196d NEON-accelerated quantization
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@689 632fc199-4ca6-4c93-a231-07263d6284db
2011-08-17 21:00:59 +00:00
DRC
00a69f142a NEON-accelerated quantization 2011-08-17 21:00:59 +00:00
DRC
e5c6eb583f git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@688 632fc199-4ca6-4c93-a231-07263d6284db 2011-08-17 20:59:56 +00:00
DRC
adce3b2eeb 2011-08-17 20:59:56 +00:00
DRC
a2fdd0c9ab Use integer arithmetic for CMYK-to-RGB conversions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@687 632fc199-4ca6-4c93-a231-07263d6284db
2011-08-16 01:39:05 +00:00
DRC
6070e60924 Use integer arithmetic for CMYK-to-RGB conversions 2011-08-16 01:39:05 +00:00
DRC
4b024a62b2 Improve performance of ARM NEON IFAST iDCT
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@686 632fc199-4ca6-4c93-a231-07263d6284db
2011-08-15 08:36:51 +00:00
DRC
dbb92f2eee Improve performance of ARM NEON IFAST iDCT 2011-08-15 08:36:51 +00:00
DRC
0dc7c82f35 Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@685 632fc199-4ca6-4c93-a231-07263d6284db
2011-08-12 19:31:09 +00:00
DRC
33ddbcc5b3 Oops 2011-08-12 19:31:09 +00:00
DRC
3d0fe946e5 Add Nokia copyright (for ARM NEON code)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@684 632fc199-4ca6-4c93-a231-07263d6284db
2011-08-12 19:30:21 +00:00
DRC
9227c0d77b Add Nokia copyright (for ARM NEON code) 2011-08-12 19:30:21 +00:00
DRC
8a367177fa git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@683 632fc199-4ca6-4c93-a231-07263d6284db 2011-08-12 19:28:28 +00:00
DRC
29b738d9b6 2011-08-12 19:28:28 +00:00
DRC
7a9376c114 ARM NEON-accelerated RGB-to-YCbCr conversion
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@682 632fc199-4ca6-4c93-a231-07263d6284db
2011-08-12 19:27:20 +00:00
DRC
22b4359e42 ARM NEON-accelerated RGB-to-YCbCr conversion 2011-08-12 19:27:20 +00:00
DRC
2a47df6627 Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@681 632fc199-4ca6-4c93-a231-07263d6284db
2011-08-11 02:17:17 +00:00
DRC
35c1909f0b Oops 2011-08-11 02:17:17 +00:00
DRC
51cf51a41c CMYK/YCCK support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@680 632fc199-4ca6-4c93-a231-07263d6284db
2011-08-11 02:16:44 +00:00
DRC
8de30b8c28 CMYK/YCCK support 2011-08-11 02:16:44 +00:00
DRC
0f65030297 Support for accelerated forward DCT using ARM NEON instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@679 632fc199-4ca6-4c93-a231-07263d6284db
2011-08-11 02:15:31 +00:00
DRC
14dfb6b81d Support for accelerated forward DCT using ARM NEON instructions 2011-08-11 02:15:31 +00:00
DRC
b740054f3c Support for accelerated forward DCT using ARM NEON instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@678 632fc199-4ca6-4c93-a231-07263d6284db
2011-08-10 23:31:13 +00:00
DRC
ce02d1d62a Support for accelerated forward DCT using ARM NEON instructions 2011-08-10 23:31:13 +00:00
DRC
9c4590e37b git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@677 632fc199-4ca6-4c93-a231-07263d6284db 2011-07-26 09:22:16 +00:00
DRC
157c7635db 2011-07-26 09:22:16 +00:00
DRC
a9b35c965e Don't include JAR file in 32-bit compatibility package
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@676 632fc199-4ca6-4c93-a231-07263d6284db
2011-07-19 09:52:11 +00:00
DRC
b10d6c827d Don't include JAR file in 32-bit compatibility package 2011-07-19 09:52:11 +00:00
DRC
1208d50fa6 Trying to out-clever ourselves by having autotools generate the deb-control file broke the 32-bit supplementary DEB, so revert to the method we used in LJT 1.0 to generate this file.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@675 632fc199-4ca6-4c93-a231-07263d6284db
2011-07-19 09:29:01 +00:00
DRC
cf446479aa Trying to out-clever ourselves by having autotools generate the deb-control file broke the 32-bit supplementary DEB, so revert to the method we used in LJT 1.0 to generate this file. 2011-07-19 09:29:01 +00:00
DRC
68a086a147 Trying to out-clever ourselves by having autotools generate the deb-control file broke the 32-bit supplementary DEB, so revert to the method we used in LJT 1.0 to generate this file.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@674 632fc199-4ca6-4c93-a231-07263d6284db
2011-07-19 09:26:23 +00:00
DRC
2091870c9f Oops. Apparently forgot to change the description when borrowing this from VirtualGL
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@673 632fc199-4ca6-4c93-a231-07263d6284db
2011-07-19 09:15:20 +00:00
DRC
e835ee3340 Windows doesn't have random()
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@672 632fc199-4ca6-4c93-a231-07263d6284db
2011-07-15 10:06:56 +00:00
DRC
4658c17c9e Windows doesn't have random() 2011-07-15 10:06:56 +00:00
DRC
dc2697da3a Windows doesn't have random()
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@671 632fc199-4ca6-4c93-a231-07263d6284db
2011-07-15 09:55:36 +00:00
DRC
868ca2b377 Use random noise to ensure that the JPEG image generated in the buffer size test exceeds the size of the uncompressed source image.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@670 632fc199-4ca6-4c93-a231-07263d6284db
2011-07-15 05:29:10 +00:00
DRC
724c56b46a Use random noise to ensure that the JPEG image generated in the buffer size test exceeds the size of the uncompressed source image.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@669 632fc199-4ca6-4c93-a231-07263d6284db
2011-07-12 06:22:06 +00:00
DRC
869095444e Use random noise to ensure that the JPEG image generated in the buffer size test exceeds the size of the uncompressed source image. 2011-07-12 06:22:06 +00:00
DRC
9b49f0e4c7 Re-work TJBUFSIZE() to take into account the level of chrominance subsampling
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@668 632fc199-4ca6-4c93-a231-07263d6284db
2011-07-12 03:17:23 +00:00
DRC
489864aefa Re-work TJBUFSIZE() to take into account the level of chrominance subsampling 2011-07-12 03:17:23 +00:00
DRC
fa9ff8e88c Restore compatibility with the jpeg-6b error enum, even if arithmetic coding is enabled.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@667 632fc199-4ca6-4c93-a231-07263d6284db
2011-06-21 06:17:10 +00:00
DRC
bd1ef431b3 Restore compatibility with the jpeg-6b error enum, even if arithmetic coding is enabled.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@666 632fc199-4ca6-4c93-a231-07263d6284db
2011-06-21 06:13:16 +00:00
DRC
2bfd5d8c7d Restore compatibility with the jpeg-6b error enum, even if arithmetic coding is enabled. 2011-06-21 06:13:16 +00:00
DRC
ffdb8f22f6 Prevent jmorecfg.h from re-defining INT32 and INT16 if those types have already been defined by the Windows system headers.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@665 632fc199-4ca6-4c93-a231-07263d6284db
2011-06-21 04:59:41 +00:00
DRC
b7120ca547 Prevent jmorecfg.h from re-defining INT32 and INT16 if those types have already been defined by the Windows system headers.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@664 632fc199-4ca6-4c93-a231-07263d6284db
2011-06-21 04:57:32 +00:00
DRC
eed08614a6 Prevent jmorecfg.h from re-defining INT32 and INT16 if those types have already been defined by the Windows system headers.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@663 632fc199-4ca6-4c93-a231-07263d6284db
2011-06-21 04:56:02 +00:00
DRC
71be635a89 Prevent jmorecfg.h from re-defining INT32 and INT16 if those types have already been defined by the Windows system headers. 2011-06-21 04:56:02 +00:00
DRC
8c60d22ff5 NEON-optimized 2x2 and 4x4 scaled iDCTs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@662 632fc199-4ca6-4c93-a231-07263d6284db
2011-06-17 21:12:58 +00:00
DRC
e3f7e75525 NEON-optimized 2x2 and 4x4 scaled iDCTs 2011-06-17 21:12:58 +00:00
DRC
c52c55670a git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@661 632fc199-4ca6-4c93-a231-07263d6284db 2011-06-15 02:43:42 +00:00
DRC
b6fb92eeff 2011-06-15 02:43:42 +00:00
DRC
e54b755ab8 iOS ARM support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@660 632fc199-4ca6-4c93-a231-07263d6284db
2011-06-14 22:17:37 +00:00
DRC
04dc101077 iOS ARM support 2011-06-14 22:17:37 +00:00
DRC
4346f91fcb iOS ARM support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@659 632fc199-4ca6-4c93-a231-07263d6284db
2011-06-14 22:16:50 +00:00
DRC
d02c734a19 iOS ARM support 2011-06-14 22:16:50 +00:00
DRC
cf137ac46a 1.1.2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@657 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-31 20:23:07 +00:00
DRC
b8c6ee38b0 Fix a minor ABI incompatibility caused by the introduction of new error constants into the enum in jerror.h.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@656 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-31 20:22:37 +00:00
DRC
9d5f6b9e33 Fix a minor ABI incompatibility caused by the introduction of new error constants into the enum in jerror.h. 2011-05-31 20:22:37 +00:00
DRC
0571e17c55 Fix a minor ABI incompatibility caused by the introduction of new error constants into the enum in jerror.h.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@655 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-31 20:17:16 +00:00
DRC
215aa8b78b Re-factor checkBufYUV() function to more closely resemble re-factored checkBuf() function
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@654 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-27 02:10:42 +00:00
DRC
de8be2e9f0 Re-factor checkBufYUV() function to more closely resemble re-factored checkBuf() function 2011-05-27 02:10:42 +00:00
DRC
ac906c5308 Change the name of the pre-computed bits table to match its actual function
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@653 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-26 11:28:22 +00:00
DRC
64d644bcc3 Change the name of the pre-computed bits table to match its actual function 2011-05-26 11:28:22 +00:00
DRC
418dbdff66 turbojpegl.c=turbojpeg.c
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@652 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-26 10:45:06 +00:00
DRC
395bf7e218 turbojpegl.c=turbojpeg.c 2011-05-26 10:45:06 +00:00
DRC
bd86b76e94 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@651 632fc199-4ca6-4c93-a231-07263d6284db 2011-05-25 06:09:09 +00:00
DRC
7e3fd2faf5 jpegtran on Windows needs the same fix as cjpeg and djpeg to eliminate errors when I/O redirection is used.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@650 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-25 06:04:43 +00:00
DRC
e9f9ec4a4e jpegtran on Windows needs the same fix as cjpeg and djpeg to eliminate errors when I/O redirection is used.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@649 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-25 06:02:50 +00:00
DRC
67810edcf7 jpegtran on Windows needs the same fix as cjpeg and djpeg to eliminate errors when I/O redirection is used. 2011-05-25 06:02:50 +00:00
DRC
4db92add1b Need to set TJFLAG_NOREALLOC for tjTransform()
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@648 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-25 04:52:25 +00:00
DRC
cd39e3abc1 Need to set TJFLAG_NOREALLOC for tjTransform() 2011-05-25 04:52:25 +00:00
DRC
94f0e03f90 Oops. Add the already-advertised -bmp option
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@647 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-25 04:35:53 +00:00
DRC
14ae3e4959 Oops. Add the already-advertised -bmp option 2011-05-25 04:35:53 +00:00
DRC
296c71ba0f MinGW seems to barf unless jinclude.h is included before jpeglib.h
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@646 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-25 04:12:52 +00:00
DRC
ac31113152 MinGW seems to barf unless jinclude.h is included before jpeglib.h 2011-05-25 04:12:52 +00:00
DRC
312cd79456 "jpegut"="tjunittest" & "jpgtest"="tjbench"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@645 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-25 04:12:22 +00:00
DRC
42c015d5a2 "jpegut"="tjunittest" & "jpgtest"="tjbench" 2011-05-25 04:12:22 +00:00
DRC
b8b359ae97 "jpegut"="tjunittest" & "jpgtest"="tjbench"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@644 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-25 03:54:56 +00:00
DRC
49e17cd6a7 "jpegut"="tjunittest" & "jpgtest"="tjbench" 2011-05-25 03:54:56 +00:00
DRC
3185cb94f1 "jpegut"="tjunittest" & "jpgtest"="tjbench"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@643 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-25 03:52:22 +00:00
DRC
5e3346ba58 "jpegut"="tjunittest" & "jpgtest"="tjbench" 2011-05-25 03:52:22 +00:00
DRC
7f73d9b6ad Fix OS X uninstaller
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@642 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-25 03:51:29 +00:00
DRC
2bc15f6bac Fix OS X uninstaller 2011-05-25 03:51:29 +00:00
DRC
565a5bd5f5 Add dynamic allocation test; Fix compression ratio output in quiet mode; Fix memory leak
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@641 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-25 02:58:21 +00:00
DRC
1d4c5744a8 Add dynamic allocation test; Fix compression ratio output in quiet mode; Fix memory leak 2011-05-25 02:58:21 +00:00
DRC
9a746ad485 Remove wxWindows license files from packages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@640 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 17:33:06 +00:00
DRC
24b83b5b0c Remove wxWindows license files from packages 2011-05-24 17:33:06 +00:00
DRC
44eb47ef2b Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@639 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 17:18:11 +00:00
DRC
8e732e32be Fix 'make dist' 2011-05-24 17:18:11 +00:00
DRC
9f5320fd6f Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@638 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 17:14:43 +00:00
DRC
e3086351f9 Fix 'make dist' 2011-05-24 17:14:43 +00:00
DRC
18821f89a7 Fix 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@637 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 17:07:51 +00:00
DRC
3ee533eb7c Fix 'make dist' 2011-05-24 17:07:51 +00:00
DRC
4348464a2f Fix build on Windows
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@636 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 17:03:51 +00:00
DRC
626f00e5c8 Fix build on Windows 2011-05-24 17:03:51 +00:00
DRC
d441107013 Added "See also" for tjAlloc() and tjFree()
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@635 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 17:00:15 +00:00
DRC
994f49d8c2 Added "See also" for tjAlloc() and tjFree() 2011-05-24 17:00:15 +00:00
DRC
6b76f75d2c Add new API functions, tjAlloc() and tjFree(), which allow memory to be allocated and freed using a method of the library's choosing. At the moment, the primary purpose for this is to avoid allocating/freeing memory across the DLL boundary on Windows.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@634 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 16:52:47 +00:00
DRC
411c62396d Add new API functions, tjAlloc() and tjFree(), which allow memory to be allocated and freed using a method of the library's choosing. At the moment, the primary purpose for this is to avoid allocating/freeing memory across the DLL boundary on Windows. 2011-05-24 16:52:47 +00:00
DRC
90215cca0c Fix memory leak in new TurboJPEG auto-reallocation mode
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@633 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 15:15:15 +00:00
DRC
4703b773af Fix memory leak in new TurboJPEG auto-reallocation mode 2011-05-24 15:15:15 +00:00
DRC
67d1fc1f7c Remove any references to the wxWindows Library License and VirtualGL copyrights
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@632 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 14:13:01 +00:00
DRC
2ff9d2a26d Remove any references to the wxWindows Library License and VirtualGL copyrights 2011-05-24 14:13:01 +00:00
DRC
b5624ee8b6 Remove any references to the wxWindows Library License and VirtualGL copyrights
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@631 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 14:12:07 +00:00
DRC
d25fe3fd18 Remove any references to the wxWindows Library License and VirtualGL copyrights 2011-05-24 14:12:07 +00:00
DRC
81f5f7c110 Refactor uninstall script. No legacy code remains, so relicense under BSD-style license. Remove uninstall app from package for now, until we can come up with a new version that doesn't have any legacy code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@630 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 13:59:14 +00:00
DRC
9682a6e036 Refactor uninstall script. No legacy code remains, so relicense under BSD-style license. Remove uninstall app from package for now, until we can come up with a new version that doesn't have any legacy code. 2011-05-24 13:59:14 +00:00
DRC
be49b8c0cf Refactored to use new TurboJPEG API and new BMP library + additional cleanup. There is no legacy code remaining, so the refactored version of the program has been re-licensed under a BSD-style license.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@629 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 13:41:27 +00:00
DRC
a501250666 Refactored to use new TurboJPEG API and new BMP library + additional cleanup. There is no legacy code remaining, so the refactored version of the program has been re-licensed under a BSD-style license. 2011-05-24 13:41:27 +00:00
DRC
cb6205a774 Add new API functions to JNI mapfile as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@628 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 13:37:37 +00:00
DRC
9bfb9ee536 Add new API functions to JNI mapfile as well 2011-05-24 13:37:37 +00:00
DRC
61d06e7133 Need stdlib.h to get NULL on Linux
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@627 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 13:37:01 +00:00
DRC
8338344cf8 Need stdlib.h to get NULL on Linux 2011-05-24 13:37:01 +00:00
DRC
ff78e37595 Don't require buffer size to be preset if using TJFLAG_NOREALLOC
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@626 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 10:17:32 +00:00
DRC
abeb01d5f1 Don't require buffer size to be preset if using TJFLAG_NOREALLOC 2011-05-24 10:17:32 +00:00
DRC
a29294a946 Use tjutil instead of rrutil
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@625 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 09:17:57 +00:00
DRC
16d4cc3b34 Use tjutil instead of rrutil 2011-05-24 09:17:57 +00:00
DRC
20c404d3b3 Add max, min functions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@624 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 09:17:43 +00:00
DRC
7f352fc982 Add max, min functions 2011-05-24 09:17:43 +00:00
DRC
3a1bb35117 Prevent header from being included multiple times
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@623 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 09:15:44 +00:00
DRC
34e538a8ca Prevent header from being included multiple times 2011-05-24 09:15:44 +00:00
DRC
0fc884a811 Completely refactor BMP library so that it takes advantage of the existing BMP and PPM load/save routines in libjpeg
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@622 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-24 09:13:17 +00:00
DRC
3fbb13e0cd Completely refactor BMP library so that it takes advantage of the existing BMP and PPM load/save routines in libjpeg 2011-05-24 09:13:17 +00:00
DRC
9792ce8947 Simplify initialization code (we don't have to explicitly initialize a component to 0, because the whole buffer has already been initialized to 0)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@621 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-23 05:50:07 +00:00
DRC
3bdddc666b Simplify initialization code (we don't have to explicitly initialize a component to 0, because the whole buffer has already been initialized to 0) 2011-05-23 05:50:07 +00:00
DRC
f962fbb44a Refactor slightly to match new C code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@620 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-23 05:49:08 +00:00
DRC
c2ddde57c4 Refactor slightly to match new C code 2011-05-23 05:49:08 +00:00
DRC
007a42cda4 Clean up error messages; Fix lossless transformation; General cleanup
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@619 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-22 13:55:56 +00:00
DRC
7a8cefdb71 Clean up error messages; Fix lossless transformation; General cleanup 2011-05-22 13:55:56 +00:00
DRC
a8b8b472b9 Refactored jpegut to test the new TurboJPEG API. There is no legacy code remaining, so the refactored version of the program has been re-licensed under a BSD-style license.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@618 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-22 13:55:17 +00:00
DRC
4fa973b836 Refactored jpegut to test the new TurboJPEG API. There is no legacy code remaining, so the refactored version of the program has been re-licensed under a BSD-style license. 2011-05-22 13:55:17 +00:00
DRC
25b995ad4d Clean up constants so that flags, pixel formats, etc. are clearly differentiated; Update documentation accordingly; Name the enums to make it easier to reference them in the docs and clean up the references accordingly; Set Doxygen option to force a detailed description for the constants to always be generated
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@617 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-21 15:34:54 +00:00
DRC
3ec2702bfc Clean up constants so that flags, pixel formats, etc. are clearly differentiated; Update documentation accordingly; Name the enums to make it easier to reference them in the docs and clean up the references accordingly; Set Doxygen option to force a detailed description for the constants to always be generated 2011-05-21 15:34:54 +00:00
DRC
9b28defe6a Completely refactored the TurboJPEG C API so that it uses pixel formats instead of the clunky pixel size + flags combination to define the pixel size and component order. tjCompress2() and tjTransform() can also now grow the JPEG buffer as needed, which can allow programs to save memory by not pre-allocating the "worst-case" buffer size calculated by TJBUFSIZE(). Converted API documentation to Doxygen. There is no legacy code remaining, so the refactored version of the library has been re-licensed under a BSD-style license.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@616 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-21 14:37:15 +00:00
DRC
aa92628cd4 Completely refactored the TurboJPEG C API so that it uses pixel formats instead of the clunky pixel size + flags combination to define the pixel size and component order. tjCompress2() and tjTransform() can also now grow the JPEG buffer as needed, which can allow programs to save memory by not pre-allocating the "worst-case" buffer size calculated by TJBUFSIZE(). Converted API documentation to Doxygen. There is no legacy code remaining, so the refactored version of the library has been re-licensed under a BSD-style license. 2011-05-21 14:37:15 +00:00
DRC
f89dd1ec1a Remove duplicate entries
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@615 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-21 14:23:30 +00:00
DRC
6be4598bec Remove duplicate entries 2011-05-21 14:23:30 +00:00
DRC
ba29357611 Can't assume that current directory is in PATH
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@614 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-18 03:50:53 +00:00
DRC
2bfdb5d4af git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@613 632fc199-4ca6-4c93-a231-07263d6284db 2011-05-10 22:15:26 +00:00
DRC
2c289bfa9b git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@612 632fc199-4ca6-4c93-a231-07263d6284db 2011-05-10 22:15:04 +00:00
DRC
34a8e35a4f git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@611 632fc199-4ca6-4c93-a231-07263d6284db 2011-05-10 22:14:38 +00:00
DRC
14a2cd0317 2011-05-10 22:14:38 +00:00
DRC
e19f15e3f2 Not necessary to save r10 and r11, since these are scratch registers
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@610 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-10 21:44:33 +00:00
DRC
fcdffa2265 Not necessary to save r10 and r11, since these are scratch registers 2011-05-10 21:44:33 +00:00
DRC
a27962bd9a Can't assume that current directory is in PATH
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@609 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-10 21:09:27 +00:00
DRC
d6e51e6cde Can't assume that current directory is in PATH 2011-05-10 21:09:27 +00:00
DRC
750e078179 Include scaled decompression test images when doing 'make dist'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@608 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-10 21:05:49 +00:00
DRC
ef534974a8 Include scaled decompression test images when doing 'make dist' 2011-05-10 21:05:49 +00:00
DRC
321e068601 ARM NEON support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@607 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-03 08:47:43 +00:00
DRC
99799a6c29 ARM NEON support 2011-05-03 08:47:43 +00:00
DRC
56fb237472 YASM support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@606 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-03 06:32:41 +00:00
DRC
a399b5bbea YASM support 2011-05-03 06:32:41 +00:00
DRC
e8738541c9 Fix I/O redirection in cjpeg and djpeg on Windows
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@605 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-02 00:40:13 +00:00
DRC
fd62eca284 Fix I/O redirection in cjpeg and djpeg on Windows
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@604 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-02 00:37:32 +00:00
DRC
6f78dc30c5 Fix I/O redirection in cjpeg and djpeg on Windows 2011-05-02 00:37:32 +00:00
DRC
5ee81f43cf Fix I/O redirection in cjpeg and djpeg on Windows
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@603 632fc199-4ca6-4c93-a231-07263d6284db
2011-05-02 00:35:50 +00:00
DRC
fad469f51e New libjpeg-turbo domain
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@602 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-30 04:43:23 +00:00
DRC
4f81526385 New libjpeg-turbo domain
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@601 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-27 00:33:14 +00:00
DRC
c07f688aa8 New libjpeg-turbo domain
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@600 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-27 00:32:24 +00:00
DRC
f84a4eb00d New libjpeg-turbo domain 2011-04-27 00:32:24 +00:00
DRC
ee269920c4 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@599 632fc199-4ca6-4c93-a231-07263d6284db 2011-04-26 23:46:38 +00:00
DRC
c3f61d6f57 2011-04-26 23:46:38 +00:00
DRC
65e0cd3278 Update license text to reflect the newly-relicensed jchuff.c
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@598 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-26 23:44:37 +00:00
DRC
65b1230f18 Update license text to reflect the newly-relicensed jchuff.c 2011-04-26 23:44:37 +00:00
DRC
6bb57b7219 Re-factor and re-license under the libjpeg BSD-style license. Justification: the accelerated Huffman encoding optimizations in libjpeg-turbo were all developed by me as an independent developer. The structure of the inline Huffman encoding macros was originally borrowed from similar routines in the TurboJPEG/mediaLib codec, which is part of VirtualGL and TurboVNC. Thus, although the code for these macros was not copied verbatim, they were still thought to be a derivative work of TurboJPEG/mediaLib, and I assigned the copyright and license from TurboJPEG/mediaLib to them. I have re-written these routines from first principles by breaking down the libjpeg out-of-line routines. Although the new code bears algorithmic similarities to the TurboJPEG/mediaLib macros, it can now clearly be shown to be derived from the out-of-line routines and thus, in my opinion, it can no longer be considered a derivative of TurboJPEG/mediaLib. -- DRC
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@597 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-26 22:08:31 +00:00
DRC
ed7ec8322c Re-factor and re-license under the libjpeg BSD-style license. Justification: the accelerated Huffman encoding optimizations in libjpeg-turbo were all developed by me as an independent developer. The structure of the inline Huffman encoding macros was originally borrowed from similar routines in the TurboJPEG/mediaLib codec, which is part of VirtualGL and TurboVNC. Thus, although the code for these macros was not copied verbatim, they were still thought to be a derivative work of TurboJPEG/mediaLib, and I assigned the copyright and license from TurboJPEG/mediaLib to them. I have re-written these routines from first principles by breaking down the libjpeg out-of-line routines. Although the new code bears algorithmic similarities to the TurboJPEG/mediaLib macros, it can now clearly be shown to be derived from the out-of-line routines and thus, in my opinion, it can no longer be considered a derivative of TurboJPEG/mediaLib. -- DRC 2011-04-26 22:08:31 +00:00
DRC
4852d283d7 Add more comprehensive tests for IDCT scaling
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@596 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-25 23:56:40 +00:00
DRC
2540beb951 Add more comprehensive tests for IDCT scaling 2011-04-25 23:56:40 +00:00
DRC
83c8f14fa2 Eliminate excessive I/O overhead when reading BMP files in cjpeg
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@595 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-25 22:53:44 +00:00
DRC
f165c2dfc5 Eliminate excessive I/O overhead when reading BMP files in cjpeg
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@594 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-25 22:47:44 +00:00
DRC
431e5937b5 Eliminate excessive I/O overhead when reading BMP files in cjpeg 2011-04-25 22:47:44 +00:00
DRC
d884011c17 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@593 632fc199-4ca6-4c93-a231-07263d6284db 2011-04-25 22:46:25 +00:00
DRC
2fea4ae8bf 2011-04-25 22:46:25 +00:00
DRC
049aef51d4 Eliminate excessive I/O overhead when reading BMP files in cjpeg
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@592 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-25 22:41:14 +00:00
DRC
1f8b6010ea git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@591 632fc199-4ca6-4c93-a231-07263d6284db 2011-04-18 07:01:46 +00:00
DRC
5d3d11ee66 2011-04-18 07:01:46 +00:00
DRC
bc51580f28 Re-factor and re-license under the libjpeg BSD-style license. Justification: the accelerated Huffman decoding optimizations in libjpeg-turbo were all developed by me as an independent developer. The structure of the inline Huffman decoding macros was originally borrowed from similar routines in the TurboJPEG/mediaLib codec, which is part of VirtualGL and TurboVNC. Thus, although the code for these macros was not copied verbatim, they were still thought to be a derivative work of TurboJPEG/mediaLib, and I assigned the copyright and license from TurboJPEG/mediaLib to them. I have re-written these routines from first principles by breaking down the libjpeg out-of-line routines. Although the new code bears algorithmic similarities to the TurboJPEG/mediaLib macros, it can now clearly be shown to be derived from the out-of-line routines and thus, in my opinion, it can no longer be considered a derivative of TurboJPEG/mediaLib. -- DRC
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@590 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-18 06:52:07 +00:00
DRC
bdc88147bb Re-factor and re-license under the libjpeg BSD-style license. Justification: the accelerated Huffman decoding optimizations in libjpeg-turbo were all developed by me as an independent developer. The structure of the inline Huffman decoding macros was originally borrowed from similar routines in the TurboJPEG/mediaLib codec, which is part of VirtualGL and TurboVNC. Thus, although the code for these macros was not copied verbatim, they were still thought to be a derivative work of TurboJPEG/mediaLib, and I assigned the copyright and license from TurboJPEG/mediaLib to them. I have re-written these routines from first principles by breaking down the libjpeg out-of-line routines. Although the new code bears algorithmic similarities to the TurboJPEG/mediaLib macros, it can now clearly be shown to be derived from the out-of-line routines and thus, in my opinion, it can no longer be considered a derivative of TurboJPEG/mediaLib. -- DRC 2011-04-18 06:52:07 +00:00
DRC
c56a74cdac Get rid of unused IS_WIN32 conditional
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@589 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-17 15:36:38 +00:00
DRC
51705fb967 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@588 632fc199-4ca6-4c93-a231-07263d6284db 2011-04-17 15:31:46 +00:00
DRC
8071c391bc git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@587 632fc199-4ca6-4c93-a231-07263d6284db 2011-04-17 15:29:17 +00:00
DRC
47ce37c6b0 2011-04-17 15:29:17 +00:00
DRC
e43d21d57f git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@586 632fc199-4ca6-4c93-a231-07263d6284db 2011-04-17 15:28:32 +00:00
DRC
9e6378c448 The previous attempt to handle unexpected markers in the data stream caused breakage in applications that attempted to set bytes_in_buffer to a larger value than the actual size of the JPEG image. The latter behavior was causing the fast decoder to be used for the last MCU in the image under certain circumstances, and this sometimes caused the EOI marker to be encountered by the fast decoder, which was treating it as an "unexpected" marker and throwing an error. Now, the fast decoder simply hands off the decoding of the block to the slow decoder if any marker is encountered.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@585 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-16 18:54:12 +00:00
DRC
051d962318 The previous attempt to handle unexpected markers in the data stream caused breakage in applications that attempted to set bytes_in_buffer to a larger value than the actual size of the JPEG image. The latter behavior was causing the fast decoder to be used for the last MCU in the image under certain circumstances, and this sometimes caused the EOI marker to be encountered by the fast decoder, which was treating it as an "unexpected" marker and throwing an error. Now, the fast decoder simply hands off the decoding of the block to the slow decoder if any marker is encountered.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@584 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-16 18:53:26 +00:00
DRC
93598f71bb The previous attempt to handle unexpected markers in the data stream caused breakage in applications that attempted to set bytes_in_buffer to a larger value than the actual size of the JPEG image. The latter behavior was causing the fast decoder to be used for the last MCU in the image under certain circumstances, and this sometimes caused the EOI marker to be encountered by the fast decoder, which was treating it as an "unexpected" marker and throwing an error. Now, the fast decoder simply hands off the decoding of the block to the slow decoder if any marker is encountered. 2011-04-16 18:53:26 +00:00
DRC
62de12281a This is subtle, but an unread marker is not an error unless we run out of bits, which may not occur in the same MCU in which the unread marker is encountered. Thus, don't try to use the fast decoder as long as there is an outstanding unread marker.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@583 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-16 18:50:42 +00:00
DRC
5c36465fd5 The previous attempt to handle unexpected markers in the data stream caused breakage in applications that attempted to set bytes_in_buffer to a larger value than the actual size of the JPEG image. The latter behavior was causing the fast decoder to be used for the last MCU in the image under certain circumstances, and this sometimes caused the EOI marker to be encountered by the fast decoder, which was treating it as an "unexpected" marker and throwing an error. Now, the fast decoder simply hands off the decoding of the block to the slow decoder if any marker is encountered.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@582 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-16 17:39:58 +00:00
DRC
9026b37c0b "OS/X"="OS X"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@581 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-16 13:37:22 +00:00
DRC
254937b33b Update build instructions to reflect the fact that 32-bit LJT build doesn't work with NASM 0.99 or 2.00
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@580 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-16 13:35:35 +00:00
DRC
59f954b323 Update build instructions to reflect the fact that 32-bit LJT build doesn't work with NASM 0.99 or 2.00
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@579 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-16 13:29:54 +00:00
DRC
82c0d4c9e9 Update build instructions to reflect the fact that 32-bit LJT build doesn't work with NASM 0.99 or 2.00 2011-04-16 13:29:54 +00:00
DRC
58454c74cc Update build instructions to reflect the fact that 32-bit LJT build doesn't work with NASM 0.99 or 2.00
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@578 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-16 13:26:36 +00:00
DRC
ddcd5a1979 Use option() to handle configuration variables, so they will show up in the CMake GUI
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@577 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-15 00:24:02 +00:00
DRC
a9300ce862 Use option() to handle configuration variables, so they will show up in the CMake GUI 2011-04-15 00:24:02 +00:00
DRC
98b8529d1f Use option() to handle configuration variables, so they will show up in the CMake GUI
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@576 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-15 00:20:15 +00:00
DRC
dc6f6a9c4e Don't need MSVC definition in assembler code anymore
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@575 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-07 05:27:29 +00:00
DRC
4611077eab Don't need MSVC definition in assembler code anymore 2011-04-07 05:27:29 +00:00
DRC
577ae78c30 Don't need MSVC definition in assembler code anymore
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@574 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-07 05:26:52 +00:00
DRC
926e01ffe1 Attempt to make build work with Visual Studio 2010 (still doesn't work if SIMD or Java are enabled-- see bug tracker)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@573 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-06 06:35:38 +00:00
DRC
d9ee65c24a git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@572 632fc199-4ca6-4c93-a231-07263d6284db 2011-04-05 07:01:26 +00:00
DRC
667766d07f 2011-04-05 07:01:26 +00:00
DRC
2a33dfcaab git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@571 632fc199-4ca6-4c93-a231-07263d6284db 2011-04-05 06:51:59 +00:00
DRC
b05ebcbcc4 Attempt to make build work with Visual Studio 2010 (still doesn't work if SIMD or Java are enabled-- see bug tracker)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@570 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-04 21:00:53 +00:00
DRC
31a13fcbb2 Attempt to make build work with Visual Studio 2010 (still doesn't work if SIMD or Java are enabled-- see bug tracker) 2011-04-04 21:00:53 +00:00
DRC
2ffcb8eaf7 Comment code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@569 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-04 04:56:24 +00:00
DRC
10979fb0fe Comment code 2011-04-04 04:56:24 +00:00
DRC
e7fde87ca5 Fix jpegoptim with v7 emulation as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@568 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-03 07:09:49 +00:00
DRC
7394e27b16 Fix jpegoptim with v7 emulation as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@567 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-03 07:08:18 +00:00
DRC
5bc9a1076e Fix jpegoptim with v7 emulation as well 2011-04-03 07:08:18 +00:00
DRC
db42506734 Allow customization of Java compiler flags
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@566 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-03 06:10:18 +00:00
DRC
cc2cf7db19 Allow customization of Java compiler flags 2011-04-03 06:10:18 +00:00
DRC
59a58343ea Ensure that image_width and image_height are initialized if libjpeg v8 emulation is enabled.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@565 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-02 05:40:16 +00:00
DRC
df48945d2d Ensure that image_width and image_height are initialized if libjpeg v8 emulation is enabled.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@564 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-02 05:37:49 +00:00
DRC
d5a3955024 Ensure that image_width and image_height are initialized if libjpeg v8 emulation is enabled. 2011-04-02 05:37:49 +00:00
DRC
279bd348ce Change build instructions and README to reflect the fact that the Java front-end classes are now part of the build and distribution
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@563 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-02 05:17:12 +00:00
DRC
8b351a8fa6 Change build instructions and README to reflect the fact that the Java front-end classes are now part of the build and distribution 2011-04-02 05:17:12 +00:00
DRC
a0f878a07b Add testclean target for cleaning up test images
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@562 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-02 04:43:14 +00:00
DRC
9a77f7f3ce Add testclean target for cleaning up test images 2011-04-02 04:43:14 +00:00
DRC
b0428a73c0 Fix compiler warning
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@561 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-02 04:19:21 +00:00
DRC
9237ae5f3e Fix compiler warning 2011-04-02 04:19:21 +00:00
DRC
848f225e2f Oops. Constructor should actually do something.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@560 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-02 03:43:12 +00:00
DRC
0e72ee1ccc Oops. Constructor should actually do something. 2011-04-02 03:43:12 +00:00
DRC
62c6f9811b Distribute TJLoader.java.in
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@559 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-02 02:33:29 +00:00
DRC
7e60806f34 Distribute TJLoader.java.in 2011-04-02 02:33:29 +00:00
DRC
58b6ec4580 Ensure that *gra*.asm is rebuilt whenever *gry*.asm changes.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@558 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-02 02:14:13 +00:00
DRC
115955e36e Ensure that *gra*.asm is rebuilt whenever *gry*.asm changes. 2011-04-02 02:14:13 +00:00
DRC
b2f9415a63 Slight refactor to put ScalingFactor into its own class (mainly because the $ in the class name was wreaking havoc on the build scripts, but also to add a few convenience methods to it) and to create a separate loader class so we can provide a .jar file with the MinGW distribution that loads the correct DLL
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@557 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-02 02:09:03 +00:00
DRC
90a42bb4d2 Slight refactor to put ScalingFactor into its own class (mainly because the $ in the class name was wreaking havoc on the build scripts, but also to add a few convenience methods to it) and to create a separate loader class so we can provide a .jar file with the MinGW distribution that loads the correct DLL 2011-04-02 02:09:03 +00:00
DRC
86e51f2268 Fix compiler warning with OpenJDK
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@556 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-01 20:31:03 +00:00
DRC
d6d704d30d Fix compiler warning with OpenJDK 2011-04-01 20:31:03 +00:00
DRC
9db6bebe23 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@555 632fc199-4ca6-4c93-a231-07263d6284db 2011-04-01 11:26:10 +00:00
DRC
3f8b9470a9 2011-04-01 11:26:10 +00:00
DRC
9e50fa7fbe Fixed a regression bug in the NSIS script that caused the Windows installer
build to fail when using the Visual Studio IDE.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@554 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-01 11:24:31 +00:00
DRC
957d623461 Include TurboJPEG/OSS Java wrapper JAR in Windows distribution packages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@553 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-01 11:13:11 +00:00
DRC
a391158b34 Include TurboJPEG/OSS Java wrapper JAR in Windows distribution packages 2011-04-01 11:13:11 +00:00
DRC
01fa031b85 Fix regression bug that caused the "Installer" targets to fail when building from the MSVC IDE
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@552 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-01 11:10:46 +00:00
DRC
187e286f44 Fix regression bug that caused the "Installer" targets to fail when building from the MSVC IDE 2011-04-01 11:10:46 +00:00
DRC
88f54a4a5d Modify build instructions to reflect the fact that the Java front-end classes are now built along with the JNI wrapper
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@551 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-01 01:21:22 +00:00
DRC
1c610ebfa3 Modify build instructions to reflect the fact that the Java front-end classes are now built along with the JNI wrapper 2011-04-01 01:21:22 +00:00
DRC
dffd53da5d Fix 'make dist' so that it includes only what we need from java/ (it was errantly including java/Makefile)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@550 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-01 00:37:20 +00:00
DRC
5c4e594064 Fix 'make dist' so that it includes only what we need from java/ (it was errantly including java/Makefile) 2011-04-01 00:37:20 +00:00
DRC
f2602ce567 Build and package TurboJPEG/OSS Java wrapper into JAR file
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@549 632fc199-4ca6-4c93-a231-07263d6284db
2011-04-01 00:20:33 +00:00
DRC
d56b1c71cd Build and package TurboJPEG/OSS Java wrapper into JAR file 2011-04-01 00:20:33 +00:00
DRC
b6ed7d347a Use a different naming convention, to avoid conflict with jpegut
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@548 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-31 20:58:03 +00:00
DRC
2139a653b0 Use a different naming convention, to avoid conflict with jpegut 2011-03-31 20:58:03 +00:00
DRC
04def09ea9 Use the same naming convention for the output files as the Java tests
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@547 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-31 20:48:30 +00:00
DRC
f634833a16 Use the same naming convention for the output files as the Java tests 2011-03-31 20:48:30 +00:00
DRC
4f8c29572e Clean up compiler warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@546 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-31 10:06:17 +00:00
DRC
892ed7e6b4 Clean up compiler warnings 2011-03-31 10:06:17 +00:00
DRC
ba6f457099 make testclean should clean up .yuv and 4:4:0 files as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@545 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-31 09:41:53 +00:00
DRC
977458e00d make testclean should clean up .yuv and 4:4:0 files as well 2011-03-31 09:41:53 +00:00
DRC
e44f8c0112 make testclean should clean up .yuv files as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@544 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-31 09:19:53 +00:00
DRC
e08c05f6e8 "JAVA_CFLAGS"="JNI_CFLAGS"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@543 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-31 08:03:26 +00:00
DRC
76e7801a58 "JAVA_CFLAGS"="JNI_CFLAGS" 2011-03-31 08:03:26 +00:00
DRC
1e14b47c22 Get rid of unused IS_WIN32 conditional
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@542 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-31 04:15:50 +00:00
DRC
bb83575b75 Get rid of unused IS_WIN32 conditional
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@541 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-31 04:14:55 +00:00
DRC
7ed5fe39c9 Get rid of unused IS_WIN32 conditional 2011-03-31 04:14:55 +00:00
DRC
b97bafdfd7 Create local round up function for jmemmgr.c so we can revert the original argument types of jround_up() without breaking the build on 64-bit Windows.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@540 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-29 05:01:23 +00:00
DRC
35acffcf0c Create local round up function for jmemmgr.c so we can revert the original argument types of jround_up() without breaking the build on 64-bit Windows. 2011-03-29 05:01:23 +00:00
DRC
a8eabfebd1 Create local round up function for jmemmgr.c so we can revert the original argument types of jround_up() without breaking the build on 64-bit Windows.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@539 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-29 04:58:40 +00:00
DRC
1da7858d24 MinGW64 no longer prefixes symbols with underscores by default
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@538 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-22 09:34:01 +00:00
DRC
b94f2de41d Clean up packaging system
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@537 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-22 09:31:25 +00:00
DRC
1fbaddde3b Clean up packaging system 2011-03-22 09:31:25 +00:00
DRC
cd2e6946bb MinGW64 no longer prefixes symbols with underscores by default
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@536 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-22 09:19:29 +00:00
DRC
51a4282abc MinGW64 no longer prefixes symbols with underscores by default 2011-03-22 09:19:29 +00:00
DRC
1c87e45cff We want to keep the same name for the install directory, even though the installer name has changed
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@535 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-22 06:49:31 +00:00
DRC
539b288780 Typo
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@534 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-22 06:28:04 +00:00
DRC
47aaf6fa15 MinGW64 no longer prefixes symbols with underscores by default
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@533 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-22 05:40:39 +00:00
DRC
328c4388b7 Oops. Forgot to generate makecygwinpkg
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@532 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-22 05:04:30 +00:00
DRC
e6f597f28f Don't use architecture extension in package name, since we're building a combined package
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@531 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-22 03:19:11 +00:00
DRC
bfa34cf143 "release/"="pkgscripts/"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@530 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-22 01:38:04 +00:00
DRC
5e091d4d1f Need to put the generated packaging scripts in a directory other than release/ so they won't get distributed
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@529 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-22 01:21:42 +00:00
DRC
95db4f48a5 Clean up packaging system
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@528 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-22 00:20:43 +00:00
DRC
1a79ede633 1.1.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@527 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-21 22:42:31 +00:00
DRC
a6471c34ed git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@526 632fc199-4ca6-4c93-a231-07263d6284db 2011-03-18 05:59:21 +00:00
DRC
f5c3bb38bc git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@525 632fc199-4ca6-4c93-a231-07263d6284db 2011-03-18 05:59:07 +00:00
DRC
bcfb6ed138 2011-03-18 05:59:07 +00:00
DRC
fe6a2ee5a1 Throw a warning if an unexpected marker is found in the middle of the JPEG data stream
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@524 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-18 05:49:26 +00:00
DRC
ebf239d056 Throw a warning if an unexpected marker is found in the middle of the JPEG data stream
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@523 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-18 05:44:55 +00:00
DRC
59fd32e903 Throw a warning if an unexpected marker is found in the middle of the JPEG data stream 2011-03-18 05:44:55 +00:00
DRC
60de06ef7a Throw a warning if an unexpected marker is found in the middle of the JPEG data stream
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@522 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-18 05:44:27 +00:00
DRC
efc012f0b5 Throw a warning if an unexpected marker is found in the middle of the JPEG data stream 2011-03-18 05:44:27 +00:00
DRC
df1c38df74 Throw a warning if an unexpected marker is found in the middle of the JPEG data stream
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@521 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-18 05:40:33 +00:00
DRC
1f014c32e6 Fix compression from/decompression to TYPE_INT_{RGB|BGR} BufferedImages on big endian platforms
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@520 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-17 07:39:25 +00:00
DRC
d8cc0513ee Fix compression from/decompression to TYPE_INT_{RGB|BGR} BufferedImages on big endian platforms 2011-03-17 07:39:25 +00:00
DRC
2c74e5124d More Java API cleanup
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@519 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-16 00:02:53 +00:00
DRC
f90d1d84c7 More Java API cleanup 2011-03-16 00:02:53 +00:00
DRC
92549de2c2 Java code cleanup + Java docs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@518 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-15 20:52:02 +00:00
DRC
22faf366c3 Java code cleanup + Java docs 2011-03-15 20:52:02 +00:00
DRC
d932e58217 tjTransform() was not working properly if r.w=0 or r.h=0
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@517 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-15 20:09:47 +00:00
DRC
552dd27bde tjTransform() was not working properly if r.w=0 or r.h=0 2011-03-15 20:09:47 +00:00
DRC
16958e823e Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@516 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-15 19:33:43 +00:00
DRC
4c5eae3bd0 Wordsmithing 2011-03-15 19:33:43 +00:00
DRC
7c99822efb Add notes about performance
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@515 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-10 07:25:41 +00:00
DRC
4a0cf492f4 Add notes about performance 2011-03-10 07:25:41 +00:00
DRC
16c7077887 Add an option to display the output image
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@514 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-07 09:59:08 +00:00
DRC
ac0eff91f6 Add an option to display the output image 2011-03-07 09:59:08 +00:00
DRC
1da67e18a3 If a scaled-down JPEG output image is requested, we must decompress and recompress the transformed image.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@513 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-07 08:21:11 +00:00
DRC
d04c64b75a If a scaled-down JPEG output image is requested, we must decompress and recompress the transformed image. 2011-03-07 08:21:11 +00:00
DRC
23da0c0e41 On Windows, long is 32-bit, so use jlong instead
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@512 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 15:28:16 +00:00
DRC
d594af38e1 On Windows, long is 32-bit, so use jlong instead 2011-03-04 15:28:16 +00:00
DRC
e217b7ea54 We actually don't need windows.h at all, and it makes both MinGW and VC++ unhappy because of conflicting macros (such as INT32 in jmorecfg.h)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@511 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 14:57:14 +00:00
DRC
fed7b30436 We actually don't need windows.h at all, and it makes both MinGW and VC++ unhappy because of conflicting macros (such as INT32 in jmorecfg.h) 2011-03-04 14:57:14 +00:00
DRC
2930fa8e9c MinGW already has snprintf(), so don't use our macro substitute there
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@510 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 14:37:00 +00:00
DRC
32fa016937 MinGW already has snprintf(), so don't use our macro substitute there 2011-03-04 14:37:00 +00:00
DRC
6bd084afd2 Oops. Forgot to add TJTransform class
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@509 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 14:10:29 +00:00
DRC
5526cf13d0 Oops. Forgot to add TJTransform class 2011-03-04 14:10:29 +00:00
DRC
e856eb0f8f Include new grayscale SIMD routines in dist
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@508 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 14:05:23 +00:00
DRC
58a0845738 Include new grayscale SIMD routines in dist 2011-03-04 14:05:23 +00:00
DRC
15866ac1da git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@507 632fc199-4ca6-4c93-a231-07263d6284db 2011-03-04 13:46:55 +00:00
DRC
0260fd6196 2011-03-04 13:46:55 +00:00
DRC
31334415ae Add access methods for getting at the JPEG buffer
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@506 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 13:41:05 +00:00
DRC
d5bc5379a4 Add access methods for getting at the JPEG buffer 2011-03-04 13:41:05 +00:00
DRC
7d4b001665 If transforming and outputting a JPEG file, output the transformed file directly instead of decompressing/recompressing it
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@505 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 13:40:42 +00:00
DRC
c5efebc394 If transforming and outputting a JPEG file, output the transformed file directly instead of decompressing/recompressing it 2011-03-04 13:40:42 +00:00
DRC
bb0e0b57dd Add TJTransformer JNI functions to mapfile
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@504 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 13:39:46 +00:00
DRC
15ff5c1feb Add TJTransformer JNI functions to mapfile 2011-03-04 13:39:46 +00:00
DRC
d0a813632b Handle 4:4:0 (transposed 4:2:2 subsampling)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@503 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 13:04:24 +00:00
DRC
696f25e052 Handle 4:4:0 (transposed 4:2:2 subsampling) 2011-03-04 13:04:24 +00:00
DRC
a3f68b4d2a Handle 4:4:0 (transposed 4:2:2 subsampling)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@502 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 12:52:45 +00:00
DRC
074a6f24bb Handle 4:4:0 (transposed 4:2:2 subsampling) 2011-03-04 12:52:45 +00:00
DRC
e85730157e Implement lossless cropping interface in Java
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@501 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 10:13:59 +00:00
DRC
89d167655e Implement lossless cropping interface in Java 2011-03-04 10:13:59 +00:00
DRC
46531c3265 Don't need PAD() anymore
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@500 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 10:01:22 +00:00
DRC
91332307b5 Don't need PAD() anymore 2011-03-04 10:01:22 +00:00
DRC
2e2358eae4 Print stack trace on error
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@499 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 09:54:59 +00:00
DRC
a43dd1aeb7 Print stack trace on error 2011-03-04 09:54:59 +00:00
DRC
ad05754a87 Methods of a final class are automatically final
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@498 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 09:15:07 +00:00
DRC
e3c79837d1 Methods of a final class are automatically final 2011-03-04 09:15:07 +00:00
DRC
d8ebb6b654 Modify filename of decompressed output files to indicate that scaling was used
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@497 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 04:14:47 +00:00
DRC
77f2cf4e75 Modify filename of decompressed output files to indicate that scaling was used 2011-03-04 04:14:47 +00:00
DRC
ddd728c6bd If losslessly transforming to grayscale, compute trimmed dimensions based on grayscale MCU size, not MCU size of source image
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@496 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 03:38:47 +00:00
DRC
19f178b9f3 If losslessly transforming to grayscale, compute trimmed dimensions based on grayscale MCU size, not MCU size of source image 2011-03-04 03:38:47 +00:00
DRC
ba5ea5143e Tile generation did not work with TJXFORM_HFLIP, because the underlying transform code was using an in-place algorithm, which modified the source coefficients after the first tile was generated. Thus, create a new option which allows TurboJPEG to turn off the in-place horizontal flip if there are multiple transforms being performed from the same set of coefficients.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@495 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 03:20:34 +00:00
DRC
5e9da424a4 Tile generation did not work with TJXFORM_HFLIP, because the underlying transform code was using an in-place algorithm, which modified the source coefficients after the first tile was generated. Thus, create a new option which allows TurboJPEG to turn off the in-place horizontal flip if there are multiple transforms being performed from the same set of coefficients. 2011-03-04 03:20:34 +00:00
DRC
f2cef492b1 Transform tests; Variable benchmark time; General cleanup
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@494 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-04 02:25:00 +00:00
DRC
7e1d9c4e42 Transform tests; Variable benchmark time; General cleanup 2011-03-04 02:25:00 +00:00
DRC
6a833a8ee0 Add an option to force grayscale->RGB conversion (needed for jpgtest regression test)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@493 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-03 16:58:47 +00:00
DRC
3bcf42b4ac Add an option to force grayscale->RGB conversion (needed for jpgtest regression test) 2011-03-03 16:58:47 +00:00
DRC
3c2d7f21a4 Move per-format flag assignments to the actual TurboJPEG function calls
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@492 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-02 10:30:29 +00:00
DRC
5e9c5f9ff7 Move per-format flag assignments to the actual TurboJPEG function calls 2011-03-02 10:30:29 +00:00
DRC
9977e28a09 Make the C version work more like the Java version
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@491 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-02 10:13:55 +00:00
DRC
086cc1e5cc Make the C version work more like the Java version 2011-03-02 10:13:55 +00:00
DRC
45358dd140 Generate separate JPEG images for the YUV decode tests
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@490 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-02 09:30:57 +00:00
DRC
1873d021c7 Generate separate JPEG images for the YUV decode tests 2011-03-02 09:30:57 +00:00
DRC
0a07969273 Oops. Left out the all-important transform structures
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@489 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-02 09:27:49 +00:00
DRC
4be061b162 Oops. Left out the all-important transform structures 2011-03-02 09:27:49 +00:00
DRC
0a325197de Since lossless transforms have such a high fixed performance cost, implement a mechanism for performing more than one at a time on the same source image.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@488 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-02 09:22:41 +00:00
DRC
66b6d80ed6 Since lossless transforms have such a high fixed performance cost, implement a mechanism for performing more than one at a time on the same source image. 2011-03-02 09:22:41 +00:00
DRC
a81d3101da Wordsmithing and general cleanup
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@487 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-02 09:05:09 +00:00
DRC
92df122286 Wordsmithing and general cleanup 2011-03-02 09:05:09 +00:00
DRC
da5220acdd Fix Windows build; Add grayscale tests to Windows build; Add proper implementation of snprintf on Windows and use snprintf() in TurboJPEG library and tests instead of sprintf()
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@486 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-02 02:17:30 +00:00
DRC
0c7b322efe Fix Windows build; Add grayscale tests to Windows build; Add proper implementation of snprintf on Windows and use snprintf() in TurboJPEG library and tests instead of sprintf() 2011-03-02 02:17:30 +00:00
DRC
e6ab539b1d Fix compiler warnings in Visual C++
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@485 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-02 01:30:38 +00:00
DRC
43f33a4d19 Fix compiler warnings in Visual C++ 2011-03-02 01:30:38 +00:00
DRC
43a29d2c17 Fix compiler warnings in Visual C++
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@484 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-02 01:27:26 +00:00
DRC
b02715c1b1 Fix compiler warnings in Visual C++ 2011-03-02 01:27:26 +00:00
DRC
6acf52b5f9 Perform size checks on arrays
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@483 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-02 01:09:20 +00:00
DRC
ef842c142c Perform size checks on arrays 2011-03-02 01:09:20 +00:00
DRC
5528b55834 Use new scaling API
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@482 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-01 20:43:47 +00:00
DRC
b58789cb91 Use new scaling API 2011-03-01 20:43:47 +00:00
DRC
0f1f60d080 Make error handling more consistent with other TurboJPEG C code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@481 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-01 20:23:12 +00:00
DRC
95dfd2ab45 Make error handling more consistent with other TurboJPEG C code 2011-03-01 20:23:12 +00:00
DRC
b15b7df690 Use "bailout" label to be more consistent with other TurboJPEG C code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@480 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-01 20:17:12 +00:00
DRC
581609cebd Use "bailout" label to be more consistent with other TurboJPEG C code 2011-03-01 20:17:12 +00:00
DRC
f7f3ea404c Use consistent formatting conventions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@479 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-01 20:03:32 +00:00
DRC
e701ed74c0 Use consistent formatting conventions 2011-03-01 20:03:32 +00:00
DRC
20ec358b3c Add getScalingFactors() method to libturbojpeg version script
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@478 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-01 10:20:23 +00:00
DRC
ce03e93dfd Add getScalingFactors() method to libturbojpeg version script 2011-03-01 10:20:23 +00:00
DRC
109a578e89 tjGetScaledSize() would never be able to accommodate scaling factors > 1, so replace it with a function that returns a list of fractional scaling factors that TurboJPEG supports.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@477 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-01 09:53:07 +00:00
DRC
be085e08b3 tjGetScaledSize() would never be able to accommodate scaling factors > 1, so replace it with a function that returns a list of fractional scaling factors that TurboJPEG supports. 2011-03-01 09:53:07 +00:00
DRC
7166bb7b3a Don't call jpeg_finish_compress() with YUV output, because it tries to insert an EOI marker right in the middle of our image data.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@476 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-01 08:23:53 +00:00
DRC
da6a1f6c76 Don't call jpeg_finish_compress() with YUV output, because it tries to insert an EOI marker right in the middle of our image data. 2011-03-01 08:23:53 +00:00
DRC
6ee5459459 Don't call jpeg_finish_compress() with YUV output, because it tries to insert an EOI marker right in the middle of our image data.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@475 632fc199-4ca6-4c93-a231-07263d6284db
2011-03-01 08:18:30 +00:00
DRC
438affe886 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@474 632fc199-4ca6-4c93-a231-07263d6284db 2011-02-28 22:23:37 +00:00
DRC
407cd22df3 2011-02-28 22:23:37 +00:00
DRC
1a3dbe6fba Unused variables
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@473 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-28 10:51:55 +00:00
DRC
43577eacf9 Unused variables 2011-02-28 10:51:55 +00:00
DRC
23f2bbaeda Improve performance a bit for the non-SIMD case
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@472 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-27 10:51:20 +00:00
DRC
045e8f7f07 Improve performance a bit for the non-SIMD case 2011-02-27 10:51:20 +00:00
DRC
5a9d6c3722 Improve performance a bit for the non-SIMD case
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@471 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-27 10:26:08 +00:00
DRC
c17c5c8188 Improve performance a bit for the non-SIMD case 2011-02-27 10:26:08 +00:00
DRC
66df5eca03 Oops. cconvert is still needed for 12-bit samples
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@470 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-27 09:48:48 +00:00
DRC
ddb158c5c1 Add short names for RGB->grayscale MMX functions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@468 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-27 09:09:54 +00:00
DRC
f2cb47a275 Add short names for RGB->grayscale MMX functions 2011-02-27 09:09:54 +00:00
DRC
07122dd2fe Change filename in header
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@467 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-27 07:59:38 +00:00
DRC
a8bb67e5a9 Change filename in header 2011-02-27 07:59:38 +00:00
DRC
0244061515 Make Visual C++ happy
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@466 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-27 00:08:06 +00:00
DRC
3c620745a7 Make Visual C++ happy 2011-02-27 00:08:06 +00:00
DRC
da58a91d1e Make Visual C++ happy
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@465 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-27 00:07:51 +00:00
DRC
890f1e0413 Expose libjpeg lossless transform feature in TurboJPEG/OSS
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@464 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-26 22:02:37 +00:00
DRC
3f2ef301c4 Expose libjpeg lossless transform feature in TurboJPEG/OSS 2011-02-26 22:02:37 +00:00
DRC
17ac3720f1 Fix compiler warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@463 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-26 21:20:46 +00:00
DRC
28db388687 Fix compiler warnings 2011-02-26 21:20:46 +00:00
DRC
5d1e034a12 Enable full GCC compiler warnings by default
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@462 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-26 21:12:36 +00:00
DRC
a3845bd44b Enable full GCC compiler warnings by default 2011-02-26 21:12:36 +00:00
DRC
0769f505bf Fix compiler warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@461 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-26 21:08:39 +00:00
DRC
b4a50ceefb Enable full GCC compiler warnings by default
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@460 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-26 21:07:50 +00:00
DRC
992611b689 "tjScaledSize"="tjGetScaledSize" (again)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@459 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-26 20:15:27 +00:00
DRC
c8ddbca289 "tjScaledSize"="tjGetScaledSize" (again) 2011-02-26 20:15:27 +00:00
DRC
98a7bdec4e Remove entry for tjScaledSize()
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@458 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-26 20:04:23 +00:00
DRC
b8530db29f Remove entry for tjScaledSize() 2011-02-26 20:04:23 +00:00
DRC
89d11649a1 Include tjGetScaledSize() in version scripts
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@457 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-26 19:59:01 +00:00
DRC
cc9133fadf Include tjGetScaledSize() in version scripts 2011-02-26 19:59:01 +00:00
DRC
1b1e88674a "tjScaledSize"="tjGetScaledSize"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@456 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-26 19:53:58 +00:00
DRC
02156d7c53 "tjScaledSize"="tjGetScaledSize" 2011-02-26 19:53:58 +00:00
DRC
361a637174 Fix uninitialized variables
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@455 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-26 19:46:27 +00:00
DRC
88534c50aa Add RGB --> Grayscale YUV decoding test
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@454 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-25 06:21:54 +00:00
DRC
8b3f7c6ff0 Add RGB --> Grayscale YUV decoding test 2011-02-25 06:21:54 +00:00
DRC
3484e0b160 Add RGB-->Grayscale YUV decode test
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@453 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-25 06:21:15 +00:00
DRC
e4d9b5b76a git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@452 632fc199-4ca6-4c93-a231-07263d6284db 2011-02-25 06:17:17 +00:00
DRC
cc8df443e6 2011-02-25 06:17:17 +00:00
DRC
4f1580cc0e Implement YUV encode/decode methods at the Java level; Remove some of the arguments from the Java API and replace with get/set methods; General API cleanup; Fix BufferedImage grayscale tests in TJUnitTest
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@451 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-25 06:11:03 +00:00
DRC
8755a6805a Implement YUV encode/decode methods at the Java level; Remove some of the arguments from the Java API and replace with get/set methods; General API cleanup; Fix BufferedImage grayscale tests in TJUnitTest 2011-02-25 06:11:03 +00:00
DRC
d5a69afa5a Fix the buffer size regression test so that it generates the intended pixel patterns
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@450 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-25 02:13:07 +00:00
DRC
0a192aca50 Oops. Committed some debugging code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@449 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-25 02:12:11 +00:00
DRC
7ce8dfe258 Oops. Committed some debugging code 2011-02-25 02:12:11 +00:00
DRC
8424160345 Replace the TJ_YUV flag with two new API functions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@448 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-25 02:08:23 +00:00
DRC
3405865cd2 Replace the TJ_YUV flag with two new API functions 2011-02-25 02:08:23 +00:00
DRC
0745c0fb6a Correct memory allocation failure messages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@447 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-25 01:31:13 +00:00
DRC
94476c648b Only access TJBUFSIZEYUV symbol if YUV encoding is enabled, and add 1 to the buffer size; This allows jpgtest to be used to benchmark the old TurboJPEG/IPP libraries.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@446 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-25 01:14:46 +00:00
DRC
0cc1279e03 Use correct size for YUV buffers
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@445 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-25 00:54:29 +00:00
DRC
6a1580f88c Tiling doesn't work with YUV encoding either
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@444 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-25 00:26:07 +00:00
DRC
18f4b35de5 Tiling doesn't work with YUV encoding either 2011-02-25 00:26:07 +00:00
DRC
f8552faa09 Fix various CR/LF issues
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@443 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-25 00:25:31 +00:00
DRC
1630b15a0e Fix various CR/LF issues 2011-02-25 00:25:31 +00:00
DRC
9fa95594c2 Use a proper version script for libturbojpeg
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@442 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-25 00:23:44 +00:00
DRC
4dc725069a Use a proper version script for libturbojpeg 2011-02-25 00:23:44 +00:00
DRC
10e3193373 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@441 632fc199-4ca6-4c93-a231-07263d6284db 2011-02-25 00:14:12 +00:00
DRC
eeab6957dd Replace the TJ_YUV flag with two new API functions, and add TJBUFSIZEYUV() from trunk
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@440 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-25 00:02:04 +00:00
DRC
5cb1b68d39 Tiling doesn't work with YUV encoding either
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@439 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-24 22:13:20 +00:00
DRC
0b11d1c815 Fix various CR/LF issues
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@438 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-24 21:43:35 +00:00
DRC
582a46a59e Ensure that libjpeg state is reset if an error occurs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@437 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-24 21:16:10 +00:00
DRC
6e51e19b1c Use a proper version script for libturbojpeg, since we've added functions to it since 1.0
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@436 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-24 19:36:02 +00:00
DRC
0ad78a688c Add line feed
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@435 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-23 20:57:17 +00:00
DRC
2a07591e9b Add line feed 2011-02-23 20:57:17 +00:00
DRC
026f7cea77 Numerous enhancements, including using the new BufferedImage support to read/write non-JPEG files
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@434 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-23 20:51:54 +00:00
DRC
6ce4882e2a Numerous enhancements, including using the new BufferedImage support to read/write non-JPEG files 2011-02-23 20:51:54 +00:00
DRC
b605cac79e Check for invalid subsampling factor
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@433 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-23 20:51:23 +00:00
DRC
4e08a1d3bc Check for invalid subsampling factor 2011-02-23 20:51:23 +00:00
DRC
84a1bcca6f Support for compressing from/decompressing to a BufferedImage in the Java wrapper
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@432 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-23 12:09:56 +00:00
DRC
a311c1cd21 Support for compressing from/decompressing to a BufferedImage in the Java wrapper 2011-02-23 12:09:56 +00:00
DRC
3bad53fa04 More JNI cleanup + added unit test and fixed bugs uncovered by it
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@431 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-23 02:20:49 +00:00
DRC
4802041125 More JNI cleanup + added unit test and fixed bugs uncovered by it 2011-02-23 02:20:49 +00:00
DRC
cce6b43463 Oops. dumpbuf() was displaying only red components.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@430 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-23 01:41:26 +00:00
DRC
2ca3eb5660 Oops. dumpbuf() was displaying only red components.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@429 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-23 01:40:44 +00:00
DRC
7ffa0c85de Oops. dumpbuf() was displaying only red components.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@428 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-23 01:40:22 +00:00
DRC
8bde192230 Oops. dumpbuf() was displaying only red components. 2011-02-23 01:40:22 +00:00
DRC
404e82e070 Test all YUV decode paths
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@427 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-22 19:59:54 +00:00
DRC
601a433b1a Test all YUV decode paths
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@426 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-22 19:59:05 +00:00
DRC
e005c1f751 Test all YUV decode paths 2011-02-22 19:59:05 +00:00
DRC
e0d4d34f10 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@425 632fc199-4ca6-4c93-a231-07263d6284db 2011-02-22 10:28:18 +00:00
DRC
e7c15f3e41 2011-02-22 10:28:18 +00:00
DRC
36336fcddc Streamline Java wrapper
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@424 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-22 10:27:31 +00:00
DRC
1a9a4d13c7 Streamline Java wrapper 2011-02-22 10:27:31 +00:00
DRC
4e8ae08b00 Add new functions to anonymous version script
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@423 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-22 06:44:50 +00:00
DRC
892b81cb44 Add new functions to anonymous version script 2011-02-22 06:44:50 +00:00
DRC
b28fc5710a Make the scaling API a bit more friendly
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@422 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-22 06:41:29 +00:00
DRC
38218222cd Make the scaling API a bit more friendly 2011-02-22 06:41:29 +00:00
DRC
45bd1f2bd4 "TurboJPEG/OSS"="TurboJPEG", since the TurboJPEG header is used with other codecs besides libjpeg-turbo
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@421 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-22 00:36:04 +00:00
DRC
05c1af2f57 "TurboJPEG/OSS"="TurboJPEG", since the TurboJPEG header is used with other codecs besides libjpeg-turbo 2011-02-22 00:36:04 +00:00
DRC
7d9d434826 "TurboJPEG/OSS"="TurboJPEG", since the TurboJPEG header is used with other codecs besides libjpeg-turbo
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@420 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-22 00:31:27 +00:00
DRC
f3cf973e8e Add TJBUFSIZEYUV() convenience function
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@419 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-22 00:16:14 +00:00
DRC
9eecea2a8e Add TJBUFSIZEYUV() convenience function 2011-02-22 00:16:14 +00:00
DRC
035aac43b0 RGBA=RGBX, BGRA=BGRX, ABGR=XBGR, ARGB=XRGB
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@418 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-19 18:10:05 +00:00
DRC
2c31f2b499 RGBA=RGBX, BGRA=BGRX, ABGR=XBGR, ARGB=XRGB 2011-02-19 18:10:05 +00:00
DRC
b67c2dce8b Implement "ultra quiet mode" for generating output that is easy to copy/paste into a spreadsheet
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@417 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-19 18:06:09 +00:00
DRC
86eefe66a6 Implement "ultra quiet mode" for generating output that is easy to copy/paste into a spreadsheet 2011-02-19 18:06:09 +00:00
DRC
c4c304950d Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@416 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-19 17:57:08 +00:00
DRC
964a22d663 Wordsmithing 2011-02-19 17:57:08 +00:00
DRC
9cd2c42e84 Include jpgtest in Unix/Linux distribution packages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@415 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-19 17:52:45 +00:00
DRC
b457b5d42e Include jpgtest in Unix/Linux distribution packages 2011-02-19 17:52:45 +00:00
DRC
c62cc7678d Include libjpeg run-time programs and jpgtest in installer; Move documentation in SDK distribution packages into doc\ subdirectory
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@414 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-19 17:50:23 +00:00
DRC
400d484c41 Include libjpeg run-time programs and jpgtest in installer; Move documentation in SDK distribution packages into doc\ subdirectory 2011-02-19 17:50:23 +00:00
DRC
52c479d578 Disable CXX compiler check
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@413 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-19 17:48:26 +00:00
DRC
47ae9a3e0f Disable CXX compiler check 2011-02-19 17:48:26 +00:00
DRC
b4b31403c7 RGBA=RGBX, BGRA=BGRX, ABGR=XBGR, ARGB=XRGB
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@412 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-19 17:31:24 +00:00
DRC
2a28599343 Implement "ultra quiet mode" for generating output that is easy to copy/paste into a spreadsheet
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@411 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-19 17:20:11 +00:00
DRC
3e87c8b0a4 Wordsmithing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@410 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-19 16:42:14 +00:00
DRC
db8df01c85 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@409 632fc199-4ca6-4c93-a231-07263d6284db 2011-02-19 00:01:11 +00:00
DRC
240d82f8be Include jpgtest in Unix/Linux distribution packages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@408 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-19 00:00:34 +00:00
DRC
8569c2f5a6 Include libjpeg run-time programs and jpgtest in installer; Move documentation in SDK distribution packages into doc\ subdirectory
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@407 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 23:49:42 +00:00
DRC
5d6f858235 Disable CXX compiler check
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@406 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 23:08:58 +00:00
DRC
0df25a7340 Wordsmithed the project description
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@405 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 22:47:32 +00:00
DRC
22f9ca067c Wordsmithed the project description 2011-02-18 22:47:32 +00:00
DRC
2ddcc6334b Distribute high-quality and grayscale test images
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@404 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 22:46:05 +00:00
DRC
85712cb267 Distribute high-quality and grayscale test images 2011-02-18 22:46:05 +00:00
DRC
f3281e8275 Oops. We still had the description left over from VirtualGL
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@403 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 22:40:34 +00:00
DRC
0d2d965364 Wordsmithed the project description
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@402 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 22:29:45 +00:00
DRC
16e761e59c Include high-quality test image in distribution
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@401 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 21:20:50 +00:00
DRC
69e15442f3 1.1.0
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@400 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 21:16:56 +00:00
DRC
da509e32c6 New C version of jpgtest needs libm
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@399 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 21:16:04 +00:00
DRC
9af407729b The API/ABI should be described as "libjpeg v8", not "libjpeg v8b", since there are multiple libjpeg releases with the same interface
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@398 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 20:55:20 +00:00
DRC
055ddf28b4 The API/ABI should be described as "libjpeg v8", not "libjpeg v8b", since there are multiple libjpeg releases with the same interface 2011-02-18 20:55:20 +00:00
DRC
4db36eb09e Add high-quality JPEG tests to CMake build system
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@397 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 20:52:57 +00:00
DRC
ad02bb6032 Add high-quality JPEG tests to CMake build system 2011-02-18 20:52:57 +00:00
DRC
0700eab8a2 Various doc tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@396 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 20:51:10 +00:00
DRC
6262130033 Various doc tweaks 2011-02-18 20:51:10 +00:00
DRC
a49c4e5247 The SIMD quantization algorithm does not produce correct results with the fast forward integer DCT and JPEG qualities >= 98, so for now, use the non-SIMD quantization function under those circumstances.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@395 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 20:50:08 +00:00
DRC
756095aaf0 The SIMD quantization algorithm does not produce correct results with the fast forward integer DCT and JPEG qualities >= 98, so for now, use the non-SIMD quantization function under those circumstances. 2011-02-18 20:50:08 +00:00
DRC
392e0483a3 Updated (C)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@394 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 20:43:04 +00:00
DRC
25299d0d2f Updated (C) 2011-02-18 20:43:04 +00:00
DRC
c86663335b SIMD-accelerated RGB-to-Grayscale color conversion
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@393 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 11:23:45 +00:00
DRC
439527e0b9 SIMD-accelerated RGB-to-Grayscale color conversion 2011-02-18 11:23:45 +00:00
DRC
23ce65d25d Updated (C)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@392 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 07:02:32 +00:00
DRC
f38eee0739 The API/ABI should be described as "libjpeg v8", not "libjpeg v8b", since there are multiple libjpeg releases with the same interface
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@391 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 07:00:38 +00:00
DRC
d24b276820 Re-order high-quality JPEG test per existing convention
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@390 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 05:24:50 +00:00
DRC
94a402305c Also run high-quality JPEG test when code is built without SIMD extensions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@389 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 05:15:59 +00:00
DRC
c4ef01fc66 Add high-quality JPEG tests to CMake
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@388 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 05:06:58 +00:00
DRC
ab4db657db Various documentation tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@387 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 04:55:08 +00:00
DRC
856fd82ea3 More doc tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@386 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 04:50:45 +00:00
DRC
39f3aa0871 Various documentation tweaks
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@385 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 04:39:36 +00:00
DRC
6514105007 Include high-quality test image in distribution
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@384 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 03:55:25 +00:00
DRC
6ca69537f1 The SIMD quantization algorithm does not produce correct results with the fast forward integer DCT and JPEG qualities >= 98, so for now, use the non-SIMD quantization function under those circumstances.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@383 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 03:31:11 +00:00
DRC
f0a5ba7542 "integer forward DCT", not "forward integer DCT"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@382 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 03:21:06 +00:00
DRC
e1716b8507 The fast integer DCT degrades for qualities > 95, so use the slow integer DCT instead to ensure that perceptually lossless performance is maintained.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@381 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 03:19:43 +00:00
DRC
7c1df0a430 Performance pitfalls
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@380 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 02:45:24 +00:00
DRC
bb4465f392 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@379 632fc199-4ca6-4c93-a231-07263d6284db 2011-02-18 02:41:03 +00:00
DRC
72abc29722 The SIMD quantization algorithm does not produce correct results with the fast forward integer DCT and JPEG qualities >= 98, so for now, use the non-SIMD quantization function under those circumstances.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@378 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-18 01:45:24 +00:00
DRC
e2f3718d39 Fix typo that was causing visual artifacts in grayscale JPEGs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@377 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-17 07:53:46 +00:00
DRC
fc1970acef Fix typo that was causing visual artifacts in grayscale JPEGs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@376 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-17 07:51:35 +00:00
DRC
e1303ef099 Expose TurboJPEG scaling features in Java wrapper
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@375 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-16 03:26:48 +00:00
DRC
a683760d1c Expose TurboJPEG scaling features in Java wrapper 2011-02-16 03:26:48 +00:00
DRC
942029fd93 Print scaled image size when performing verbose decompression test
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@374 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-16 02:29:07 +00:00
DRC
f46386f87d Print scaled image size when performing verbose decompression test 2011-02-16 02:29:07 +00:00
DRC
4a3322df1e Fix seg fault
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@373 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-16 02:25:40 +00:00
DRC
10e445c341 Fix seg fault 2011-02-16 02:25:40 +00:00
DRC
dae3ee9f67 Test scaled decompression feature in TurboJPEG
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@372 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-16 02:08:17 +00:00
DRC
e4f9ae630d Test scaled decompression feature in TurboJPEG 2011-02-16 02:08:17 +00:00
DRC
dbf80031ae Not using Intel codec anymore
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@371 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-16 01:39:29 +00:00
DRC
bc507f672d Use same naming scheme for output files as v1.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@370 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-16 01:23:48 +00:00
DRC
8252677857 Use same naming scheme for output files as v1.1 2011-02-16 01:23:48 +00:00
DRC
72b0f2b68e General code cleanup
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@369 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-15 21:57:50 +00:00
DRC
452d7857cc General code cleanup 2011-02-15 21:57:50 +00:00
DRC
993bf0e515 General code cleanup
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@368 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-15 21:57:26 +00:00
DRC
b9e093c1a8 General code cleanup 2011-02-15 21:57:26 +00:00
DRC
8ed7b81403 Added scaling API to TurboJPEG/OSS
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@367 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-15 08:31:34 +00:00
DRC
aa8b75afa8 Added scaling API to TurboJPEG/OSS 2011-02-15 08:31:34 +00:00
DRC
8254df1a06 Document that pitch=0 == pitch=width*pixelsize
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@366 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-15 07:57:48 +00:00
DRC
e9cf55cc94 Ensure that YUV temp buffers get properly freed if a failure occurs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@365 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-15 05:26:28 +00:00
DRC
50103b80ca Ensure that YUV temp buffers get properly freed if a failure occurs 2011-02-15 05:26:28 +00:00
DRC
91e86ba6cf Ensure that YUV temp buffers get properly freed if a failure occurs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@364 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-15 05:24:08 +00:00
DRC
f98553bae1 Ensure that the exit status of the program indicates failure if one of the pixel value checks fails
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@363 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-15 05:19:31 +00:00
DRC
d850ff7386 Ensure that the exit status of the program indicates failure if one of the pixel value checks fails 2011-02-15 05:19:31 +00:00
DRC
cfef7f1bd8 Ensure that the exit status of the program indicates failure if one of the pixel value checks fails
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@362 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-15 05:17:20 +00:00
DRC
b306607ad6 Ported jpgtest.cxx to pure C to avoid the need for a C++ compiler
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@361 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-15 04:04:02 +00:00
DRC
d70d48ea3e Ported jpgtest.cxx to pure C to avoid the need for a C++ compiler 2011-02-15 04:04:02 +00:00
DRC
b8cc52bf1a Ported jpgtest.cxx to pure C to avoid the need for a C++ compiler
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@360 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-15 03:59:11 +00:00
DRC
e27124ab39 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@359 632fc199-4ca6-4c93-a231-07263d6284db 2011-02-08 07:14:33 +00:00
DRC
c5a419970e Restructure Java classes into their own package
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@358 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-08 06:54:36 +00:00
DRC
7404770855 Restructure Java classes into their own package 2011-02-08 06:54:36 +00:00
DRC
2413cb8673 Use Java capitalization conventions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@357 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-08 02:11:37 +00:00
DRC
b56211da74 Use Java capitalization conventions 2011-02-08 02:11:37 +00:00
DRC
2e4e0c0779 New C version of jpgtest needs libm
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@356 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-08 02:09:04 +00:00
DRC
4c2c2e7467 New C version of jpgtest needs libm 2011-02-08 02:09:04 +00:00
DRC
2e4d044cab Ported jpgtest.cxx to pure C to avoid the need for a C++ compiler
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@355 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-08 01:18:37 +00:00
DRC
a3c3059fe2 Ported jpgtest.cxx to pure C to avoid the need for a C++ compiler
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@354 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-07 08:06:16 +00:00
DRC
1913d03c89 Ported jpgtest.cxx to pure C to avoid the need for a C++ compiler 2011-02-07 08:06:16 +00:00
DRC
8b38f49a8a git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@353 632fc199-4ca6-4c93-a231-07263d6284db 2011-02-06 18:51:24 +00:00
DRC
023d8b367d 2011-02-06 18:51:24 +00:00
DRC
389c47248b JNI expects symbols to either have both an underscore and an @ suffix or to have neither, so since MinGW doesn't add an underscore, we need to disable the suffix as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@352 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-06 18:48:13 +00:00
DRC
f0512c5686 JNI expects symbols to either have both an underscore and an @ suffix or to have neither, so since MinGW doesn't add an underscore, we need to disable the suffix as well 2011-02-06 18:48:13 +00:00
DRC
d00dea3052 Update (C) message
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@351 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-06 16:35:58 +00:00
DRC
62bb97b9ac Update (C) message 2011-02-06 16:35:58 +00:00
DRC
0caa0b4ebf 1.1.90
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@350 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-06 16:11:41 +00:00
DRC
2719c40abc 1.1.90 2011-02-06 16:11:41 +00:00
DRC
207a03b377 Add java/ to dist
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@349 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-06 15:58:22 +00:00
DRC
3bc6dc4305 Add java/ to dist 2011-02-06 15:58:22 +00:00
DRC
1b0c3b01de Propagate --with-jni down to RPM SPEC
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@348 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-06 15:51:27 +00:00
DRC
be2de6bc98 Propagate --with-jni down to RPM SPEC 2011-02-06 15:51:27 +00:00
DRC
1421a264e4 Don't set BUILDJNILIB=1 or default JAVA_CFLAGS unless --with-jni is specified
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@347 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-06 15:35:38 +00:00
DRC
a117c67704 Don't set BUILDJNILIB=1 or default JAVA_CFLAGS unless --with-jni is specified 2011-02-06 15:35:38 +00:00
DRC
218c0c1db3 Build JNI wrapper on Windows
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@346 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-05 06:01:18 +00:00
DRC
74ff1aac8e Build JNI wrapper on Windows 2011-02-05 06:01:18 +00:00
DRC
f2214c2e6b git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@345 632fc199-4ca6-4c93-a231-07263d6284db 2011-02-05 05:51:46 +00:00
DRC
345c3eed92 2011-02-05 05:51:46 +00:00
DRC
ed6526f002 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@344 632fc199-4ca6-4c93-a231-07263d6284db 2011-02-05 05:41:18 +00:00
DRC
3bfca02ca0 2011-02-05 05:41:18 +00:00
DRC
25c58709e3 OS X Tiger requires that JNI libraries have the extension .jnilib, so create a sym link to make it happy
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@343 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-05 04:41:36 +00:00
DRC
a4b6e4cd66 OS X Tiger requires that JNI libraries have the extension .jnilib, so create a sym link to make it happy 2011-02-05 04:41:36 +00:00
DRC
285bbef159 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@342 632fc199-4ca6-4c93-a231-07263d6284db 2011-02-05 04:17:37 +00:00
DRC
763f26b29a 2011-02-05 04:17:37 +00:00
DRC
063ab49603 Detect jni.h; Provide mechanism for adding include paths necessary to find it; Set intelligent defaults for Linux/Mac/Solaris
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@341 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-04 22:16:41 +00:00
DRC
4ac54c3cd6 Detect jni.h; Provide mechanism for adding include paths necessary to find it; Set intelligent defaults for Linux/Mac/Solaris 2011-02-04 22:16:41 +00:00
DRC
9af1aedcdb Eliminate compiler warnings in Sun Studio
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@340 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-04 22:13:14 +00:00
DRC
c20ba350ad Eliminate compiler warnings in Sun Studio 2011-02-04 22:13:14 +00:00
DRC
5ccb982332 JNI interface changed for TJ class, since it only has static methods now
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@339 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-04 11:22:15 +00:00
DRC
5cc45fd6df JNI interface changed for TJ class, since it only has static methods now 2011-02-04 11:22:15 +00:00
DRC
de3c86120c 1.1.90
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@338 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-04 11:07:34 +00:00
DRC
eaad60012a 1.1.90 2011-02-04 11:07:34 +00:00
DRC
f8e0055a6a Add JNI wrapper for TurboJPEG/OSS
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@337 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-04 11:06:36 +00:00
DRC
36adfee700 Add JNI wrapper for TurboJPEG/OSS 2011-02-04 11:06:36 +00:00
DRC
353477f47a Oops. Committed debugging code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@336 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-02 06:02:38 +00:00
DRC
b10fb30664 Oops. Committed debugging code 2011-02-02 06:02:38 +00:00
DRC
af1ca9bcc1 Clarify that the C wrappers and headers fall under the same license as the rest of the SIMD code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@335 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-02 05:42:37 +00:00
DRC
daae6d966a Clarify that the C wrappers and headers fall under the same license as the rest of the SIMD code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@334 632fc199-4ca6-4c93-a231-07263d6284db
2011-02-02 05:41:15 +00:00
DRC
d83e1f8900 Clarify that the C wrappers fall under the same license as the rest of the SIMD code 2011-02-02 05:38:34 +00:00
DRC
26a69b1a29 Clarify that the C wrappers fall under the same license as the rest of the SIMD code 2011-02-02 05:31:16 +00:00
DRC
5a5af28b7c Clarify that the C wrappers fall under the same license as the rest of the SIMD code 2011-02-02 05:29:19 +00:00
DRC
958b2c0c9b git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@330 632fc199-4ca6-4c93-a231-07263d6284db 2011-01-28 08:00:40 +00:00
DRC
1dd9985842 2011-01-28 08:00:40 +00:00
DRC
4a1c2d9693 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@329 632fc199-4ca6-4c93-a231-07263d6284db 2011-01-28 08:00:10 +00:00
DRC
9dcb1af2f6 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@328 632fc199-4ca6-4c93-a231-07263d6284db 2011-01-28 07:56:21 +00:00
DRC
c4bce4857e git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@327 632fc199-4ca6-4c93-a231-07263d6284db 2011-01-28 07:51:25 +00:00
DRC
b52e7334f6 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@326 632fc199-4ca6-4c93-a231-07263d6284db 2011-01-28 07:48:41 +00:00
DRC
6ca296de5d 2011-01-28 07:48:41 +00:00
DRC
a4efd4eec7 Create 1.1.x branch
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@325 632fc199-4ca6-4c93-a231-07263d6284db
2011-01-28 06:06:34 +00:00
DRC
fa1d18385d Further protect against invalid Huffman codes
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@324 632fc199-4ca6-4c93-a231-07263d6284db
2011-01-26 05:35:20 +00:00
DRC
79778f6588 1.0.2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@323 632fc199-4ca6-4c93-a231-07263d6284db
2011-01-26 05:34:01 +00:00
DRC
a432ff43a2 Create 1.0.x branch
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@322 632fc199-4ca6-4c93-a231-07263d6284db
2011-01-26 05:23:28 +00:00
DRC
2d94e261ec The fast integer DCT degrades for qualities > 95, so use the slow integer DCT instead to ensure that perceptually lossless performance is maintained.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@320 632fc199-4ca6-4c93-a231-07263d6284db
2011-01-25 06:52:31 +00:00
DRC
21b5c4bc4d The fast integer DCT degrades for qualities > 95, so use the slow integer DCT instead to ensure that perceptually lossless performance is maintained. 2011-01-25 06:52:31 +00:00
DRC
01e6909180 Clarifications
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@319 632fc199-4ca6-4c93-a231-07263d6284db
2011-01-06 01:19:43 +00:00
DRC
9ca11b80fc Clarifications 2011-01-06 01:19:43 +00:00
DRC
57423076e6 Eliminate all of the __memalign() mess and just handle the alignment ourselves
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@317 632fc199-4ca6-4c93-a231-07263d6284db
2011-01-05 23:35:53 +00:00
DRC
2e1b59c09d Eliminate all of the __memalign() mess and just handle the alignment ourselves 2011-01-05 23:35:53 +00:00
DRC
2a2e451ddc Ensure temp. buffers for YUV output are 16-byte aligned on 32-bit Windows
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@316 632fc199-4ca6-4c93-a231-07263d6284db
2011-01-05 22:33:24 +00:00
DRC
3c7c57b3ad Ensure temp. buffers for YUV output are 16-byte aligned on 32-bit Windows 2011-01-05 22:33:24 +00:00
DRC
990e28dc96 Make arithmetic coding support status messages more clear
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@315 632fc199-4ca6-4c93-a231-07263d6284db
2011-01-04 21:40:11 +00:00
DRC
fd7105e1d6 Make arithmetic coding support status messages more clear 2011-01-04 21:40:11 +00:00
DRC
49aedf4231 Further protect against invalid Huffman codes
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@314 632fc199-4ca6-4c93-a231-07263d6284db
2011-01-04 08:09:41 +00:00
DRC
38b8c2f0ef Further protect against invalid Huffman codes 2011-01-04 08:09:41 +00:00
DRC
190d5495fe Include new tjDecompressHeader2() function
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@313 632fc199-4ca6-4c93-a231-07263d6284db
2010-12-14 19:48:38 +00:00
DRC
6ac57da9cd Include new tjDecompressHeader2() function 2010-12-14 19:48:38 +00:00
DRC
50c657bc09 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@312 632fc199-4ca6-4c93-a231-07263d6284db 2010-12-14 01:23:16 +00:00
DRC
4d53f88ea5 2010-12-14 01:23:16 +00:00
DRC
cad1cfe17c Added YUV decode functionality to the "decompress only" test
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@311 632fc199-4ca6-4c93-a231-07263d6284db
2010-12-14 01:22:00 +00:00
DRC
4add559463 Added YUV decode functionality to the "decompress only" test 2010-12-14 01:22:00 +00:00
DRC
1fe80f80f5 Added extended tjDecompressHeader() function which can determine the type of subsampling used in the JPEG image
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@310 632fc199-4ca6-4c93-a231-07263d6284db
2010-12-14 01:21:29 +00:00
DRC
f0d2577482 Added extended tjDecompressHeader() function which can determine the type of subsampling used in the JPEG image 2010-12-14 01:21:29 +00:00
DRC
a6f4fca72c Fix various memory corruption issues in the new JPEG->YUV feature
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@309 632fc199-4ca6-4c93-a231-07263d6284db
2010-12-11 06:01:11 +00:00
DRC
55a9cbffe7 Fix various memory corruption issues in the new JPEG->YUV feature 2010-12-11 06:01:11 +00:00
DRC
f9cf5c799d If the output width/height are not an even number of MCU's, then use an intermediate buffer to ensure that the output format is XVideo-compatible
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@308 632fc199-4ca6-4c93-a231-07263d6284db
2010-12-10 10:58:49 +00:00
DRC
f54cc16225 If the output width/height are not an even number of MCU's, then use an intermediate buffer to ensure that the output format is XVideo-compatible 2010-12-10 10:58:49 +00:00
DRC
9e17f7d9bc Provide TJ_YUV option for tjDecompress() as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@307 632fc199-4ca6-4c93-a231-07263d6284db
2010-12-10 04:59:13 +00:00
DRC
f80fb63847 Provide TJ_YUV option for tjDecompress() as well 2010-12-10 04:59:13 +00:00
DRC
ac08ef624c Don't require quality argument when encoding to YUV
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@306 632fc199-4ca6-4c93-a231-07263d6284db
2010-12-09 10:01:57 +00:00
DRC
33c17e84f2 Don't require quality argument when encoding to YUV 2010-12-09 10:01:57 +00:00
DRC
fbb674707e Merge the TurboJPEG planar YUV encoding feature from VirtualGL 2.2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@305 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-24 04:02:37 +00:00
DRC
979a590374 Merge the TurboJPEG planar YUV encoding feature from VirtualGL 2.2 2010-11-24 04:02:37 +00:00
DRC
541e651e4c Hide internal SIMD symbols in libjpeg-turbo shared library
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@304 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-23 20:42:48 +00:00
DRC
c0cfde855c Hide internal SIMD symbols in libjpeg-turbo shared library 2010-11-23 20:42:48 +00:00
DRC
a46830b232 Eliminate spurious global symbols
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@303 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-23 18:00:46 +00:00
DRC
1f981a0210 Eliminate spurious global symbols 2010-11-23 18:00:46 +00:00
DRC
f0b7fefbf4 Include arithmetic coding test files in dist
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@302 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-23 17:13:02 +00:00
DRC
2e25b45529 Include arithmetic coding test files in dist 2010-11-23 17:13:02 +00:00
DRC
245cfdf3d6 Allow arithmetic encoding/decoding to be disabled in CMake build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@301 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-23 17:11:06 +00:00
DRC
bdb1602e25 Allow arithmetic encoding/decoding to be disabled in CMake build 2010-11-23 17:11:06 +00:00
DRC
e372004b4d Added configure options to disable arithmetic encoding/decoding
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@300 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-23 06:50:14 +00:00
DRC
fe418b6240 Added configure options to disable arithmetic encoding/decoding 2010-11-23 06:50:14 +00:00
DRC
66f97e6820 Support arithmetic encoding and decoding
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@299 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-23 05:49:54 +00:00
DRC
19e6975e90 Support arithmetic encoding and decoding 2010-11-23 05:49:54 +00:00
DRC
58842f9679 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@298 632fc199-4ca6-4c93-a231-07263d6284db 2010-11-23 04:46:59 +00:00
DRC
a97cc7c538 2010-11-23 04:46:59 +00:00
DRC
ec31193812 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@297 632fc199-4ca6-4c93-a231-07263d6284db 2010-11-22 19:51:42 +00:00
DRC
d06a3aec90 2010-11-22 19:51:42 +00:00
DRC
646e5a8a11 RGBA=RGBX, etc.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@296 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-18 19:55:29 +00:00
DRC
2f1473783f RGBA=RGBX, etc. 2010-11-18 19:55:29 +00:00
DRC
b8841f1ba2 Oops. Still need to explicitly make symlinks in this script, because prefix!=/opt/libjpeg-turbo
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@295 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-17 23:14:53 +00:00
DRC
a6ae163f09 Oops. Still need to explicitly make symlinks in this script, because prefix!=/opt/libjpeg-turbo 2010-11-17 23:14:53 +00:00
DRC
d1c281a055 Create /opt/libjpeg-turbo/lib32 and /opt/libjpeg-turbo/lib64 symlinks when doing 'make install'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@294 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-17 22:44:40 +00:00
DRC
76f402f51b Create /opt/libjpeg-turbo/lib32 and /opt/libjpeg-turbo/lib64 symlinks when doing 'make install' 2010-11-17 22:44:40 +00:00
DRC
61c15bdefb Fix invalid use of fpos_t
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@293 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-13 05:31:25 +00:00
DRC
b6d2ffa0c3 Fix invalid use of fpos_t 2010-11-13 05:31:25 +00:00
DRC
e89bbaee14 Document jpgtest decompress-only feature
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@292 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-12 10:18:08 +00:00
DRC
b6563b2d50 Document jpgtest decompress-only feature 2010-11-12 10:18:08 +00:00
DRC
e8ce2e0864 Add option to test decompression only + clean up error handling
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@291 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-12 10:14:11 +00:00
DRC
024e30659f Add option to test decompression only + clean up error handling 2010-11-12 10:14:11 +00:00
DRC
7a0478e1e4 Use version script for jpeg-6b emulation as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@290 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-07 19:12:30 +00:00
DRC
cd9000a034 Use version script for jpeg-6b emulation as well 2010-11-07 19:12:30 +00:00
DRC
7ab9d7cad9 Update header description for grayscale bitmap support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@289 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-04 22:42:18 +00:00
DRC
24fd779ccf Update header description for grayscale bitmap support 2010-11-04 22:42:18 +00:00
DRC
09854f57dc Grayscale bitmap support in TurboJPEG/OSS
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@288 632fc199-4ca6-4c93-a231-07263d6284db
2010-11-04 22:39:59 +00:00
DRC
366f303099 Grayscale bitmap support in TurboJPEG/OSS 2010-11-04 22:39:59 +00:00
DRC
98dbe91270 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@287 632fc199-4ca6-4c93-a231-07263d6284db 2010-11-04 22:22:30 +00:00
DRC
409b94e337 2010-11-04 22:22:30 +00:00
DRC
0f53df8f71 Allow Mac and Solaris packages to be built with v7/v8b emulated libraries
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@286 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-21 19:47:06 +00:00
DRC
b4aae95e78 Allow Mac and Solaris packages to be built with v7/v8b emulated libraries 2010-10-21 19:47:06 +00:00
DRC
8515d3d58d Emulate the version script in libjpeg v7/v8 shared libraries
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@285 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-19 06:38:57 +00:00
DRC
8705f11462 Emulate the version script in libjpeg v7/v8 shared libraries 2010-10-19 06:38:57 +00:00
DRC
c0a1cba11b Accommodate spaces in CMAKE_BINARY_DIR
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@284 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-18 09:46:27 +00:00
DRC
627856c2cf Accommodate spaces in CMAKE_BINARY_DIR 2010-10-18 09:46:27 +00:00
DRC
efa618ecba git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@283 632fc199-4ca6-4c93-a231-07263d6284db 2010-10-18 08:41:11 +00:00
DRC
257a3bcf05 2010-10-18 08:41:11 +00:00
DRC
3a606240f7 1.0.90 (1.1 beta1)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@282 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-18 08:27:04 +00:00
DRC
117bacff3a 1.0.90 (1.1 beta1) 2010-10-18 08:27:04 +00:00
DRC
9ef93dbbdc Modify OS X universal binary creation process to give the user more control over the 32-bit fork (necessary for building universal binaries with libjpeg v7/v8b emulation, for instance)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@281 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-18 08:24:42 +00:00
DRC
d910129db9 Modify OS X universal binary creation process to give the user more control over the 32-bit fork (necessary for building universal binaries with libjpeg v7/v8b emulation, for instance) 2010-10-18 08:24:42 +00:00
DRC
68bf3f2846 MinGW under Cygwin needs CMAKE_SYSTEM_NAME=Windows as well, since technically, we're cross-compiling
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@280 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-18 07:56:14 +00:00
DRC
e300354827 MinGW under Cygwin needs CMAKE_SYSTEM_NAME=Windows as well, since technically, we're cross-compiling 2010-10-18 07:56:14 +00:00
DRC
81543310fd Cygwin is only supported with the autotools build system
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@279 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-18 07:23:58 +00:00
DRC
abd867408b Cygwin is only supported with the autotools build system 2010-10-18 07:23:58 +00:00
DRC
5559c900c0 Additional information/corrections involving libjpeg v7/v8b emulation
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@278 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-18 02:21:10 +00:00
DRC
7a4d1f0fdb Additional information/corrections involving libjpeg v7/v8b emulation 2010-10-18 02:21:10 +00:00
DRC
b42a48cc44 Use built-in cmake compare_files function rather than GNU cmp (which isn't natively available on Windows)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@277 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-18 01:06:36 +00:00
DRC
89c9085fcd Use built-in cmake compare_files function rather than GNU cmp (which isn't natively available on Windows) 2010-10-18 01:06:36 +00:00
DRC
1f80a10b4e Allow RPMs and SRPMs to be generated with v7/v8b emulation; Add CMake scripts and other missing files to source distribution
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@276 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-18 00:15:31 +00:00
DRC
71cbfe8860 Allow RPMs and SRPMs to be generated with v7/v8b emulation; Add CMake scripts and other missing files to source distribution 2010-10-18 00:15:31 +00:00
DRC
e2befdef6a Install headers as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@275 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-17 07:28:08 +00:00
DRC
76a6ac5c44 Install headers as well 2010-10-17 07:28:08 +00:00
DRC
310f606b72 Windows packaging has been moved to the CMake build system, so remove it from autotools
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@274 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-17 06:50:35 +00:00
DRC
1040f1ac81 Windows packaging has been moved to the CMake build system, so remove it from autotools 2010-10-17 06:50:35 +00:00
DRC
26658432fb Document 'make install'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@273 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-16 22:04:29 +00:00
DRC
4b8c2743fb Document 'make install' 2010-10-16 22:04:29 +00:00
DRC
7284c9a0cd Allow installation from the build system (without needing to build an installer)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@272 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-16 21:55:14 +00:00
DRC
2413fda880 Allow installation from the build system (without needing to build an installer) 2010-10-16 21:55:14 +00:00
DRC
6f4ba6144a Eliminate redundant dependency statement; Notify user when SIMD is disabled
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@271 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-16 21:27:38 +00:00
DRC
d91d48ed83 Eliminate redundant dependency statement; Notify user when SIMD is disabled 2010-10-16 21:27:38 +00:00
DRC
1c73ce8eb5 Additional MinGW recipes
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@270 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-16 21:02:54 +00:00
DRC
364c050c1a Additional MinGW recipes 2010-10-16 21:02:54 +00:00
DRC
b397bfd7db Remove old Windows build system
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@269 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-16 09:23:36 +00:00
DRC
f228b139fa Remove old Windows build system 2010-10-16 09:23:36 +00:00
DRC
cc2437425b Document new CMake build system
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@268 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-16 09:22:43 +00:00
DRC
6a6ac8951c Document new CMake build system 2010-10-16 09:22:43 +00:00
DRC
b09fde7723 Oops. Forgot to check in header templates
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@267 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-16 08:52:55 +00:00
DRC
deab46b949 Oops. Forgot to check in header templates 2010-10-16 08:52:55 +00:00
DRC
2c0a4e1e74 Integrate installer build into CMake build system
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@266 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-16 08:51:43 +00:00
DRC
5b8f6495d1 Integrate installer build into CMake build system 2010-10-16 08:51:43 +00:00
DRC
d830d36074 Fix dependencies for the color conversion routines, which build other .asm files indirectly
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@265 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-15 20:07:41 +00:00
DRC
edc8253164 Fix dependencies for the color conversion routines, which build other .asm files indirectly 2010-10-15 20:07:41 +00:00
DRC
378da4d61b Print error message if trying to do a native Unix build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@264 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-15 19:11:11 +00:00
DRC
8f91c754c8 Print error message if trying to do a native Unix build 2010-10-15 19:11:11 +00:00
DRC
c869c2c811 Unix LF
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@263 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-15 08:43:32 +00:00
DRC
e0b2920fdd Unix LF 2010-10-15 08:43:32 +00:00
DRC
cd5f2ee23c Allow nasm path to be overridden
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@262 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-15 08:39:44 +00:00
DRC
03c5cacaec Allow nasm path to be overridden 2010-10-15 08:39:44 +00:00
DRC
a9d5b25304 Set version information for DLL's
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@261 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-15 06:42:45 +00:00
DRC
d8d4b03bc5 Set version information for DLL's 2010-10-15 06:42:45 +00:00
DRC
e328bf25f0 Export the correct symbols from the Windows DLL when built with libjpeg v7 or v8b emulation
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@260 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-15 05:33:21 +00:00
DRC
ce23b96141 Export the correct symbols from the Windows DLL when built with libjpeg v7 or v8b emulation 2010-10-15 05:33:21 +00:00
DRC
cdd8f123cc Use version suffix on Cygwin DLL as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@259 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-15 04:58:13 +00:00
DRC
75905554de Use version suffix on Cygwin DLL as well 2010-10-15 04:58:13 +00:00
DRC
eb2b9d6b96 Echo version and build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@258 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-15 04:55:13 +00:00
DRC
ea84d5dd61 Echo version and build 2010-10-15 04:55:13 +00:00
DRC
846970366b First pass at a CMake build system
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@257 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-15 03:43:24 +00:00
DRC
bb8322f4c8 First pass at a CMake build system 2010-10-15 03:43:24 +00:00
DRC
efa4ddcc88 Space = Tab
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@256 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-13 19:22:50 +00:00
DRC
a478af780a Space = Tab 2010-10-13 19:22:50 +00:00
DRC
2edf19d601 Oops. Should be single, not double = sign
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@255 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-13 19:22:20 +00:00
DRC
21e8297c16 Oops. Should be single, not double = sign 2010-10-13 19:22:20 +00:00
DRC
77e3964ca9 Document the libjpeg v7/v8 extensions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@254 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-12 03:02:31 +00:00
DRC
0879ed8eaf Document the libjpeg v7/v8 extensions 2010-10-12 03:02:31 +00:00
DRC
766dc5c59d Mention new v7/v8 extensions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@253 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-12 02:50:18 +00:00
DRC
53c7d3bc82 Mention new v7/v8 extensions 2010-10-12 02:50:18 +00:00
DRC
39ea562c07 Document new v7/v8 features; .doc = .txt
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@252 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-12 01:55:31 +00:00
DRC
7e08d60891 Document new v7/v8 features; .doc = .txt 2010-10-12 01:55:31 +00:00
DRC
ed16ad11ff Enable the use of separate luminance/chrominance quality scaling with libjpeg v6b code base as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@251 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-11 23:36:04 +00:00
DRC
1dc925aa11 Enable the use of separate luminance/chrominance quality scaling with libjpeg v6b code base as well 2010-10-11 23:36:04 +00:00
DRC
12387ebc92 Add sanity check in BMP reader module to avoid cjpeg crash for empty input
image


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@250 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-10 07:27:26 +00:00
DRC
fd644379ed Add sanity check in BMP reader module to avoid cjpeg crash for empty input
image
2010-10-10 07:27:26 +00:00
DRC
a119e8f8d0 Add sanity check in BMP reader module to avoid cjpeg crash for empty input
image; Support 32-bit BMPs
2010-10-10 07:25:16 +00:00
DRC
294079cbe0 Add option for setting luminance & chrominance quality independently (currently only works if using libjpeg v7 or v8 code base)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@248 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-10 07:21:55 +00:00
DRC
153f54b94f Add option for setting luminance & chrominance quality independently (currently only works if using libjpeg v7 or v8 code base) 2010-10-10 07:21:55 +00:00
DRC
2cdd2ae753 Display libjpeg-turbo version/copyrights in run-time programs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@247 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-10 06:54:21 +00:00
DRC
ddf1f74cc3 Display libjpeg-turbo version/copyrights in run-time programs 2010-10-10 06:54:21 +00:00
DRC
517e1c0525 Add -raw option to rdjpgcom for outputting non-printable characters as-is; Make rdjpgcom locale-aware.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@246 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-10 06:04:05 +00:00
DRC
674ea621df Add -raw option to rdjpgcom for outputting non-printable characters as-is; Make rdjpgcom locale-aware. 2010-10-10 06:04:05 +00:00
DRC
1658c79eba Fix byte order issue with 16bit PPM/PGM files
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@245 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-10 06:01:00 +00:00
DRC
3576a86dfb Fix byte order issue with 16bit PPM/PGM files 2010-10-10 06:01:00 +00:00
DRC
9a648cc90b Fix transpose feature with jpeg v6b code base
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@244 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-10 02:48:21 +00:00
DRC
7a3ae15f7d Fix transpose feature with jpeg v6b code base 2010-10-10 02:48:21 +00:00
DRC
c04bd3cc97 Implement lossless crop feature from jpeg v7 and v8
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@243 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-10 02:15:56 +00:00
DRC
be1aa6e080 Implement lossless crop feature from jpeg v7 and v8 2010-10-10 02:15:56 +00:00
DRC
c54275c6a7 Fix version numbers for v7/v8 shared libs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@242 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-10 00:40:37 +00:00
DRC
8dc66668e6 Fix version numbers for v7/v8 shared libs 2010-10-10 00:40:37 +00:00
DRC
49967cdb30 Improve readability and flexibility of compatibility macros
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@241 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-09 19:57:51 +00:00
DRC
65ee62c698 Improve readability and flexibility of compatibility macros 2010-10-09 19:57:51 +00:00
DRC
10acd811d0 Remove comments describing DCT scaling feature
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@240 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-09 19:24:28 +00:00
DRC
ba825db7ad Remove comments describing DCT scaling feature 2010-10-09 19:24:28 +00:00
DRC
553d868c25 Oops. Forgot to include the new macro header
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@239 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-09 19:09:41 +00:00
DRC
c49c2e80e8 Oops. Forgot to include the new macro header 2010-10-09 19:09:41 +00:00
DRC
a5ee9df541 Bump revision to 1.1 alpha
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@238 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-08 08:07:37 +00:00
DRC
74e983609c Bump revision to 1.1 alpha 2010-10-08 08:07:37 +00:00
DRC
eafbe8a056 Bump revision to 1.1 alpha
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@237 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-08 08:07:10 +00:00
DRC
aa25adaaa0 Bump revision to 1.1 alpha 2010-10-08 08:07:10 +00:00
DRC
36a6eec932 Added optional emulation of the jpeg-7 or jpeg-8b API/ABI's
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@236 632fc199-4ca6-4c93-a231-07263d6284db
2010-10-08 08:05:44 +00:00
DRC
d0d0f09d40 Added optional emulation of the jpeg-7 or jpeg-8b API/ABI's 2010-10-08 08:05:44 +00:00
DRC
e5d7bc9f93 "OS/X" = "OS X"
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@235 632fc199-4ca6-4c93-a231-07263d6284db
2010-09-30 18:54:31 +00:00
DRC
0b1530e1e3 "OS/X" = "OS X" 2010-09-30 18:54:31 +00:00
DRC
585a0172e7 Use testimgflt.ppm in Windows tests
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@233 632fc199-4ca6-4c93-a231-07263d6284db
2010-09-09 22:05:49 +00:00
DRC
b9d65553d7 Use testimgflt.ppm in Windows tests 2010-09-09 22:05:49 +00:00
DRC
5263a8044f Require a full build prior to testing (this fixes a problem whereby running 'make test' on an unbuilt tree would fail)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@232 632fc199-4ca6-4c93-a231-07263d6284db
2010-09-09 21:02:21 +00:00
DRC
1b6f7d3992 Require a full build prior to testing (this fixes a problem whereby running 'make test' on an unbuilt tree would fail) 2010-09-09 21:02:21 +00:00
DRC
50503c7ac3 Include testimgflt.ppm in distribution
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@231 632fc199-4ca6-4c93-a231-07263d6284db
2010-09-09 21:00:31 +00:00
DRC
30ce53edf9 Include testimgflt.ppm in distribution 2010-09-09 21:00:31 +00:00
DRC
c21e538bfb Most of the "nosimd" test images no longer exist, so don't try to include them in the distribution
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@230 632fc199-4ca6-4c93-a231-07263d6284db
2010-09-09 20:40:35 +00:00
DRC
c37c0d1195 Most of the "nosimd" test images no longer exist, so don't try to include them in the distribution 2010-09-09 20:40:35 +00:00
DRC
babb815cc0 1.0.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@229 632fc199-4ca6-4c93-a231-07263d6284db
2010-09-09 20:34:10 +00:00
DRC
031227571f 1.0.1 2010-09-09 20:34:10 +00:00
DRC
c06073a949 Remove simd/ prefix from #include (not necessary and was causing problems with Visual Studio project)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@228 632fc199-4ca6-4c93-a231-07263d6284db
2010-09-06 17:37:12 +00:00
DRC
5e8d78ff40 Remove simd/ prefix from #include (not necessary and was causing problems with Visual Studio project) 2010-09-06 17:37:12 +00:00
DRC
bdb1288e9e Automatically determine whether INCOMPLETE_TYPES_BROKEN should be defined
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@227 632fc199-4ca6-4c93-a231-07263d6284db
2010-08-21 21:14:17 +00:00
DRC
134d29791f Automatically determine whether INCOMPLETE_TYPES_BROKEN should be defined 2010-08-21 21:14:17 +00:00
DRC
ae7fe0b9ab Clarify licensing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@226 632fc199-4ca6-4c93-a231-07263d6284db
2010-08-11 21:46:46 +00:00
DRC
d982f7d040 Clarify licensing 2010-08-11 21:46:46 +00:00
DRC
025a279ce6 Strike that! Reverse it!
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@225 632fc199-4ca6-4c93-a231-07263d6284db
2010-08-07 16:27:56 +00:00
DRC
8737bd492f Strike that! Reverse it! 2010-08-07 16:27:56 +00:00
DRC
3da06c794e No longer need separate test BMP for non-SIMD unit tests
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@224 632fc199-4ca6-4c93-a231-07263d6284db
2010-08-07 16:14:05 +00:00
DRC
ddef5f56d3 No longer need separate test BMP for non-SIMD unit tests 2010-08-07 16:14:05 +00:00
DRC
30959719ad Fix typo in SIMD dispatch routines which was causing 4:2:0 upsampling to
be used instead of 4:2:2 when decompressing JPEG images using SSE2 code


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@223 632fc199-4ca6-4c93-a231-07263d6284db
2010-08-07 16:06:56 +00:00
DRC
09345b6eb4 Fix typo in SIMD dispatch routines which was causing 4:2:0 upsampling to
be used instead of 4:2:2 when decompressing JPEG images using SSE2 code
2010-08-07 16:06:56 +00:00
DRC
231a43fc68 Fix build with YASM
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@222 632fc199-4ca6-4c93-a231-07263d6284db
2010-08-03 18:45:11 +00:00
DRC
7dcc736177 Fix build with YASM 2010-08-03 18:45:11 +00:00
DRC
0fbb28ec39 Handle erroneous Huffman codes
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@221 632fc199-4ca6-4c93-a231-07263d6284db
2010-07-30 17:15:52 +00:00
DRC
2f85b88bdf Handle erroneous Huffman codes 2010-07-30 17:15:52 +00:00
DRC
bab2941338 1.0.1
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@220 632fc199-4ca6-4c93-a231-07263d6284db
2010-07-30 15:28:22 +00:00
DRC
84aba108d6 1.0.1 2010-07-30 15:28:22 +00:00
DRC
575c3425ad Document NASM version requirement for 64-bit backward compatible build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@219 632fc199-4ca6-4c93-a231-07263d6284db
2010-07-08 07:01:20 +00:00
DRC
843e7306a1 Document NASM version requirement for 64-bit backward compatible build 2010-07-08 07:01:20 +00:00
DRC
f1372d29eb We're no longer using the RM macro in Makefile.am, so it doesn't need to be substituted anymore
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@218 632fc199-4ca6-4c93-a231-07263d6284db
2010-07-08 05:41:47 +00:00
DRC
1c7414ba64 We're no longer using the RM macro in Makefile.am, so it doesn't need to be substituted anymore 2010-07-08 05:41:47 +00:00
DRC
0dedd1ae9a 64-bit support doesn't just exist in 10.6.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@216 632fc199-4ca6-4c93-a231-07263d6284db
2010-07-02 09:20:12 +00:00
DRC
6e6910e89b 64-bit support doesn't just exist in 10.6. 2010-07-02 09:20:12 +00:00
DRC
df3337ce8a Log only changes to this source tree, not the external build scripts
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@215 632fc199-4ca6-4c93-a231-07263d6284db
2010-07-02 09:13:58 +00:00
DRC
3b5b551723 Log only changes to this source tree, not the external build scripts 2010-07-02 09:13:58 +00:00
DRC
38ccf8532d git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@214 632fc199-4ca6-4c93-a231-07263d6284db 2010-06-10 19:49:49 +00:00
DRC
7a4df47c41 2010-06-10 19:49:49 +00:00
DRC
7b99172528 Not all platforms define RM
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@213 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-10 19:44:56 +00:00
DRC
faab86eecc Not all platforms define RM 2010-06-10 19:44:56 +00:00
DRC
13b0944e9b Include non-SIMD test images in distribution
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@212 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-10 18:56:27 +00:00
DRC
80a67be49b Include non-SIMD test images in distribution 2010-06-10 18:56:27 +00:00
DRC
83f2144655 Don't require --without-simd to be specified on non-x86 architectures, and fix 'make test' on such architectures
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@211 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-10 18:52:41 +00:00
DRC
3f60381c7a Don't require --without-simd to be specified on non-x86 architectures, and fix 'make test' on such architectures 2010-06-10 18:52:41 +00:00
DRC
bdf7986e7c 1.0.0
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@210 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-10 04:12:48 +00:00
DRC
6993ea56e9 1.0.0 2010-06-10 04:12:48 +00:00
DRC
eadc3c0f91 Cygwin distribution package
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@209 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-09 20:17:09 +00:00
DRC
7aa7b6dbec Cygwin distribution package 2010-06-09 20:17:09 +00:00
DRC
ae79fdbc2d Cygwin package build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@208 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-09 20:16:04 +00:00
DRC
3d9b2409ce Cygwin package build 2010-06-09 20:16:04 +00:00
DRC
c773d10b65 Added bug tracker ID's
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@207 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-05 06:58:22 +00:00
DRC
82b3873e31 Added bug tracker ID's 2010-06-05 06:58:22 +00:00
DRC
2093c6380d Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@206 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-05 03:09:17 +00:00
DRC
1edebfd17b Oops 2010-06-05 03:09:17 +00:00
DRC
3d1dd07d54 Ensure that libdir is set properly during build and install so that the run-time library bindings for the binary programs will be correct
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@205 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-05 03:00:36 +00:00
DRC
aaa3706132 Ensure that libdir is set properly during build and install so that the run-time library bindings for the binary programs will be correct 2010-06-05 03:00:36 +00:00
DRC
995c831c5e Remove bin and man directories when uninstalling package
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@204 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-05 01:20:35 +00:00
DRC
c840af9323 Remove bin and man directories when uninstalling package 2010-06-05 01:20:35 +00:00
DRC
cbda81a01d Distribute man pages in source tarball
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@203 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-05 01:12:35 +00:00
DRC
bf617c729e Distribute man pages in source tarball 2010-06-05 01:12:35 +00:00
DRC
4bf3b585ef git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@202 632fc199-4ca6-4c93-a231-07263d6284db 2010-06-05 01:03:23 +00:00
DRC
7387b7409a 2010-06-05 01:03:23 +00:00
DRC
e238603c37 Install libjpeg run-time programs and man pages and include in Unix/Linux packages; Create a 32-bit compatibility package for amd64 Debian which has only the 32-bit libraries
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@201 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-05 01:02:38 +00:00
DRC
36a5d9d238 Install libjpeg run-time programs and man pages and include in Unix/Linux packages; Create a 32-bit compatibility package for amd64 Debian which has only the 32-bit libraries 2010-06-05 01:02:38 +00:00
DRC
45d48291f9 Create sym. link from /opt/libjpeg-turbo/lib/64 to /opt/libjpeg-turbo/lib/amd64
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@200 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-05 00:35:18 +00:00
DRC
83d312b3f5 Create sym. link from /opt/libjpeg-turbo/lib/64 to /opt/libjpeg-turbo/lib/amd64 2010-06-05 00:35:18 +00:00
DRC
ff95aa6d36 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@199 632fc199-4ca6-4c93-a231-07263d6284db 2010-06-05 00:22:32 +00:00
DRC
66ecd42c6e 2010-06-05 00:22:32 +00:00
DRC
d90c9a2564 Allow arbitrary package name to be specified
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@198 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-05 00:02:23 +00:00
DRC
bb631abf79 Allow arbitrary package name to be specified 2010-06-05 00:02:23 +00:00
DRC
8e2bba9e02 Install libjpeg run-time programs and man pages and include in Unix/Linux packages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@197 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-04 23:54:10 +00:00
DRC
b0a89debf1 Install libjpeg run-time programs and man pages and include in Unix/Linux packages 2010-06-04 23:54:10 +00:00
DRC
8c2b9fa744 Some Linux platforms require -m32 in the LDFLAGS as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@196 632fc199-4ca6-4c93-a231-07263d6284db
2010-06-04 23:09:00 +00:00
DRC
e4451444a3 Some Linux platforms require -m32 in the LDFLAGS as well 2010-06-04 23:09:00 +00:00
DRC
64586cd185 Don't need to use sudo when building Solaris PKG or RPM's
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@195 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-18 22:21:46 +00:00
DRC
e086462c22 Don't need to use sudo when building Solaris PKG or RPM's 2010-05-18 22:21:46 +00:00
DRC
e16eaed09c Oops
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@194 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-18 19:18:42 +00:00
DRC
f77287acae Oops 2010-05-18 19:18:42 +00:00
DRC
f12c7db429 Create sym links so that headers and static libs can always be found in the same place on Solaris, Linux, and Mac
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@193 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-18 19:04:47 +00:00
DRC
85f7af7f92 Create sym links so that headers and static libs can always be found in the same place on Solaris, Linux, and Mac 2010-05-18 19:04:47 +00:00
DRC
bf5a12db42 Go ahead and set the version to 1.0.0 so all interim builds will be release candidates
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@192 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-18 17:31:32 +00:00
DRC
fe51f97001 Go ahead and set the version to 1.0.0 so all interim builds will be release candidates 2010-05-18 17:31:32 +00:00
DRC
12fc3eaf63 0.0.94
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@191 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-18 05:32:01 +00:00
DRC
e480777a66 0.0.94 2010-05-18 05:32:01 +00:00
DRC
49597877a4 64-bit FreeBSD sets host_cpu to "amd64", not "x86_64". Handle that case so that configure will work without explicitly specifying --host.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@190 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-17 20:47:57 +00:00
DRC
daddf82191 64-bit FreeBSD sets host_cpu to "amd64", not "x86_64". Handle that case so that configure will work without explicitly specifying --host. 2010-05-17 20:47:57 +00:00
DRC
991c2fcae7 Some systems (FreeBSD, in particular) don't define the RM macro in automake
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@189 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-17 20:42:51 +00:00
DRC
6be102a7a4 Some systems (FreeBSD, in particular) don't define the RM macro in automake 2010-05-17 20:42:51 +00:00
DRC
4ea16c0603 Define TJ_411 so that VirtualGL <= 2.1.x and TurboVNC <= 0.6 can be built with the libjpeg-turbo SDK
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@188 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-17 16:42:14 +00:00
DRC
d40bcf1723 Define TJ_411 so that VirtualGL <= 2.1.x and TurboVNC <= 0.6 can be built with the libjpeg-turbo SDK 2010-05-17 16:42:14 +00:00
DRC
377add7ae9 Updated Windows build information
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@187 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-17 16:41:12 +00:00
DRC
8b4725152d Updated Windows build information 2010-05-17 16:41:12 +00:00
DRC
a51ada6706 Use new e-mail alias
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@185 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-11 00:39:45 +00:00
DRC
9582b1cdee Use new e-mail alias 2010-05-11 00:39:45 +00:00
DRC
ef663e333e Only disable filesystem redirection in the 64-bit installers
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@184 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-10 23:39:22 +00:00
DRC
7cdba23378 Only disable filesystem redirection in the 64-bit installers 2010-05-10 23:39:22 +00:00
DRC
be09b20a40 Handle cases in which MinGW inexplicably builds the DLL as libjpeg-0.dll instead of libjpeg-62.dll
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@183 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-10 22:20:14 +00:00
DRC
68f4bb1ad4 Handle cases in which MinGW inexplicably builds the DLL as libjpeg-0.dll instead of libjpeg-62.dll 2010-05-10 22:20:14 +00:00
DRC
9ca2364694 Use "make nsi" instead of "make dist" to be consistent with MinGW build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@182 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-10 22:19:24 +00:00
DRC
5b6447311e Use "make nsi" instead of "make dist" to be consistent with MinGW build 2010-05-10 22:19:24 +00:00
DRC
3dc1bc2ded Create separate packages for Win64 binaries
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@181 632fc199-4ca6-4c93-a231-07263d6284db
2010-05-10 22:18:10 +00:00
DRC
0cc699da2a Create separate packages for Win64 binaries 2010-05-10 22:18:10 +00:00
DRC
1a2219ec26 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@180 632fc199-4ca6-4c93-a231-07263d6284db 2010-05-10 20:03:36 +00:00
DRC
2a16fd79cc 2010-05-10 20:03:36 +00:00
DRC
b6f097f729 xmm6-xmm15 must also be preserved by the callee; Win64 should fully work now
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@179 632fc199-4ca6-4c93-a231-07263d6284db
2010-04-23 15:41:34 +00:00
DRC
0f7601bf85 xmm6-xmm15 must also be preserved by the callee; Win64 should fully work now 2010-04-23 15:41:34 +00:00
DRC
d3e320fee7 Win64 should fully work now
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@178 632fc199-4ca6-4c93-a231-07263d6284db
2010-04-21 17:20:12 +00:00
DRC
1d7eaef724 Win64 should fully work now 2010-04-21 17:20:12 +00:00
DRC
830d5fccf4 Use 64-bit holding buffer on Win64 for increased performance
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@177 632fc199-4ca6-4c93-a231-07263d6284db
2010-04-20 21:13:26 +00:00
DRC
ac87162327 Use 64-bit holding buffer on Win64 for increased performance 2010-04-20 21:13:26 +00:00
DRC
4132b1d552 Updated (C)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@176 632fc199-4ca6-4c93-a231-07263d6284db
2010-04-20 20:54:03 +00:00
DRC
7321ba352c Updated (C) 2010-04-20 20:54:03 +00:00
DRC
f9bdeb62e2 Not sure why the cjpeg/djpeg image loaders got disabled, but re-enable them
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@175 632fc199-4ca6-4c93-a231-07263d6284db
2010-04-20 19:16:06 +00:00
DRC
c3a5da1def Not sure why the cjpeg/djpeg image loaders got disabled, but re-enable them 2010-04-20 19:16:06 +00:00
DRC
e728ed7a36 Win64 (mostly) works now
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@174 632fc199-4ca6-4c93-a231-07263d6284db
2010-04-20 19:15:09 +00:00
DRC
ec65eee13b Win64 (mostly) works now 2010-04-20 19:15:09 +00:00
DRC
a644fb05a7 Use correct filenames in headers
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@173 632fc199-4ca6-4c93-a231-07263d6284db
2010-04-20 18:20:13 +00:00
DRC
d8f6cdb23b Use correct filenames in headers 2010-04-20 18:20:13 +00:00
DRC
86d8c0aa26 0.0.93
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@172 632fc199-4ca6-4c93-a231-07263d6284db
2010-04-20 18:12:38 +00:00
DRC
199c556b18 0.0.93 2010-04-20 18:12:38 +00:00
DRC
fb096fff78 Only have to use 32-bit mov for r14, since it is populated from the stack
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@171 632fc199-4ca6-4c93-a231-07263d6284db
2010-04-19 18:58:07 +00:00
DRC
719a2b62ad Only have to use 32-bit mov for r14, since it is populated from the stack 2010-04-19 18:58:07 +00:00
DRC
14ecb539df Attempt to fix Win64 issues
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@170 632fc199-4ca6-4c93-a231-07263d6284db
2010-04-17 21:57:25 +00:00
DRC
fcbd92d31e Attempt to fix Win64 issues 2010-04-17 21:57:25 +00:00
DRC
09271951d9 0.0.92
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@169 632fc199-4ca6-4c93-a231-07263d6284db
2010-04-13 07:56:24 +00:00
DRC
20e5edecac 0.0.92 2010-04-13 07:56:24 +00:00
DRC
7bac07bf12 Added FreeBSD build instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@168 632fc199-4ca6-4c93-a231-07263d6284db
2010-04-10 05:53:35 +00:00
DRC
c2bfb82eb7 Added FreeBSD build instructions 2010-04-10 05:53:35 +00:00
DRC
0f413b2207 Fix x86-64 build on FreeBSD systems
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@167 632fc199-4ca6-4c93-a231-07263d6284db
2010-04-06 20:05:39 +00:00
DRC
f3a31100ec Fix x86-64 build on FreeBSD systems 2010-04-06 20:05:39 +00:00
DRC
97f8ec4b60 I'm not sure why, but this was necessary in order to return the 32-bit performance to the 0.0.90 baseline
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@165 632fc199-4ca6-4c93-a231-07263d6284db
2010-03-20 22:38:53 +00:00
DRC
fe706f6e28 I'm not sure why, but this was necessary in order to return the 32-bit performance to the 0.0.90 baseline 2010-03-20 22:38:53 +00:00
DRC
1e6b5b4884 Clarify license description
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@164 632fc199-4ca6-4c93-a231-07263d6284db
2010-03-20 20:00:51 +00:00
DRC
0d30199d2b Clarify license description 2010-03-20 20:00:51 +00:00
DRC
ae19bf6f15 Add ChangeLog to repository
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@163 632fc199-4ca6-4c93-a231-07263d6284db
2010-03-15 11:40:31 +00:00
DRC
30d3cc5854 Add ChangeLog to repository 2010-03-15 11:40:31 +00:00
DRC
e885a8bf41 Fix data corruption issues when decompressing large JPEG images and/or using buffered I/O. Specifically, decode_mcu_fast() can potentially process more than 1 MCU, so make sure there is enough space in the buffer to accommodate this case. Otherwise, the buffer pointer goes negative, and bad mojo ensues. Also, the fast decoder's method of handling unread markers doesn't make libjpeg's restart handler happy, so disable fast decode when restarts are used.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@162 632fc199-4ca6-4c93-a231-07263d6284db
2010-03-15 11:34:58 +00:00
DRC
c6838b243e Fix data corruption issues when decompressing large JPEG images and/or using buffered I/O. Specifically, decode_mcu_fast() can potentially process more than 1 MCU, so make sure there is enough space in the buffer to accommodate this case. Otherwise, the buffer pointer goes negative, and bad mojo ensues. Also, the fast decoder's method of handling unread markers doesn't make libjpeg's restart handler happy, so disable fast decode when restarts are used. 2010-03-15 11:34:58 +00:00
DRC
0b7d4ed792 Include ChangeLog.txt in dist
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@161 632fc199-4ca6-4c93-a231-07263d6284db
2010-03-03 09:37:58 +00:00
DRC
56e1973681 Include ChangeLog.txt in dist 2010-03-03 09:37:58 +00:00
DRC
10a094f0e6 Bump version number
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@160 632fc199-4ca6-4c93-a231-07263d6284db
2010-03-03 09:36:31 +00:00
DRC
efe0be8eeb Bump version number 2010-03-03 09:36:31 +00:00
DRC
f8b77c44f1 Don't allow code path to be forced on a system that doesn't support it
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@159 632fc199-4ca6-4c93-a231-07263d6284db
2010-03-03 08:46:29 +00:00
DRC
a0609a5e50 Don't allow code path to be forced on a system that doesn't support it 2010-03-03 08:46:29 +00:00
DRC
048990944f Bleepin' Windows uses LLP64, not LP64
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@158 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-26 23:01:19 +00:00
DRC
0298a12bd8 Bleepin' Windows uses LLP64, not LP64 2010-02-26 23:01:19 +00:00
DRC
d3c7eff53d Oops. Debian users might like documentation as well.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@157 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-25 20:14:10 +00:00
DRC
689114d5ef Oops. Debian users might like documentation as well. 2010-02-25 20:14:10 +00:00
DRC
0248dd9aeb Clarify the DLL hell problem
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@154 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-25 06:21:12 +00:00
DRC
bb4cee56c8 Clarify the DLL hell problem 2010-02-25 06:21:12 +00:00
DRC
7e0b499ee7 Install jpeg62.dll in SDK directory, not Windows system directory. Also, check whether SDK is already installed prior to re-installing
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@153 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-25 05:52:44 +00:00
DRC
5c8514046b Install jpeg62.dll in SDK directory, not Windows system directory. Also, check whether SDK is already installed prior to re-installing 2010-02-25 05:52:44 +00:00
DRC
f19caa5e67 Ensure static libs are built with PIC
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@152 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-24 21:27:32 +00:00
DRC
ea3b2ebdc8 Ensure static libs are built with PIC 2010-02-24 21:27:32 +00:00
DRC
0a1f68edeb Visual C++ libraries can't be made to work with MinGW because of the dependency on msvcr90.dll, so build a separate installer for MinGW libraries
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@151 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-24 07:24:26 +00:00
DRC
5926e27a45 Visual C++ libraries can't be made to work with MinGW because of the dependency on msvcr90.dll, so build a separate installer for MinGW libraries 2010-02-24 07:24:26 +00:00
DRC
8f870c297d 4.0 is significantly slower than 4.1+
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@150 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-24 00:30:00 +00:00
DRC
c139c254e6 4.0 is significantly slower than 4.1+ 2010-02-24 00:30:00 +00:00
DRC
f66a2b08a2 Get rid of cjpeg/djpeg-specific #defines
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@149 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-23 23:54:28 +00:00
DRC
aebd271f92 Get rid of cjpeg/djpeg-specific #defines 2010-02-23 23:54:28 +00:00
DRC
485cd80811 We don't actually need to use GCC 4.0 to do a backward compatible build, and it slows things down relative to GCC 4.2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@148 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-23 23:23:42 +00:00
DRC
14b2ea965a We don't actually need to use GCC 4.0 to do a backward compatible build, and it slows things down relative to GCC 4.2 2010-02-23 23:23:42 +00:00
DRC
a9a7b22443 Fix Windows package script to accommodate new output directory for VC build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@147 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-23 22:56:05 +00:00
DRC
bab8a11dd8 Fix Windows package script to accommodate new output directory for VC build 2010-02-23 22:56:05 +00:00
DRC
3cd2e503c6 Fix compiler warning about ending struct with a comma
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@146 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-23 21:43:21 +00:00
DRC
dafd6e3e76 Fix compiler warning about ending struct with a comma 2010-02-23 21:43:21 +00:00
DRC
fe7936c603 Make sure CFLAGS, CXXFLAGS, LDFLAGS, and host_alias are unset to get a 32-bit build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@145 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-23 20:17:48 +00:00
DRC
e8b4d69f1a Make sure CFLAGS, CXXFLAGS, LDFLAGS, and host_alias are unset to get a 32-bit build 2010-02-23 20:17:48 +00:00
DRC
252dbc9fad Oops. Didn't mean to commit the debug statement
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@144 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-23 10:39:07 +00:00
DRC
659295da13 Oops. Didn't mean to commit the debug statement 2010-02-23 10:39:07 +00:00
DRC
5df6c2372d For some unknown reason, the sym link and the actual file get flipped around whenever you do 'make install'. Make sure the script handles both cases.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@143 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-23 10:22:33 +00:00
DRC
b8c4739843 For some unknown reason, the sym link and the actual file get flipped around whenever you do 'make install'. Make sure the script handles both cases. 2010-02-23 10:22:33 +00:00
DRC
ca3cebbaef Compile properly with C++
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@142 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-23 08:12:38 +00:00
DRC
9f90f4835e Compile properly with C++ 2010-02-23 08:12:38 +00:00
DRC
4425702a6a Oops. Missing test image
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@141 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-22 22:57:45 +00:00
DRC
a443f36e44 Oops. Missing test image 2010-02-22 22:57:45 +00:00
DRC
968c8bbc00 Fix 'make dist' since we added new test images
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@140 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-22 22:50:13 +00:00
DRC
90965c3d7e Fix 'make dist' since we added new test images 2010-02-22 22:50:13 +00:00
DRC
8f0d62cb92 Added additional documentation for flags
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@139 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-22 08:35:19 +00:00
DRC
3ee7a1103f Added additional documentation for flags 2010-02-22 08:35:19 +00:00
DRC
0c6a271f97 Make TJ_FORCE* options work correctly
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@138 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-22 08:34:44 +00:00
DRC
f72fb65759 Make TJ_FORCE* options work correctly 2010-02-22 08:34:44 +00:00
DRC
3bddd467c4 A bit better solution for 64-bit cleanliness
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@137 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-22 06:14:05 +00:00
DRC
852575c603 A bit better solution for 64-bit cleanliness 2010-02-22 06:14:05 +00:00
DRC
4df84bf859 Clarify Win64 issue
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@136 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-22 04:55:23 +00:00
DRC
3a2d3ad1c5 Clarify Win64 issue 2010-02-22 04:55:23 +00:00
DRC
748fda3834 Use the C library DLL only with jpeg62.dll where it is needed. Build turbojpeg.dll with the static C library to maintain backward compatibility with TurboJPEG/IPP
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@135 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-22 04:51:09 +00:00
DRC
7e2aebae6b Use the C library DLL only with jpeg62.dll where it is needed. Build turbojpeg.dll with the static C library to maintain backward compatibility with TurboJPEG/IPP 2010-02-22 04:51:09 +00:00
DRC
aa91179eac Speed up make testclean
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@134 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-22 04:12:06 +00:00
DRC
04a22b9409 Speed up make testclean 2010-02-22 04:12:06 +00:00
DRC
03c3c9be67 Added note about this being an outdated document
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@133 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-21 15:45:00 +00:00
DRC
f626e49ae2 Added note about this being an outdated document 2010-02-21 15:45:00 +00:00
DRC
c3f4ac0b6e Add note about texinfo dependency in NASM build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@132 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-19 21:51:26 +00:00
DRC
bd8a138197 Add note about texinfo dependency in NASM build 2010-02-19 21:51:26 +00:00
DRC
a93881b109 Remove debug output
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@131 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-19 07:01:23 +00:00
DRC
5fe77ba686 Remove debug output 2010-02-19 07:01:23 +00:00
DRC
4924e49ad0 test depends on jpegut as well
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@130 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-19 07:00:30 +00:00
DRC
b079982e2c test depends on jpegut as well 2010-02-19 07:00:30 +00:00
DRC
687244b90e Unfortunately, we have to use the DLL version of the C library to avoid crashes in cjpeg
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@129 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-19 06:59:18 +00:00
DRC
34e8ec1eef Unfortunately, we have to use the DLL version of the C library to avoid crashes in cjpeg 2010-02-19 06:59:18 +00:00
DRC
9abc855552 Oops. DLL object was misnamed and thus wasn't getting removed on 'make clean'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@128 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-19 06:56:53 +00:00
DRC
8dcefc5dbd Oops. DLL object was misnamed and thus wasn't getting removed on 'make clean' 2010-02-19 06:56:53 +00:00
DRC
10d15cbe44 Improve unit tests
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@127 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-19 06:56:03 +00:00
DRC
40b41cfd6a Improve unit tests 2010-02-19 06:56:03 +00:00
DRC
0fd8be5d0c Improve unit tests
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@126 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-19 05:12:39 +00:00
DRC
22659e40da Improve unit tests 2010-02-19 05:12:39 +00:00
DRC
26b208d8b7 MinGW64 requires that the functions be prefixed with an underscore. Visual C++ apparently doesn't
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@125 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-18 13:14:29 +00:00
DRC
69ec314fb5 MinGW64 requires that the functions be prefixed with an underscore. Visual C++ apparently doesn't 2010-02-18 13:14:29 +00:00
DRC
8b014d7f5d First attempt at Win64 support
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@124 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-18 13:03:41 +00:00
DRC
b50c3ca33f First attempt at Win64 support 2010-02-18 13:03:41 +00:00
DRC
ea1978896e dumpbuf() should have void return type
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@123 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-18 05:12:58 +00:00
DRC
b96fd4daa4 dumpbuf() should have void return type 2010-02-18 05:12:58 +00:00
DRC
c9327685dd Oops. Leftover bugs from the 64-bit port (cause seg fault when using JDCT_FLOAT or JDCT_IFAST when decompressing)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@122 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-18 04:14:14 +00:00
DRC
c3574b2b38 Oops. Leftover bugs from the 64-bit port (cause seg fault when using JDCT_FLOAT or JDCT_IFAST when decompressing) 2010-02-18 04:14:14 +00:00
DRC
65d05c1d92 Exit with non-zero status if an error is encountered
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@121 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-18 00:40:17 +00:00
DRC
e25f0c337c Exit with non-zero status if an error is encountered 2010-02-18 00:40:17 +00:00
DRC
ca5e7d184e Sun Studio recipes
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@120 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-17 02:25:06 +00:00
DRC
feca7e5b6f Sun Studio recipes 2010-02-17 02:25:06 +00:00
DRC
b9b1ca30ca Build Sun packages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@119 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-17 02:24:02 +00:00
DRC
ede97ef4b4 Build Sun packages 2010-02-17 02:24:02 +00:00
DRC
10e75a71da Make sure existing .deb file is removed prior to building new one
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@118 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-17 01:08:37 +00:00
DRC
f37c1f3363 Make sure existing .deb file is removed prior to building new one 2010-02-17 01:08:37 +00:00
DRC
051dd5a4ab Replace clunky doexit() mechanism with a better means of error trapping
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@117 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-17 01:07:46 +00:00
DRC
4c24ec5383 Replace clunky doexit() mechanism with a better means of error trapping 2010-02-17 01:07:46 +00:00
DRC
6afd256e98 Oops. Need to use %dir to list directories
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@116 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-17 00:56:59 +00:00
DRC
def5d225f9 Oops. Need to use %dir to list directories 2010-02-17 00:56:59 +00:00
DRC
d86e4d914c Build libturbojpeg.so using mapfile on Solaris
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@115 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-16 22:40:26 +00:00
DRC
3b9219b882 Build libturbojpeg.so using mapfile on Solaris 2010-02-16 22:40:26 +00:00
DRC
1e2f298f94 Set default optimization flags to -xO5 if using Sun Studio
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@114 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-16 22:35:25 +00:00
DRC
00c5bcbd7b Set default optimization flags to -xO5 if using Sun Studio 2010-02-16 22:35:25 +00:00
DRC
8a26fdea23 Fix build with Sun Studio
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@113 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-16 22:34:12 +00:00
DRC
9c5f5a5314 Fix build with Sun Studio 2010-02-16 22:34:12 +00:00
DRC
23071bcba5 Install additional documentation
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@112 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-16 05:54:00 +00:00
DRC
0d88231511 Install additional documentation 2010-02-16 05:54:00 +00:00
DRC
68fef83ed9 Split build instructions into a new file and add SDK usage notes to README-turbo.txt
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@111 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-16 05:29:10 +00:00
DRC
668d21fe80 Split build instructions into a new file and add SDK usage notes to README-turbo.txt 2010-02-16 05:29:10 +00:00
DRC
2f272d519f Make sure directories under /opt/libjpeg-turbo get deleted when uninstalling RPM
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@110 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-16 05:04:46 +00:00
DRC
af894dd7be Make sure directories under /opt/libjpeg-turbo get deleted when uninstalling RPM 2010-02-16 05:04:46 +00:00
DRC
6f8c66880e Build TurboJPEG/OSS with a version script to prevent any non-global symbols from being accessible (this is to protect against potential namespace conflicts when preloading it into an application via VirtualGL.)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@109 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-16 05:03:51 +00:00
DRC
27c9e4290d Build TurboJPEG/OSS with a version script to prevent any non-global symbols from being accessible (this is to protect against potential namespace conflicts when preloading it into an application via VirtualGL.) 2010-02-16 05:03:51 +00:00
DRC
45ff6e2745 Create Windows installer
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@108 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 17:10:36 +00:00
DRC
70d9c0bd55 Create Windows installer 2010-02-15 17:10:36 +00:00
DRC
fb18e856e4 Keep dllexport symbols out of static lib
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@107 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 17:07:46 +00:00
DRC
f40efc062f Keep dllexport symbols out of static lib 2010-02-15 17:07:46 +00:00
DRC
315123fa3e Add mechanism for building universal (i386/x86-64) binaries on Snow Leopard
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@106 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 16:14:26 +00:00
DRC
16299d15a8 Add mechanism for building universal (i386/x86-64) binaries on Snow Leopard 2010-02-15 16:14:26 +00:00
DRC
6a3477c29f Use more appropriate temp. directory name
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@105 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 15:16:58 +00:00
DRC
68e57edef5 Use more appropriate temp. directory name 2010-02-15 15:16:58 +00:00
DRC
6533b6e023 Add mechanism for creating Mac packages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@104 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 14:57:18 +00:00
DRC
ff6f4bcf88 Add mechanism for creating Mac packages 2010-02-15 14:57:18 +00:00
DRC
268ef884d8 Use a cleaner method of arg checking that works with set -u
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@103 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 13:32:09 +00:00
DRC
e35e2360e5 Use a cleaner method of arg checking that works with set -u 2010-02-15 13:32:09 +00:00
DRC
4614871092 Instructions for Tiger-compatible build on Leopard/Snow Leopard
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@102 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 13:27:17 +00:00
DRC
cb2dd6c427 Instructions for Tiger-compatible build on Leopard/Snow Leopard 2010-02-15 13:27:17 +00:00
DRC
feb9dce665 Oops. This should have been included with r100
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@101 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 12:08:46 +00:00
DRC
1798b82a86 Oops. This should have been included with r100 2010-02-15 12:08:46 +00:00
DRC
52a19f25d5 Add mechanism for creating DEB packages
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@100 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 12:06:27 +00:00
DRC
6b0f9283dd Add mechanism for creating DEB packages 2010-02-15 12:06:27 +00:00
DRC
f26914b93a Actually, we only need to 'make dist-gzip' prior to building the SRPM
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@99 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 11:36:46 +00:00
DRC
79fc8d851e Actually, we only need to 'make dist-gzip' prior to building the SRPM 2010-02-15 11:36:46 +00:00
DRC
079b4346bc Add mechanism for creating RPMs
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@98 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 11:32:23 +00:00
DRC
eda68dbd6a Add mechanism for creating RPMs 2010-02-15 11:32:23 +00:00
DRC
6f52592267 Should really use $(srcdir) here
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@97 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 11:10:08 +00:00
DRC
b754ae7260 Should really use $(srcdir) here 2010-02-15 11:10:08 +00:00
DRC
8ff1f254f3 Change default prefix to /opt/libjpeg-turbo
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@96 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 11:08:57 +00:00
DRC
f7f66301b2 Change default prefix to /opt/libjpeg-turbo 2010-02-15 11:08:57 +00:00
DRC
211de3b963 Don't need Visual C++ project file
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@95 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 11:07:33 +00:00
DRC
bfa7c1f2ee Don't need Visual C++ project file 2010-02-15 11:07:33 +00:00
DRC
ec84a6bdbf Change package name & version
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@94 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 11:05:53 +00:00
DRC
615df6941d Change package name & version 2010-02-15 11:05:53 +00:00
DRC
0a945a1770 Make sure 'make dist' includes everything we want (and nothing we don't)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@93 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 11:04:51 +00:00
DRC
4b24e9833c Make sure 'make dist' includes everything we want (and nothing we don't) 2010-02-15 11:04:51 +00:00
DRC
6aa6a0a768 More missing files from jpeg-6b
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@92 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-15 10:49:01 +00:00
DRC
1a275c641e More missing files from jpeg-6b 2010-02-15 10:49:01 +00:00
Thomas G. Lane
41f55c093a The Independent JPEG Group's JPEG software v6b 2014-09-07 20:00:00 +01:00
Thomas G. Lane
16c97143f3 The Independent JPEG Group's JPEG software v6a 2014-09-07 20:00:00 +01:00
Thomas G. Lane
0baf670330 The Independent JPEG Group's JPEG software v6 2014-09-07 20:00:00 +01:00
Thomas G. Lane
357eba2331 The Independent JPEG Group's JPEG software v5b 2014-09-07 20:00:00 +01:00
Thomas G. Lane
54656d1d59 The Independent JPEG Group's JPEG software v5a 2014-09-07 20:00:00 +01:00
Thomas G. Lane
c5414ae082 The Independent JPEG Group's JPEG software v5 2014-09-07 20:00:00 +01:00
Thomas G. Lane
24b8211e9f The Independent JPEG Group's JPEG software v4a 2014-09-07 20:00:00 +01:00
Thomas G. Lane
f14f1a0dc3 The Independent JPEG Group's JPEG software v4 2014-09-07 20:00:00 +01:00
Thomas G. Lane
9821061877 The Independent JPEG Group's JPEG software v3 2014-09-07 20:00:00 +01:00
Thomas G. Lane
98f16a9b4d The Independent JPEG Group's JPEG software v2 2014-09-07 20:00:00 +01:00
Thomas G. Lane
7a9a82bf06 The Independent JPEG Group's JPEG software v1 2014-09-07 20:00:00 +01:00
DRC
4d5fc18f58 Reflect the fact that CFLAGS=CXXFLAGS=-O3 by default
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@91 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-14 08:02:55 +00:00
DRC
db1a243631 Reflect the fact that CFLAGS=CXXFLAGS=-O3 by default 2010-02-14 08:02:55 +00:00
DRC
e7b699d653 Set CFLAGS=CXXFLAGS=-O3 if using GCC and the flags are not already set
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@90 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-14 07:39:07 +00:00
DRC
55e8d83a10 Set CFLAGS=CXXFLAGS=-O3 if using GCC and the flags are not already set 2010-02-14 07:39:07 +00:00
DRC
327184fbee builddir isn't always defined
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@89 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-14 02:15:52 +00:00
DRC
5838d99dfe builddir isn't always defined 2010-02-14 02:15:52 +00:00
DRC
ce1546eb90 License info + updated performance claims
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@88 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-13 23:06:03 +00:00
DRC
825d07f5d5 License info + updated performance claims 2010-02-13 23:06:03 +00:00
DRC
971d851844 Enable (i.e. fix) VPATH and out-of-tree builds
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@87 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-13 22:55:05 +00:00
DRC
64462a3578 Enable (i.e. fix) VPATH and out-of-tree builds 2010-02-13 22:55:05 +00:00
DRC
bd17e2a5d6 Instructions for cross compiling MinGW libs on Cygwin
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@86 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-12 23:24:21 +00:00
DRC
36db4985d5 Instructions for cross compiling MinGW libs on Cygwin 2010-02-12 23:24:21 +00:00
DRC
101f09a3d1 Build instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@85 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-12 22:52:37 +00:00
DRC
4240858f53 Build instructions 2010-02-12 22:52:37 +00:00
DRC
bf0fab9aa1 MinGW uses autoconf 2.56
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@84 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-12 22:22:01 +00:00
DRC
ea1c8a3360 MinGW uses autoconf 2.56 2010-02-12 22:22:01 +00:00
DRC
f4253a7cdd Visual C++ build
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@83 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-12 09:37:20 +00:00
DRC
c65c17f5ea Visual C++ build 2010-02-12 09:37:20 +00:00
DRC
34d59e71d6 Clean up test detritus
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@82 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-12 06:27:34 +00:00
DRC
392b89a5a5 Clean up test detritus 2010-02-12 06:27:34 +00:00
DRC
60fa0600c0 Re-add relevant files and tests from libjpeg v6b
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@81 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-12 06:01:49 +00:00
DRC
3b1c09417f Re-add relevant files and tests from libjpeg v6b 2010-02-12 06:01:49 +00:00
DRC
60cddeb849 Restore --without-simd option for testing purposes
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@80 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-12 05:37:07 +00:00
DRC
f222c7547c Restore --without-simd option for testing purposes 2010-02-12 05:37:07 +00:00
DRC
21d66837a0 Do not build libturbojpeg as a versioned library
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@79 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-12 04:34:41 +00:00
DRC
444950fec8 Do not build libturbojpeg as a versioned library 2010-02-12 04:34:41 +00:00
DRC
411dcf5666 Oops. Still need to #define WITH_SIMD
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@78 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-12 04:28:29 +00:00
DRC
3ca410784c Oops. Still need to #define WITH_SIMD 2010-02-12 04:28:29 +00:00
DRC
87581b8188 Make SIMD build compulsory (otherwise, what's the point?)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@77 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-11 06:57:57 +00:00
DRC
4c1c7f5a52 Make SIMD build compulsory (otherwise, what's the point?) 2010-02-11 06:57:57 +00:00
DRC
1bf1a14d71 Build shared libraries by default; Include libturbojpeg in distribution
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@76 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-11 06:39:32 +00:00
DRC
2e069ba879 Build shared libraries by default; Include libturbojpeg in distribution 2010-02-11 06:39:32 +00:00
DRC
4f4428185b Oops. Use EGREP instead of GREP, because GREP is not available in earlier versions of autotools
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@75 632fc199-4ca6-4c93-a231-07263d6284db
2010-02-05 09:19:13 +00:00
DRC
c61c02e031 Oops. Use EGREP instead of GREP, because GREP is not available in earlier versions of autotools 2010-02-05 09:19:13 +00:00
DRC
2a46aeece8 Fix build problems on Solaris 10
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@74 632fc199-4ca6-4c93-a231-07263d6284db
2010-01-29 07:14:57 +00:00
DRC
05e874048b Fix build problems on Solaris 10 2010-01-29 07:14:57 +00:00
DRC
83e9cd5e36 Enable 64-bit libjpeg/SIMD build on Solaris
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@73 632fc199-4ca6-4c93-a231-07263d6284db
2010-01-28 23:57:53 +00:00
DRC
4f2536e187 Enable 64-bit libjpeg/SIMD build on Solaris 2010-01-28 23:57:53 +00:00
DRC
a1e9878b31 Use the correct version to name the shared library, and if the shared library build is enabled, allow the headers to be installed
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@72 632fc199-4ca6-4c93-a231-07263d6284db
2010-01-28 22:18:41 +00:00
DRC
7d3a698e52 Use the correct version to name the shared library, and if the shared library build is enabled, allow the headers to be installed 2010-01-28 22:18:41 +00:00
DRC
0c0f304e8d Allow building libjpeg.so if --enable-shared is passed to configure (but disable shared library build by default)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@71 632fc199-4ca6-4c93-a231-07263d6284db
2010-01-28 05:34:53 +00:00
DRC
49933cde47 Allow building libjpeg.so if --enable-shared is passed to configure (but disable shared library build by default) 2010-01-28 05:34:53 +00:00
Adam Tkac
e54fb0bf95 [Bugfix] Mark stack as non-executable in NASM code.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@70 632fc199-4ca6-4c93-a231-07263d6284db
2010-01-27 10:10:23 +00:00
Adam Tkac
63c18bbe6c [Bugfix] Mark stack as non-executable in NASM code. 2010-01-27 10:10:23 +00:00
Pierre Ossman
1536192e92 Update the svn:ignore lists for the new build system.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@69 632fc199-4ca6-4c93-a231-07263d6284db
2009-12-23 09:24:42 +00:00
DRC
1fee9f05fb Enable 64-bit build on Snow Leopard 2009-10-08 09:41:39 +00:00
DRC
321ad51314 Enable 64-bit build on Snow Leopard
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@68 632fc199-4ca6-4c93-a231-07263d6284db
2009-10-08 09:41:39 +00:00
DRC
b2c532f62d Work around alignment issue with OS X linker which was causing problems on Leopard and Snow Leopard 2009-10-08 09:04:56 +00:00
DRC
132b5fdd6d Work around alignment issue with OS X linker which was causing problems on Leopard and Snow Leopard
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@67 632fc199-4ca6-4c93-a231-07263d6284db
2009-10-08 09:04:56 +00:00
DRC
9a6243c913 Some systems (notably OS X Leopard) have fls() already, so rename ours to avoid conflict 2009-10-01 22:26:14 +00:00
DRC
fc5dc4fa19 Some systems (notably OS X Leopard) have fls() already, so rename ours to avoid conflict
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@66 632fc199-4ca6-4c93-a231-07263d6284db
2009-10-01 22:26:14 +00:00
DRC
4d289a4912 Not all platforms define __WORDSIZE 2009-09-28 08:19:40 +00:00
DRC
021da085a7 Not all platforms define __WORDSIZE
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@65 632fc199-4ca6-4c93-a231-07263d6284db
2009-09-28 08:19:40 +00:00
DRC
5b3da6d4e3 Greatly improve performance of Huffman decoding 2009-09-28 00:33:02 +00:00
DRC
e2816648d8 Greatly improve performance of Huffman decoding
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@64 632fc199-4ca6-4c93-a231-07263d6284db
2009-09-28 00:33:02 +00:00
DRC
95de778c46 Significantly improve grayscale performance 2009-09-24 06:18:25 +00:00
DRC
6c0e1fc72e Significantly improve grayscale performance
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@63 632fc199-4ca6-4c93-a231-07263d6284db
2009-09-24 06:18:25 +00:00
Adam Tkac
f585c78fe6 Merge unified_buildsys branch to trunk (r3892 - r3898) 2009-09-14 13:07:14 +00:00
Adam Tkac
0ba6826d20 Merge unified_buildsys branch to trunk (r3892 - r3898)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@62 632fc199-4ca6-4c93-a231-07263d6284db
2009-09-14 13:07:14 +00:00
DRC
164cb4004b Update (C) notice and fix line feed in usage instructions 2009-09-03 01:35:12 +00:00
DRC
a21a01c60d Update (C) notice and fix line feed in usage instructions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@61 632fc199-4ca6-4c93-a231-07263d6284db
2009-09-03 01:35:12 +00:00
Peter Åstrand
cb9c102ddb Corrected last patch: Use jsimd_none.c instead of jsimd_i386.c on
VC/Windows at this point.
2009-08-19 14:20:46 +00:00
Peter Åstrand
353332b015 Corrected last patch: Use jsimd_none.c instead of jsimd_i386.c on
VC/Windows at this point. 



git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@60 632fc199-4ca6-4c93-a231-07263d6284db
2009-08-19 14:20:46 +00:00
Peter Åstrand
0cae220381 Windows build fixes:
* Use jsimd_i386.c instead of the attic jsimd.c

* Corrected include of jsimd.h in jsimd_i386.c.
2009-08-19 13:53:48 +00:00
Peter Åstrand
adfd23393c Windows build fixes:
* Use jsimd_i386.c instead of the attic jsimd.c

* Corrected include of jsimd.h in jsimd_i386.c. 



git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@59 632fc199-4ca6-4c93-a231-07263d6284db
2009-08-19 13:53:48 +00:00
DRC
389975d9ee Unfortunately, the previous enhancements made an invalid assumption about the code sizes, which caused "DCT out of range" errors in the decoder. Was able to fix 64-bit without losing any performance, but unfortunately had to revert 32-bit back to its previous behavior for now. 2009-08-06 08:58:48 +00:00
DRC
dae4474117 Unfortunately, the previous enhancements made an invalid assumption about the code sizes, which caused "DCT out of range" errors in the decoder. Was able to fix 64-bit without losing any performance, but unfortunately had to revert 32-bit back to its previous behavior for now.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@58 632fc199-4ca6-4c93-a231-07263d6284db
2009-08-06 08:58:48 +00:00
DRC
a1a5989d85 Update copyrights to indicate files modified with colorspace extensions 2009-08-06 08:32:00 +00:00
DRC
8ece7fef15 Update copyrights to indicate files modified with colorspace extensions
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@57 632fc199-4ca6-4c93-a231-07263d6284db
2009-08-06 08:32:00 +00:00
DRC
8311c51c07 Oops. Clean up a couple of remaining 32-bit memory accesses 2009-08-06 07:51:26 +00:00
DRC
62aaa7e7c1 Oops. Clean up a couple of remaining 32-bit memory accesses
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@56 632fc199-4ca6-4c93-a231-07263d6284db
2009-08-06 07:51:26 +00:00
DRC
2691a24539 Improve compression performance by 15-20% 2009-07-30 08:35:06 +00:00
DRC
8443e529e9 Improve compression performance by 15-20%
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@55 632fc199-4ca6-4c93-a231-07263d6284db
2009-07-30 08:35:06 +00:00
Pierre Ossman
1bd552079d Make our Makefile.am a bit easier to convert to a standalone one by
indicating which headers are the public ones.
2009-07-10 12:59:14 +00:00
Pierre Ossman
5d20b7e662 Make our Makefile.am a bit easier to convert to a standalone one by
indicating which headers are the public ones.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@54 632fc199-4ca6-4c93-a231-07263d6284db
2009-07-10 12:59:14 +00:00
Pierre Ossman
daa07a8ac3 Make sure bmp.h gets distributed. 2009-07-10 12:56:00 +00:00
Pierre Ossman
79ecd1b16e Make sure bmp.h gets distributed.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@53 632fc199-4ca6-4c93-a231-07263d6284db
2009-07-10 12:56:00 +00:00
Pierre Ossman
7a9b1adb5f Make sure the indirectly used assembly files get packaged. 2009-07-10 12:47:13 +00:00
Pierre Ossman
f1418c76a8 Make sure the indirectly used assembly files get packaged.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@52 632fc199-4ca6-4c93-a231-07263d6284db
2009-07-10 12:47:13 +00:00
Pierre Ossman
769c80420b Make x86_64 SIMD code PIC friendly
Use RIP relative addressing as that works in both PIC and non-PIC mode.
2009-06-29 12:58:48 +00:00
Pierre Ossman
9a6b8dca7e Make x86_64 SIMD code PIC friendly
Use RIP relative addressing as that works in both PIC and non-PIC mode.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@51 632fc199-4ca6-4c93-a231-07263d6284db
2009-06-29 12:58:48 +00:00
Pierre Ossman
db838bdb73 Ignore test tools and files generated by them
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@50 632fc199-4ca6-4c93-a231-07263d6284db
2009-06-29 11:24:50 +00:00
Pierre Ossman
6212076d91 Clean up SIMD glue code
The SIMD glue code has gotten a bit #ifdef heavy so clean it up by having
one file for each possible SIMD arch. This also allows a simplification of
the x86_64 code as SSE/SSE2 is always known to exist on that arch.
2009-06-29 11:20:42 +00:00
Pierre Ossman
ba82ddf6ca Clean up SIMD glue code
The SIMD glue code has gotten a bit #ifdef heavy so clean it up by having
one file for each possible SIMD arch. This also allows a simplification of
the x86_64 code as SSE/SSE2 is always known to exist on that arch.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@49 632fc199-4ca6-4c93-a231-07263d6284db
2009-06-29 11:20:42 +00:00
Pierre Ossman
c8eee1dffe Remove unused variable. 2009-06-26 14:10:33 +00:00
Pierre Ossman
1aea5fa182 Remove unused variable.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@48 632fc199-4ca6-4c93-a231-07263d6284db
2009-06-26 14:10:33 +00:00
Pierre Ossman
88617301e9 Improve the messages for the SIMD configuration test now that we support
more than one arch.
2009-06-26 14:09:47 +00:00
Pierre Ossman
afa937e62b Improve the messages for the SIMD configuration test now that we support
more than one arch.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@47 632fc199-4ca6-4c93-a231-07263d6284db
2009-06-26 14:09:47 +00:00
DRC
33d5bcb4f3 Add back in cjpeg and djpeg utilities for testing purposes 2009-06-25 20:41:17 +00:00
DRC
73de982473 Add back in cjpeg and djpeg utilities for testing purposes
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@46 632fc199-4ca6-4c93-a231-07263d6284db
2009-06-25 20:41:17 +00:00
DRC
9b74d3f224 64-bit SIMD acceleration 2009-06-25 20:38:31 +00:00
DRC
cdc8ac3eb1 64-bit SIMD acceleration
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@45 632fc199-4ca6-4c93-a231-07263d6284db
2009-06-25 20:38:31 +00:00
DRC
5cac289deb Fix dependencies for merged upsampling code 2009-06-25 20:33:51 +00:00
DRC
3a63184474 Fix dependencies for merged upsampling code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@44 632fc199-4ca6-4c93-a231-07263d6284db
2009-06-25 20:33:51 +00:00
DRC
cf75c6f1be Test fast upsampling
"4:1:1 = 4:2:0"
2009-04-05 21:53:20 +00:00
DRC
61e51f98e2 Test fast upsampling
"4:1:1 = 4:2:0"


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@43 632fc199-4ca6-4c93-a231-07263d6284db
2009-04-05 21:53:20 +00:00
DRC
b0716b6875 Add colorspace extensions to merged upsampling routines 2009-04-05 21:51:25 +00:00
DRC
720e161083 Add colorspace extensions to merged upsampling routines
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@42 632fc199-4ca6-4c93-a231-07263d6284db
2009-04-05 21:51:25 +00:00
DRC
adce982c72 Remove unnecessary code 2009-04-05 21:47:40 +00:00
DRC
e673a1764a Remove unnecessary code
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@41 632fc199-4ca6-4c93-a231-07263d6284db
2009-04-05 21:47:40 +00:00
DRC
d8d563f60a Oops. jcolsamp.inc should be included from j[c|d]clr[mmx|ss2].asm so it received the effect of the redefined RGB_* macros 2009-04-04 15:25:45 +00:00
DRC
16ed1f5387 Oops. jcolsamp.inc should be included from j[c|d]clr[mmx|ss2].asm so it received the effect of the redefined RGB_* macros
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@40 632fc199-4ca6-4c93-a231-07263d6284db
2009-04-04 15:25:45 +00:00
DRC
9cc9035c67 Oops. jcolsamp.inc needs to be included from j[c|d]clr[mmx|ss2].asm so that it receives the effect of the redefined RGB_* macros 2009-04-04 15:22:14 +00:00
DRC
a2d19e1981 Oops. jcolsamp.inc needs to be included from j[c|d]clr[mmx|ss2].asm so that it receives the effect of the redefined RGB_* macros
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@39 632fc199-4ca6-4c93-a231-07263d6284db
2009-04-04 15:22:14 +00:00
Adam Tkac
af9ce6951a Don't install test programs, build them only. 2009-04-03 14:54:40 +00:00
Adam Tkac
6e8b69d35f Don't install test programs, build them only.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@38 632fc199-4ca6-4c93-a231-07263d6284db
2009-04-03 14:54:40 +00:00
Adam Tkac
c689a22bb0 Check if C++ compiler is present. 2009-04-03 14:47:50 +00:00
Adam Tkac
6e075fcfae Check if C++ compiler is present.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@37 632fc199-4ca6-4c93-a231-07263d6284db
2009-04-03 14:47:50 +00:00
DRC
65b7cbecf3 Include low-level unit tests borrowed from VirtualGL 2009-04-03 12:04:24 +00:00
DRC
2e7b76b28c Include low-level unit tests borrowed from VirtualGL
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@36 632fc199-4ca6-4c93-a231-07263d6284db
2009-04-03 12:04:24 +00:00
DRC
f7e0f6d5f5 Implement new colorspaces to allow directly compressing from/decompressing to RGB/RGBX/BGR/BGRX/XBGR/XRGB without conversion 2009-04-03 12:00:51 +00:00
DRC
f25c071eb7 Implement new colorspaces to allow directly compressing from/decompressing to RGB/RGBX/BGR/BGRX/XBGR/XRGB without conversion
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@35 632fc199-4ca6-4c93-a231-07263d6284db
2009-04-03 12:00:51 +00:00
DRC
6b7eeb745c Add environment variables to force MMX/SSE2 code path selection 2009-04-03 11:27:17 +00:00
DRC
59c1a252d5 Add environment variables to force MMX/SSE2 code path selection
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@34 632fc199-4ca6-4c93-a231-07263d6284db
2009-04-03 11:27:17 +00:00
DRC
3901fbb143 Fix build for RGB_PIXELSIZE==4 2009-04-01 20:02:14 +00:00
DRC
c7fbf2961a Fix build for RGB_PIXELSIZE==4
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@33 632fc199-4ca6-4c93-a231-07263d6284db
2009-04-01 20:02:14 +00:00
DRC
bf9f8d041b Eliminate backward incompatibility that required empty_output_buffer() to handle cases in which the buffer wasn't 100% full 2009-03-16 23:58:30 +00:00
DRC
3cba8db08f Eliminate backward incompatibility that required empty_output_buffer() to handle cases in which the buffer wasn't 100% full
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@32 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-16 23:58:30 +00:00
Pierre Ossman
a63544a357 Work around subdirectory bug in older automake.
Older versions of automake doesn't properly support no-recursive make.
Reimplement the build system by having a local Makefile.am in the
simd/ directory.
2009-03-16 13:34:18 +00:00
Pierre Ossman
3a65ef478b Work around subdirectory bug in older automake.
Older versions of automake doesn't properly support no-recursive make.
Reimplement the build system by having a local Makefile.am in the
simd/ directory.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@31 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-16 13:34:18 +00:00
DRC
98d1d692b5 Fix broken buffered I/O (to make cjpeg work) 2009-03-14 01:21:13 +00:00
DRC
8629988742 Fix broken buffered I/O (to make cjpeg work)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@30 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-14 01:21:13 +00:00
Adam Tkac
de4b417a81 Make source compilable via GNU autotools which are part of RHEL 5. 2009-03-13 13:58:44 +00:00
Adam Tkac
d07a0a6479 Make source compilable via GNU autotools which are part of RHEL 5.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@29 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-13 13:58:44 +00:00
Adam Tkac
de0008d00e Revert r3657 (import of autogenerated) files. 2009-03-13 13:44:18 +00:00
Adam Tkac
6a8b33d3cd Revert r3657 (import of autogenerated) files.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@28 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-13 13:44:18 +00:00
Pierre Ossman
89e518a098 Add new simd files to Visual Studio project file. 2009-03-13 12:24:28 +00:00
Pierre Ossman
995a3e14ee Add new simd files to Visual Studio project file.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@27 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-13 12:24:28 +00:00
Pierre Ossman
59641bb95f Move variable init around a bit to please crappy compilers. 2009-03-13 12:17:26 +00:00
Pierre Ossman
dc5db14a33 Move variable init around a bit to please crappy compilers.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@26 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-13 12:17:26 +00:00
Pierre Ossman
a06a8bc928 Don't mix LOCAL() and qualifiers. 2009-03-13 12:16:51 +00:00
Pierre Ossman
b28e287f93 Don't mix LOCAL() and qualifiers.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@25 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-13 12:16:51 +00:00
DRC
0a22f153ea Include Huffman codec optimizations borrowed from TurboJPEG 2009-03-12 17:24:27 +00:00
DRC
99313388cc Include Huffman codec optimizations borrowed from TurboJPEG
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@24 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-12 17:24:27 +00:00
Adam Tkac
4a7a6cc081 Import autogenerated files for unix/ and common/ subdirs to make source
compilable without GNU autotools.
2009-03-11 11:14:37 +00:00
Adam Tkac
0747ad2b12 Import autogenerated files for unix/ and common/ subdirs to make source
compilable without GNU autotools.



git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@23 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-11 11:14:37 +00:00
Pierre Ossman
093fe3bb51 Add SSE2 SIMD implementation of computationally intensive routines. 2009-03-09 13:34:17 +00:00
Pierre Ossman
eea7215525 Add SSE2 SIMD implementation of computationally intensive routines.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@22 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-09 13:34:17 +00:00
MIYASAKA Masaru
a2e6a9dd47 IJG R6b with x86SIMD V1.02
Independent JPEG Group's JPEG software release 6b
with x86 SIMD extension for IJG JPEG library version 1.02
2015-07-29 16:36:25 -05:00
Pierre Ossman
205cdc87d4 Add SSE SIMD implementation of computationally intensive routines. 2009-03-09 13:31:56 +00:00
Pierre Ossman
018fc42974 Add SSE SIMD implementation of computationally intensive routines.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@21 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-09 13:31:56 +00:00
Pierre Ossman
a5cccc9dbf Most SIMD implementations need 16 byte alignment 2009-03-09 13:30:47 +00:00
Pierre Ossman
7311830680 Most SIMD implementations need 16 byte alignment
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@20 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-09 13:30:47 +00:00
Pierre Ossman
c7de3b4d83 Make sure the work space memory is properly aligned
We use the heap allocators to avoid having more than one implementation
of the alignment logic.
2009-03-09 13:29:37 +00:00
Pierre Ossman
35c4719638 Make sure the work space memory is properly aligned
We use the heap allocators to avoid having more than one implementation
of the alignment logic.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@19 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-09 13:29:37 +00:00
Pierre Ossman
9a4a8bb721 Add 3DNow SIMD implementation of computationally intensive routines. 2009-03-09 13:28:10 +00:00
Pierre Ossman
65d0317346 Add 3DNow SIMD implementation of computationally intensive routines.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@18 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-09 13:28:10 +00:00
Pierre Ossman
649fe159ce Add MMX SIMD implementation of computationally intensive routines. 2009-03-09 13:25:30 +00:00
Pierre Ossman
5eb84ff97f Add MMX SIMD implementation of computationally intensive routines.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@17 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-09 13:25:30 +00:00
Pierre Ossman
e1594812ac "Optimise" quantization step by replacing the division by a multiplication.
This has no measurable difference right now but makes it possible to do
SIMD implementations of this stage.
2009-03-09 13:23:04 +00:00
Pierre Ossman
dedc42e268 "Optimise" quantization step by replacing the division by a multiplication.
This has no measurable difference right now but makes it possible to do
SIMD implementations of this stage.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@16 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-09 13:23:04 +00:00
Pierre Ossman
863946aebd Implement x86 SIMD framework
Add NASM support and stub routine for detecting SIMD extensions.
2009-03-09 13:21:27 +00:00
Pierre Ossman
2ae181c7b8 Implement x86 SIMD framework
Add NASM support and stub routine for detecting SIMD extensions.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@15 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-09 13:21:27 +00:00
Pierre Ossman
c5cf41164a Framework for supporting SIMD acceleration
Designed to impose minimal changes on the "normal" code.
2009-03-09 13:15:56 +00:00
Pierre Ossman
59a3938b2e Framework for supporting SIMD acceleration
Designed to impose minimal changes on the "normal" code.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@14 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-09 13:15:56 +00:00
Pierre Ossman
a4f55b50c9 Split up the forward DCT routine into three stages
Divide it into sample conversion, DCT and quantization in order to
easily provide alternative implementations of each stage.
2009-03-09 10:37:20 +00:00
Pierre Ossman
49dcbfbf13 Split up the forward DCT routine into three stages
Divide it into sample conversion, DCT and quantization in order to
easily provide alternative implementations of each stage.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@13 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-09 10:37:20 +00:00
Pierre Ossman
d7bacc0721 Improve memory allocater alignment handling
Fix some broken assumptions and allow any alignment, not just those
associated with C types.
2009-03-09 10:34:53 +00:00
Pierre Ossman
5557fd2217 Improve memory allocater alignment handling
Fix some broken assumptions and allow any alignment, not just those
associated with C types.


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@12 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-09 10:34:53 +00:00
Pierre Ossman
2fb0831aeb Ignore generated configuration header.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@11 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-09 10:33:17 +00:00
Pierre Ossman
f1962bc0ce Explain the config header voodoo. 2009-03-06 15:30:42 +00:00
Pierre Ossman
ba0ce39b70 Explain the config header voodoo.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@10 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-06 15:30:42 +00:00
Pierre Ossman
8622727c09 Don't test for GNU malloc as we don't need it (or even check the result
of the test).
2009-03-06 15:00:56 +00:00
Pierre Ossman
b22e883a5f Don't test for GNU malloc as we don't need it (or even check the result
of the test).


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@9 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-06 15:00:56 +00:00
Peter Åstrand
ebd6166488 Renamed README_TightVNC.txt as README_TigerVNC.txt 2009-03-03 12:04:47 +00:00
Peter Åstrand
aa026fbf36 Renamed README_TightVNC.txt as README_TigerVNC.txt
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@8 632fc199-4ca6-4c93-a231-07263d6284db
2009-03-03 12:04:47 +00:00
Peter Åstrand
f83b43b7c9 Rebrand the source as TigerVNC. It is my hope that this patch is
minimal but still complete. The rebranding was done using a script:

find trunk -name .svn -prune -o -type f -exec rep.sh \{\} \;
pushd trunk
svn revert doc/TODO doc/registered-codes.txt doc/ft-protocol-problems.txt doc/rfbtight.tex
perl -pi -e 's|tightvnc|tigervnc|g' unix/configure.ac win/configure.ac unix/README

With rep.sh looking like:

perl -pi -e 's|TightVNC|TigerVNC|g' "$@"
perl -pi -e 's|www\.tightvnc\.com/bugs\.html|www\.tigervnc\.org|g' "$@"
perl -pi -e 's|www\.tightvnc\.com|www\.tigervnc\.org|g' "$@"
perl -pi -e 's|devteam\@tightvnc\.com|tigervnc-devel\@lists\.sourceforge\.net|g' "$@"
perl -pi -e 's|TigerVNC Team|TightVNC Team|g' "$@"
perl -pi -e 's|TigerVNC Group|TightVNC Group|g' "$@"
perl -pi -e 's|TigerVNC protocol|TightVNC protocol|g' "$@"
perl -pi -e 's|TigerVNC-specific|TightVNC-specific|g' "$@"
perl -pi -e 's|Vendor signatures: standard VNC/RealVNC, TridiaVNC, and TigerVNC|Vendor signatures: standard VNC/RealVNC, TridiaVNC, and TightVNC|g' "$@"
perl -pi -e 's|TigerVNC vendor|TightVNC vendor|g' "$@"
perl -pi -e 's|TigerVNC extension|TightVNC extension|g' "$@"
perl -pi -e 's|protocolTigerVNC|protocolTightVNC|g' "$@"
perl -pi -e 's|TigerVNC additions were|TightVNC additions were|g' "$@"
perl -pi -e 's|TigerVNC 1\.2|TightVNC 1\.2|g' "$@"
perl -pi -e 's|TigerVNC authentication type|TightVNC authentication type|g' "$@"
2009-02-27 10:12:14 +00:00
Peter Åstrand
8a418b2bb8 Rebrand the source as TigerVNC. It is my hope that this patch is
minimal but still complete. The rebranding was done using a script:

find trunk -name .svn -prune -o -type f -exec rep.sh \{\} \;
pushd trunk
svn revert doc/TODO doc/registered-codes.txt doc/ft-protocol-problems.txt doc/rfbtight.tex
perl -pi -e 's|tightvnc|tigervnc|g' unix/configure.ac win/configure.ac unix/README

With rep.sh looking like:

perl -pi -e 's|TightVNC|TigerVNC|g' "$@"
perl -pi -e 's|www\.tightvnc\.com/bugs\.html|www\.tigervnc\.org|g' "$@"
perl -pi -e 's|www\.tightvnc\.com|www\.tigervnc\.org|g' "$@"
perl -pi -e 's|devteam\@tightvnc\.com|tigervnc-devel\@lists\.sourceforge\.net|g' "$@"
perl -pi -e 's|TigerVNC Team|TightVNC Team|g' "$@"
perl -pi -e 's|TigerVNC Group|TightVNC Group|g' "$@"
perl -pi -e 's|TigerVNC protocol|TightVNC protocol|g' "$@"
perl -pi -e 's|TigerVNC-specific|TightVNC-specific|g' "$@"
perl -pi -e 's|Vendor signatures: standard VNC/RealVNC, TridiaVNC, and TigerVNC|Vendor signatures: standard VNC/RealVNC, TridiaVNC, and TightVNC|g' "$@"
perl -pi -e 's|TigerVNC vendor|TightVNC vendor|g' "$@"
perl -pi -e 's|TigerVNC extension|TightVNC extension|g' "$@"
perl -pi -e 's|protocolTigerVNC|protocolTightVNC|g' "$@"
perl -pi -e 's|TigerVNC additions were|TightVNC additions were|g' "$@"
perl -pi -e 's|TigerVNC 1\.2|TightVNC 1\.2|g' "$@"
perl -pi -e 's|TigerVNC authentication type|TightVNC authentication type|g' "$@"



git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@7 632fc199-4ca6-4c93-a231-07263d6284db
2009-02-27 10:12:14 +00:00
Peter Åstrand
5f33883e0e Ignoring Autotools and build files.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@6 632fc199-4ca6-4c93-a231-07263d6284db
2008-12-10 08:50:48 +00:00
Peter Åstrand
e2796477e6 This should be the final modification to restore a working Visual
Studio build. A static jconfig.h has been re-added, but in a separate
directory, to avoid clash with jconfig.h generated by configure
script. Also, jconfig.h now includes the inline macro. jpeg.dsp has
been modified to search in the "win" subdir, to find jconfig.h. 

This patch is in spirit similar to r121.
2008-12-02 09:56:26 +00:00
Peter Åstrand
213a72aaea This should be the final modification to restore a working Visual
Studio build. A static jconfig.h has been re-added, but in a separate
directory, to avoid clash with jconfig.h generated by configure
script. Also, jconfig.h now includes the inline macro. jpeg.dsp has
been modified to search in the "win" subdir, to find jconfig.h. 

This patch is in spirit similar to r121. 



git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@5 632fc199-4ca6-4c93-a231-07263d6284db
2008-12-02 09:56:26 +00:00
Adam Tkac
c653640b0d [Bugfix] Include man files and more jpeg libraries in tarball 2008-10-22 11:19:25 +00:00
Adam Tkac
da5a1fe760 [Bugfix] Include man files and more jpeg libraries in tarball
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@3 632fc199-4ca6-4c93-a231-07263d6284db
2008-10-22 11:19:25 +00:00
Constantin Kaplinsky
0ca44258fc Merged changes from branches/1.5-xserver (revision range 2432:2631) back to trunk.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@2 632fc199-4ca6-4c93-a231-07263d6284db
2008-09-28 05:08:48 +00:00
Adam Tkac
2d830a0e0c Add headers to Makefile.am-s to fix "make dist" command in common/* subtree 2008-06-18 15:29:19 +00:00
Adam Tkac
6687665312 - introduced common/jpeg/jconfig.h.in - minimal jconfig.h template 2008-04-14 13:11:58 +00:00
Adam Tkac
d88cc24540 - introduced common/jpeg/{configure.ac,Makefile.am}
- removed autogenerated stuff (jconfig.h, configure, config.guess, config.sub, jconfig.h, install-sh)
- minor macros changes in jchuff.c, jcphuff.c, jmorecfg.h (same with configure produced macros)
2008-04-03 13:29:28 +00:00
Constantin Kaplinsky
c87530727a Migrating to new directory structure adopted from the RealVNC's source tree. More changes will follow.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1 632fc199-4ca6-4c93-a231-07263d6284db
2006-05-25 05:01:55 +00:00
Constantin Kaplinsky
3347727ebb Migrating to new directory structure adopted from the RealVNC's source tree. More changes will follow. 2006-05-25 05:01:55 +00:00
611 changed files with 187667 additions and 31392 deletions

5
.gitattributes vendored Normal file
View File

@@ -0,0 +1,5 @@
/appveyor.yml export-ignore
/.gitattributes export-ignore
/.github export-ignore
*.ppm binary
/ChangeLog.md conflict-marker-size=8

8
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,8 @@
**Complete description of the bug fix or feature that this pull request implements**
**Checklist before submitting the pull request, to maximize the chances that the pull request will be accepted**
- [ ] Read CONTRIBUTING.md, a link to which appears under "Helpful resources" below. That document discusses general guidelines for contributing to libjpeg-turbo, as well as the types of contributions that will not be accepted or are unlikely to be accepted.
- [ ] Search the existing issues and pull requests (both open and closed) to ensure that a similar request has not already been submitted and rejected.
- [ ] Discuss the proposed bug fix or feature in a GitHub issue, through direct e-mail with the project maintainer, or on the libjpeg-turbo-devel mailing list.

48
.gitignore vendored Normal file
View File

@@ -0,0 +1,48 @@
.DS_Store
Makefile.in
Makefile
/CMakeFiles
/autom4te.cache
/aclocal.m4
/compile
/configure
/depcomp
/install-sh
/libtool
/missing
/stamp-h*
/java/classnoinst.stamp
/pkgscripts/
/jconfig.h
/jconfigint.h
/config.guess
/config.h
/config.h.in
/config.log
/config.status
/config.sub
/ltmain.sh
/ar-lib
/libjpeg.map
/.libs/
/simd/.libs/
/simd/jsimdcfg.inc
*.o
*.lo
*.la
/cjpeg
/djpeg
/jcstest
/jpegtran
/jpegyuv
/md5/md5cmp
/rdjpgcom
/test_enc_*
/tjbench
/tjbenchtest
/tjunittest
/wrjpgcom
/yuvjpeg
test_yuv*.jpg
CMakeCache.txt
CTestTestfile.cmake

726
BUILDING.md Normal file
View File

@@ -0,0 +1,726 @@
Building libjpeg-turbo
======================
Build Requirements
------------------
### All Systems
- [CMake](https://cmake.org) v2.8.12 or later
- [NASM](https://nasm.us) or [Yasm](https://yasm.tortall.net)
(if building x86 or x86-64 SIMD extensions)
* If using NASM, 2.13 or later is required.
* If using Yasm, 1.2.0 or later is required.
* NASM 2.15 or later is required if building libjpeg-turbo with Intel
Control-flow Enforcement Technology (CET) support.
* If building on macOS, NASM or Yasm can be obtained from
[MacPorts](https://macports.org) or [Homebrew](https://brew.sh).
- NOTE: Currently, if it is desirable to hide the SIMD function symbols in
Mac executables or shared libraries that statically link with
libjpeg-turbo, then NASM 2.14 or later or Yasm must be used when
building libjpeg-turbo.
* If NASM or Yasm is not in your `PATH`, then you can specify the full path
to the assembler by using either the `CMAKE_ASM_NASM_COMPILER` CMake
variable or the `ASM_NASM` environment variable. On Windows, use forward
slashes rather than backslashes in the path (for example,
**c:/nasm/nasm.exe**).
* NASM and Yasm are located in the CRB (Code Ready Builder) or PowerTools
repository on Red Hat Enterprise Linux 8+ and derivatives, which is not
enabled by default.
### Un*x Platforms (including Linux, Mac, FreeBSD, Solaris, and Cygwin)
- GCC v4.1 (or later) or Clang recommended for best performance
- If building the TurboJPEG Java wrapper, JDK or OpenJDK 1.5 or later is
required. Most modern Linux distributions, as well as Solaris 10 and later,
include JDK or OpenJDK. For other systems, you can obtain the Oracle Java
Development Kit from
<https://oracle.com/java/technologies/downloads>.
* If using JDK 11 or later, CMake 3.10.x or later must also be used.
### Windows
- Microsoft Visual C++ 2005 or later
If you don't already have Visual C++, then the easiest way to get it is by
installing
[Visual Studio Community Edition](https://visualstudio.microsoft.com),
which includes everything necessary to build libjpeg-turbo.
* You can also download and install the standalone Windows SDK (for Windows 7
or later), which includes command-line versions of the 32-bit and 64-bit
Visual C++ compilers.
* If you intend to build libjpeg-turbo from the command line, then add the
appropriate compiler and SDK directories to the `INCLUDE`, `LIB`, and
`PATH` environment variables. This is generally accomplished by
executing `vcvars32.bat` or `vcvars64.bat`, which are located in the same
directory as the compiler.
* If built with Visual C++ 2015 or later, the libjpeg-turbo static libraries
cannot be used with earlier versions of Visual C++, and vice versa.
* The libjpeg API DLL (**jpeg{version}.dll**) will depend on the C run-time
DLLs corresponding to the version of Visual C++ that was used to build it.
- Vcpkg
You need to download and install libpng using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.bat
./vcpkg integrate install
./vcpkg install libpng:x64-windows
./vcpkg install libpng:x64-windows-static
Actually, you can just download and install MozJPEG using vcpkg dependency manager:
./vcpkg install mozjpeg
The mozjpeg port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
... OR ...
- MinGW
[MSYS2](https://msys2.org) or [tdm-gcc](https://jmeubank.github.io/tdm-gcc)
recommended if building on a Windows machine. Both distributions install a
Start Menu link that can be used to launch a command prompt with the
appropriate compiler paths automatically set.
- If building the TurboJPEG Java wrapper, JDK 1.5 or later is required. This
can be downloaded from
<https://oracle.com/java/technologies/downloads>.
* If using JDK 11 or later, CMake 3.10.x or later must also be used.
Sub-Project Builds
------------------
The libjpeg-turbo build system does not support being included as a sub-project
using the CMake `add_subdirectory()` function. Use the CMake
`ExternalProject_Add()` function instead.
Out-of-Tree Builds
------------------
Binary objects, libraries, and executables are generated in the directory from
which CMake is executed (the "binary directory"), and this directory need not
necessarily be the same as the libjpeg-turbo source directory. You can create
multiple independent binary directories, in which different versions of
libjpeg-turbo can be built from the same source tree using different compilers
or settings. In the sections below, *{build_directory}* refers to the binary
directory, whereas *{source_directory}* refers to the libjpeg-turbo source
directory. For in-tree builds, these directories are the same.
Ninja
-----
If using Ninja, then replace `make` or `nmake` with `ninja`, and replace the
CMake generator (specified with the `-G` option) with `Ninja`, in all of the
procedures and recipes below.
Build Procedure
---------------
NOTE: The build procedures below assume that CMake is invoked from the command
line, but all of these procedures can be adapted to the CMake GUI as
well.
### Un*x
The following procedure will build libjpeg-turbo on Unix and Unix-like systems.
(On Solaris, this generates a 32-bit build. See "Build Recipes" below for
64-bit build instructions.)
cd {build_directory}
cmake -G"Unix Makefiles" [additional CMake flags] {source_directory}
make
This will generate the following files under *{build_directory}*:
**libjpeg.a**<br>
Static link library for the libjpeg API
**libjpeg.so.{version}** (Linux, Unix)<br>
**libjpeg.{version}.dylib** (Mac)<br>
**cygjpeg-{version}.dll** (Cygwin)<br>
Shared library for the libjpeg API
By default, *{version}* is 62.2.0, 7.2.0, or 8.1.2, depending on whether
libjpeg v6b (default), v7, or v8 emulation is enabled. If using Cygwin,
*{version}* is 62, 7, or 8.
**libjpeg.so** (Linux, Unix)<br>
**libjpeg.dylib** (Mac)<br>
Development symlink for the libjpeg API
**libjpeg.dll.a** (Cygwin)<br>
Import library for the libjpeg API
**libturbojpeg.a**<br>
Static link library for the TurboJPEG API
**libturbojpeg.so.0.2.0** (Linux, Unix)<br>
**libturbojpeg.0.2.0.dylib** (Mac)<br>
**cygturbojpeg-0.dll** (Cygwin)<br>
Shared library for the TurboJPEG API
**libturbojpeg.so** (Linux, Unix)<br>
**libturbojpeg.dylib** (Mac)<br>
Development symlink for the TurboJPEG API
**libturbojpeg.dll.a** (Cygwin)<br>
Import library for the TurboJPEG API
### Visual C++ (Command Line)
cd {build_directory}
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release [additional CMake flags] {source_directory}
nmake
This will build either a 32-bit or a 64-bit version of libjpeg-turbo, depending
on which version of **cl.exe** is in the `PATH`.
The following files will be generated under *{build_directory}*:
**jpeg-static.lib**<br>
Static link library for the libjpeg API
**jpeg{version}.dll**<br>
DLL for the libjpeg API
**jpeg.lib**<br>
Import library for the libjpeg API
**turbojpeg-static.lib**<br>
Static link library for the TurboJPEG API
**turbojpeg.dll**<br>
DLL for the TurboJPEG API
**turbojpeg.lib**<br>
Import library for the TurboJPEG API
*{version}* is 62, 7, or 8, depending on whether libjpeg v6b (default), v7, or
v8 emulation is enabled.
### Visual C++ (IDE)
Choose the appropriate CMake generator option for your version of Visual Studio
(run `cmake` with no arguments for a list of available generators.) For
instance:
cd {build_directory}
cmake -G"Visual Studio 10" [additional CMake flags] {source_directory}
NOTE: Add "Win64" to the generator name (for example, "Visual Studio 10 Win64")
to build a 64-bit version of libjpeg-turbo. A separate build directory must be
used for 32-bit and 64-bit builds.
You can then open **ALL_BUILD.vcproj** in Visual Studio and build one of the
configurations in that project ("Debug", "Release", etc.) to generate a full
build of libjpeg-turbo.
This will generate the following files under *{build_directory}*:
**{configuration}/jpeg-static.lib**<br>
Static link library for the libjpeg API
**{configuration}/jpeg{version}.dll**<br>
DLL for the libjpeg API
**{configuration}/jpeg.lib**<br>
Import library for the libjpeg API
**{configuration}/turbojpeg-static.lib**<br>
Static link library for the TurboJPEG API
**{configuration}/turbojpeg.dll**<br>
DLL for the TurboJPEG API
**{configuration}/turbojpeg.lib**<br>
Import library for the TurboJPEG API
*{configuration}* is Debug, Release, RelWithDebInfo, or MinSizeRel, depending
on the configuration you built in the IDE, and *{version}* is 62, 7, or 8,
depending on whether libjpeg v6b (default), v7, or v8 emulation is enabled.
### MinGW
NOTE: This assumes that you are building on a Windows machine using the MSYS
environment. If you are cross-compiling on a Un*x platform (including Mac and
Cygwin), then see "Build Recipes" below.
cd {build_directory}
cmake -G"MSYS Makefiles" [additional CMake flags] {source_directory}
make
This will generate the following files under *{build_directory}*:
**libjpeg.a**<br>
Static link library for the libjpeg API
**libjpeg-{version}.dll**<br>
DLL for the libjpeg API
**libjpeg.dll.a**<br>
Import library for the libjpeg API
**libturbojpeg.a**<br>
Static link library for the TurboJPEG API
**libturbojpeg.dll**<br>
DLL for the TurboJPEG API
**libturbojpeg.dll.a**<br>
Import library for the TurboJPEG API
*{version}* is 62, 7, or 8, depending on whether libjpeg v6b (default), v7, or
v8 emulation is enabled.
### Debug Build
Add `-DCMAKE_BUILD_TYPE=Debug` to the CMake command line. Or, if building
with NMake, remove `-DCMAKE_BUILD_TYPE=Release` (Debug builds are the default
with NMake.)
### libjpeg v7 or v8 API/ABI Emulation
Add `-DWITH_JPEG7=1` to the CMake command line to build a version of
libjpeg-turbo that is API/ABI-compatible with libjpeg v7. Add `-DWITH_JPEG8=1`
to the CMake command line to build a version of libjpeg-turbo that is
API/ABI-compatible with libjpeg v8. See [README.md](README.md) for more
information about libjpeg v7 and v8 emulation.
### Arithmetic Coding Support
Since the patent on arithmetic coding has expired, this functionality has been
included in this release of libjpeg-turbo. libjpeg-turbo's implementation is
based on the implementation in libjpeg v8, but it works when emulating libjpeg
v7 or v6b as well. The default is to enable both arithmetic encoding and
decoding, but those who have philosophical objections to arithmetic coding can
add `-DWITH_ARITH_ENC=0` or `-DWITH_ARITH_DEC=0` to the CMake command line to
disable encoding or decoding (respectively.)
### TurboJPEG Java Wrapper
Add `-DWITH_JAVA=1` to the CMake command line to incorporate an optional Java
Native Interface (JNI) wrapper into the TurboJPEG shared library and build the
Java front-end classes to support it. This allows the TurboJPEG shared library
to be used directly from Java applications. See [java/README](java/README) for
more details.
If Java is not in your `PATH`, or if you wish to use an alternate JDK to
build/test libjpeg-turbo, then (prior to running CMake) set the `JAVA_HOME`
environment variable to the location of the JDK that you wish to use. The
`Java_JAVAC_EXECUTABLE`, `Java_JAVA_EXECUTABLE`, and `Java_JAR_EXECUTABLE`
CMake variables can also be used to specify alternate commands or locations for
javac, jar, and java (respectively.) You can also set the
`CMAKE_JAVA_COMPILE_FLAGS` CMake variable or the `JAVAFLAGS` environment
variable to specify arguments that should be passed to the Java compiler when
building the TurboJPEG classes, and the `JAVAARGS` CMake variable to specify
arguments that should be passed to the JRE when running the TurboJPEG Java unit
tests.
Build Recipes
-------------
### 32-bit Build on 64-bit Linux/Unix
Use export/setenv to set the following environment variables before running
CMake:
CFLAGS=-m32
LDFLAGS=-m32
### 64-bit Build on Solaris
Use export/setenv to set the following environment variables before running
CMake:
CFLAGS=-m64
LDFLAGS=-m64
### Other Compilers
On Un*x systems, prior to running CMake, you can set the `CC` environment
variable to the command used to invoke the C compiler.
### 32-bit MinGW Build on Un*x (including Mac and Cygwin)
Create a file called **toolchain.cmake** under *{build_directory}*, with the
following contents:
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR X86)
set(CMAKE_C_COMPILER {mingw_binary_path}/i686-w64-mingw32-gcc)
set(CMAKE_RC_COMPILER {mingw_binary_path}/i686-w64-mingw32-windres)
*{mingw\_binary\_path}* is the directory under which the MinGW binaries are
located (usually **/usr/bin**.) Next, execute the following commands:
cd {build_directory}
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
-DCMAKE_INSTALL_PREFIX={install_path} \
[additional CMake flags] {source_directory}
make
*{install\_path}* is the path under which the libjpeg-turbo binaries should be
installed.
### 64-bit MinGW Build on Un*x (including Mac and Cygwin)
Create a file called **toolchain.cmake** under *{build_directory}*, with the
following contents:
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR AMD64)
set(CMAKE_C_COMPILER {mingw_binary_path}/x86_64-w64-mingw32-gcc)
set(CMAKE_RC_COMPILER {mingw_binary_path}/x86_64-w64-mingw32-windres)
*{mingw\_binary\_path}* is the directory under which the MinGW binaries are
located (usually **/usr/bin**.) Next, execute the following commands:
cd {build_directory}
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
-DCMAKE_INSTALL_PREFIX={install_path} \
[additional CMake flags] {source_directory}
make
*{install\_path}* is the path under which the libjpeg-turbo binaries should be
installed.
Building libjpeg-turbo for iOS
------------------------------
iOS platforms, such as the iPhone and iPad, use Arm processors, and all
currently supported models include Neon instructions. Thus, they can take
advantage of libjpeg-turbo's SIMD extensions to significantly accelerate JPEG
compression/decompression. This section describes how to build libjpeg-turbo
for these platforms.
### Armv8 (64-bit)
**Xcode 5 or later required, Xcode 6.3.x or later recommended**
The following script demonstrates how to build libjpeg-turbo to run on the
iPhone 5S/iPad Mini 2/iPad Air and newer.
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
export CFLAGS="-Wall -miphoneos-version-min=8.0 -funwind-tables"
cd {build_directory}
cmake -G"Unix Makefiles" \
-DCMAKE_C_COMPILER=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
[additional CMake flags] {source_directory}
make
Replace `iPhoneOS` with `iPhoneSimulator` and `-miphoneos-version-min` with
`-miphonesimulator-version-min` to build libjpeg-turbo for the iOS simulator on
Macs with Apple silicon CPUs.
Building libjpeg-turbo for Android
----------------------------------
Building libjpeg-turbo for Android platforms requires v13b or later of the
[Android NDK](https://developer.android.com/ndk).
### Armv7 (32-bit)
**NDK r19 or later with Clang recommended**
The following is a general recipe script that can be modified for your specific
needs.
# Set these variables to suit your needs
NDK_PATH={full path to the NDK directory-- for example,
/opt/android/android-ndk-r16b}
TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r16b and earlier,
and "clang" must be used with NDK r17c and later}
ANDROID_VERSION={the minimum version of Android to support-- for example,
"16", "19", etc.}
cd {build_directory}
cmake -G"Unix Makefiles" \
-DANDROID_ABI=armeabi-v7a \
-DANDROID_ARM_MODE=arm \
-DANDROID_PLATFORM=android-${ANDROID_VERSION} \
-DANDROID_TOOLCHAIN=${TOOLCHAIN} \
-DCMAKE_ASM_FLAGS="--target=arm-linux-androideabi${ANDROID_VERSION}" \
-DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
[additional CMake flags] {source_directory}
make
### Armv8 (64-bit)
**Clang recommended**
The following is a general recipe script that can be modified for your specific
needs.
# Set these variables to suit your needs
NDK_PATH={full path to the NDK directory-- for example,
/opt/android/android-ndk-r16b}
TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r14b and earlier,
and "clang" must be used with NDK r17c and later}
ANDROID_VERSION={the minimum version of Android to support. "21" or later
is required for a 64-bit build.}
cd {build_directory}
cmake -G"Unix Makefiles" \
-DANDROID_ABI=arm64-v8a \
-DANDROID_ARM_MODE=arm \
-DANDROID_PLATFORM=android-${ANDROID_VERSION} \
-DANDROID_TOOLCHAIN=${TOOLCHAIN} \
-DCMAKE_ASM_FLAGS="--target=aarch64-linux-android${ANDROID_VERSION}" \
-DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
[additional CMake flags] {source_directory}
make
### x86 (32-bit)
The following is a general recipe script that can be modified for your specific
needs.
# Set these variables to suit your needs
NDK_PATH={full path to the NDK directory-- for example,
/opt/android/android-ndk-r16b}
TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r14b and earlier,
and "clang" must be used with NDK r17c and later}
ANDROID_VERSION={The minimum version of Android to support-- for example,
"16", "19", etc.}
cd {build_directory}
cmake -G"Unix Makefiles" \
-DANDROID_ABI=x86 \
-DANDROID_PLATFORM=android-${ANDROID_VERSION} \
-DANDROID_TOOLCHAIN=${TOOLCHAIN} \
-DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
[additional CMake flags] {source_directory}
make
### x86-64 (64-bit)
The following is a general recipe script that can be modified for your specific
needs.
# Set these variables to suit your needs
NDK_PATH={full path to the NDK directory-- for example,
/opt/android/android-ndk-r16b}
TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r14b and earlier,
and "clang" must be used with NDK r17c and later}
ANDROID_VERSION={the minimum version of Android to support. "21" or later
is required for a 64-bit build.}
cd {build_directory}
cmake -G"Unix Makefiles" \
-DANDROID_ABI=x86_64 \
-DANDROID_PLATFORM=android-${ANDROID_VERSION} \
-DANDROID_TOOLCHAIN=${TOOLCHAIN} \
-DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
[additional CMake flags] {source_directory}
make
Advanced CMake Options
----------------------
To list and configure other CMake options not specifically mentioned in this
guide, run
ccmake {source_directory}
or
cmake-gui {source_directory}
from the build directory after initially configuring the build. CCMake is a
text-based interactive version of CMake, and CMake-GUI is a GUI version. Both
will display all variables that are relevant to the libjpeg-turbo build, their
current values, and a help string describing what they do.
Installing libjpeg-turbo
========================
You can use the build system to install libjpeg-turbo (as opposed to creating
an installer package.) To do this, run `make install` or `nmake install`
(or build the "install" target in the Visual Studio IDE.) Running
`make uninstall` or `nmake uninstall` (or building the "uninstall" target in
the Visual Studio IDE) will uninstall libjpeg-turbo.
The `CMAKE_INSTALL_PREFIX` CMake variable can be modified in order to install
libjpeg-turbo into a directory of your choosing. If you don't specify
`CMAKE_INSTALL_PREFIX`, then the default is:
**c:\libjpeg-turbo**<br>
Visual Studio 32-bit build
**c:\libjpeg-turbo64**<br>
Visual Studio 64-bit build
**c:\libjpeg-turbo-gcc**<br>
MinGW 32-bit build
**c:\libjpeg-turbo-gcc64**<br>
MinGW 64-bit build
**/opt/libjpeg-turbo**<br>
Un*x
The default value of `CMAKE_INSTALL_PREFIX` causes the libjpeg-turbo files to
be installed with a directory structure resembling that of the official
libjpeg-turbo binary packages. Changing the value of `CMAKE_INSTALL_PREFIX`
(for instance, to **/usr/local**) causes the libjpeg-turbo files to be
installed with a directory structure that conforms to GNU standards.
The `CMAKE_INSTALL_BINDIR`, `CMAKE_INSTALL_DATAROOTDIR`,
`CMAKE_INSTALL_DOCDIR`, `CMAKE_INSTALL_INCLUDEDIR`, `CMAKE_INSTALL_JAVADIR`,
`CMAKE_INSTALL_LIBDIR`, and `CMAKE_INSTALL_MANDIR` CMake variables allow a
finer degree of control over where specific files in the libjpeg-turbo
distribution should be installed. These directory variables can either be
specified as absolute paths or as paths relative to `CMAKE_INSTALL_PREFIX` (for
instance, setting `CMAKE_INSTALL_DOCDIR` to **doc** would cause the
documentation to be installed in **${CMAKE\_INSTALL\_PREFIX}/doc**.) If a
directory variable contains the name of another directory variable in angle
brackets, then its final value will depend on the final value of that other
variable. For instance, the default value of `CMAKE_INSTALL_MANDIR` is
**\<CMAKE\_INSTALL\_DATAROOTDIR\>/man**.
Creating Distribution Packages
==============================
The following commands can be used to create various types of distribution
packages:
Linux
-----
make rpm
Create Red Hat-style binary RPM package. Requires RPM v4 or later.
make srpm
This runs `make dist` to create a pristine source tarball, then creates a
Red Hat-style source RPM package from the tarball. Requires RPM v4 or later.
make deb
Create Debian-style binary package. Requires dpkg.
Mac
---
make dmg
Create Mac package/disk image. This requires pkgbuild and productbuild, which
are installed by default on OS X/macOS 10.7 and later.
In order to create a Mac package/disk image that contains universal
x86-64/Arm binaries, set the following CMake variable:
* `SECONDARY_BUILD`: Directory containing a cross-compiled x86-64 or Armv8
(64-bit) iOS or macOS build of libjpeg-turbo to include in the universal
binaries
You should first use CMake to configure the cross-compiled x86-64 or Armv8
secondary build of libjpeg-turbo (see "Building libjpeg-turbo for iOS" above,
if applicable) in a build directory that matches the one specified in the
aforementioned CMake variable. Next, configure the primary (native) build of
libjpeg-turbo as an out-of-tree build, specifying the aforementioned CMake
variable, and build it. Once the primary build has been built, run `make dmg`
from the build directory. The packaging system will build the secondary build,
use lipo to combine it with the primary build into a single set of universal
binaries, then package the universal binaries.
Windows
-------
If using NMake:
cd {build_directory}
nmake installer
If using MinGW:
cd {build_directory}
make installer
If using the Visual Studio IDE, build the "installer" target.
The installer package (libjpeg-turbo-*{version}*[-gcc|-vc][64].exe) will be
located under *{build_directory}*. If building using the Visual Studio IDE,
then the installer package will be located in a subdirectory with the same name
as the configuration you built (such as *{build_directory}*\Debug\ or
*{build_directory}*\Release\).
Building a Windows installer requires the
[Nullsoft Install System](https://nsis.sourceforge.io). makensis.exe should
be in your `PATH`.
Regression testing
==================
The most common way to test libjpeg-turbo is by invoking `make test` (Un*x) or
`nmake test` (Windows command line) or by building the "RUN_TESTS" target
(Visual Studio IDE), once the build has completed. This runs a series of tests
to ensure that mathematical compatibility has been maintained between
libjpeg-turbo and libjpeg v6b. This also invokes the TurboJPEG unit tests,
which ensure that the colorspace extensions, YUV encoding, decompression
scaling, and other features of the TurboJPEG C and Java APIs are working
properly (and, by extension, that the equivalent features of the underlying
libjpeg API are also working.)
Invoking `make testclean` (Un*x) or `nmake testclean` (Windows command line) or
building the "testclean" target (Visual Studio IDE) will clean up the output
images generated by the tests.
On Un*x platforms, more extensive tests of the TurboJPEG C and Java wrappers
can be run by invoking `make tjtest`. These extended TurboJPEG tests
essentially iterate through all of the available features of the TurboJPEG APIs
that are not covered by the TurboJPEG unit tests (including the lossless
transform options) and compare the images generated by each feature to images
generated using the equivalent feature in the libjpeg API. The extended
TurboJPEG tests are meant to test for regressions in the TurboJPEG wrappers,
not in the underlying libjpeg API library.

1902
CMakeLists.txt Normal file

File diff suppressed because it is too large Load Diff

15
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,15 @@
# Community Participation Guidelines
This repository is governed by Mozilla's code of conduct and etiquette guidelines.
For more details, please read the
[Mozilla Community Participation Guidelines](https://www.mozilla.org/about/governance/policies/participation/).
## How to Report
For more information on how to report violations of the Community Participation Guidelines, please read our '[How to Report](https://www.mozilla.org/about/governance/policies/participation/reporting/)' page.
<!--
## Project Specific Etiquette
In some cases, there will be additional project etiquette i.e.: (https://bugzilla.mozilla.org/page.cgi?id=etiquette.html).
Please update for your project.
-->

2316
ChangeLog.md Normal file

File diff suppressed because it is too large Load Diff

135
LICENSE.md Normal file
View File

@@ -0,0 +1,135 @@
libjpeg-turbo Licenses
======================
libjpeg-turbo is covered by two compatible BSD-style open source licenses:
- The IJG (Independent JPEG Group) License, which is listed in
[README.ijg](README.ijg)
This license applies to the libjpeg API library and associated programs,
including any code inherited from libjpeg and any modifications to that
code. Note that the libjpeg-turbo SIMD source code bears the
[zlib License](https://opensource.org/licenses/Zlib), but in the context of
the overall libjpeg API library, the terms of the zlib License are subsumed
by the terms of the IJG License.
- The Modified (3-clause) BSD License, which is listed below
This license applies to the TurboJPEG API library and associated programs, as
well as the build system. Note that the TurboJPEG API library wraps the
libjpeg API library, so in the context of the overall TurboJPEG API library,
both the terms of the IJG License and the terms of the Modified (3-clause)
BSD License apply.
Complying with the libjpeg-turbo Licenses
=========================================
This section provides a roll-up of the libjpeg-turbo licensing terms, to the
best of our understanding. This is not a license in and of itself. It is
intended solely for clarification.
1. If you are distributing a modified version of the libjpeg-turbo source,
then:
1. You cannot alter or remove any existing copyright or license notices
from the source.
**Origin**
- Clause 1 of the IJG License
- Clause 1 of the Modified BSD License
- Clauses 1 and 3 of the zlib License
2. You must add your own copyright notice to the header of each source
file you modified, so others can tell that you modified that file. (If
there is not an existing copyright header in that file, then you can
simply add a notice stating that you modified the file.)
**Origin**
- Clause 1 of the IJG License
- Clause 2 of the zlib License
3. You must include the IJG README file, and you must not alter any of the
copyright or license text in that file.
**Origin**
- Clause 1 of the IJG License
2. If you are distributing only libjpeg-turbo binaries without the source, or
if you are distributing an application that statically links with
libjpeg-turbo, then:
1. Your product documentation must include a message stating:
This software is based in part on the work of the Independent JPEG
Group.
**Origin**
- Clause 2 of the IJG license
2. If your binary distribution includes or uses the TurboJPEG API, then
your product documentation must include the text of the Modified BSD
License (see below.)
**Origin**
- Clause 2 of the Modified BSD License
3. You cannot use the name of the IJG or The libjpeg-turbo Project or the
contributors thereof in advertising, publicity, etc.
**Origin**
- IJG License
- Clause 3 of the Modified BSD License
4. The IJG and The libjpeg-turbo Project do not warrant libjpeg-turbo to be
free of defects, nor do we accept any liability for undesirable
consequences resulting from your use of the software.
**Origin**
- IJG License
- Modified BSD License
- zlib License
The Modified (3-clause) BSD License
===================================
Copyright (C)2009-2024 D. R. Commander. All Rights Reserved.<br>
Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither the name of the libjpeg-turbo Project nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Why Two Licenses?
=================
The zlib License could have been used instead of the Modified (3-clause) BSD
License, and since the IJG License effectively subsumes the distribution
conditions of the zlib License, this would have effectively placed
libjpeg-turbo binary distributions under the IJG License. However, the IJG
License specifically refers to the Independent JPEG Group and does not extend
attribution and endorsement protections to other entities. Thus, it was
desirable to choose a license that granted us the same protections for new code
that were granted to the IJG for code derived from their software.

385
README
View File

@@ -1,385 +0,0 @@
The Independent JPEG Group's JPEG software
==========================================
README for release 6b of 27-Mar-1998
====================================
This distribution contains the sixth public release of the Independent JPEG
Group's free JPEG software. You are welcome to redistribute this software and
to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
Serious users of this software (particularly those incorporating it into
larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to
our electronic mailing list. Mailing list members are notified of updates
and have a chance to participate in technical discussions, etc.
This software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
Group.
IJG is not affiliated with the official ISO JPEG standards committee.
DOCUMENTATION ROADMAP
=====================
This file contains the following sections:
OVERVIEW General description of JPEG and the IJG software.
LEGAL ISSUES Copyright, lack of warranty, terms of distribution.
REFERENCES Where to learn more about JPEG.
ARCHIVE LOCATIONS Where to find newer versions of this software.
RELATED SOFTWARE Other stuff you should get.
FILE FORMAT WARS Software *not* to get.
TO DO Plans for future IJG releases.
Other documentation files in the distribution are:
User documentation:
install.doc How to configure and install the IJG software.
usage.doc Usage instructions for cjpeg, djpeg, jpegtran,
rdjpgcom, and wrjpgcom.
*.1 Unix-style man pages for programs (same info as usage.doc).
wizard.doc Advanced usage instructions for JPEG wizards only.
change.log Version-to-version change highlights.
Programmer and internal documentation:
libjpeg.doc How to use the JPEG library in your own programs.
example.c Sample code for calling the JPEG library.
structure.doc Overview of the JPEG library's internal structure.
filelist.doc Road map of IJG files.
coderules.doc Coding style rules --- please read if you contribute code.
Please read at least the files install.doc and usage.doc. Useful information
can also be found in the JPEG FAQ (Frequently Asked Questions) article. See
ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
If you want to understand how the JPEG code works, we suggest reading one or
more of the REFERENCES, then looking at the documentation files (in roughly
the order listed) before diving into the code.
OVERVIEW
========
This package contains C software to implement JPEG image compression and
decompression. JPEG (pronounced "jay-peg") is a standardized compression
method for full-color and gray-scale images. JPEG is intended for compressing
"real-world" scenes; line drawings, cartoons and other non-realistic images
are not its strong suit. JPEG is lossy, meaning that the output image is not
exactly identical to the input image. Hence you must not use JPEG if you
have to have identical output bits. However, on typical photographic images,
very good compression levels can be obtained with no visible change, and
remarkably high compression levels are possible if you can tolerate a
low-quality image. For more details, see the references, or just experiment
with various compression settings.
This software implements JPEG baseline, extended-sequential, and progressive
compression processes. Provision is made for supporting all variants of these
processes, although some uncommon parameter settings aren't implemented yet.
For legal reasons, we are not distributing code for the arithmetic-coding
variants of JPEG; see LEGAL ISSUES. We have made no provision for supporting
the hierarchical or lossless processes defined in the standard.
We provide a set of library routines for reading and writing JPEG image files,
plus two sample applications "cjpeg" and "djpeg", which use the library to
perform conversion between JPEG and some other popular image file formats.
The library is intended to be reused in other applications.
In order to support file conversion and viewing software, we have included
considerable functionality beyond the bare JPEG coding/decoding capability;
for example, the color quantization modules are not strictly part of JPEG
decoding, but they are essential for output to colormapped file formats or
colormapped displays. These extra functions can be compiled out of the
library if not required for a particular application. We have also included
"jpegtran", a utility for lossless transcoding between different JPEG
processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
inserting and extracting textual comments in JFIF files.
The emphasis in designing this software has been on achieving portability and
flexibility, while also making it fast enough to be useful. In particular,
the software is not intended to be read as a tutorial on JPEG. (See the
REFERENCES section for introductory material.) Rather, it is intended to
be reliable, portable, industrial-strength code. We do not claim to have
achieved that goal in every aspect of the software, but we strive for it.
We welcome the use of this software as a component of commercial products.
No royalty is required, but we do ask for an acknowledgement in product
documentation, as described under LEGAL ISSUES.
LEGAL ISSUES
============
In plain English:
1. We don't promise that this software works. (But if you find any bugs,
please let us know!)
2. You can use this software for whatever you want. You don't have to pay us.
3. You may not pretend that you wrote this software. If you use it in a
program, you must acknowledge somewhere in your documentation that
you've used the IJG code.
In legalese:
The authors make NO WARRANTY or representation, either express or implied,
with respect to this software, its quality, accuracy, merchantability, or
fitness for a particular purpose. This software is provided "AS IS", and you,
its user, assume the entire risk as to its quality and accuracy.
This software is copyright (C) 1991-1998, Thomas G. Lane.
All Rights Reserved except as specified below.
Permission is hereby granted to use, copy, modify, and distribute this
software (or portions thereof) for any purpose, without fee, subject to these
conditions:
(1) If any part of the source code for this software is distributed, then this
README file must be included, with this copyright and no-warranty notice
unaltered; and any additions, deletions, or changes to the original files
must be clearly indicated in accompanying documentation.
(2) If only executable code is distributed, then the accompanying
documentation must state that "this software is based in part on the work of
the Independent JPEG Group".
(3) Permission for use of this software is granted only if the user accepts
full responsibility for any undesirable consequences; the authors accept
NO LIABILITY for damages of any kind.
These conditions apply to any software derived from or based on the IJG code,
not just to the unmodified library. If you use our work, you ought to
acknowledge us.
Permission is NOT granted for the use of any IJG author's name or company name
in advertising or publicity relating to this software or products derived from
it. This software may be referred to only as "the Independent JPEG Group's
software".
We specifically permit and encourage the use of this software as the basis of
commercial products, provided that all warranty or liability claims are
assumed by the product vendor.
ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
ansi2knr.c is NOT covered by the above copyright and conditions, but instead
by the usual distribution terms of the Free Software Foundation; principally,
that you must include source code if you redistribute it. (See the file
ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
of any program generated from the IJG code, this does not limit you more than
the foregoing paragraphs do.
The Unix configuration script "configure" was produced with GNU Autoconf.
It is copyright by the Free Software Foundation but is freely distributable.
The same holds for its supporting scripts (config.guess, config.sub,
ltconfig, ltmain.sh). Another support script, install-sh, is copyright
by M.I.T. but is also freely distributable.
It appears that the arithmetic coding option of the JPEG spec is covered by
patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot
legally be used without obtaining one or more licenses. For this reason,
support for arithmetic coding has been removed from the free JPEG software.
(Since arithmetic coding provides only a marginal gain over the unpatented
Huffman mode, it is unlikely that very many implementations will support it.)
So far as we are aware, there are no patent restrictions on the remaining
code.
The IJG distribution formerly included code to read and write GIF files.
To avoid entanglement with the Unisys LZW patent, GIF reading support has
been removed altogether, and the GIF writer has been simplified to produce
"uncompressed GIFs". This technique does not use the LZW algorithm; the
resulting GIF files are larger than usual, but are readable by all standard
GIF decoders.
We are required to state that
"The Graphics Interchange Format(c) is the Copyright property of
CompuServe Incorporated. GIF(sm) is a Service Mark property of
CompuServe Incorporated."
REFERENCES
==========
We highly recommend reading one or more of these references before trying to
understand the innards of the JPEG software.
The best short technical introduction to the JPEG compression algorithm is
Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
(Adjacent articles in that issue discuss MPEG motion picture compression,
applications of JPEG, and related topics.) If you don't have the CACM issue
handy, a PostScript file containing a revised version of Wallace's article is
available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz. The file (actually
a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
omits the sample images that appeared in CACM, but it includes corrections
and some added material. Note: the Wallace article is copyright ACM and IEEE,
and it may not be used for commercial purposes.
A somewhat less technical, more leisurely introduction to JPEG can be found in
"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides
good explanations and example C code for a multitude of compression methods
including JPEG. It is an excellent source if you are comfortable reading C
code but don't know much about data compression in general. The book's JPEG
sample code is far from industrial-strength, but when you are ready to look
at a full implementation, you've got one here...
The best full description of JPEG is the textbook "JPEG Still Image Data
Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. Price US$59.95, 638 pp.
The book includes the complete text of the ISO JPEG standards (DIS 10918-1
and draft DIS 10918-2). This is by far the most complete exposition of JPEG
in existence, and we highly recommend it.
The JPEG standard itself is not available electronically; you must order a
paper copy through ISO or ITU. (Unless you feel a need to own a certified
official copy, we recommend buying the Pennebaker and Mitchell book instead;
it's much cheaper and includes a great deal of useful explanatory material.)
In the USA, copies of the standard may be ordered from ANSI Sales at (212)
642-4900, or from Global Engineering Documents at (800) 854-7179. (ANSI
doesn't take credit card orders, but Global does.) It's not cheap: as of
1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
shipping/handling. The standard is divided into two parts, Part 1 being the
actual specification, while Part 2 covers compliance testing methods. Part 1
is titled "Digital Compression and Coding of Continuous-tone Still Images,
Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of
Continuous-tone Still Images, Part 2: Compliance testing" and has document
numbers ISO/IEC IS 10918-2, ITU-T T.83.
Some extensions to the original JPEG standard are defined in JPEG Part 3,
a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84. IJG
currently does not support any Part 3 extensions.
The JPEG standard does not specify all details of an interchangeable file
format. For the omitted details we follow the "JFIF" conventions, revision
1.02. A copy of the JFIF spec is available from:
Literature Department
C-Cube Microsystems, Inc.
1778 McCarthy Blvd.
Milpitas, CA 95035
phone (408) 944-6300, fax (408) 944-6314
A PostScript version of this document is available by FTP at
ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz. There is also a plain text
version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
the figures.
The TIFF 6.0 file format specification can be obtained by FTP from
ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme
found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
(Compression tag 7). Copies of this Note can be obtained from ftp.sgi.com or
from ftp://ftp.uu.net/graphics/jpeg/. It is expected that the next revision
of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
Although IJG's own code does not support TIFF/JPEG, the free libtiff library
uses our library to implement TIFF/JPEG per the Note. libtiff is available
from ftp://ftp.sgi.com/graphics/tiff/.
ARCHIVE LOCATIONS
=================
The "official" archive site for this software is ftp.uu.net (Internet
address 192.48.96.9). The most recent released version can always be found
there in directory graphics/jpeg. This particular version will be archived
as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz. If you don't have
direct Internet access, UUNET's archives are also available via UUCP; contact
help@uunet.uu.net for information on retrieving files that way.
Numerous Internet sites maintain copies of the UUNET files. However, only
ftp.uu.net is guaranteed to have the latest official version.
You can also obtain this software in DOS-compatible "zip" archive format from
the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
"JPEG Tools". Again, these versions may sometimes lag behind the ftp.uu.net
release.
The JPEG FAQ (Frequently Asked Questions) article is a useful source of
general information about JPEG. It is updated constantly and therefore is
not included in this distribution. The FAQ is posted every two weeks to
Usenet newsgroups comp.graphics.misc, news.answers, and other groups.
It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
and other news.answers archive sites, including the official news.answers
archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu
with body
send usenet/news.answers/jpeg-faq/part1
send usenet/news.answers/jpeg-faq/part2
RELATED SOFTWARE
================
Numerous viewing and image manipulation programs now support JPEG. (Quite a
few of them use this library to do so.) The JPEG FAQ described above lists
some of the more popular free and shareware viewers, and tells where to
obtain them on Internet.
If you are on a Unix machine, we highly recommend Jef Poskanzer's free
PBMPLUS software, which provides many useful operations on PPM-format image
files. In particular, it can convert PPM images to and from a wide range of
other formats, thus making cjpeg/djpeg considerably more useful. The latest
version is distributed by the NetPBM group, and is available from numerous
sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
you are likely to have difficulty making it work on any non-Unix machine.
A different free JPEG implementation, written by the PVRG group at Stanford,
is available from ftp://havefun.stanford.edu/pub/jpeg/. This program
is designed for research and experimentation rather than production use;
it is slower, harder to use, and less portable than the IJG code, but it
is easier to read and modify. Also, the PVRG code supports lossless JPEG,
which we do not. (On the other hand, it doesn't do progressive JPEG.)
FILE FORMAT WARS
================
Some JPEG programs produce files that are not compatible with our library.
The root of the problem is that the ISO JPEG committee failed to specify a
concrete file format. Some vendors "filled in the blanks" on their own,
creating proprietary formats that no one else could read. (For example, none
of the early commercial JPEG implementations for the Macintosh were able to
exchange compressed files.)
The file format we have adopted is called JFIF (see REFERENCES). This format
has been agreed to by a number of major commercial JPEG vendors, and it has
become the de facto standard. JFIF is a minimal or "low end" representation.
We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
Technical Note #2) for "high end" applications that need to record a lot of
additional data about an image. TIFF/JPEG is fairly new and not yet widely
supported, unfortunately.
The upcoming JPEG Part 3 standard defines a file format called SPIFF.
SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
be able to read the most common variant of SPIFF. SPIFF has some technical
advantages over JFIF, but its major claim to fame is simply that it is an
official standard rather than an informal one. At this point it is unclear
whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
standard. IJG intends to support SPIFF once the standard is frozen, but we
have not decided whether it should become our default output format or not.
(In any case, our decoder will remain capable of reading JFIF indefinitely.)
Various proprietary file formats incorporating JPEG compression also exist.
We have little or no sympathy for the existence of these formats. Indeed,
one of the original reasons for developing this free software was to help
force convergence on common, open format standards for JPEG files. Don't
use a proprietary file format!
TO DO
=====
The major thrust for v7 will probably be improvement of visual quality.
The current method for scaling the quantization tables is known not to be
very good at low Q values. We also intend to investigate block boundary
smoothing, "poor man's variable quantization", and other means of improving
quality-vs-file-size performance without sacrificing compatibility.
In future versions, we are considering supporting some of the upcoming JPEG
Part 3 extensions --- principally, variable quantization and the SPIFF file
format.
As always, speeding things up is of great interest.
Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net.

194
README-mozilla.txt Normal file
View File

@@ -0,0 +1,194 @@
Mozilla JPEG Encoder Project
============================
mozjpeg is a fork of libjpeg-turbo that aims to speed up load times of web
pages by reducing the size (and, by extension, the transmission time) of JPEG
files. It accomplishes this by enabling optimized Huffman trees and
progressive entropy coding by default in the JPEG compressor, as well as
splitting the spectrum of DCT coefficients into separate scans and using
Trellis quantisation.
Although it is based on libjpeg-turbo, mozjpeg is not intended to be a
general-purpose or high-performance JPEG library. Its performance is highly
"asymmetric". That is, the JPEG files it generates require much more time to
compress than to decompress. When the default settings are used, mozjpeg is
considerably slower than libjpeg-turbo or even libjpeg at compressing images.
Thus, it is not generally suitable for real-time compression. It is best used
as part of a web encoding workflow.
libjpeg API Extensibility Framework
===================================
mozjpeg's implementation of the libjpeg API includes an extensibility framework
that allows new features to be added without modifying the transparent libjpeg
compress/decompress structures (which would break backward ABI compatibility.)
Extension parameters are placed into the opaque jpeg_comp_master structure, and
a set of accessor functions and globally unique tokens allows for
getting/setting those parameters without directly accessing the structure.
Currently, only the accessor functions necessary to support the mozjpeg
extensions are implemented, but the framework can be easily extended in the
future to accommodate additional simple parameter types, complex or
multi-valued parameters, or decompressor extensions.
The currently-implemented accessor functions are as follows:
boolean jpeg_c_bool_param_supported (j_compress_ptr cinfo,
J_BOOLEAN_PARAM param)
Returns TRUE if the given boolean extension parameter is supported by
this implementation of the libjpeg API, or FALSE otherwise.
void jpeg_c_set_bool_param (j_compress_ptr cinfo,
J_BOOLEAN_PARAM param, boolean value);
Set the given boolean extension parameter to the given value (TRUE or
FALSE.)
boolean jpeg_c_get_bool_param (j_compress_ptr cinfo, J_BOOLEAN_PARAM param)
Get the value of the given boolean extension parameter (TRUE or FALSE.)
boolean jpeg_c_float_param_supported (j_compress_ptr cinfo,
J_FLOAT_PARAM param)
Returns TRUE if the given floating point extension parameter is
supported by this implementation of the libjpeg API, or FALSE
otherwise.
void jpeg_c_set_float_param (j_compress_ptr cinfo, J_FLOAT_PARAM param,
float value)
Set the given floating point extension parameter to the given value.
float jpeg_c_get_float_param (j_compress_ptr cinfo, J_FLOAT_PARAM param);
Get the value of the given floating point extension parameter.
boolean jpeg_c_int_param_supported (j_compress_ptr cinfo,
J_INT_PARAM param)
Returns TRUE if the given integer extension parameter is supported by
this implementation of the libjpeg API, or FALSE otherwise.
void jpeg_c_set_int_param (j_compress_ptr cinfo, J_INT_PARAM param,
int value)
Set the given integer extension parameter to the given value.
int jpeg_c_get_int_param (j_compress_ptr cinfo, J_INT_PARAM param)
Get the value of the given integer extension parameter.
Boolean Extension Parameters Supported by mozjpeg
-------------------------------------------------
* JBOOLEAN_OPTIMIZE_SCANS (default: TRUE)
Specifies whether scan parameters should be optimized. Parameter
optimization is done as in jpgcrush. jpeg_simple_progression() should be called
after setting JBOOLEAN_OPTIMIZE_SCANS.
When disabling JBOOLEAN_OPTIMIZE_SCANS, cinfo.scan_info should additionally be
set to NULL to disable use of the progressive coding mode, if so desired.
* JBOOLEAN_TRELLIS_QUANT (default: TRUE)
Specifies whether to apply trellis quantization. For each 8x8 block, trellis
quantization determines the best tradeoff between rate and distortion.
* JBOOLEAN_TRELLIS_QUANT_DC (default: TRUE)
Specifies whether to apply trellis quantization to DC coefficients.
* JBOOLEAN_TRELLIS_EOB_OPT (default: FALSE)
Specifies whether to optimize runs of zero blocks in trellis quantization.
This is applicable only when JBOOLEAN_USE_SCANS_IN_TRELLIS is enabled.
* JBOOLEAN_USE_LAMBDA_WEIGHT_TBL currently has no effect.
* JBOOLEAN_USE_SCANS_IN_TRELLIS (default: FALSE)
Specifies whether multiple scans should be considered during trellis
quantization.
* JBOOLEAN_TRELLIS_Q_OPT (default: FALSE)
Specifies whether to optimize the quantization table after trellis
quantization. If enabled, then a revised quantization table is derived so
as to minimize the reconstruction error of the quantized coefficients.
* JBOOLEAN_OVERSHOOT_DERINGING (default: TRUE)
Specifies whether overshooting is applied to samples with extreme values
(for example, 0 and 255 for 8-bit samples). Overshooting may reduce ringing
artifacts from compression, in particular in areas where black text appears
on a white background.
Floating Point Extension Parameters Supported by mozjpeg
--------------------------------------------------------
* JFLOAT_LAMBDA_LOG_SCALE1 (default: 14.75)
JFLOAT_LAMBDA_LOG_SCALE2 (default: 16.5)
These parameters specify the lambda value used in trellis quantization. The
lambda value (Lagrange multiplier) in the
R + lambda * D
equation is derived from
lambda = 2^s1 / ((2^s2 + n) * q^2),
where s1 and s2 are the values of JFLOAT_LAMBDA_LOG_SCALE1 and
JFLOAT_LAMBDA_LOG_SCALE2, n is the average of the squared unquantized AC
coefficients within the current 8x8 block, and q is the quantization table
entry associated with the current coefficient frequency. If
JFLOAT_LAMBDA_LOG_SCALE2 is 0, then an alternate form is used that does not
rely on n:
lambda = 2^(s1-12) / q^2.
* JFLOAT_TRELLIS_DELTA_DC_WEIGHT (default: 0.0)
This parameter controls how distortion is calculated in DC trellis quantization
(enabled with JBOOLEAN_TRELLIS_QUANT_DC). It defines weighting between distortion
of the DC coefficient and distortion of the vertical gradient of DC coefficients.
The value of the parameter corresponds to the weight applied to the distortion
of the vertical gradient.
Integer Extension Parameters Supported by mozjpeg
-------------------------------------------------
* JINT_COMPRESS_PROFILE (default: JCP_MAX_COMPRESSION)
Select a compression profile, which is a set of default parameters that will
achieve a desired compression goal. This parameter controls the behavior of
the jpeg_set_defaults() function. Thus, setting JINT_COMPRESS_PROFILE does
not cause any other parameters to be modified until jpeg_set_defaults() is
called. The following compression profiles are supported:
- JCP_MAX_COMPRESSION (default)
Increase the compression ratio as much as possible, at the expense of
increased encoding time. This enables progressive entropy coding and all
mozjpeg extensions.
- JCP_FASTEST
Use the libjpeg[-turbo] defaults (baseline entropy coding, no mozjpeg
extensions enabled.)
* JINT_TRELLIS_FREQ_SPLIT (default: 8)
Specifies the position within the zigzag scan at which the split between
scans is positioned in the context of trellis quantization.
JBOOLEAN_USE_SCANS_IN_TRELLIS must be enabled for this parameter to have any
effect.
* JINT_TRELLIS_NUM_LOOPS (default: 1)
Specifies the number of trellis quantization passes. Huffman tables are
updated between passes.
* JINT_BASE_QUANT_TBL_IDX (default: 3)
Specifies which quantization table set to use. The following options are
available:
0 = Tables from JPEG Annex K
1 = Flat table
2 = Table tuned for MSSIM on Kodak image set
3 = Table from http://www.imagemagick.org/discourse-server/viewtopic.php?f=22&t=20333&p=98008#p98008
4 = Table tuned for PSNR-HVS-M on Kodak image set
5 = Table from: Relevance of Human Vision to JPEG-DCT Compression
(1992) Klein, Silverstein and Carney
6 = Table from: DCTune Perceptual Optimization of Compressed Dental X-Rays
(1997) Watson, Taylor, Borthwick
7 = Table from: A Visual Detection Model for DCT Coefficient Quantization
(12/9/93) Ahumada, Watson, Peterson
8 = Table from: An Improved Detection Model for DCT Coefficient Quantization
(1993) Peterson, Ahumada and Watson
* JINT_DC_SCAN_OPT_MODE (default: 0)
Specifies the DC scan optimization mode. The following options are
available:
0 = One scan for all components
1 = One scan per component
2 = Optimize between one scan for all components and one scan for the first
component plus one scan for the remaining components

372
README-turbo.txt Normal file
View File

@@ -0,0 +1,372 @@
Background
==========
libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate
baseline JPEG compression and decompression on x86, x86-64, Arm, PowerPC, and
MIPS systems, as well as progressive JPEG compression on x86, x86-64, and Arm
systems. On such systems, libjpeg-turbo is generally 2-6x as fast as libjpeg,
all else being equal. On other types of systems, libjpeg-turbo can still
outperform libjpeg by a significant amount, by virtue of its highly-optimized
Huffman coding routines. In many cases, the performance of libjpeg-turbo
rivals that of proprietary high-speed JPEG codecs.
libjpeg-turbo implements both the traditional libjpeg API as well as the less
powerful but more straightforward TurboJPEG API. libjpeg-turbo also features
colorspace extensions that allow it to compress from/decompress to 32-bit and
big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java
interface.
libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated
derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and
VirtualGL projects made numerous enhancements to the codec in 2009, and in
early 2010, libjpeg-turbo spun off into an independent project, with the goal
of making high-speed JPEG compression/decompression technology available to a
broader range of users and developers. libjpeg-turbo is an ISO/IEC and ITU-T
reference implementation of the JPEG standard.
More information about libjpeg-turbo can be found at
<https://libjpeg-turbo.org>.
Funding
=======
libjpeg-turbo is an independent open source project, but we rely on patronage
and funded development in order to maintain that independence. The easiest way
to ensure that libjpeg-turbo remains community-focused and free of any one
organization's agenda is to
[sponsor our project through GitHub](https://github.com/sponsors/libjpeg-turbo).
All sponsorship money goes directly toward funding the labor necessary to
maintain libjpeg-turbo, support the user community, and implement bug fixes and
strategically important features.
[![Sponsor libjpeg-turbo](https://img.shields.io/github/sponsors/libjpeg-turbo?label=Sponsor&logo=GitHub)](https://github.com/sponsors/libjpeg-turbo)
License
=======
libjpeg-turbo is covered by three compatible BSD-style open source licenses.
Refer to [LICENSE.md](LICENSE.md) for a roll-up of license terms.
Building libjpeg-turbo
======================
Refer to [BUILDING.md](BUILDING.md) for complete instructions.
Using libjpeg-turbo
===================
libjpeg-turbo includes two APIs that can be used to compress and decompress
JPEG images:
- **TurboJPEG API**<br>
This API provides an easy-to-use interface for compressing and decompressing
JPEG images in memory. It also provides some functionality that would not be
straightforward to achieve using the underlying libjpeg API, such as
generating planar YUV images and performing multiple simultaneous lossless
transforms on an image. The Java interface for libjpeg-turbo is written on
top of the TurboJPEG API. The TurboJPEG API is recommended for first-time
users of libjpeg-turbo. Refer to [tjexample.c](tjexample.c) and
[TJExample.java](java/TJExample.java) for examples of its usage and to
<https://libjpeg-turbo.org/Documentation/Documentation> for API
documentation.
- **libjpeg API**<br>
This is the de facto industry-standard API for compressing and decompressing
JPEG images. It is more difficult to use than the TurboJPEG API but also
more powerful. The libjpeg API implementation in libjpeg-turbo is both
API/ABI-compatible and mathematically compatible with libjpeg v6b. It can
also optionally be configured to be API/ABI-compatible with libjpeg v7 and v8
(see below.) Refer to [cjpeg.c](cjpeg.c) and [djpeg.c](djpeg.c) for examples
of its usage and to [libjpeg.txt](libjpeg.txt) for API documentation.
There is no significant performance advantage to either API when both are used
to perform similar operations.
Colorspace Extensions
---------------------
libjpeg-turbo includes extensions that allow JPEG images to be compressed
directly from (and decompressed directly to) buffers that use BGR, BGRX,
RGBX, XBGR, and XRGB pixel ordering. This is implemented with ten new
colorspace constants:
JCS_EXT_RGB /* red/green/blue */
JCS_EXT_RGBX /* red/green/blue/x */
JCS_EXT_BGR /* blue/green/red */
JCS_EXT_BGRX /* blue/green/red/x */
JCS_EXT_XBGR /* x/blue/green/red */
JCS_EXT_XRGB /* x/red/green/blue */
JCS_EXT_RGBA /* red/green/blue/alpha */
JCS_EXT_BGRA /* blue/green/red/alpha */
JCS_EXT_ABGR /* alpha/blue/green/red */
JCS_EXT_ARGB /* alpha/red/green/blue */
Setting `cinfo.in_color_space` (compression) or `cinfo.out_color_space`
(decompression) to one of these values will cause libjpeg-turbo to read the
red, green, and blue values from (or write them to) the appropriate position in
the pixel when compressing from/decompressing to an RGB buffer.
Your application can check for the existence of these extensions at compile
time with:
#ifdef JCS_EXTENSIONS
At run time, attempting to use these extensions with a libjpeg implementation
that does not support them will result in a "Bogus input colorspace" error.
Applications can trap this error in order to test whether run-time support is
available for the colorspace extensions.
When using the RGBX, BGRX, XBGR, and XRGB colorspaces during decompression, the
X byte is undefined, and in order to ensure the best performance, libjpeg-turbo
can set that byte to whatever value it wishes. If an application expects the X
byte to be used as an alpha channel, then it should specify `JCS_EXT_RGBA`,
`JCS_EXT_BGRA`, `JCS_EXT_ABGR`, or `JCS_EXT_ARGB`. When these colorspace
constants are used, the X byte is guaranteed to be 0xFF, which is interpreted
as opaque.
Your application can check for the existence of the alpha channel colorspace
extensions at compile time with:
#ifdef JCS_ALPHA_EXTENSIONS
[jcstest.c](jcstest.c), located in the libjpeg-turbo source tree, demonstrates
how to check for the existence of the colorspace extensions at compile time and
run time.
libjpeg v7 and v8 API/ABI Emulation
-----------------------------------
With libjpeg v7 and v8, new features were added that necessitated extending the
compression and decompression structures. Unfortunately, due to the exposed
nature of those structures, extending them also necessitated breaking backward
ABI compatibility with previous libjpeg releases. Thus, programs that were
built to use libjpeg v7 or v8 did not work with libjpeg-turbo, since it is
based on the libjpeg v6b code base. Although libjpeg v7 and v8 are not
as widely used as v6b, enough programs (including a few Linux distros) made
the switch that there was a demand to emulate the libjpeg v7 and v8 ABIs
in libjpeg-turbo. It should be noted, however, that this feature was added
primarily so that applications that had already been compiled to use libjpeg
v7+ could take advantage of accelerated baseline JPEG encoding/decoding
without recompiling. libjpeg-turbo does not claim to support all of the
libjpeg v7+ features, nor to produce identical output to libjpeg v7+ in all
cases (see below.)
By passing an argument of `-DWITH_JPEG7=1` or `-DWITH_JPEG8=1` to `cmake`, you
can build a version of libjpeg-turbo that emulates the libjpeg v7 or v8 ABI, so
that programs that are built against libjpeg v7 or v8 can be run with
libjpeg-turbo. The following section describes which libjpeg v7+ features are
supported and which aren't.
### Support for libjpeg v7 and v8 Features
#### Fully supported
- **libjpeg API: IDCT scaling extensions in decompressor**<br>
libjpeg-turbo supports IDCT scaling with scaling factors of 1/8, 1/4, 3/8,
1/2, 5/8, 3/4, 7/8, 9/8, 5/4, 11/8, 3/2, 13/8, 7/4, 15/8, and 2/1 (only 1/4
and 1/2 are SIMD-accelerated.)
- **libjpeg API: Arithmetic coding**
- **libjpeg API: In-memory source and destination managers**<br>
See notes below.
- **cjpeg: Separate quality settings for luminance and chrominance**<br>
Note that the libpjeg v7+ API was extended to accommodate this feature only
for convenience purposes. It has always been possible to implement this
feature with libjpeg v6b (see rdswitch.c for an example.)
- **cjpeg: 32-bit BMP support**
- **cjpeg: `-rgb` option**
- **jpegtran: Lossless cropping**
- **jpegtran: `-perfect` option**
- **jpegtran: Forcing width/height when performing lossless crop**
- **rdjpgcom: `-raw` option**
- **rdjpgcom: Locale awareness**
#### Not supported
NOTE: As of this writing, extensive research has been conducted into the
usefulness of DCT scaling as a means of data reduction and SmartScale as a
means of quality improvement. Readers are invited to peruse the research at
<https://libjpeg-turbo.org/About/SmartScale> and draw their own conclusions,
but it is the general belief of our project that these features have not
demonstrated sufficient usefulness to justify inclusion in libjpeg-turbo.
- **libjpeg API: DCT scaling in compressor**<br>
`cinfo.scale_num` and `cinfo.scale_denom` are silently ignored.
There is no technical reason why DCT scaling could not be supported when
emulating the libjpeg v7+ API/ABI, but without the SmartScale extension (see
below), only scaling factors of 1/2, 8/15, 4/7, 8/13, 2/3, 8/11, 4/5, and
8/9 would be available, which is of limited usefulness.
- **libjpeg API: SmartScale**<br>
`cinfo.block_size` is silently ignored.
SmartScale is an extension to the JPEG format that allows for DCT block
sizes other than 8x8. Providing support for this new format would be
feasible (particularly without full acceleration.) However, until/unless
the format becomes either an official industry standard or, at minimum, an
accepted solution in the community, we are hesitant to implement it, as
there is no sense of whether or how it might change in the future. It is
our belief that SmartScale has not demonstrated sufficient usefulness as a
lossless format nor as a means of quality enhancement, and thus our primary
interest in providing this feature would be as a means of supporting
additional DCT scaling factors.
- **libjpeg API: Fancy downsampling in compressor**<br>
`cinfo.do_fancy_downsampling` is silently ignored.
This requires the DCT scaling feature, which is not supported.
- **jpegtran: Scaling**<br>
This requires both the DCT scaling and SmartScale features, which are not
supported.
- **Lossless RGB JPEG files**<br>
This requires the SmartScale feature, which is not supported.
### What About libjpeg v9?
libjpeg v9 introduced yet another field to the JPEG compression structure
(`color_transform`), thus making the ABI backward incompatible with that of
libjpeg v8. This new field was introduced solely for the purpose of supporting
lossless SmartScale encoding. Furthermore, there was actually no reason to
extend the API in this manner, as the color transform could have just as easily
been activated by way of a new JPEG colorspace constant, thus preserving
backward ABI compatibility.
Our research (see link above) has shown that lossless SmartScale does not
generally accomplish anything that can't already be accomplished better with
existing, standard lossless formats. Therefore, at this time it is our belief
that there is not sufficient technical justification for software projects to
upgrade from libjpeg v8 to libjpeg v9, and thus there is not sufficient
technical justification for us to emulate the libjpeg v9 ABI.
In-Memory Source/Destination Managers
-------------------------------------
By default, libjpeg-turbo 1.3 and later includes the `jpeg_mem_src()` and
`jpeg_mem_dest()` functions, even when not emulating the libjpeg v8 API/ABI.
Previously, it was necessary to build libjpeg-turbo from source with libjpeg v8
API/ABI emulation in order to use the in-memory source/destination managers,
but several projects requested that those functions be included when emulating
the libjpeg v6b API/ABI as well. This allows the use of those functions by
programs that need them, without breaking ABI compatibility for programs that
don't, and it allows those functions to be provided in the "official"
libjpeg-turbo binaries.
Note that, on most Un*x systems, the dynamic linker will not look for a
function in a library until that function is actually used. Thus, if a program
is built against libjpeg-turbo 1.3+ and uses `jpeg_mem_src()` or
`jpeg_mem_dest()`, that program will not fail if run against an older version
of libjpeg-turbo or against libjpeg v7- until the program actually tries to
call `jpeg_mem_src()` or `jpeg_mem_dest()`. Such is not the case on Windows.
If a program is built against the libjpeg-turbo 1.3+ DLL and uses
`jpeg_mem_src()` or `jpeg_mem_dest()`, then it must use the libjpeg-turbo 1.3+
DLL at run time.
Both cjpeg and djpeg have been extended to allow testing the in-memory
source/destination manager functions. See their respective man pages for more
details.
Mathematical Compatibility
==========================
For the most part, libjpeg-turbo should produce identical output to libjpeg
v6b. There are two exceptions:
1. When decompressing a JPEG image that uses 4:4:0 chrominance subsampling, the
outputs of libjpeg v6b and libjpeg-turbo can differ because libjpeg-turbo
implements a "fancy" (smooth) 4:4:0 upsampling algorithm and libjpeg did not.
2. When using the floating point DCT/IDCT, the outputs of libjpeg v6b and
libjpeg-turbo can differ for the following reasons:
- The SSE/SSE2 floating point DCT implementation in libjpeg-turbo is ever
so slightly more accurate than the implementation in libjpeg v6b, but not
by any amount perceptible to human vision (generally in the range of 0.01
to 0.08 dB gain in PNSR.)
- When not using the SIMD extensions, libjpeg-turbo uses the more accurate
(and slightly faster) floating point IDCT algorithm introduced in libjpeg
v8a as opposed to the algorithm used in libjpeg v6b. It should be noted,
however, that this algorithm basically brings the accuracy of the
floating point IDCT in line with the accuracy of the accurate integer
IDCT. The floating point DCT/IDCT algorithms are mainly a legacy
feature, and they do not produce significantly more accuracy than the
accurate integer algorithms. (To put numbers on this, the typical
difference in PNSR between the two algorithms is less than 0.10 dB,
whereas changing the quality level by 1 in the upper range of the quality
scale is typically more like a 1.0 dB difference.)
- If the floating point algorithms in libjpeg-turbo are not implemented
using SIMD instructions on a particular platform, then the accuracy of
the floating point DCT/IDCT can depend on the compiler settings.
While libjpeg-turbo does emulate the libjpeg v8 API/ABI, under the hood it is
still using the same algorithms as libjpeg v6b, so there are several specific
cases in which libjpeg-turbo cannot be expected to produce the same output as
libjpeg v8:
- When decompressing using scaling factors of 1/2 and 1/4, because libjpeg v8
implements those scaling algorithms differently than libjpeg v6b does, and
libjpeg-turbo's SIMD extensions are based on the libjpeg v6b behavior.
- When using chrominance subsampling, because libjpeg v8 implements this
with its DCT/IDCT scaling algorithms rather than with a separate
downsampling/upsampling algorithm. In our testing, the subsampled/upsampled
output of libjpeg v8 is less accurate than that of libjpeg v6b for this
reason.
- When decompressing using a scaling factor > 1 and merged (AKA "non-fancy" or
"non-smooth") chrominance upsampling, because libjpeg v8 does not support
merged upsampling with scaling factors > 1.
Performance Pitfalls
====================
Restart Markers
---------------
The optimized Huffman decoder in libjpeg-turbo does not handle restart markers
in a way that makes the rest of the libjpeg infrastructure happy, so it is
necessary to use the slow Huffman decoder when decompressing a JPEG image that
has restart markers. This can cause the decompression performance to drop by
as much as 20%, but the performance will still be much greater than that of
libjpeg. Many consumer packages, such as Photoshop, use restart markers when
generating JPEG images, so images generated by those programs will experience
this issue.
Fast Integer Forward DCT at High Quality Levels
-----------------------------------------------
The algorithm used by the SIMD-accelerated quantization function cannot produce
correct results whenever the fast integer forward DCT is used along with a JPEG
quality of 98-100. Thus, libjpeg-turbo must use the non-SIMD quantization
function in those cases. This causes performance to drop by as much as 40%.
It is therefore strongly advised that you use the accurate integer forward DCT
whenever encoding images with a JPEG quality of 98 or higher.
Memory Debugger Pitfalls
========================
Valgrind and Memory Sanitizer (MSan) can generate false positives
(specifically, incorrect reports of uninitialized memory accesses) when used
with libjpeg-turbo's SIMD extensions. It is generally recommended that the
SIMD extensions be disabled, either by passing an argument of `-DWITH_SIMD=0`
to `cmake` when configuring the build or by setting the environment variable
`JSIMD_FORCENONE` to `1` at run time, when testing libjpeg-turbo with Valgrind,
MSan, or other memory debuggers.

258
README.ijg Normal file
View File

@@ -0,0 +1,258 @@
libjpeg-turbo note: This file has been modified by The libjpeg-turbo Project
to include only information relevant to libjpeg-turbo, to wordsmith certain
sections, and to remove impolitic language that existed in the libjpeg v8
README. It is included only for reference. Please see README.md for
information specific to libjpeg-turbo.
The Independent JPEG Group's JPEG software
==========================================
This distribution contains a release of the Independent JPEG Group's free JPEG
software. You are welcome to redistribute this software and to use it for any
purpose, subject to the conditions under LEGAL ISSUES, below.
This software is the work of Tom Lane, Guido Vollbeding, Philip Gladstone,
Bill Allombert, Jim Boucher, Lee Crocker, Bob Friesenhahn, Ben Jackson,
Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, Ge' Weijers,
and other members of the Independent JPEG Group.
IJG is not affiliated with the ISO/IEC JTC1/SC29/WG1 standards committee
(also known as JPEG, together with ITU-T SG16).
DOCUMENTATION ROADMAP
=====================
This file contains the following sections:
OVERVIEW General description of JPEG and the IJG software.
LEGAL ISSUES Copyright, lack of warranty, terms of distribution.
REFERENCES Where to learn more about JPEG.
ARCHIVE LOCATIONS Where to find newer versions of this software.
FILE FORMAT WARS Software *not* to get.
TO DO Plans for future IJG releases.
Other documentation files in the distribution are:
User documentation:
usage.txt Usage instructions for cjpeg, djpeg, jpegtran,
rdjpgcom, and wrjpgcom.
*.1 Unix-style man pages for programs (same info as usage.txt).
wizard.txt Advanced usage instructions for JPEG wizards only.
change.log Version-to-version change highlights.
Programmer and internal documentation:
libjpeg.txt How to use the JPEG library in your own programs.
example.c Sample code for calling the JPEG library.
structure.txt Overview of the JPEG library's internal structure.
coderules.txt Coding style rules --- please read if you contribute code.
Please read at least usage.txt. Some information can also be found in the JPEG
FAQ (Frequently Asked Questions) article. See ARCHIVE LOCATIONS below to find
out where to obtain the FAQ article.
If you want to understand how the JPEG code works, we suggest reading one or
more of the REFERENCES, then looking at the documentation files (in roughly
the order listed) before diving into the code.
OVERVIEW
========
This package contains C software to implement JPEG image encoding, decoding,
and transcoding. JPEG (pronounced "jay-peg") is a standardized compression
method for full-color and grayscale images. JPEG's strong suit is compressing
photographic images or other types of images that have smooth color and
brightness transitions between neighboring pixels. Images with sharp lines or
other abrupt features may not compress well with JPEG, and a higher JPEG
quality may have to be used to avoid visible compression artifacts with such
images.
JPEG is normally lossy, meaning that the output pixels are not necessarily
identical to the input pixels. However, on photographic content and other
"smooth" images, very good compression ratios can be obtained with no visible
compression artifacts, and extremely high compression ratios are possible if
you are willing to sacrifice image quality (by reducing the "quality" setting
in the compressor.)
This software implements JPEG baseline, extended-sequential, progressive, and
lossless compression processes. Provision is made for supporting all variants
of these processes, although some uncommon parameter settings aren't
implemented yet. We have made no provision for supporting the hierarchical
processes defined in the standard.
We provide a set of library routines for reading and writing JPEG image files,
plus two sample applications "cjpeg" and "djpeg", which use the library to
perform conversion between JPEG and some other popular image file formats.
The library is intended to be reused in other applications.
In order to support file conversion and viewing software, we have included
considerable functionality beyond the bare JPEG coding/decoding capability;
for example, the color quantization modules are not strictly part of JPEG
decoding, but they are essential for output to colormapped file formats. These
extra functions can be compiled out of the library if not required for a
particular application.
We have also included "jpegtran", a utility for lossless transcoding between
different JPEG processes, and "rdjpgcom" and "wrjpgcom", two simple
applications for inserting and extracting textual comments in JFIF files.
The emphasis in designing this software has been on achieving portability and
flexibility, while also making it fast enough to be useful. In particular,
the software is not intended to be read as a tutorial on JPEG. (See the
REFERENCES section for introductory material.) Rather, it is intended to
be reliable, portable, industrial-strength code. We do not claim to have
achieved that goal in every aspect of the software, but we strive for it.
We welcome the use of this software as a component of commercial products.
No royalty is required, but we do ask for an acknowledgement in product
documentation, as described under LEGAL ISSUES.
LEGAL ISSUES
============
In plain English:
1. We don't promise that this software works. (But if you find any bugs,
please let us know!)
2. You can use this software for whatever you want. You don't have to pay us.
3. You may not pretend that you wrote this software. If you use it in a
program, you must acknowledge somewhere in your documentation that
you've used the IJG code.
In legalese:
The authors make NO WARRANTY or representation, either express or implied,
with respect to this software, its quality, accuracy, merchantability, or
fitness for a particular purpose. This software is provided "AS IS", and you,
its user, assume the entire risk as to its quality and accuracy.
This software is copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding.
All Rights Reserved except as specified below.
Permission is hereby granted to use, copy, modify, and distribute this
software (or portions thereof) for any purpose, without fee, subject to these
conditions:
(1) If any part of the source code for this software is distributed, then this
README file must be included, with this copyright and no-warranty notice
unaltered; and any additions, deletions, or changes to the original files
must be clearly indicated in accompanying documentation.
(2) If only executable code is distributed, then the accompanying
documentation must state that "this software is based in part on the work of
the Independent JPEG Group".
(3) Permission for use of this software is granted only if the user accepts
full responsibility for any undesirable consequences; the authors accept
NO LIABILITY for damages of any kind.
These conditions apply to any software derived from or based on the IJG code,
not just to the unmodified library. If you use our work, you ought to
acknowledge us.
Permission is NOT granted for the use of any IJG author's name or company name
in advertising or publicity relating to this software or products derived from
it. This software may be referred to only as "the Independent JPEG Group's
software".
We specifically permit and encourage the use of this software as the basis of
commercial products, provided that all warranty or liability claims are
assumed by the product vendor.
REFERENCES
==========
We recommend reading one or more of these references before trying to
understand the innards of the JPEG software.
The best short technical introduction to the JPEG compression algorithm is
Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
(Adjacent articles in that issue discuss MPEG motion picture compression,
applications of JPEG, and related topics.) If you don't have the CACM issue
handy, a PDF file containing a revised version of Wallace's article is
available at http://www.ijg.org/files/Wallace.JPEG.pdf. The file (actually
a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
omits the sample images that appeared in CACM, but it includes corrections
and some added material. Note: the Wallace article is copyright ACM and IEEE,
and it may not be used for commercial purposes.
A somewhat less technical, more leisurely introduction to JPEG can be found in
"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides
good explanations and example C code for a multitude of compression methods
including JPEG. It is an excellent source if you are comfortable reading C
code but don't know much about data compression in general. The book's JPEG
sample code is far from industrial-strength, but when you are ready to look
at a full implementation, you've got one here...
The best currently available description of JPEG is the textbook "JPEG Still
Image Data Compression Standard" by William B. Pennebaker and Joan L.
Mitchell, published by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.
Price US$59.95, 638 pp. The book includes the complete text of the ISO JPEG
standards (DIS 10918-1 and draft DIS 10918-2).
The original JPEG standard is divided into two parts, Part 1 being the actual
specification, while Part 2 covers compliance testing methods. Part 1 is
titled "Digital Compression and Coding of Continuous-tone Still Images,
Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of
Continuous-tone Still Images, Part 2: Compliance testing" and has document
numbers ISO/IEC IS 10918-2, ITU-T T.83.
The JPEG standard does not specify all details of an interchangeable file
format. For the omitted details, we follow the "JFIF" conventions, revision
1.02. JFIF version 1 has been adopted as ISO/IEC 10918-5 (05/2013) and
Recommendation ITU-T T.871 (05/2011): Information technology - Digital
compression and coding of continuous-tone still images: JPEG File Interchange
Format (JFIF). It is available as a free download in PDF file format from
https://www.iso.org/standard/54989.html and http://www.itu.int/rec/T-REC-T.871.
A PDF file of the older JFIF 1.02 specification is available at
http://www.w3.org/Graphics/JPEG/jfif3.pdf.
The TIFF 6.0 file format specification can be obtained from
http://mirrors.ctan.org/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation
scheme found in the TIFF 6.0 spec of 3-June-92 has a number of serious
problems. IJG does not recommend use of the TIFF 6.0 design (TIFF Compression
tag 6). Instead, we recommend the JPEG design proposed by TIFF Technical Note
#2 (Compression tag 7). Copies of this Note can be obtained from
http://www.ijg.org/files/. It is expected that the next revision
of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
Although IJG's own code does not support TIFF/JPEG, the free libtiff library
uses our library to implement TIFF/JPEG per the Note.
ARCHIVE LOCATIONS
=================
The "official" archive site for this software is www.ijg.org.
The most recent released version can always be found there in
directory "files".
The JPEG FAQ (Frequently Asked Questions) article is a source of some
general information about JPEG. It is available at
http://www.faqs.org/faqs/jpeg-faq.
FILE FORMAT COMPATIBILITY
=========================
This software implements ITU T.81 | ISO/IEC 10918 with some extensions from
ITU T.871 | ISO/IEC 10918-5 (JPEG File Interchange Format-- see REFERENCES).
Informally, the term "JPEG image" or "JPEG file" most often refers to JFIF or
a subset thereof, but there are other formats containing the name "JPEG" that
are incompatible with the original JPEG standard or with JFIF (for instance,
JPEG 2000 and JPEG XR). This software therefore does not support these
formats. Indeed, one of the original reasons for developing this free software
was to help force convergence on a common, interoperable format standard for
JPEG files.
JFIF is a minimal or "low end" representation. TIFF/JPEG (TIFF revision 6.0 as
modified by TIFF Technical Note #2) can be used for "high end" applications
that need to record a lot of additional data about an image.
TO DO
=====
Please send bug reports, offers of help, etc. to jpeg-info@jpegclub.org.

29
README.md Normal file
View File

@@ -0,0 +1,29 @@
Mozilla JPEG Encoder Project [![Build Status](https://ci.appveyor.com/api/projects/status/github/mozilla/mozjpeg?branch=master&svg=true)](https://ci.appveyor.com/project/kornel/mozjpeg-4ekrx)
============================
MozJPEG improves JPEG compression efficiency achieving higher visual quality and smaller file sizes at the same time. It is compatible with the JPEG standard, and the vast majority of the world's deployed JPEG decoders.
MozJPEG is a patch for [libjpeg-turbo](https://github.com/libjpeg-turbo/libjpeg-turbo). **Please send pull requests to libjpeg-turbo** if the changes aren't specific to newly-added MozJPEG-only compression code. This project aims to keep differences with libjpeg-turbo minimal, so whenever possible, improvements and bug fixes should go there first.
MozJPEG is compatible with the libjpeg API and ABI. It is intended to be a drop-in replacement for libjpeg. MozJPEG is a strict superset of libjpeg-turbo's functionality. All MozJPEG's improvements can be disabled at run time, and in that case it behaves exactly like libjpeg-turbo.
MozJPEG is meant to be used as a library in graphics programs and image processing tools. We include a demo `cjpeg` command-line tool, but it's not intended for serious use. We encourage authors of graphics programs to use libjpeg's [C API](libjpeg.txt) and link with MozJPEG library instead.
## Features
* Progressive encoding with "jpegrescan" optimization. It can be applied to any JPEG file (with `jpegtran`) to losslessly reduce file size.
* Trellis quantization. When converting other formats to JPEG it maximizes quality/filesize ratio.
* Comes with new quantization table presets, e.g. tuned for high-resolution displays.
* Fully compatible with all web browsers.
* Can be seamlessly integrated into any program that uses the industry-standard libjpeg API. There's no need to write any MozJPEG-specific integration code.
## Releases
* [Latest release](https://github.com/mozilla/mozjpeg/releases/latest)
* [Overview of 3.0 features](https://calendar.perfplanet.com/2014/mozjpeg-3-0/)
* [Version 2.0 Announcement](https://blog.mozilla.org/research/2014/07/15/mozilla-advances-jpeg-encoding-with-mozjpeg-2-0/)
* [Version 1.0 Announcement](https://blog.mozilla.org/research/2014/03/05/introducing-the-mozjpeg-project/)
## Compiling
See [BUILDING](BUILDING.md). MozJPEG is built exactly the same way as libjpeg-turbo, so if you need additional help please consult [libjpeg-turbo documentation](https://libjpeg-turbo.org/).

View File

@@ -1,36 +0,0 @@
.TH ANSI2KNR 1 "19 Jan 1996"
.SH NAME
ansi2knr \- convert ANSI C to Kernighan & Ritchie C
.SH SYNOPSIS
.I ansi2knr
[--varargs] input_file [output_file]
.SH DESCRIPTION
If no output_file is supplied, output goes to stdout.
.br
There are no error messages.
.sp
.I ansi2knr
recognizes function definitions by seeing a non-keyword identifier at the left
margin, followed by a left parenthesis, with a right parenthesis as the last
character on the line, and with a left brace as the first token on the
following line (ignoring possible intervening comments). It will recognize a
multi-line header provided that no intervening line ends with a left or right
brace or a semicolon. These algorithms ignore whitespace and comments, except
that the function name must be the first thing on the line.
.sp
The following constructs will confuse it:
.br
- Any other construct that starts at the left margin and follows the
above syntax (such as a macro or function call).
.br
- Some macros that tinker with the syntax of the function header.
.sp
The --varargs switch is obsolete, and is recognized only for
backwards compatibility. The present version of
.I ansi2knr
will always attempt to convert a ... argument to va_alist and va_dcl.
.SH AUTHOR
L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
continues to maintain the current version; most of the code in the current
version is his work. ansi2knr also includes contributions by Francois
Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.

View File

@@ -1,693 +0,0 @@
/* ansi2knr.c */
/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
/*
ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY. No author or distributor accepts responsibility to anyone for the
consequences of using it or for whether it serves any particular purpose or
works at all, unless he says so in writing. Refer to the GNU General Public
License (the "GPL") for full details.
Everyone is granted permission to copy, modify and redistribute ansi2knr,
but only under the conditions described in the GPL. A copy of this license
is supposed to have been given to you along with ansi2knr so you can know
your rights and responsibilities. It should be in a file named COPYLEFT.
[In the IJG distribution, the GPL appears below, not in a separate file.]
Among other things, the copyright notice and this notice must be preserved
on all copies.
We explicitly state here what we believe is already implied by the GPL: if
the ansi2knr program is distributed as a separate set of sources and a
separate executable file which are aggregated on a storage medium together
with another program, this in itself does not bring the other program under
the GPL, nor does the mere fact that such a program or the procedures for
constructing it invoke the ansi2knr executable bring any other part of the
program under the GPL.
*/
/*
---------- Here is the GNU GPL file COPYLEFT, referred to above ----------
----- These terms do NOT apply to the JPEG software itself; see README ------
GHOSTSCRIPT GENERAL PUBLIC LICENSE
(Clarified 11 Feb 1988)
Copyright (C) 1988 Richard M. Stallman
Everyone is permitted to copy and distribute verbatim copies of this
license, but changing it is not allowed. You can also use this wording
to make the terms for other programs.
The license agreements of most software companies keep you at the
mercy of those companies. By contrast, our general public license is
intended to give everyone the right to share Ghostscript. To make sure
that you get the rights we want you to have, we need to make
restrictions that forbid anyone to deny you these rights or to ask you
to surrender the rights. Hence this license agreement.
Specifically, we want to make sure that you have the right to give
away copies of Ghostscript, that you receive source code or else can get
it if you want it, that you can change Ghostscript or use pieces of it
in new free programs, and that you know you can do these things.
To make sure that everyone has such rights, we have to forbid you to
deprive anyone else of these rights. For example, if you distribute
copies of Ghostscript, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must tell them their rights.
Also, for our own protection, we must make certain that everyone finds
out that there is no warranty for Ghostscript. If Ghostscript is
modified by someone else and passed on, we want its recipients to know
that what they have is not what we distributed, so that any problems
introduced by others will not reflect on our reputation.
Therefore we (Richard M. Stallman and the Free Software Foundation,
Inc.) make the following terms which say what you must do to be allowed
to distribute or change Ghostscript.
COPYING POLICIES
1. You may copy and distribute verbatim copies of Ghostscript source
code as you receive it, in any medium, provided that you conspicuously
and appropriately publish on each copy a valid copyright and license
notice "Copyright (C) 1989 Aladdin Enterprises. All rights reserved.
Distributed by Free Software Foundation, Inc." (or with whatever year is
appropriate); keep intact the notices on all files that refer to this
License Agreement and to the absence of any warranty; and give any other
recipients of the Ghostscript program a copy of this License Agreement
along with the program. You may charge a distribution fee for the
physical act of transferring a copy.
2. You may modify your copy or copies of Ghostscript or any portion of
it, and copy and distribute such modifications under the terms of
Paragraph 1 above, provided that you also do the following:
a) cause the modified files to carry prominent notices stating
that you changed the files and the date of any change; and
b) cause the whole of any work that you distribute or publish,
that in whole or in part contains or is a derivative of Ghostscript
or any part thereof, to be licensed at no charge to all third
parties on terms identical to those contained in this License
Agreement (except that you may choose to grant more extensive
warranty protection to some or all third parties, at your option).
c) You may charge a distribution fee for the physical act of
transferring a copy, and you may at your option offer warranty
protection in exchange for a fee.
Mere aggregation of another unrelated program with this program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other program under the scope of these terms.
3. You may copy and distribute Ghostscript (or a portion or derivative
of it, under Paragraph 2) in object code or executable form under the
terms of Paragraphs 1 and 2 above provided that you also do one of the
following:
a) accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or,
b) accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal
shipping charge) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,
c) accompany it with the information you received as to where the
corresponding source code may be obtained. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
For an executable file, complete source code means all the source code for
all modules it contains; but, as a special exception, it need not include
source code for modules which are standard libraries that accompany the
operating system on which the executable file runs.
4. You may not copy, sublicense, distribute or transfer Ghostscript
except as expressly provided under this License Agreement. Any attempt
otherwise to copy, sublicense, distribute or transfer Ghostscript is
void and your rights to use the program under this License agreement
shall be automatically terminated. However, parties who have received
computer software programs from you with this License Agreement will not
have their licenses terminated so long as such parties remain in full
compliance.
5. If you wish to incorporate parts of Ghostscript into other free
programs whose distribution conditions are different, write to the Free
Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not
yet worked out a simple rule that can be stated here, but we will often
permit this. We will be guided by the two goals of preserving the free
status of all derivatives of our free software and of promoting the
sharing and reuse of software.
Your comments and suggestions about our licensing policies and our
software are welcome! Please contact the Free Software Foundation,
Inc., 675 Mass Ave, Cambridge, MA 02139, or call (617) 876-3296.
NO WARRANTY
BECAUSE GHOSTSCRIPT IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT
WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, RICHARD
M. STALLMAN, ALADDIN ENTERPRISES, L. PETER DEUTSCH, AND/OR OTHER PARTIES
PROVIDE GHOSTSCRIPT "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF GHOSTSCRIPT IS WITH
YOU. SHOULD GHOSTSCRIPT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M.
STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., L. PETER DEUTSCH, ALADDIN
ENTERPRISES, AND/OR ANY OTHER PARTY WHO MAY MODIFY AND REDISTRIBUTE
GHOSTSCRIPT AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING
ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE
PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) GHOSTSCRIPT, EVEN IF YOU
HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM
BY ANY OTHER PARTY.
-------------------- End of file COPYLEFT ------------------------------
*/
/*
* Usage:
ansi2knr input_file [output_file]
* If no output_file is supplied, output goes to stdout.
* There are no error messages.
*
* ansi2knr recognizes function definitions by seeing a non-keyword
* identifier at the left margin, followed by a left parenthesis,
* with a right parenthesis as the last character on the line,
* and with a left brace as the first token on the following line
* (ignoring possible intervening comments).
* It will recognize a multi-line header provided that no intervening
* line ends with a left or right brace or a semicolon.
* These algorithms ignore whitespace and comments, except that
* the function name must be the first thing on the line.
* The following constructs will confuse it:
* - Any other construct that starts at the left margin and
* follows the above syntax (such as a macro or function call).
* - Some macros that tinker with the syntax of the function header.
*/
/*
* The original and principal author of ansi2knr is L. Peter Deutsch
* <ghost@aladdin.com>. Other authors are noted in the change history
* that follows (in reverse chronological order):
lpd 96-01-21 added code to cope with not HAVE_CONFIG_H and with
compilers that don't understand void, as suggested by
Tom Lane
lpd 96-01-15 changed to require that the first non-comment token
on the line following a function header be a left brace,
to reduce sensitivity to macros, as suggested by Tom Lane
<tgl@sss.pgh.pa.us>
lpd 95-06-22 removed #ifndefs whose sole purpose was to define
undefined preprocessor symbols as 0; changed all #ifdefs
for configuration symbols to #ifs
lpd 95-04-05 changed copyright notice to make it clear that
including ansi2knr in a program does not bring the entire
program under the GPL
lpd 94-12-18 added conditionals for systems where ctype macros
don't handle 8-bit characters properly, suggested by
Francois Pinard <pinard@iro.umontreal.ca>;
removed --varargs switch (this is now the default)
lpd 94-10-10 removed CONFIG_BROKETS conditional
lpd 94-07-16 added some conditionals to help GNU `configure',
suggested by Francois Pinard <pinard@iro.umontreal.ca>;
properly erase prototype args in function parameters,
contributed by Jim Avera <jima@netcom.com>;
correct error in writeblanks (it shouldn't erase EOLs)
lpd 89-xx-xx original version
*/
/* Most of the conditionals here are to make ansi2knr work with */
/* or without the GNU configure machinery. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <ctype.h>
#if HAVE_CONFIG_H
/*
For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
This will define HAVE_CONFIG_H and so, activate the following lines.
*/
# if STDC_HEADERS || HAVE_STRING_H
# include <string.h>
# else
# include <strings.h>
# endif
#else /* not HAVE_CONFIG_H */
/* Otherwise do it the hard way */
# ifdef BSD
# include <strings.h>
# else
# ifdef VMS
extern int strlen(), strncmp();
# else
# include <string.h>
# endif
# endif
#endif /* not HAVE_CONFIG_H */
#if STDC_HEADERS
# include <stdlib.h>
#else
/*
malloc and free should be declared in stdlib.h,
but if you've got a K&R compiler, they probably aren't.
*/
# ifdef MSDOS
# include <malloc.h>
# else
# ifdef VMS
extern char *malloc();
extern void free();
# else
extern char *malloc();
extern int free();
# endif
# endif
#endif
/*
* The ctype macros don't always handle 8-bit characters correctly.
* Compensate for this here.
*/
#ifdef isascii
# undef HAVE_ISASCII /* just in case */
# define HAVE_ISASCII 1
#else
#endif
#if STDC_HEADERS || !HAVE_ISASCII
# define is_ascii(c) 1
#else
# define is_ascii(c) isascii(c)
#endif
#define is_space(c) (is_ascii(c) && isspace(c))
#define is_alpha(c) (is_ascii(c) && isalpha(c))
#define is_alnum(c) (is_ascii(c) && isalnum(c))
/* Scanning macros */
#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
/* Forward references */
char *skipspace();
int writeblanks();
int test1();
int convert1();
/* The main program */
int
main(argc, argv)
int argc;
char *argv[];
{ FILE *in, *out;
#define bufsize 5000 /* arbitrary size */
char *buf;
char *line;
char *more;
/*
* In previous versions, ansi2knr recognized a --varargs switch.
* If this switch was supplied, ansi2knr would attempt to convert
* a ... argument to va_alist and va_dcl; if this switch was not
* supplied, ansi2knr would simply drop any such arguments.
* Now, ansi2knr always does this conversion, and we only
* check for this switch for backward compatibility.
*/
int convert_varargs = 1;
if ( argc > 1 && argv[1][0] == '-' )
{ if ( !strcmp(argv[1], "--varargs") )
{ convert_varargs = 1;
argc--;
argv++;
}
else
{ fprintf(stderr, "Unrecognized switch: %s\n", argv[1]);
exit(1);
}
}
switch ( argc )
{
default:
printf("Usage: ansi2knr input_file [output_file]\n");
exit(0);
case 2:
out = stdout;
break;
case 3:
out = fopen(argv[2], "w");
if ( out == NULL )
{ fprintf(stderr, "Cannot open output file %s\n", argv[2]);
exit(1);
}
}
in = fopen(argv[1], "r");
if ( in == NULL )
{ fprintf(stderr, "Cannot open input file %s\n", argv[1]);
exit(1);
}
fprintf(out, "#line 1 \"%s\"\n", argv[1]);
buf = malloc(bufsize);
line = buf;
while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
{
test: line += strlen(line);
switch ( test1(buf) )
{
case 2: /* a function header */
convert1(buf, out, 1, convert_varargs);
break;
case 1: /* a function */
/* Check for a { at the start of the next line. */
more = ++line;
f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
goto wl;
if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
goto wl;
switch ( *skipspace(more, 1) )
{
case '{':
/* Definitely a function header. */
convert1(buf, out, 0, convert_varargs);
fputs(more, out);
break;
case 0:
/* The next line was blank or a comment: */
/* keep scanning for a non-comment. */
line += strlen(line);
goto f;
default:
/* buf isn't a function header, but */
/* more might be. */
fputs(buf, out);
strcpy(buf, more);
line = buf;
goto test;
}
break;
case -1: /* maybe the start of a function */
if ( line != buf + (bufsize - 1) ) /* overflow check */
continue;
/* falls through */
default: /* not a function */
wl: fputs(buf, out);
break;
}
line = buf;
}
if ( line != buf )
fputs(buf, out);
free(buf);
fclose(out);
fclose(in);
return 0;
}
/* Skip over space and comments, in either direction. */
char *
skipspace(p, dir)
register char *p;
register int dir; /* 1 for forward, -1 for backward */
{ for ( ; ; )
{ while ( is_space(*p) )
p += dir;
if ( !(*p == '/' && p[dir] == '*') )
break;
p += dir; p += dir;
while ( !(*p == '*' && p[dir] == '/') )
{ if ( *p == 0 )
return p; /* multi-line comment?? */
p += dir;
}
p += dir; p += dir;
}
return p;
}
/*
* Write blanks over part of a string.
* Don't overwrite end-of-line characters.
*/
int
writeblanks(start, end)
char *start;
char *end;
{ char *p;
for ( p = start; p < end; p++ )
if ( *p != '\r' && *p != '\n' )
*p = ' ';
return 0;
}
/*
* Test whether the string in buf is a function definition.
* The string may contain and/or end with a newline.
* Return as follows:
* 0 - definitely not a function definition;
* 1 - definitely a function definition;
* 2 - definitely a function prototype (NOT USED);
* -1 - may be the beginning of a function definition,
* append another line and look again.
* The reason we don't attempt to convert function prototypes is that
* Ghostscript's declaration-generating macros look too much like
* prototypes, and confuse the algorithms.
*/
int
test1(buf)
char *buf;
{ register char *p = buf;
char *bend;
char *endfn;
int contin;
if ( !isidfirstchar(*p) )
return 0; /* no name at left margin */
bend = skipspace(buf + strlen(buf) - 1, -1);
switch ( *bend )
{
case ';': contin = 0 /*2*/; break;
case ')': contin = 1; break;
case '{': return 0; /* not a function */
case '}': return 0; /* not a function */
default: contin = -1;
}
while ( isidchar(*p) )
p++;
endfn = p;
p = skipspace(p, 1);
if ( *p++ != '(' )
return 0; /* not a function */
p = skipspace(p, 1);
if ( *p == ')' )
return 0; /* no parameters */
/* Check that the apparent function name isn't a keyword. */
/* We only need to check for keywords that could be followed */
/* by a left parenthesis (which, unfortunately, is most of them). */
{ static char *words[] =
{ "asm", "auto", "case", "char", "const", "double",
"extern", "float", "for", "if", "int", "long",
"register", "return", "short", "signed", "sizeof",
"static", "switch", "typedef", "unsigned",
"void", "volatile", "while", 0
};
char **key = words;
char *kp;
int len = endfn - buf;
while ( (kp = *key) != 0 )
{ if ( strlen(kp) == len && !strncmp(kp, buf, len) )
return 0; /* name is a keyword */
key++;
}
}
return contin;
}
/* Convert a recognized function definition or header to K&R syntax. */
int
convert1(buf, out, header, convert_varargs)
char *buf;
FILE *out;
int header; /* Boolean */
int convert_varargs; /* Boolean */
{ char *endfn;
register char *p;
char **breaks;
unsigned num_breaks = 2; /* for testing */
char **btop;
char **bp;
char **ap;
char *vararg = 0;
/* Pre-ANSI implementations don't agree on whether strchr */
/* is called strchr or index, so we open-code it here. */
for ( endfn = buf; *(endfn++) != '('; )
;
top: p = endfn;
breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
if ( breaks == 0 )
{ /* Couldn't allocate break table, give up */
fprintf(stderr, "Unable to allocate break table!\n");
fputs(buf, out);
return -1;
}
btop = breaks + num_breaks * 2 - 2;
bp = breaks;
/* Parse the argument list */
do
{ int level = 0;
char *lp = NULL;
char *rp;
char *end = NULL;
if ( bp >= btop )
{ /* Filled up break table. */
/* Allocate a bigger one and start over. */
free((char *)breaks);
num_breaks <<= 1;
goto top;
}
*bp++ = p;
/* Find the end of the argument */
for ( ; end == NULL; p++ )
{ switch(*p)
{
case ',':
if ( !level ) end = p;
break;
case '(':
if ( !level ) lp = p;
level++;
break;
case ')':
if ( --level < 0 ) end = p;
else rp = p;
break;
case '/':
p = skipspace(p, 1) - 1;
break;
default:
;
}
}
/* Erase any embedded prototype parameters. */
if ( lp )
writeblanks(lp + 1, rp);
p--; /* back up over terminator */
/* Find the name being declared. */
/* This is complicated because of procedure and */
/* array modifiers. */
for ( ; ; )
{ p = skipspace(p - 1, -1);
switch ( *p )
{
case ']': /* skip array dimension(s) */
case ')': /* skip procedure args OR name */
{ int level = 1;
while ( level )
switch ( *--p )
{
case ']': case ')': level++; break;
case '[': case '(': level--; break;
case '/': p = skipspace(p, -1) + 1; break;
default: ;
}
}
if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
{ /* We found the name being declared */
while ( !isidfirstchar(*p) )
p = skipspace(p, 1) + 1;
goto found;
}
break;
default:
goto found;
}
}
found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
{ if ( convert_varargs )
{ *bp++ = "va_alist";
vararg = p-2;
}
else
{ p++;
if ( bp == breaks + 1 ) /* sole argument */
writeblanks(breaks[0], p);
else
writeblanks(bp[-1] - 1, p);
bp--;
}
}
else
{ while ( isidchar(*p) ) p--;
*bp++ = p+1;
}
p = end;
}
while ( *p++ == ',' );
*bp = p;
/* Make a special check for 'void' arglist */
if ( bp == breaks+2 )
{ p = skipspace(breaks[0], 1);
if ( !strncmp(p, "void", 4) )
{ p = skipspace(p+4, 1);
if ( p == breaks[2] - 1 )
{ bp = breaks; /* yup, pretend arglist is empty */
writeblanks(breaks[0], p + 1);
}
}
}
/* Put out the function name and left parenthesis. */
p = buf;
while ( p != endfn ) putc(*p, out), p++;
/* Put out the declaration. */
if ( header )
{ fputs(");", out);
for ( p = breaks[0]; *p; p++ )
if ( *p == '\r' || *p == '\n' )
putc(*p, out);
}
else
{ for ( ap = breaks+1; ap < bp; ap += 2 )
{ p = *ap;
while ( isidchar(*p) )
putc(*p, out), p++;
if ( ap < bp - 1 )
fputs(", ", out);
}
fputs(") ", out);
/* Put out the argument declarations */
for ( ap = breaks+2; ap <= bp; ap += 2 )
(*ap)[-1] = ';';
if ( vararg != 0 )
{ *vararg = 0;
fputs(breaks[0], out); /* any prior args */
fputs("va_dcl", out); /* the final arg */
fputs(bp[0], out);
}
else
fputs(breaks[0], out);
}
free((char *)breaks);
return 0;
}

62
appveyor.yml Normal file
View File

@@ -0,0 +1,62 @@
image: Visual Studio 2019
configuration: Release
platform:
- Win32
- x64
install:
- if %PLATFORM% == Win32 (set ARCH=x86)
- if %PLATFORM% == x64 (set ARCH=x64)
## Set up nasm
- choco install nasm
- set PATH=%PATH%;C:\Program Files\NASM
## Set up libpng
- cd C:\Tools\vcpkg
- vcpkg install libpng:%ARCH%-windows
- vcpkg install libpng:%ARCH%-windows-static
before_build:
- cd %APPVEYOR_BUILD_FOLDER%
- nasm -v
- cmake --version
- git describe --always --tags --dirty
- FOR /F %%a in ('git describe --always --tags --dirty') do set GIT_VERSION=%%a
build_script:
## Build shared
- cmake -B shared -A %PLATFORM%
-DENABLE_SHARED=1 -DENABLE_STATIC=0
-DREQUIRE_SIMD=1
-DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake
- cmake --build shared --config Release
## Build static
- cmake -B static -A %PLATFORM%
-DENABLE_SHARED=0 -DENABLE_STATIC=1
-DREQUIRE_SIMD=1
-DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-DVCPKG_TARGET_TRIPLET=%ARCH%-windows-static
- cmake --build static --config Release
after_build:
- 7z a mozjpeg-%GIT_VERSION%-win-%ARCH%.zip shared/Release static/Release
artifacts:
- path: '*.zip'
cache:
- C:\ProgramData\chocolatey\bin
- C:\ProgramData\chocolatey\lib
- C:\Program Files\NASM
- C:\tools\vcpkg\installed
deploy:
description: 'Automated build using Appveyor'
provider: GitHub
auth_token:
secure: 2Jj47Q5HnaPob9U4yX2t4q4TYTw4JWU6cS56mM12aoRLgfYkZ4gRZPySIzfmTPqC
artifact: /.*\.zip/
on:
APPVEYOR_REPO_TAG: true # deploy on tag push only

View File

@@ -1,9 +1,13 @@
/*
* cderror.h
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1997, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
* Modified 2009-2017 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2021, 2024, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
* This file defines the error and message codes for the cjpeg/djpeg
* applications. These strings are not needed as part of the JPEG library
@@ -24,7 +28,7 @@
#define JMAKE_ENUM_LIST
#else
/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
#define JMESSAGE(code,string)
#define JMESSAGE(code, string)
#endif /* CDERROR_H */
#endif /* JMESSAGE */
@@ -32,94 +36,77 @@
typedef enum {
#define JMESSAGE(code,string) code ,
#define JMESSAGE(code, string) code,
#endif /* JMAKE_ENUM_LIST */
JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */
JMESSAGE(JMSG_FIRSTADDONCODE = 1000, NULL) /* Must be first entry! */
#ifdef BMP_SUPPORTED
JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format")
JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported")
JMESSAGE(JERR_BMP_BADDEPTH, "Only 8-, 24-, and 32-bit BMP files are supported")
JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length")
JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1")
JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB")
JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported")
JMESSAGE(JERR_BMP_EMPTY, "Empty BMP image")
JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM")
JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image")
JMESSAGE(JERR_BMP_OUTOFRANGE, "Numeric value out of range in BMP file")
JMESSAGE(JTRC_BMP, "%ux%u %d-bit BMP image")
JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image")
JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image")
JMESSAGE(JTRC_BMP_OS2, "%ux%u %d-bit OS2 BMP image")
JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image")
#endif /* BMP_SUPPORTED */
#ifdef GIF_SUPPORTED
JMESSAGE(JERR_GIF_BUG, "GIF output got confused")
JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d")
JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB")
JMESSAGE(JERR_GIF_EMPTY, "Empty GIF image")
JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file")
JMESSAGE(JERR_GIF_NOT, "Not a GIF file")
JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image")
JMESSAGE(JTRC_GIF_BADVERSION,
"Warning: unexpected GIF version number '%c%c%c'")
"Warning: unexpected GIF version number '%c%c%c'")
JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x")
JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input")
JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file")
JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring")
JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image")
JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits")
#endif /* GIF_SUPPORTED */
#ifdef PPM_SUPPORTED
JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB")
JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file")
JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file")
JMESSAGE(JTRC_PGM, "%ux%u PGM image")
JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image")
JMESSAGE(JTRC_PPM, "%ux%u PPM image")
JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image")
#endif /* PPM_SUPPORTED */
JMESSAGE(JERR_PPM_OUTOFRANGE, "Numeric value out of range in PPM file")
JMESSAGE(JTRC_PGM, "%ux%u PGM image (maximum color value = %u)")
JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image (maximum color value = %u)")
JMESSAGE(JTRC_PPM, "%ux%u PPM image (maximum color value = %u)")
JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image (maximum color value = %u)")
#ifdef RLE_SUPPORTED
JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library")
JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB")
JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE")
JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file")
JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header")
JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header")
JMESSAGE(JERR_RLE_NOT, "Not an RLE file")
JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE")
JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup")
JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file")
JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d")
JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file")
JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d")
JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d")
#endif /* RLE_SUPPORTED */
#ifdef TARGA_SUPPORTED
JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format")
JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file")
JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB")
JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image")
JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image")
JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image")
#else
JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled")
#endif /* TARGA_SUPPORTED */
JMESSAGE(JERR_BAD_CMAP_FILE,
"Color map file is invalid or of unsupported format")
"Color map file is invalid or of unsupported format")
JMESSAGE(JERR_TOO_MANY_COLORS,
"Output file format cannot handle %d colormap entries")
"Output file format cannot handle %d colormap entries")
JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed")
#ifdef TARGA_SUPPORTED
#ifdef PNG_SUPPORTED
JMESSAGE(JERR_UNKNOWN_FORMAT,
"Unrecognized input file format --- perhaps you need -targa")
"MozJPEG can't read the image (JPEG, PNG and old BMP and Targa are supported)")
#else
JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format")
JMESSAGE(JERR_UNKNOWN_FORMAT, "MozJPEG can't read the image (PNG support is disabled in this build)")
#endif
JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format")
#ifdef PNG_SUPPORTED
JMESSAGE(JERR_PNG_ERROR, "Unable to read PNG file: %s")
JMESSAGE(JERR_PNG_PROFILETOOLARGE, "Embedded profile was too large for this tool - dropped.")
#endif
#ifdef JMAKE_ENUM_LIST
JMSG_LASTADDONCODE

133
cdjpeg.c
View File

@@ -1,60 +1,23 @@
/*
* cdjpeg.c
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1997, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
* libjpeg-turbo Modifications:
* Copyright (C) 2019, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
* This file contains common support routines used by the IJG application
* programs (cjpeg, djpeg, jpegtran).
*/
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
#include <ctype.h> /* to declare isupper(), tolower() */
#ifdef NEED_SIGNAL_CATCHER
#include <signal.h> /* to declare signal() */
#endif
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
#include <ctype.h> /* to declare isupper(), tolower() */
#ifdef USE_SETMODE
#include <fcntl.h> /* to declare setmode()'s parameter macros */
#include <fcntl.h> /* to declare setmode()'s parameter macros */
/* If you have setmode() but not <io.h>, just delete this line: */
#include <io.h> /* to declare setmode() */
#endif
/*
* Signal catcher to ensure that temporary files are removed before aborting.
* NB: for Amiga Manx C this is actually a global routine named _abort();
* we put "#define signal_catcher _abort" in jconfig.h. Talk about bogus...
*/
#ifdef NEED_SIGNAL_CATCHER
static j_common_ptr sig_cinfo;
void /* must be global for Manx C */
signal_catcher (int signum)
{
if (sig_cinfo != NULL) {
if (sig_cinfo->err != NULL) /* turn off trace output */
sig_cinfo->err->trace_level = 0;
jpeg_destroy(sig_cinfo); /* clean up memory allocation & temp files */
}
exit(EXIT_FAILURE);
}
GLOBAL(void)
enable_signal_catcher (j_common_ptr cinfo)
{
sig_cinfo = cinfo;
#ifdef SIGINT /* not all systems have SIGINT */
signal(SIGINT, signal_catcher);
#endif
#ifdef SIGTERM /* not all systems have SIGTERM */
signal(SIGTERM, signal_catcher);
#endif
}
#include <io.h> /* to declare setmode() */
#endif
@@ -62,37 +25,51 @@ enable_signal_catcher (j_common_ptr cinfo)
* Optional progress monitor: display a percent-done figure on stderr.
*/
#ifdef PROGRESS_REPORT
METHODDEF(void)
progress_monitor (j_common_ptr cinfo)
progress_monitor(j_common_ptr cinfo)
{
cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress;
int total_passes = prog->pub.total_passes + prog->total_extra_passes;
int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit);
cd_progress_ptr prog = (cd_progress_ptr)cinfo->progress;
if (percent_done != prog->percent_done) {
prog->percent_done = percent_done;
if (total_passes > 1) {
fprintf(stderr, "\rPass %d/%d: %3d%% ",
prog->pub.completed_passes + prog->completed_extra_passes + 1,
total_passes, percent_done);
} else {
fprintf(stderr, "\r %3d%% ", percent_done);
if (prog->max_scans != 0 && cinfo->is_decompressor) {
int scan_no = ((j_decompress_ptr)cinfo)->input_scan_number;
if (scan_no > (int)prog->max_scans) {
fprintf(stderr, "Scan number %d exceeds maximum scans (%u)\n", scan_no,
prog->max_scans);
exit(EXIT_FAILURE);
}
}
if (prog->report) {
int total_passes = prog->pub.total_passes + prog->total_extra_passes;
int percent_done =
(int)(prog->pub.pass_counter * 100L / prog->pub.pass_limit);
if (percent_done != prog->percent_done) {
prog->percent_done = percent_done;
if (total_passes > 1) {
fprintf(stderr, "\rPass %d/%d: %3d%% ",
prog->pub.completed_passes + prog->completed_extra_passes + 1,
total_passes, percent_done);
} else {
fprintf(stderr, "\r %3d%% ", percent_done);
}
fflush(stderr);
}
fflush(stderr);
}
}
GLOBAL(void)
start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress)
start_progress_monitor(j_common_ptr cinfo, cd_progress_ptr progress)
{
/* Enable progress display, unless trace output is on */
if (cinfo->err->trace_level == 0) {
progress->pub.progress_monitor = progress_monitor;
progress->completed_extra_passes = 0;
progress->total_extra_passes = 0;
progress->max_scans = 0;
progress->report = FALSE;
progress->percent_done = -1;
cinfo->progress = &progress->pub;
}
@@ -100,7 +77,7 @@ start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress)
GLOBAL(void)
end_progress_monitor (j_common_ptr cinfo)
end_progress_monitor(j_common_ptr cinfo)
{
/* Clear away progress display */
if (cinfo->err->trace_level == 0) {
@@ -109,8 +86,6 @@ end_progress_monitor (j_common_ptr cinfo)
}
}
#endif
/*
* Case-insensitive matching of possibly-abbreviated keyword switches.
@@ -119,24 +94,24 @@ end_progress_monitor (j_common_ptr cinfo)
*/
GLOBAL(boolean)
keymatch (char * arg, const char * keyword, int minchars)
keymatch(char *arg, const char *keyword, int minchars)
{
register int ca, ck;
register int nmatched = 0;
while ((ca = *arg++) != '\0') {
if ((ck = *keyword++) == '\0')
return FALSE; /* arg longer than keyword, no good */
if (isupper(ca)) /* force arg to lcase (assume ck is already) */
return FALSE; /* arg longer than keyword, no good */
if (isupper(ca)) /* force arg to lcase (assume ck is already) */
ca = tolower(ca);
if (ca != ck)
return FALSE; /* no good */
nmatched++; /* count matched characters */
return FALSE; /* no good */
nmatched++; /* count matched characters */
}
/* reached end of argument; fail if it's too short for unique abbrev */
if (nmatched < minchars)
return FALSE;
return TRUE; /* A-OK */
return TRUE; /* A-OK */
}
@@ -146,14 +121,14 @@ keymatch (char * arg, const char * keyword, int minchars)
*/
GLOBAL(FILE *)
read_stdin (void)
read_stdin(void)
{
FILE * input_file = stdin;
FILE *input_file = stdin;
#ifdef USE_SETMODE /* need to hack file mode? */
#ifdef USE_SETMODE /* need to hack file mode? */
setmode(fileno(stdin), O_BINARY);
#endif
#ifdef USE_FDOPEN /* need to re-open in binary mode? */
#ifdef USE_FDOPEN /* need to re-open in binary mode? */
if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) {
fprintf(stderr, "Cannot reopen stdin\n");
exit(EXIT_FAILURE);
@@ -164,14 +139,14 @@ read_stdin (void)
GLOBAL(FILE *)
write_stdout (void)
write_stdout(void)
{
FILE * output_file = stdout;
FILE *output_file = stdout;
#ifdef USE_SETMODE /* need to hack file mode? */
#ifdef USE_SETMODE /* need to hack file mode? */
setmode(fileno(stdout), O_BINARY);
#endif
#ifdef USE_FDOPEN /* need to re-open in binary mode? */
#ifdef USE_FDOPEN /* need to re-open in binary mode? */
if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) {
fprintf(stderr, "Cannot reopen stdout\n");
exit(EXIT_FAILURE);

193
cdjpeg.h
View File

@@ -1,40 +1,54 @@
/*
* cdjpeg.h
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1997, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
* Modified 2019 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2017, 2019, 2021-2022, D. R. Commander.
* Copyright (C) 2014, Mozilla Corporation.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
* This file contains common declarations for the sample applications
* cjpeg and djpeg. It is NOT used by the core JPEG library.
*/
#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */
#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */
#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */
#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */
#include "jinclude.h"
#include "jpeglib.h"
#include "jerror.h" /* get library error codes too */
#include "cderror.h" /* get application-specific error codes */
#include "jerror.h" /* get library error codes too */
#include "cderror.h" /* get application-specific error codes */
#define JPEG_RAW_READER 0
/*
* Object interface for cjpeg's source file decoding modules
*/
typedef struct cjpeg_source_struct * cjpeg_source_ptr;
typedef struct cjpeg_source_struct *cjpeg_source_ptr;
struct cjpeg_source_struct {
JMETHOD(void, start_input, (j_compress_ptr cinfo,
cjpeg_source_ptr sinfo));
JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
cjpeg_source_ptr sinfo));
JMETHOD(void, finish_input, (j_compress_ptr cinfo,
cjpeg_source_ptr sinfo));
void (*start_input) (j_compress_ptr cinfo, cjpeg_source_ptr sinfo);
JDIMENSION (*get_pixel_rows) (j_compress_ptr cinfo, cjpeg_source_ptr sinfo);
void (*finish_input) (j_compress_ptr cinfo, cjpeg_source_ptr sinfo);
FILE *input_file;
JSAMPARRAY buffer;
J12SAMPARRAY buffer12;
#ifdef C_LOSSLESS_SUPPORTED
J16SAMPARRAY buffer16;
#endif
JDIMENSION buffer_height;
JDIMENSION max_pixels;
#if JPEG_RAW_READER
// For reading JPEG
JSAMPARRAY plane_pointer[4];
#endif
jpeg_saved_marker_ptr marker_list;
};
@@ -42,30 +56,39 @@ struct cjpeg_source_struct {
* Object interface for djpeg's output file encoding modules
*/
typedef struct djpeg_dest_struct * djpeg_dest_ptr;
typedef struct djpeg_dest_struct *djpeg_dest_ptr;
struct djpeg_dest_struct {
/* start_output is called after jpeg_start_decompress finishes.
* The color map will be ready at this time, if one is needed.
*/
JMETHOD(void, start_output, (j_decompress_ptr cinfo,
djpeg_dest_ptr dinfo));
void (*start_output) (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo);
/* Emit the specified number of pixel rows from the buffer. */
JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo,
djpeg_dest_ptr dinfo,
JDIMENSION rows_supplied));
void (*put_pixel_rows) (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
JDIMENSION rows_supplied);
/* Finish up at the end of the image. */
JMETHOD(void, finish_output, (j_decompress_ptr cinfo,
djpeg_dest_ptr dinfo));
void (*finish_output) (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo);
/* Re-calculate buffer dimensions based on output dimensions (for use with
partial image decompression.) If this is NULL, then the output format
does not support partial image decompression (BMP, in particular, cannot
support partial decompression because it uses an inversion buffer to write
the image in bottom-up order.) */
void (*calc_buffer_dimensions) (j_decompress_ptr cinfo,
djpeg_dest_ptr dinfo);
/* Target file spec; filled in by djpeg.c after object is created. */
FILE * output_file;
FILE *output_file;
/* Output pixel-row buffer. Created by module init or start_output.
* Width is cinfo->output_width * cinfo->output_components;
* height is buffer_height.
*/
JSAMPARRAY buffer;
J12SAMPARRAY buffer12;
#ifdef D_LOSSLESS_SUPPORTED
J16SAMPARRAY buffer16;
#endif
JDIMENSION buffer_height;
};
@@ -79,106 +102,88 @@ struct djpeg_dest_struct {
*/
struct cdjpeg_progress_mgr {
struct jpeg_progress_mgr pub; /* fields known to JPEG library */
int completed_extra_passes; /* extra passes completed */
int total_extra_passes; /* total extra */
struct jpeg_progress_mgr pub; /* fields known to JPEG library */
int completed_extra_passes; /* extra passes completed */
int total_extra_passes; /* total extra */
JDIMENSION max_scans; /* abort if the number of scans exceeds this
value and the value is non-zero */
boolean report; /* whether or not to report progress */
/* last printed percentage stored here to avoid multiple printouts */
int percent_done;
};
typedef struct cdjpeg_progress_mgr * cd_progress_ptr;
typedef struct cdjpeg_progress_mgr *cd_progress_ptr;
/* Short forms of external names for systems with brain-damaged linkers. */
#ifdef NEED_SHORT_EXTERNAL_NAMES
#define jinit_read_bmp jIRdBMP
#define jinit_write_bmp jIWrBMP
#define jinit_read_gif jIRdGIF
#define jinit_write_gif jIWrGIF
#define jinit_read_ppm jIRdPPM
#define jinit_write_ppm jIWrPPM
#define jinit_read_rle jIRdRLE
#define jinit_write_rle jIWrRLE
#define jinit_read_targa jIRdTarga
#define jinit_write_targa jIWrTarga
#define read_quant_tables RdQTables
#define read_scan_script RdScnScript
#define set_quant_slots SetQSlots
#define set_sample_factors SetSFacts
#define read_color_map RdCMap
#define enable_signal_catcher EnSigCatcher
#define start_progress_monitor StProgMon
#define end_progress_monitor EnProgMon
#define read_stdin RdStdin
#define write_stdout WrStdout
#endif /* NEED_SHORT_EXTERNAL_NAMES */
/* Module selection routines for I/O modules. */
EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo));
EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo,
boolean is_os2));
EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo));
EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo));
EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo));
EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo));
EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo));
EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo));
EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo));
EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo));
EXTERN(cjpeg_source_ptr) jinit_read_jpeg (j_compress_ptr cinfo);
EXTERN(cjpeg_source_ptr) jinit_read_png (j_compress_ptr cinfo);
EXTERN(cjpeg_source_ptr) jinit_read_bmp(j_compress_ptr cinfo,
boolean use_inversion_array);
EXTERN(djpeg_dest_ptr) jinit_write_bmp(j_decompress_ptr cinfo, boolean is_os2,
boolean use_inversion_array);
EXTERN(cjpeg_source_ptr) jinit_read_gif(j_compress_ptr cinfo);
EXTERN(cjpeg_source_ptr) j12init_read_gif(j_compress_ptr cinfo);
#ifdef C_LOSSLESS_SUPPORTED
EXTERN(cjpeg_source_ptr) j16init_read_gif(j_compress_ptr cinfo);
#endif
EXTERN(djpeg_dest_ptr) jinit_write_gif(j_decompress_ptr cinfo, boolean is_lzw);
EXTERN(djpeg_dest_ptr) j12init_write_gif(j_decompress_ptr cinfo,
boolean is_lzw);
EXTERN(cjpeg_source_ptr) jinit_read_ppm(j_compress_ptr cinfo);
EXTERN(cjpeg_source_ptr) j12init_read_ppm(j_compress_ptr cinfo);
#ifdef C_LOSSLESS_SUPPORTED
EXTERN(cjpeg_source_ptr) j16init_read_ppm(j_compress_ptr cinfo);
#endif
EXTERN(djpeg_dest_ptr) jinit_write_ppm(j_decompress_ptr cinfo);
EXTERN(djpeg_dest_ptr) j12init_write_ppm(j_decompress_ptr cinfo);
#ifdef D_LOSSLESS_SUPPORTED
EXTERN(djpeg_dest_ptr) j16init_write_ppm(j_decompress_ptr cinfo);
#endif
EXTERN(cjpeg_source_ptr) jinit_read_targa(j_compress_ptr cinfo);
EXTERN(djpeg_dest_ptr) jinit_write_targa(j_decompress_ptr cinfo);
/* cjpeg support routines (in rdswitch.c) */
EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename,
int scale_factor, boolean force_baseline));
EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename));
EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg));
EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg));
EXTERN(boolean) read_quant_tables(j_compress_ptr cinfo, char *filename,
boolean force_baseline);
EXTERN(boolean) read_scan_script(j_compress_ptr cinfo, char *filename);
EXTERN(boolean) set_quality_ratings(j_compress_ptr cinfo, char *arg,
boolean force_baseline);
EXTERN(boolean) set_quant_slots(j_compress_ptr cinfo, char *arg);
EXTERN(boolean) set_sample_factors(j_compress_ptr cinfo, char *arg);
/* djpeg support routines (in rdcolmap.c) */
EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile));
EXTERN(void) read_color_map(j_decompress_ptr cinfo, FILE *infile);
EXTERN(void) read_color_map_12(j_decompress_ptr cinfo, FILE *infile);
/* common support routines (in cdjpeg.c) */
EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo));
EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo,
cd_progress_ptr progress));
EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo));
EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars));
EXTERN(FILE *) read_stdin JPP((void));
EXTERN(FILE *) write_stdout JPP((void));
EXTERN(void) start_progress_monitor(j_common_ptr cinfo,
cd_progress_ptr progress);
EXTERN(void) end_progress_monitor(j_common_ptr cinfo);
EXTERN(boolean) keymatch(char *arg, const char *keyword, int minchars);
EXTERN(FILE *) read_stdin(void);
EXTERN(FILE *) write_stdout(void);
/* miscellaneous useful macros */
#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
#define READ_BINARY "r"
#define WRITE_BINARY "w"
#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
#define READ_BINARY "r"
#define WRITE_BINARY "w"
#else
#ifdef VMS /* VMS is very nonstandard */
#define READ_BINARY "rb", "ctx=stm"
#define WRITE_BINARY "wb", "ctx=stm"
#else /* standard ANSI-compliant case */
#define READ_BINARY "rb"
#define WRITE_BINARY "wb"
#endif
#define READ_BINARY "rb"
#define WRITE_BINARY "wb"
#endif
#ifndef EXIT_FAILURE /* define exit() codes if not provided */
#ifndef EXIT_FAILURE /* define exit() codes if not provided */
#define EXIT_FAILURE 1
#endif
#ifndef EXIT_SUCCESS
#ifdef VMS
#define EXIT_SUCCESS 1 /* VMS is very nonstandard */
#else
#define EXIT_SUCCESS 0
#endif
#endif
#ifndef EXIT_WARNING
#ifdef VMS
#define EXIT_WARNING 1 /* VMS is very nonstandard */
#else
#define EXIT_WARNING 2
#endif
#endif

View File

@@ -1,6 +1,130 @@
libjpeg-turbo note: This file has been modified by The libjpeg-turbo Project
to include only information relevant to libjpeg-turbo. It is included only for
reference. Please see ChangeLog.md for information specific to libjpeg-turbo.
CHANGE LOG for Independent JPEG Group's JPEG software
Version 9d 12-Jan-2020
-----------------------
Restore GIF read and write support from libjpeg version 6a.
Thank to Wolfgang Werner (W.W.) Heinz for suggestion.
Add jpegtran -drop option; add options to the crop extension and wipe
to fill the extra area with content from the source image region,
instead of gray out.
Version 9c 14-Jan-2018
-----------------------
jpegtran: add an option to the -wipe switch to fill the region
with the average of adjacent blocks, instead of gray out.
Thank to Caitlyn Feddock and Maddie Ziegler for inspiration.
Version 9b 17-Jan-2016
-----------------------
Document 'f' specifier for jpegtran -crop specification.
Thank to Michele Martone for suggestion.
Version 9a 19-Jan-2014
-----------------------
Add jpegtran -wipe option and extension for -crop.
Thank to Andrew Senior, David Clunie, and Josef Schmid for suggestion.
Version 9 13-Jan-2013
----------------------
Add remark for jpeg_mem_dest() in jdatadst.c.
Thank to Elie-Gregoire Khoury for the hint.
Correct argument type in format string, avoid compiler warnings.
Thank to Vincent Torri for hint.
Version 8d 15-Jan-2012
-----------------------
Add cjpeg -rgb option to create RGB JPEG files.
Using this switch suppresses the conversion from RGB
colorspace input to the default YCbCr JPEG colorspace.
Thank to Michael Koch for the initial suggestion.
Add option to disable the region adjustment in the transupp crop code.
Thank to Jeffrey Friedl for the suggestion.
Version 8b 16-May-2010
-----------------------
Repair problem in new memory source manager with corrupt JPEG data.
Thank to Ted Campbell and Samuel Chun for the report.
Version 8a 28-Feb-2010
-----------------------
Writing tables-only datastreams via jpeg_write_tables works again.
Support 32-bit BMPs (RGB image with Alpha channel) for read in cjpeg.
Thank to Brett Blackham for the suggestion.
Version 8 10-Jan-2010
----------------------
Add sanity check in BMP reader module to avoid cjpeg crash for empty input
image (thank to Isaev Ildar of ISP RAS, Moscow, RU for reporting this error).
Add data source and destination managers for read from and write to
memory buffers. New API functions jpeg_mem_src and jpeg_mem_dest.
Thank to Roberto Boni from Italy for the suggestion.
Version 7 27-Jun-2009
----------------------
New scaled DCTs implemented.
djpeg now supports scalings N/8 with all N from 1 to 16.
cjpeg -quality option has been extended for support of separate quality
settings for luminance and chrominance (or in general, for every provided
quantization table slot).
New API function jpeg_default_qtables() and q_scale_factor array in library.
Support arithmetic entropy encoding and decoding.
Added files jaricom.c, jcarith.c, jdarith.c.
jpegtran has a new "lossless" cropping feature.
Implement -perfect option in jpegtran, new API function
jtransform_perfect_transform() in transupp. (DP 204_perfect.dpatch)
Better error messages for jpegtran fopen failure.
(DP 203_jpegtran_errmsg.dpatch)
Fix byte order issue with 16bit PPM/PGM files in rdppm.c/wrppm.c:
according to Netpbm, the de facto standard implementation of the PNM formats,
the most significant byte is first. (DP 203_rdppm.dpatch)
Add -raw option to rdjpgcom not to mangle the output.
(DP 205_rdjpgcom_raw.dpatch)
Make rdjpgcom locale aware. (DP 201_rdjpgcom_locale.dpatch)
Add extern "C" to jpeglib.h.
This avoids the need to put extern "C" { ... } around #include "jpeglib.h"
in your C++ application. Defining the symbol DONT_USE_EXTERN_C in the
configuration prevents this. (DP 202_jpeglib.h_c++.dpatch)
Version 6b 27-Mar-1998
-----------------------
@@ -40,11 +164,6 @@ Huffman tables being used.
Huffman tables are checked for validity much more carefully than before.
To avoid the Unisys LZW patent, djpeg's GIF output capability has been
changed to produce "uncompressed GIFs", and cjpeg's GIF input capability
has been removed altogether. We're not happy about it either, but there
seems to be no good alternative.
The configure script now supports building libjpeg as a shared library
on many flavors of Unix (all the ones that GNU libtool knows how to
build shared libraries for). Use "./configure --enable-shared" to

263
cjpeg.1
View File

@@ -1,4 +1,4 @@
.TH CJPEG 1 "20 March 1998"
.TH CJPEG 1 "30 August 2024"
.SH NAME
cjpeg \- compress an image file to a JPEG file
.SH SYNOPSIS
@@ -16,8 +16,8 @@ cjpeg \- compress an image file to a JPEG file
compresses the named image file, or the standard input if no file is
named, and produces a JPEG/JFIF file on the standard output.
The currently supported input file formats are: PPM (PBMPLUS color
format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster
Toolkit format). (RLE is supported only if the URT library is available.)
format), PGM (PBMPLUS grayscale format), BMP, GIF [legacy feature], and Targa
[legacy feature].
.SH OPTIONS
All switch names may be abbreviated; for example,
.B \-grayscale
@@ -30,25 +30,25 @@ Upper and lower case are equivalent (thus
.B \-BMP
is the same as
.BR \-bmp ).
British spellings are also accepted (e.g.,
British spellings are also accepted (e.g.
.BR \-greyscale ),
though for brevity these are not mentioned below.
.PP
The basic switches are:
.TP
.BI \-quality " N"
.BI \-quality " N[,...]"
Scale quantization tables to adjust image quality. Quality is 0 (worst) to
100 (best); default is 75. (See below for more info.)
.TP
.B \-grayscale
Create monochrome JPEG file from color input. Be sure to use this switch when
compressing a grayscale BMP file, because
.B cjpeg
isn't bright enough to notice whether a BMP file uses only shades of gray.
By saying
.BR \-grayscale ,
Create monochrome JPEG file from color input. By specifying
.BR \-grayscale,
you'll get a smaller JPEG file that takes less time to process.
.TP
.B \-rgb
Create RGB JPEG file. Using this switch suppresses the conversion from RGB
colorspace input to the default YCbCr JPEG colorspace.
.TP
.B \-optimize
Perform optimization of entropy encoding parameters. Without this, default
encoding parameters are used.
@@ -60,18 +60,22 @@ decompression are unaffected by
.BR \-optimize .
.TP
.B \-progressive
Create progressive JPEG file (see below).
Create progressive JPEG file (see below). Implies
.B \-optimize
unless
.B \-arithmetic
is also specified.
.TP
.B \-targa
Input file is Targa format. Targa files that contain an "identification"
field will not be automatically recognized by
.BR cjpeg ;
for such files you must specify
Input file is Targa format [legacy feature]. Targa files that contain an
"identification" field will not be automatically recognized by
.BR cjpeg .
For such files, you must specify
.B \-targa
to make
.B cjpeg
treat the input as Targa format.
For most Targa files, you won't need this switch.
treat the input as Targa format. For most Targa files, you won't need this
switch.
.PP
The
.B \-quality
@@ -80,8 +84,8 @@ reconstructed image: the higher the quality setting, the larger the JPEG file,
and the closer the output image will be to the original input. Normally you
want to use the lowest quality setting (smallest file) that decompresses into
something visually indistinguishable from the original image. For this
purpose the quality setting should be between 50 and 95; the default of 75 is
often about right. If you see defects at
purpose the quality setting should generally be between 50 and 95 (the default
is 75) for photographic images. If you see defects at
.B \-quality
75, then go up 5 or 10 counts at a time until you are happy with the output
image. (The optimal setting will vary from one image to another.)
@@ -89,11 +93,10 @@ image. (The optimal setting will vary from one image to another.)
.B \-quality
100 will generate a quantization table of all 1's, minimizing loss in the
quantization step (but there is still information loss in subsampling, as well
as roundoff error). This setting is mainly of interest for experimental
purposes. Quality values above about 95 are
.B not
recommended for normal use; the compressed file size goes up dramatically for
hardly any gain in output image quality.
as roundoff error.) For most images, specifying a quality value above
about 95 will increase the size of the compressed file dramatically, and while
the quality gain from these higher quality values is measurable (using metrics
such as PSNR or SSIM), it is rarely perceivable by human vision.
.PP
In the other direction, quality values below 50 will produce very small files
of low image quality. Settings around 5 to 10 might be useful in preparing an
@@ -108,6 +111,36 @@ other JPEG programs may be unable to decode the resulting file. Use
.B \-baseline
if you need to ensure compatibility at low quality values.)
.PP
The \fB-quality\fR option has been extended in this version of \fBcjpeg\fR to
support separate quality settings for luminance and chrominance (or, in
general, separate settings for every quantization table slot.) The principle
is the same as chrominance subsampling: since the human eye is more sensitive
to spatial changes in brightness than spatial changes in color, the chrominance
components can be quantized more than the luminance components without
incurring any visible image quality loss. However, unlike subsampling, this
feature reduces data in the frequency domain instead of the spatial domain,
which allows for more fine-grained control. This option is useful in
quality-sensitive applications, for which the artifacts generated by
subsampling may be unacceptable.
.PP
The \fB-quality\fR option accepts a comma-separated list of parameters, which
respectively refer to the quality levels that should be assigned to the
quantization table slots. If there are more q-table slots than parameters,
then the last parameter is replicated. Thus, if only one quality parameter is
given, this is used for both luminance and chrominance (slots 0 and 1,
respectively), preserving the legacy behavior of cjpeg v6b and prior.
More (or customized) quantization tables can be set with the \fB-qtables\fR
option and assigned to components with the \fB-qslots\fR option (see the
"wizard" switches below.)
.PP
JPEG files generated with separate luminance and chrominance quality are fully
compliant with standard JPEG decoders.
.PP
.BR CAUTION:
For this setting to be useful, be sure to pass an argument of \fB-sample 1x1\fR
to \fBcjpeg\fR to disable chrominance subsampling. Otherwise, the default
subsampling level (2x2, AKA "4:2:0") will be used.
.PP
The
.B \-progressive
switch creates a "progressive JPEG" file. In this type of JPEG file, the data
@@ -117,29 +150,138 @@ scan to display a low-quality image very quickly, and can then improve the
display with each subsequent scan. The final image is exactly equivalent to a
standard JPEG file of the same quality setting, and the total file size is
about the same --- often a little smaller.
.B Caution:
progressive JPEG is not yet widely implemented, so many decoders will be
unable to view a progressive JPEG file at all.
.PP
Switches for advanced users:
.TP
.BI \-precision " N"
Create JPEG file with N-bit data precision. N is 8, 12, or 16; default is 8.
If N is 16, then
.B -lossless
must also be specified. Note that only the PBMPLUS input file format supports
data precisions other than 8. (For historical reasons,
.B cjpeg
allows GIF input files to be converted into 12-bit-per-sample JPEG files, but
this is not a useful conversion.) Note also that PBMPLUS input files are
silently scaled to the target data precision, even if it is lower than the
precision of the input file. Passing an argument of
.B \-verbose
to
.B cjpeg
will cause it to print information about the precision of the input file.
.B Caution:
12-bit and 16-bit data precision is not yet widely implemented, so many
decoders will be unable to handle a 12-bit-per-sample or 16-bit-per-sample JPEG
file at all.
.IP
.B \-precision\ 12
implies
.B \-optimize
unless
.B \-arithmetic
is also specified.
.TP
.BI \-lossless " psv[,Pt]"
Create a lossless JPEG file using the specified predictor selection value
(1 through 7) and optional point transform (0 through
.nh
.I precision
.hy
- 1, where
.nh
.I precision
.hy
is the JPEG data precision in bits). A point transform value of 0 (the
default) is necessary in order to create a fully lossless JPEG file. (A
non-zero point transform value right-shifts the input samples by the specified
number of bits, which is effectively a form of lossy color quantization.)
.B Caution:
lossless JPEG is not yet widely implemented, so many decoders will be unable to
handle a lossless JPEG file at all. In most cases, compressing and
decompressing a lossless JPEG file is considerably slower than compressing and
decompressing a lossy JPEG file, and lossless JPEG files are much larger than
lossy JPEG files. Also note that the following features will be unavailable
when compressing or decompressing a lossless JPEG file:
.IP
- Quality/quantization table selection
.IP
- Color space conversion (the JPEG image will use the same color space as the
input image)
.IP
- Color quantization
.IP
- DCT/IDCT algorithm selection
.IP
- Smoothing
.IP
- Downsampling/upsampling
.IP
- IDCT scaling
.IP
- Partial image decompression
.IP
- Transformations using
.B jpegtran
.IP
Any switches used to enable or configure those features will be ignored.
.TP
.B \-arithmetic
Use arithmetic coding.
.B Caution:
arithmetic-coded JPEG is not yet widely implemented, so many decoders will be
unable to handle an arithmetic-coded JPEG file at all.
.TP
.B \-dct int
Use integer DCT method (default).
Use accurate integer DCT method (default).
.TP
.B \-dct fast
Use fast integer DCT (less accurate).
Use less accurate integer DCT method [legacy feature].
When the Independent JPEG Group's software was first released in 1991, the
compression time for a 1-megapixel JPEG image on a mainstream PC was measured
in minutes. Thus, the \fBfast\fR integer DCT algorithm provided noticeable
performance benefits. On modern CPUs running libjpeg-turbo, however, the
compression time for a 1-megapixel JPEG image is measured in milliseconds, and
thus the performance benefits of the \fBfast\fR algorithm are much less
noticeable. On modern x86/x86-64 CPUs that support AVX2 instructions, the
\fBfast\fR and \fBint\fR methods have similar performance. On other types of
CPUs, the \fBfast\fR method is generally about 5-15% faster than the \fBint\fR
method.
For quality levels of 90 and below, there should be little or no perceptible
quality difference between the two algorithms. For quality levels above 90,
however, the difference between the \fBfast\fR and \fBint\fR methods becomes
more pronounced. With quality=97, for instance, the \fBfast\fR method incurs
generally about a 1-3 dB loss in PSNR relative to the \fBint\fR method, but
this can be larger for some images. Do not use the \fBfast\fR method with
quality levels above 97. The algorithm often degenerates at quality=98 and
above and can actually produce a more lossy image than if lower quality levels
had been used. Also, in libjpeg-turbo, the \fBfast\fR method is not fully
accelerated for quality levels above 97, so it will be slower than the
\fBint\fR method.
.TP
.B \-dct float
Use floating-point DCT method.
The float method is very slightly more accurate than the int method, but is
much slower unless your machine has very fast floating-point hardware. Also
note that results of the floating-point method may vary slightly across
machines, while the integer methods should give the same results everywhere.
The fast integer method is much less accurate than the other two.
Use floating-point DCT method [legacy feature].
The \fBfloat\fR method does not produce significantly more accurate results
than the \fBint\fR method, and it is much slower. The \fBfloat\fR method may
also give different results on different machines due to varying roundoff
behavior, whereas the integer methods should give the same results on all
machines.
.TP
.BI \-icc " file"
Embed ICC color management profile contained in the specified file.
.TP
.BI \-restart " N"
Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is
attached to the number.
Emit a JPEG restart marker every N MCU rows, or every N MCUs if "B" is attached
to the number.
.IP
In typical JPEG images, an MCU (Minimum Coded Unit) is the minimum set of
interleaved "data units" (8x8 DCT blocks if the image is lossy or samples if
the image is lossless) necessary to represent at least one data unit per
component. (For example, an MCU in an interleaved lossy JPEG image that uses
4:2:2 subsampling consists of two luminance blocks followed by one block for
each chrominance component.) In single-component or non-interleaved JPEG
images, an MCU is the same as a data unit. An MCU row is a row of MCUs
spanning the entire width of the image.
.IP
.B \-restart 0
(the default) means no restart markers.
.TP
@@ -152,11 +294,24 @@ Set limit for amount of memory to use in processing large images. Value is
in thousands of bytes, or millions of bytes if "M" is attached to the
number. For example,
.B \-max 4m
selects 4000000 bytes. If more space is needed, temporary files will be used.
selects 4000000 bytes. If more space is needed, an error will occur.
.TP
.BI \-outfile " name"
Send output image to the named file, not to standard output.
.TP
.BI \-memdst
Compress to memory instead of a file. This feature was implemented mainly as a
way of testing the in-memory destination manager (jpeg_mem_dest()), but it is
also useful for benchmarking, since it reduces the I/O overhead.
.TP
.BI \-report
Report compression progress.
.TP
.BI \-strict
Treat all warnings as fatal. Enabling this option will cause the compressor to
abort if an LZW-compressed GIF input image contains incomplete or corrupt image
data.
.TP
.B \-verbose
Enable debug printout. More
.BR \-v 's
@@ -165,6 +320,9 @@ give more output. Also, version information is printed at startup.
.B \-debug
Same as
.BR \-verbose .
.TP
.B \-version
Print version information and exit.
.PP
The
.B \-restart
@@ -211,7 +369,7 @@ Use the scan script given in the specified text file.
.PP
The "wizard" switches are intended for experimentation with JPEG. If you
don't know what you are doing, \fBdon't use them\fR. These switches are
documented further in the file wizard.doc.
documented further in the file wizard.txt.
.SH EXAMPLES
.LP
This example compresses the PPM file foo.ppm with a quality factor of
@@ -223,10 +381,10 @@ This example compresses the PPM file foo.ppm with a quality factor of
.I foo.jpg
.SH HINTS
Color GIF files are not the ideal input for JPEG; JPEG is really intended for
compressing full-color (24-bit) images. In particular, don't try to convert
cartoons, line drawings, and other images that have only a few distinct
colors. GIF works great on these, JPEG does not. If you want to convert a
GIF to JPEG, you should experiment with
compressing full-color (24-bit through 48-bit) images. In particular, don't
try to convert cartoons, line drawings, and other images that have only a few
distinct colors. GIF works great on these; JPEG does not. If you want to
convert a GIF to JPEG, you should experiment with
.BR cjpeg 's
.B \-quality
and
@@ -275,18 +433,9 @@ Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
.SH AUTHOR
Independent JPEG Group
.SH BUGS
Arithmetic coding is not supported for legal reasons.
.PP
GIF input files are no longer supported, to avoid the Unisys LZW patent.
Use a Unisys-licensed program if you need to read a GIF file. (Conversion
of GIF files to JPEG is usually a bad idea anyway.)
.PP
This file was modified by The libjpeg-turbo Project to include only information
relevant to libjpeg-turbo, to wordsmith certain sections, and to describe
features not present in libjpeg.
.SH ISSUES
Not all variants of BMP and Targa file formats are supported.
.PP
The
.B \-targa
switch is not a bug, it's a feature. (It would be a bug if the Targa format
designers had not been clueless.)
.PP
Still not as fast as we'd like.

784
cjpeg.c

File diff suppressed because it is too large Load Diff

View File

@@ -1,402 +0,0 @@
/*
* ckconfig.c
*
* Copyright (C) 1991-1994, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*/
/*
* This program is intended to help you determine how to configure the JPEG
* software for installation on a particular system. The idea is to try to
* compile and execute this program. If your compiler fails to compile the
* program, make changes as indicated in the comments below. Once you can
* compile the program, run it, and it will produce a "jconfig.h" file for
* your system.
*
* As a general rule, each time you try to compile this program,
* pay attention only to the *first* error message you get from the compiler.
* Many C compilers will issue lots of spurious error messages once they
* have gotten confused. Go to the line indicated in the first error message,
* and read the comments preceding that line to see what to change.
*
* Almost all of the edits you may need to make to this program consist of
* changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL",
* or vice versa. This is called defining or undefining that symbol.
*/
/* First we must see if your system has the include files we need.
* We start out with the assumption that your system has all the ANSI-standard
* include files. If you get any error trying to include one of these files,
* undefine the corresponding HAVE_xxx symbol.
*/
#define HAVE_STDDEF_H /* replace 'define' by 'undef' if error here */
#ifdef HAVE_STDDEF_H /* next line will be skipped if you undef... */
#include <stddef.h>
#endif
#define HAVE_STDLIB_H /* same thing for stdlib.h */
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h> /* If you ain't got this, you ain't got C. */
/* We have to see if your string functions are defined by
* strings.h (old BSD convention) or string.h (everybody else).
* We try the non-BSD convention first; define NEED_BSD_STRINGS
* if the compiler says it can't find string.h.
*/
#undef NEED_BSD_STRINGS
#ifdef NEED_BSD_STRINGS
#include <strings.h>
#else
#include <string.h>
#endif
/* On some systems (especially older Unix machines), type size_t is
* defined only in the include file <sys/types.h>. If you get a failure
* on the size_t test below, try defining NEED_SYS_TYPES_H.
*/
#undef NEED_SYS_TYPES_H /* start by assuming we don't need it */
#ifdef NEED_SYS_TYPES_H
#include <sys/types.h>
#endif
/* Usually type size_t is defined in one of the include files we've included
* above. If not, you'll get an error on the "typedef size_t my_size_t;" line.
* In that case, first try defining NEED_SYS_TYPES_H just above.
* If that doesn't work, you'll have to search through your system library
* to figure out which include file defines "size_t". Look for a line that
* says "typedef something-or-other size_t;". Then, change the line below
* that says "#include <someincludefile.h>" to instead include the file
* you found size_t in, and define NEED_SPECIAL_INCLUDE. If you can't find
* type size_t anywhere, try replacing "#include <someincludefile.h>" with
* "typedef unsigned int size_t;".
*/
#undef NEED_SPECIAL_INCLUDE /* assume we DON'T need it, for starters */
#ifdef NEED_SPECIAL_INCLUDE
#include <someincludefile.h>
#endif
typedef size_t my_size_t; /* The payoff: do we have size_t now? */
/* The next question is whether your compiler supports ANSI-style function
* prototypes. You need to know this in order to choose between using
* makefile.ansi and using makefile.unix.
* The #define line below is set to assume you have ANSI function prototypes.
* If you get an error in this group of lines, undefine HAVE_PROTOTYPES.
*/
#define HAVE_PROTOTYPES
#ifdef HAVE_PROTOTYPES
int testfunction (int arg1, int * arg2); /* check prototypes */
struct methods_struct { /* check method-pointer declarations */
int (*error_exit) (char *msgtext);
int (*trace_message) (char *msgtext);
int (*another_method) (void);
};
int testfunction (int arg1, int * arg2) /* check definitions */
{
return arg2[arg1];
}
int test2function (void) /* check void arg list */
{
return 0;
}
#endif
/* Now we want to find out if your compiler knows what "unsigned char" means.
* If you get an error on the "unsigned char un_char;" line,
* then undefine HAVE_UNSIGNED_CHAR.
*/
#define HAVE_UNSIGNED_CHAR
#ifdef HAVE_UNSIGNED_CHAR
unsigned char un_char;
#endif
/* Now we want to find out if your compiler knows what "unsigned short" means.
* If you get an error on the "unsigned short un_short;" line,
* then undefine HAVE_UNSIGNED_SHORT.
*/
#define HAVE_UNSIGNED_SHORT
#ifdef HAVE_UNSIGNED_SHORT
unsigned short un_short;
#endif
/* Now we want to find out if your compiler understands type "void".
* If you get an error anywhere in here, undefine HAVE_VOID.
*/
#define HAVE_VOID
#ifdef HAVE_VOID
/* Caution: a C++ compiler will insist on complete prototypes */
typedef void * void_ptr; /* check void * */
#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */
typedef void (*void_func) (int a, int b);
#else
typedef void (*void_func) ();
#endif
#ifdef HAVE_PROTOTYPES /* check void function result */
void test3function (void_ptr arg1, void_func arg2)
#else
void test3function (arg1, arg2)
void_ptr arg1;
void_func arg2;
#endif
{
char * locptr = (char *) arg1; /* check casting to and from void * */
arg1 = (void *) locptr;
(*arg2) (1, 2); /* check call of fcn returning void */
}
#endif
/* Now we want to find out if your compiler knows what "const" means.
* If you get an error here, undefine HAVE_CONST.
*/
#define HAVE_CONST
#ifdef HAVE_CONST
static const int carray[3] = {1, 2, 3};
#ifdef HAVE_PROTOTYPES
int test4function (const int arg1)
#else
int test4function (arg1)
const int arg1;
#endif
{
return carray[arg1];
}
#endif
/* If you get an error or warning about this structure definition,
* define INCOMPLETE_TYPES_BROKEN.
*/
#undef INCOMPLETE_TYPES_BROKEN
#ifndef INCOMPLETE_TYPES_BROKEN
typedef struct undefined_structure * undef_struct_ptr;
#endif
/* If you get an error about duplicate names,
* define NEED_SHORT_EXTERNAL_NAMES.
*/
#undef NEED_SHORT_EXTERNAL_NAMES
#ifndef NEED_SHORT_EXTERNAL_NAMES
int possibly_duplicate_function ()
{
return 0;
}
int possibly_dupli_function ()
{
return 1;
}
#endif
/************************************************************************
* OK, that's it. You should not have to change anything beyond this
* point in order to compile and execute this program. (You might get
* some warnings, but you can ignore them.)
* When you run the program, it will make a couple more tests that it
* can do automatically, and then it will create jconfig.h and print out
* any additional suggestions it has.
************************************************************************
*/
#ifdef HAVE_PROTOTYPES
int is_char_signed (int arg)
#else
int is_char_signed (arg)
int arg;
#endif
{
if (arg == 189) { /* expected result for unsigned char */
return 0; /* type char is unsigned */
}
else if (arg != -67) { /* expected result for signed char */
printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
printf("I fear the JPEG software will not work at all.\n\n");
}
return 1; /* assume char is signed otherwise */
}
#ifdef HAVE_PROTOTYPES
int is_shifting_signed (long arg)
#else
int is_shifting_signed (arg)
long arg;
#endif
/* See whether right-shift on a long is signed or not. */
{
long res = arg >> 4;
if (res == -0x7F7E80CL) { /* expected result for signed shift */
return 1; /* right shift is signed */
}
/* see if unsigned-shift hack will fix it. */
/* we can't just test exact value since it depends on width of long... */
res |= (~0L) << (32-4);
if (res == -0x7F7E80CL) { /* expected result now? */
return 0; /* right shift is unsigned */
}
printf("Right shift isn't acting as I expect it to.\n");
printf("I fear the JPEG software will not work at all.\n\n");
return 0; /* try it with unsigned anyway */
}
#ifdef HAVE_PROTOTYPES
int main (int argc, char ** argv)
#else
int main (argc, argv)
int argc;
char ** argv;
#endif
{
char signed_char_check = (char) (-67);
FILE *outfile;
/* Attempt to write jconfig.h */
if ((outfile = fopen("jconfig.h", "w")) == NULL) {
printf("Failed to write jconfig.h\n");
return 1;
}
/* Write out all the info */
fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n");
fprintf(outfile, "/* see jconfig.doc for explanations */\n\n");
#ifdef HAVE_PROTOTYPES
fprintf(outfile, "#define HAVE_PROTOTYPES\n");
#else
fprintf(outfile, "#undef HAVE_PROTOTYPES\n");
#endif
#ifdef HAVE_UNSIGNED_CHAR
fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n");
#else
fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n");
#endif
#ifdef HAVE_UNSIGNED_SHORT
fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n");
#else
fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n");
#endif
#ifdef HAVE_VOID
fprintf(outfile, "/* #define void char */\n");
#else
fprintf(outfile, "#define void char\n");
#endif
#ifdef HAVE_CONST
fprintf(outfile, "/* #define const */\n");
#else
fprintf(outfile, "#define const\n");
#endif
if (is_char_signed((int) signed_char_check))
fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n");
else
fprintf(outfile, "#define CHAR_IS_UNSIGNED\n");
#ifdef HAVE_STDDEF_H
fprintf(outfile, "#define HAVE_STDDEF_H\n");
#else
fprintf(outfile, "#undef HAVE_STDDEF_H\n");
#endif
#ifdef HAVE_STDLIB_H
fprintf(outfile, "#define HAVE_STDLIB_H\n");
#else
fprintf(outfile, "#undef HAVE_STDLIB_H\n");
#endif
#ifdef NEED_BSD_STRINGS
fprintf(outfile, "#define NEED_BSD_STRINGS\n");
#else
fprintf(outfile, "#undef NEED_BSD_STRINGS\n");
#endif
#ifdef NEED_SYS_TYPES_H
fprintf(outfile, "#define NEED_SYS_TYPES_H\n");
#else
fprintf(outfile, "#undef NEED_SYS_TYPES_H\n");
#endif
fprintf(outfile, "#undef NEED_FAR_POINTERS\n");
#ifdef NEED_SHORT_EXTERNAL_NAMES
fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n");
#else
fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n");
#endif
#ifdef INCOMPLETE_TYPES_BROKEN
fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n");
#else
fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n");
#endif
fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n");
if (is_shifting_signed(-0x7F7E80B1L))
fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n");
else
fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n");
fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n");
fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n");
fprintf(outfile, "#define BMP_SUPPORTED /* BMP image file format */\n");
fprintf(outfile, "#define GIF_SUPPORTED /* GIF image file format */\n");
fprintf(outfile, "#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */\n");
fprintf(outfile, "#undef RLE_SUPPORTED /* Utah RLE image file format */\n");
fprintf(outfile, "#define TARGA_SUPPORTED /* Targa image file format */\n\n");
fprintf(outfile, "#undef TWO_FILE_COMMANDLINE /* You may need this on non-Unix systems */\n");
fprintf(outfile, "#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */\n");
fprintf(outfile, "#undef DONT_USE_B_MODE\n");
fprintf(outfile, "/* #define PROGRESS_REPORT */ /* optional */\n");
fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n");
/* Close the jconfig.h file */
fclose(outfile);
/* User report */
printf("Configuration check for Independent JPEG Group's software done.\n");
printf("\nI have written the jconfig.h file for you.\n\n");
#ifdef HAVE_PROTOTYPES
printf("You should use makefile.ansi as the starting point for your Makefile.\n");
#else
printf("You should use makefile.unix as the starting point for your Makefile.\n");
#endif
#ifdef NEED_SPECIAL_INCLUDE
printf("\nYou'll need to change jconfig.h to include the system include file\n");
printf("that you found type size_t in, or add a direct definition of type\n");
printf("size_t if that's what you used. Just add it to the end.\n");
#endif
return 0;
}

View File

@@ -0,0 +1,176 @@
# This file is included from the top-level CMakeLists.txt. We just store it
# here to avoid cluttering up that file.
###############################################################################
# Linux RPM and DEB
###############################################################################
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(RPMARCH ${CMAKE_SYSTEM_PROCESSOR})
if(CPU_TYPE STREQUAL "x86_64")
set(DEBARCH amd64)
elseif(CPU_TYPE STREQUAL "arm64")
set(DEBARCH ${CPU_TYPE})
elseif(CPU_TYPE STREQUAL "arm")
check_c_source_compiles("
#if __ARM_PCS_VFP != 1
#error \"float ABI != hard\"
#endif
int main(void) { return 0; }" HAVE_HARD_FLOAT)
if(HAVE_HARD_FLOAT)
set(RPMARCH armv7hl)
set(DEBARCH armhf)
else()
set(RPMARCH armel)
set(DEBARCH armel)
endif()
elseif(CMAKE_SYSTEM_PROCESSOR_LC STREQUAL "ppc64le")
set(DEBARCH ppc64el)
elseif(CPU_TYPE STREQUAL "powerpc" AND BITS EQUAL 32)
set(RPMARCH ppc)
set(DEBARCH ppc)
else()
set(DEBARCH ${CMAKE_SYSTEM_PROCESSOR})
endif()
message(STATUS "RPM architecture = ${RPMARCH}, DEB architecture = ${DEBARCH}")
# Re-set CMAKE_POSITION_INDEPENDENT_CODE so that the RPM spec file works
# properly
boolean_number(CMAKE_POSITION_INDEPENDENT_CODE)
configure_file(release/makerpm.in pkgscripts/makerpm)
configure_file(release/rpm.spec.in pkgscripts/rpm.spec @ONLY)
add_custom_target(rpm pkgscripts/makerpm
SOURCES pkgscripts/makerpm)
configure_file(release/makesrpm.in pkgscripts/makesrpm)
add_custom_target(srpm pkgscripts/makesrpm
SOURCES pkgscripts/makesrpm
DEPENDS dist)
configure_file(release/makedpkg.in pkgscripts/makedpkg)
configure_file(release/deb-control.in pkgscripts/deb-control)
add_custom_target(deb pkgscripts/makedpkg
SOURCES pkgscripts/makedpkg)
endif() # Linux
###############################################################################
# Windows installer (NullSoft Installer)
###############################################################################
if(WIN32)
if(MSVC_LIKE)
set(INST_PLATFORM "Visual C++")
set(INST_ID vc)
set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-${INST_ID})
set(INST_REG_NAME ${CMAKE_PROJECT_NAME})
elseif(MINGW)
set(INST_PLATFORM GCC)
set(INST_ID gcc)
set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-${INST_ID})
set(INST_REG_NAME ${CMAKE_PROJECT_NAME}-${INST_ID})
set(INST_DEFS -DGCC)
endif()
if(BITS EQUAL 64)
set(INST_PLATFORM "${INST_PLATFORM} 64-bit")
set(INST_NAME ${INST_NAME}64)
set(INST_REG_NAME ${INST_REG_NAME}64)
set(INST_DEFS ${INST_DEFS} -DWIN64)
endif()
if(WITH_JAVA)
set(INST_DEFS ${INST_DEFS} -DJAVA)
endif()
if(GENERATOR_IS_MULTI_CONFIG)
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=${CMAKE_CFG_INTDIR}\\")
else()
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=")
endif()
string(REGEX REPLACE "/" "\\\\" INST_DIR ${CMAKE_INSTALL_PREFIX})
configure_file(release/installer.nsi.in installer.nsi @ONLY)
# TODO: It would be nice to eventually switch to CPack and eliminate this mess,
# but not today.
configure_file(win/projectTargets.cmake.in
win/${CMAKE_PROJECT_NAME}Targets.cmake @ONLY)
configure_file(win/${INST_ID}/projectTargets-release.cmake.in
win/${CMAKE_PROJECT_NAME}Targets-release.cmake @ONLY)
if(WITH_JAVA)
set(JAVA_DEPEND turbojpeg-java)
endif()
if(WITH_TURBOJPEG)
set(TURBOJPEG_DEPEND turbojpeg turbojpeg-static tjbench)
endif()
add_custom_target(installer
makensis -nocd ${INST_DEFS} installer.nsi
DEPENDS jpeg jpeg-static rdjpgcom wrjpgcom cjpeg djpeg jpegtran
${JAVA_DEPEND} ${TURBOJPEG_DEPEND}
SOURCES installer.nsi)
endif() # WIN32
###############################################################################
# Mac DMG
###############################################################################
if(APPLE)
set(SECONDARY_BUILD "" CACHE PATH
"Directory containing cross-compiled x86-64 or Armv8 (64-bit) iOS or macOS build to include in universal binaries")
set(MACOS_APP_CERT_NAME "" CACHE STRING
"Name of the Developer ID Application certificate (in the macOS keychain) that should be used to sign the libjpeg-turbo DMG. Leave this blank to generate an unsigned DMG.")
set(MACOS_INST_CERT_NAME "" CACHE STRING
"Name of the Developer ID Installer certificate (in the macOS keychain) that should be used to sign the libjpeg-turbo installer package. Leave this blank to generate an unsigned package.")
configure_file(release/makemacpkg.in pkgscripts/makemacpkg)
configure_file(release/Distribution.xml.in pkgscripts/Distribution.xml)
configure_file(release/Welcome.rtf.in pkgscripts/Welcome.rtf)
configure_file(release/uninstall.in pkgscripts/uninstall)
add_custom_target(dmg pkgscripts/makemacpkg
SOURCES pkgscripts/makemacpkg)
endif() # APPLE
###############################################################################
# Generic
###############################################################################
add_custom_target(dist
COMMAND git archive --prefix=${CMAKE_PROJECT_NAME}-${VERSION}/ HEAD |
gzip > ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar.gz
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
configure_file(release/maketarball.in pkgscripts/maketarball)
add_custom_target(tarball pkgscripts/maketarball
SOURCES pkgscripts/maketarball)
configure_file(release/libjpeg.pc.in pkgscripts/libjpeg.pc @ONLY)
if(WITH_TURBOJPEG)
configure_file(release/libturbojpeg.pc.in pkgscripts/libturbojpeg.pc @ONLY)
endif()
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
pkgscripts/${CMAKE_PROJECT_NAME}ConfigVersion.cmake
VERSION ${VERSION} COMPATIBILITY AnyNewerVersion)
configure_package_config_file(release/Config.cmake.in
pkgscripts/${CMAKE_PROJECT_NAME}Config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME})

View File

@@ -0,0 +1,424 @@
#.rst:
# GNUInstallDirs
# --------------
#
# Define GNU standard installation directories
#
# Provides install directory variables as defined by the
# `GNU Coding Standards`_.
#
# .. _`GNU Coding Standards`: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# Inclusion of this module defines the following variables:
#
# ``CMAKE_INSTALL_<dir>``
#
# Destination for files of a given type. This value may be passed to
# the ``DESTINATION`` options of :command:`install` commands for the
# corresponding file type.
#
# ``CMAKE_INSTALL_FULL_<dir>``
#
# The absolute path generated from the corresponding ``CMAKE_INSTALL_<dir>``
# value. If the value is not already an absolute path, an absolute path
# is constructed typically by prepending the value of the
# :variable:`CMAKE_INSTALL_PREFIX` variable. However, there are some
# `special cases`_ as documented below.
#
# where ``<dir>`` is one of:
#
# ``BINDIR``
# user executables (``bin``)
# ``SBINDIR``
# system admin executables (``sbin``)
# ``LIBEXECDIR``
# program executables (``libexec``)
# ``SYSCONFDIR``
# read-only single-machine data (``etc``)
# ``SHAREDSTATEDIR``
# modifiable architecture-independent data (``com``)
# ``LOCALSTATEDIR``
# modifiable single-machine data (``var``)
# ``LIBDIR``
# object code libraries (``lib`` or ``lib64``
# or ``lib/<multiarch-tuple>`` on Debian)
# ``INCLUDEDIR``
# C header files (``include``)
# ``OLDINCLUDEDIR``
# C header files for non-gcc (``/usr/include``)
# ``DATAROOTDIR``
# read-only architecture-independent data root (``share``)
# ``DATADIR``
# read-only architecture-independent data (``DATAROOTDIR``)
# ``INFODIR``
# info documentation (``DATAROOTDIR/info``)
# ``LOCALEDIR``
# locale-dependent data (``DATAROOTDIR/locale``)
# ``MANDIR``
# man documentation (``DATAROOTDIR/man``)
# ``DOCDIR``
# documentation root (``DATAROOTDIR/doc/PROJECT_NAME``)
#
# If the includer does not define a value the above-shown default will be
# used and the value will appear in the cache for editing by the user.
#
# Special Cases
# ^^^^^^^^^^^^^
#
# The following values of :variable:`CMAKE_INSTALL_PREFIX` are special:
#
# ``/``
#
# For ``<dir>`` other than the ``SYSCONFDIR`` and ``LOCALSTATEDIR``,
# the value of ``CMAKE_INSTALL_<dir>`` is prefixed with ``usr/`` if
# it is not user-specified as an absolute path. For example, the
# ``INCLUDEDIR`` value ``include`` becomes ``usr/include``.
# This is required by the `GNU Coding Standards`_, which state:
#
# When building the complete GNU system, the prefix will be empty
# and ``/usr`` will be a symbolic link to ``/``.
#
# ``/usr``
#
# For ``<dir>`` equal to ``SYSCONFDIR`` or ``LOCALSTATEDIR``, the
# ``CMAKE_INSTALL_FULL_<dir>`` is computed by prepending just ``/``
# to the value of ``CMAKE_INSTALL_<dir>`` if it is not user-specified
# as an absolute path. For example, the ``SYSCONFDIR`` value ``etc``
# becomes ``/etc``. This is required by the `GNU Coding Standards`_.
#
# ``/opt/...``
#
# For ``<dir>`` equal to ``SYSCONFDIR`` or ``LOCALSTATEDIR``, the
# ``CMAKE_INSTALL_FULL_<dir>`` is computed by *appending* the prefix
# to the value of ``CMAKE_INSTALL_<dir>`` if it is not user-specified
# as an absolute path. For example, the ``SYSCONFDIR`` value ``etc``
# becomes ``/etc/opt/...``. This is defined by the
# `Filesystem Hierarchy Standard`_.
#
# .. _`Filesystem Hierarchy Standard`: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html
#
# Macros
# ^^^^^^
#
# .. command:: GNUInstallDirs_get_absolute_install_dir
#
# ::
#
# GNUInstallDirs_get_absolute_install_dir(absvar var)
#
# Set the given variable ``absvar`` to the absolute path contained
# within the variable ``var``. This is to allow the computation of an
# absolute path, accounting for all the special cases documented
# above. While this macro is used to compute the various
# ``CMAKE_INSTALL_FULL_<dir>`` variables, it is exposed publicly to
# allow users who create additional path variables to also compute
# absolute paths where necessary, using the same logic.
#=============================================================================
# Copyright 2018 Tobias C. Berner
# Copyright 2018 Matthias Räncker
# Copyright 2016, 2019, 2024 D. R. Commander
# Copyright 2016, 2021 Dmitry Marakasov
# Copyright 2016 Roger Leigh
# Copyright 2015 Alex Turbov
# Copyright 2014 Rolf Eike Beer
# Copyright 2014 Daniele E. Domenichelli
# Copyright 2013 Dimitri John Ledkov
# Copyright 2011 Alex Neundorf
# Copyright 2011 Eric NOULARD
# Copyright 2011, 2013-2015 Kitware, Inc.
# Copyright 2011 Nikita Krupen'ko
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
# Installation directories
#
macro(GNUInstallDirs_set_install_dir var docstring)
# If CMAKE_INSTALL_PREFIX changes and CMAKE_INSTALL_*DIR is still set to the
# default value, then modify it accordingly. This presumes that the default
# value may change based on the prefix.
set(_GNUInstallDirs_CMAKE_INSTALL_FORCE_${var} "")
if(NOT DEFINED CMAKE_INSTALL_${var})
set(_GNUInstallDirs_CMAKE_INSTALL_DEFAULT_${var} 1 CACHE INTERNAL
"CMAKE_INSTALL_${var} has default value")
elseif(DEFINED _GNUInstallDirs_CMAKE_INSTALL_LAST_DEFAULT_${var} AND
NOT "${_GNUInstallDirs_CMAKE_INSTALL_LAST_DEFAULT_${var}}" STREQUAL
"${CMAKE_INSTALL_DEFAULT_${var}}" AND
_GNUInstallDirs_CMAKE_INSTALL_DEFAULT_${var} AND
"${_GNUInstallDirs_CMAKE_INSTALL_LAST_${var}}" STREQUAL
"${CMAKE_INSTALL_${var}}")
set(_GNUInstallDirs_CMAKE_INSTALL_FORCE_${var} "FORCE")
endif()
if(DEFINED CMAKE_INSTALL_${var} AND NOT CMAKE_INSTALL_${var} MATCHES "^/")
set_property(CACHE CMAKE_INSTALL_${var} PROPERTY TYPE PATH)
endif()
set(CMAKE_INSTALL_${var} "${CMAKE_INSTALL_DEFAULT_${var}}" CACHE PATH
"${docstring} (Default: ${CMAKE_INSTALL_DEFAULT_${var}})"
${_GNUInstallDirs_CMAKE_INSTALL_FORCE_${var}})
if(NOT CMAKE_INSTALL_${var} STREQUAL CMAKE_INSTALL_DEFAULT_${var})
unset(_GNUInstallDirs_CMAKE_INSTALL_DEFAULT_${var} CACHE)
endif()
# Save for next run
set(_GNUInstallDirs_CMAKE_INSTALL_LAST_${var} "${CMAKE_INSTALL_${var}}"
CACHE INTERNAL "CMAKE_INSTALL_${var} during last run")
set(_GNUInstallDirs_CMAKE_INSTALL_LAST_DEFAULT_${var}
"${CMAKE_INSTALL_DEFAULT_${var}}" CACHE INTERNAL
"CMAKE_INSTALL_DEFAULT_${var} during last run")
endmacro()
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_BINDIR)
set(CMAKE_INSTALL_DEFAULT_BINDIR "bin")
endif()
GNUInstallDirs_set_install_dir(BINDIR
"Directory into which user executables should be installed")
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_SBINDIR)
set(CMAKE_INSTALL_DEFAULT_SBINDIR "sbin")
endif()
GNUInstallDirs_set_install_dir(SBINDIR
"Directory into which system admin executables should be installed")
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_LIBEXECDIR)
set(CMAKE_INSTALL_DEFAULT_LIBEXECDIR "libexec")
endif()
GNUInstallDirs_set_install_dir(LIBEXECDIR
"Directory under which executables run by other programs should be installed")
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_SYSCONFDIR)
set(CMAKE_INSTALL_DEFAULT_SYSCONFDIR "etc")
endif()
GNUInstallDirs_set_install_dir(SYSCONFDIR
"Directory into which machine-specific read-only ASCII data and configuration files should be installed")
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_SHAREDSTATEDIR)
set(CMAKE_INSTALL_DEFAULT_SHAREDSTATEDIR "com")
endif()
GNUInstallDirs_set_install_dir(SHAREDSTATEDIR
"Directory into which architecture-independent run-time-modifiable data files should be installed")
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_LOCALSTATEDIR)
set(CMAKE_INSTALL_DEFAULT_LOCALSTATEDIR "var")
endif()
GNUInstallDirs_set_install_dir(LOCALSTATEDIR
"Directory into which machine-specific run-time-modifiable data files should be installed")
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_LIBDIR)
set(CMAKE_INSTALL_DEFAULT_LIBDIR "lib")
# Override this default 'lib' with 'lib64' iff:
# - we are on Linux system but NOT cross-compiling
# - we are NOT on debian
# - we are on a 64 bits system
# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
# For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if
# CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu"
# and CMAKE_INSTALL_PREFIX is "/usr"
# See http://wiki.debian.org/Multiarch
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$"
AND NOT CMAKE_CROSSCOMPILING)
if (EXISTS "/etc/debian_version") # is this a debian system ?
if(CMAKE_LIBRARY_ARCHITECTURE)
if("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$")
set(CMAKE_INSTALL_DEFAULT_LIBDIR "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
endif()
endif()
else() # not debian, rely on CMAKE_SIZEOF_VOID_P:
if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
message(AUTHOR_WARNING
"Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
"Please enable at least one language before including GNUInstallDirs.")
else()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(CMAKE_INSTALL_DEFAULT_LIBDIR "lib64")
elseif(CMAKE_C_COMPILER_ABI MATCHES "ELF X32")
set(CMAKE_INSTALL_DEFAULT_LIBDIR "libx32")
endif()
endif()
endif()
endif()
endif()
GNUInstallDirs_set_install_dir(LIBDIR
"Directory into which object files and object code libraries should be installed")
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_INCLUDEDIR)
set(CMAKE_INSTALL_DEFAULT_INCLUDEDIR "include")
endif()
GNUInstallDirs_set_install_dir(INCLUDEDIR
"Directory into which C header files should be installed")
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_OLDINCLUDEDIR)
set(CMAKE_INSTALL_DEFAULT_OLDINCLUDEDIR "/usr/include")
endif()
GNUInstallDirs_set_install_dir(OLDINCLUDEDIR
PATH "Directory into which C header files for non-GCC compilers should be installed")
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_DATAROOTDIR)
set(CMAKE_INSTALL_DEFAULT_DATAROOTDIR "share")
endif()
GNUInstallDirs_set_install_dir(DATAROOTDIR
"The root of the directory tree for read-only architecture-independent data files")
#-----------------------------------------------------------------------------
# Values whose defaults are relative to DATAROOTDIR. Store empty values in
# the cache and store the defaults in local variables if the cache values are
# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes.
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_DATADIR)
set(CMAKE_INSTALL_DEFAULT_DATADIR "<CMAKE_INSTALL_DATAROOTDIR>")
endif()
GNUInstallDirs_set_install_dir(DATADIR
"The directory under which read-only architecture-independent data files should be installed")
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_INFODIR)
if(CMAKE_SYSTEM_NAME MATCHES "^(([^kF].*)?BSD|DragonFly)$")
set(CMAKE_INSTALL_DEFAULT_INFODIR "info")
else()
set(CMAKE_INSTALL_DEFAULT_INFODIR "<CMAKE_INSTALL_DATAROOTDIR>/info")
endif()
endif()
GNUInstallDirs_set_install_dir(INFODIR
"The directory into which info documentation files should be installed")
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_MANDIR)
if(CMAKE_SYSTEM_NAME MATCHES "^(([^k].*)?BSD|DragonFly)$" AND NOT CMAKE_SYSTEM_NAME MATCHES "^(FreeBSD)$")
set(CMAKE_INSTALL_DEFAULT_MANDIR "man")
else()
set(CMAKE_INSTALL_DEFAULT_MANDIR "<CMAKE_INSTALL_DATAROOTDIR>/man")
endif()
endif()
GNUInstallDirs_set_install_dir(MANDIR
"The directory under which man pages should be installed")
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_LOCALEDIR)
set(CMAKE_INSTALL_DEFAULT_LOCALEDIR "<CMAKE_INSTALL_DATAROOTDIR>/locale")
endif()
GNUInstallDirs_set_install_dir(LOCALEDIR
"The directory under which locale-specific message catalogs should be installed")
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_DOCDIR)
set(CMAKE_INSTALL_DEFAULT_DOCDIR "<CMAKE_INSTALL_DATAROOTDIR>/doc/${PROJECT_NAME}")
endif()
GNUInstallDirs_set_install_dir(DOCDIR
"The directory into which documentation files (other than info files) should be installed")
#-----------------------------------------------------------------------------
mark_as_advanced(
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_SBINDIR
CMAKE_INSTALL_LIBEXECDIR
CMAKE_INSTALL_SYSCONFDIR
CMAKE_INSTALL_SHAREDSTATEDIR
CMAKE_INSTALL_LOCALSTATEDIR
CMAKE_INSTALL_LIBDIR
CMAKE_INSTALL_INCLUDEDIR
CMAKE_INSTALL_OLDINCLUDEDIR
CMAKE_INSTALL_DATAROOTDIR
CMAKE_INSTALL_DATADIR
CMAKE_INSTALL_INFODIR
CMAKE_INSTALL_LOCALEDIR
CMAKE_INSTALL_MANDIR
CMAKE_INSTALL_DOCDIR
)
macro(GNUInstallDirs_get_absolute_install_dir absvar var)
string(REGEX REPLACE "[<>]" "@" ${var} "${${var}}")
# Handle the specific case of an empty CMAKE_INSTALL_DATAROOTDIR
if(NOT CMAKE_INSTALL_DATAROOTDIR AND
${var} MATCHES "\@CMAKE_INSTALL_DATAROOTDIR\@/")
string(CONFIGURE "${${var}}" ${var} @ONLY)
string(REGEX REPLACE "^/" "" ${var} "${${var}}")
else()
string(CONFIGURE "${${var}}" ${var} @ONLY)
endif()
if(NOT IS_ABSOLUTE "${${var}}")
# Handle special cases:
# - CMAKE_INSTALL_PREFIX == /
# - CMAKE_INSTALL_PREFIX == /usr
# - CMAKE_INSTALL_PREFIX == /opt/...
if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/")
if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR")
set(${absvar} "/${${var}}")
else()
if (NOT "${${var}}" MATCHES "^usr/")
set(${var} "usr/${${var}}")
endif()
set(${absvar} "/${${var}}")
endif()
elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$")
if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR")
set(${absvar} "/${${var}}")
else()
set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/opt/.*")
if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR")
set(${absvar} "/${${var}}${CMAKE_INSTALL_PREFIX}")
else()
set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
else()
set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
else()
set(${absvar} "${${var}}")
endif()
string(REGEX REPLACE "/$" "" ${absvar} "${${absvar}}")
endmacro()
# Result directories
#
foreach(dir
BINDIR
SBINDIR
LIBEXECDIR
SYSCONFDIR
SHAREDSTATEDIR
LOCALSTATEDIR
LIBDIR
INCLUDEDIR
OLDINCLUDEDIR
DATAROOTDIR
DATADIR
INFODIR
LOCALEDIR
MANDIR
DOCDIR
)
GNUInstallDirs_get_absolute_install_dir(CMAKE_INSTALL_FULL_${dir} CMAKE_INSTALL_${dir})
endforeach()

View File

@@ -0,0 +1,13 @@
# This file is included from the top-level CMakeLists.txt. We just store it
# here to avoid cluttering up that file.
set(PKGNAME ${CMAKE_PROJECT_NAME} CACHE STRING
"Distribution package name (default: ${CMAKE_PROJECT_NAME})")
set(PKGVENDOR "The ${CMAKE_PROJECT_NAME} Project" CACHE STRING
"Vendor name to be included in distribution package descriptions (default: The ${CMAKE_PROJECT_NAME} Project)")
set(PKGURL "https://${CMAKE_PROJECT_NAME}.org" CACHE STRING
"URL of project web site to be included in distribution package descriptions (default: https://${CMAKE_PROJECT_NAME}.org)")
set(PKGEMAIL "information@${CMAKE_PROJECT_NAME}.org" CACHE STRING
"E-mail of project maintainer to be included in distribution package descriptions (default: information@${CMAKE_PROJECT_NAME}.org")
set(PKGID "com.${CMAKE_PROJECT_NAME}.${PKGNAME}" CACHE STRING
"Globally unique package identifier (reverse DNS notation) (default: com.${CMAKE_PROJECT_NAME}.${PKGNAME})")

View File

@@ -0,0 +1,24 @@
# This code is from the CMake FAQ
if (NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_BINARY_DIR@/install_manifest.txt\"")
endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
list(REVERSE files)
foreach (file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if (EXISTS "$ENV{DESTDIR}${file}")
execute_process(
COMMAND "@CMAKE_COMMAND@" -E remove "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval
)
if(NOT ${rm_retval} EQUAL 0)
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
endif (NOT ${rm_retval} EQUAL 0)
else (EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
endif (EXISTS "$ENV{DESTDIR}${file}")
endforeach(file)

View File

@@ -0,0 +1,50 @@
file(GLOB FILES
testout*
*_GRAY_*.bmp
*_GRAY_*.png
*_GRAY_*.ppm
*_GRAY_*.jpg
*_GRAY.yuv
*_420_*.bmp
*_420_*.png
*_420_*.ppm
*_420_*.jpg
*_420.yuv
*_422_*.bmp
*_422_*.png
*_422_*.ppm
*_422_*.jpg
*_422.yuv
*_444_*.bmp
*_444_*.png
*_444_*.ppm
*_444_*.jpg
*_444.yuv
*_440_*.bmp
*_440_*.png
*_440_*.ppm
*_440_*.jpg
*_440.yuv
*_411_*.bmp
*_411_*.png
*_411_*.ppm
*_411_*.jpg
*_411.yuv
*_441_*.bmp
*_441_*.png
*_441_*.ppm
*_441_*.jpg
*_441.yuv
*_LOSSL*S_*.bmp
*_LOSSL*S_*.ppm
*_LOSSL*S_*.jpg
croptest.log
tjbenchtest*.log
tjexampletest*.log)
if(NOT FILES STREQUAL "")
message(STATUS "Removing test files")
file(REMOVE ${FILES})
else()
message(STATUS "No files to remove")
endif()

View File

@@ -0,0 +1,77 @@
if(NOT DEFINED PRECISION)
message(FATAL_ERROR "PRECISION must be specified")
endif()
if(NOT DEFINED WITH_JAVA)
message(FATAL_ERROR "WITH_JAVA must be specified")
endif()
macro(check_error program)
if(NOT RESULT EQUAL 0)
message(FATAL_ERROR "${program} failed.")
endif()
endmacro()
macro(run_test PROG ARGS)
string(REPLACE ";" " " SPACED_ARGS "${ARGS}")
message(STATUS "${PROG} ${SPACED_ARGS}")
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${PROG} ${ARGS}
RESULT_VARIABLE RESULT)
check_error("${PROG} ${SPACED_ARGS}")
endmacro()
if(NOT PRECISION EQUAL 16)
run_test(tjbenchtest "-precision;${PRECISION}")
run_test(tjbenchtest "-precision;${PRECISION};-alloc")
endif()
if(PRECISION EQUAL 8)
run_test(tjbenchtest "-precision;${PRECISION};-yuv")
run_test(tjbenchtest "-precision;${PRECISION};-yuv;-alloc")
run_test(tjbenchtest "-precision;${PRECISION};-optimize")
run_test(tjbenchtest "-precision;${PRECISION};-optimize;-yuv")
endif()
if(NOT PRECISION EQUAL 16)
run_test(tjbenchtest "-precision;${PRECISION};-progressive")
endif()
if(PRECISION EQUAL 8)
run_test(tjbenchtest "-precision;${PRECISION};-progressive;-yuv")
endif()
if(NOT PRECISION EQUAL 16)
run_test(tjbenchtest "-precision;${PRECISION};-arithmetic")
run_test(tjbenchtest "-precision;${PRECISION};-progressive;-arithmetic")
endif()
if(PRECISION EQUAL 8)
run_test(tjbenchtest "-precision;${PRECISION};-arithmetic;-yuv")
endif()
run_test(tjbenchtest "-precision;${PRECISION};-lossless")
run_test(tjbenchtest "-precision;${PRECISION};-lossless;-alloc")
if(PRECISION EQUAL 8)
run_test(tjexampletest "")
endif()
if(WITH_JAVA)
if(NOT PRECISION EQUAL 16)
run_test(tjbenchtest "-java;-precision;${PRECISION}")
endif()
if(PRECISION EQUAL 8)
run_test(tjbenchtest "-java;-precision;${PRECISION};-yuv")
run_test(tjbenchtest "-java;-precision;${PRECISION};-optimize")
run_test(tjbenchtest "-java;-precision;${PRECISION};-optimize;-yuv")
endif()
if(NOT PRECISION EQUAL 16)
run_test(tjbenchtest "-java;-precision;${PRECISION};-progressive")
endif()
if(PRECISION EQUAL 8)
run_test(tjbenchtest "-java;-precision;${PRECISION};-progressive;-yuv")
endif()
if(NOT PRECISION EQUAL 16)
run_test(tjbenchtest "-java;-precision;${PRECISION};-arithmetic")
run_test(tjbenchtest "-java;-precision;${PRECISION};-progressive;-arithmetic")
endif()
if(PRECISION EQUAL 8)
run_test(tjbenchtest "-java;-precision;${PRECISION};-arithmetic;-yuv")
endif()
run_test(tjbenchtest "-java;-precision;${PRECISION};-lossless")
if(PRECISION EQUAL 8)
run_test(tjexampletest "-java")
endif()
endif()

61
cmyk.h Normal file
View File

@@ -0,0 +1,61 @@
/*
* cmyk.h
*
* Copyright (C) 2017-2018, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
* This file contains convenience functions for performing quick & dirty
* CMYK<->RGB conversion. This algorithm is suitable for testing purposes
* only. Properly converting between CMYK and RGB requires a color management
* system.
*/
#ifndef CMYK_H
#define CMYK_H
#include <jinclude.h>
#define JPEG_INTERNALS
#include <jpeglib.h>
#include "jsamplecomp.h"
/* Fully reversible */
INLINE
LOCAL(void)
rgb_to_cmyk(_JSAMPLE r, _JSAMPLE g, _JSAMPLE b,
_JSAMPLE *c, _JSAMPLE *m, _JSAMPLE *y, _JSAMPLE *k)
{
double ctmp = 1.0 - ((double)r / (double)_MAXJSAMPLE);
double mtmp = 1.0 - ((double)g / (double)_MAXJSAMPLE);
double ytmp = 1.0 - ((double)b / (double)_MAXJSAMPLE);
double ktmp = MIN(MIN(ctmp, mtmp), ytmp);
if (ktmp == 1.0) ctmp = mtmp = ytmp = 0.0;
else {
ctmp = (ctmp - ktmp) / (1.0 - ktmp);
mtmp = (mtmp - ktmp) / (1.0 - ktmp);
ytmp = (ytmp - ktmp) / (1.0 - ktmp);
}
*c = (_JSAMPLE)((double)_MAXJSAMPLE - ctmp * (double)_MAXJSAMPLE + 0.5);
*m = (_JSAMPLE)((double)_MAXJSAMPLE - mtmp * (double)_MAXJSAMPLE + 0.5);
*y = (_JSAMPLE)((double)_MAXJSAMPLE - ytmp * (double)_MAXJSAMPLE + 0.5);
*k = (_JSAMPLE)((double)_MAXJSAMPLE - ktmp * (double)_MAXJSAMPLE + 0.5);
}
/* Fully reversible only for C/M/Y/K values generated with rgb_to_cmyk() */
INLINE
LOCAL(void)
cmyk_to_rgb(_JSAMPLE c, _JSAMPLE m, _JSAMPLE y, _JSAMPLE k,
_JSAMPLE *r, _JSAMPLE *g, _JSAMPLE *b)
{
*r = (_JSAMPLE)((double)c * (double)k / (double)_MAXJSAMPLE + 0.5);
*g = (_JSAMPLE)((double)m * (double)k / (double)_MAXJSAMPLE + 0.5);
*b = (_JSAMPLE)((double)y * (double)k / (double)_MAXJSAMPLE + 0.5);
}
#endif /* CMYK_H */

View File

@@ -1,8 +1,10 @@
IJG JPEG LIBRARY: CODING RULES
This file was part of the Independent JPEG Group's software:
Copyright (C) 1991-1996, Thomas G. Lane.
This file is part of the Independent JPEG Group's software.
For conditions of distribution and use, see the accompanying README file.
It was modified by The libjpeg-turbo Project to include only information
relevant to libjpeg-turbo.
For conditions of distribution and use, see the accompanying README.ijg file.
Since numerous people will be contributing code and bug fixes, it's important
@@ -21,33 +23,18 @@ Block comments should be laid out thusly:
*/
We indent statements in K&R style, e.g.,
if (test) {
then-part;
} else {
else-part;
}
if (test) {
then-part;
} else {
else-part;
}
with two spaces per indentation level. (This indentation convention is
handled automatically by GNU Emacs and many other text editors.)
Multi-word names should be written in lower case with underscores, e.g.,
multi_word_name (not multiWordName). Preprocessor symbols and enum constants
are similar but upper case (MULTI_WORD_NAME). Names should be unique within
the first fifteen characters. (On some older systems, global names must be
unique within six characters. We accommodate this without cluttering the
source code by using macros to substitute shorter names.)
We use function prototypes everywhere; we rely on automatic source code
transformation to feed prototype-less C compilers. Transformation is done
by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript).
ansi2knr is not very bright, so it imposes a format requirement on function
declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions
should be written in the following style:
LOCAL(int *)
function_name (int a, char *b)
{
code...
}
the first fifteen characters.
Note that each function definition must begin with GLOBAL(type), LOCAL(type),
or METHODDEF(type). These macros expand to "static type" or just "type" as
@@ -55,32 +42,8 @@ appropriate. They provide a readable indication of the routine's usage and
can readily be changed for special needs. (For instance, special linkage
keywords can be inserted for use in Windows DLLs.)
ansi2knr does not transform method declarations (function pointers in
structs). We handle these with a macro JMETHOD, defined as
#ifdef HAVE_PROTOTYPES
#define JMETHOD(type,methodname,arglist) type (*methodname) arglist
#else
#define JMETHOD(type,methodname,arglist) type (*methodname) ()
#endif
which is used like this:
struct function_pointers {
JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp));
JMETHOD(void, term_entropy_encoder, (void));
};
Note the set of parentheses surrounding the parameter list.
A similar solution is used for forward and external function declarations
(see the EXTERN and JPP macros).
If the code is to work on non-ANSI compilers, we cannot rely on a prototype
declaration to coerce actual parameters into the right types. Therefore, use
explicit casts on actual parameters whenever the actual parameter type is not
identical to the formal parameter. Beware of implicit conversions to "int".
It seems there are some non-ANSI compilers in which the sizeof() operator
is defined to return int, yet size_t is defined as long. Needless to say,
this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(),
so that the result is guaranteed to be of type size_t.
A similar solution is used for external function declarations (see the EXTERN
macro.)
The JPEG library is intended to be used within larger programs. Furthermore,
@@ -94,23 +57,20 @@ pass these through the common routines provided.
wherever possible. (Note that our method-based calling conventions help this
a lot: in many modules only the initialization function will ever need to be
called directly, so only that function need be externally visible.) All
global function names should begin with "jpeg_", and should have an
abbreviated name (unique in the first six characters) substituted by macro
when NEED_SHORT_EXTERNAL_NAMES is set.
global function names should begin with "jpeg_".
3. Don't use global variables; anything that must be used in another module
should be in the common data structures.
4. Don't use static variables except for read-only constant tables. Variables
that should be private to a module can be placed into private structures (see
the system architecture document, structure.doc).
the system architecture document, structure.txt).
5. Source file names should begin with "j" for files that are part of the
library proper; source files that are not part of the library, such as cjpeg.c
and djpeg.c, do not begin with "j". Keep source file names to eight
characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep
compression and decompression code in separate source files --- some
applications may want only one half of the library.
and djpeg.c, do not begin with "j". Keep compression and decompression code in
separate source files --- some applications may want only one half of the
library.
Note: these rules (particularly #4) are not followed religiously in the
modules that are used in cjpeg/djpeg but are not part of the JPEG library

883
config.guess vendored
View File

@@ -1,883 +0,0 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# The master version of this file is at the FSF in /home/gd/gnu/lib.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
# don't specify an explicit system type (host/target name).
#
# Only a few systems have been added to this list; please add others
# (but try to keep the structure clean).
#
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
cat <<EOF >dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
EOF
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
;;
15)
UNAME_MACHINE="alphaev5"
;;
14)
UNAME_MACHINE="alphaev56"
;;
10)
UNAME_MACHINE="alphapca56"
;;
16)
UNAME_MACHINE="alphaev6"
;;
esac
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
exit 0 ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-cbm-sysv4
exit 0;;
amiga:NetBSD:*:*)
echo m68k-cbm-netbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc64:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hkmips:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
arm32:NetBSD:*:*)
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
SR2?01:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
else
echo pyramid-pyramid-bsd
fi
exit 0 ;;
NILE:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
exit 0 ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
exit 0 ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
;;
sun4)
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
exit 0 ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
atari*:NetBSD:*:*)
echo m68k-atari-netbsd${UNAME_RELEASE}
exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:NetBSD:*:*)
echo m68k-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit 0 ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
2020:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
sed 's/^ //' << EOF >dummy.c
int main (argc, argv) int argc; char **argv; {
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
${CC-cc} dummy.c -o dummy \
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit 0 ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
exit 0 ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
exit 0 ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
exit 0 ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
echo m88k-dg-dgux${UNAME_RELEASE}
else
echo m88k-dg-dguxbcs${UNAME_RELEASE}
fi
else echo i586-dg-dgux${UNAME_RELEASE}
fi
exit 0 ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit 0 ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
exit 0 ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
exit 0 ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
exit 0 ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit 0 ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i?86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
sed 's/^ //' << EOF >dummy.c
#include <sys/systemcfg.h>
main()
{
if (!__power_pc())
exit(1);
puts("powerpc-ibm-aix3.2.5");
exit(0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
exit 0 ;;
*:AIX:*:4)
if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=4.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit 0 ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit 0 ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit 0 ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit 0 ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
exit 0 ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
exit 0 ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit 0 ;;
9000/[3478]??:HP-UX:*:*)
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
9000/8?? ) HP_ARCH=hppa1.0 ;;
esac
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
sed 's/^ //' << EOF >dummy.c
#include <unistd.h>
int
main ()
{
long cpu = sysconf (_SC_CPU_VERSION);
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
results, however. */
if (CPU_IS_PA_RISC (cpu))
{
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
default: puts ("hppa-hitachi-hiuxwe2"); break;
}
}
else if (CPU_IS_HP_MC68K (cpu))
puts ("m68k-hitachi-hiuxwe2");
else puts ("unknown-hitachi-hiuxwe2");
exit (0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
exit 0 ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit 0 ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit 0 ;;
i?86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
exit 0 ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit 0 ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit 0 ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit 0 ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit 0 ;;
CRAY*X-MP:*:*:*)
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
F300:UNIX_System_V:*:*)
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
F301:UNIX_System_V:*:*)
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
exit 0 ;;
hp3[0-9][05]:NetBSD:*:*)
echo m68k-hp-netbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
i?86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:NetBSD:*:*)
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo i386-pc-cygwin32
exit 0 ;;
i*:MINGW*:*)
echo i386-pc-mingw32
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin32
exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
ld_supported_emulations=`echo $ld_help_string \
| sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
s/.*supported emulations: *//
s/ .*//
p'`
case "$ld_supported_emulations" in
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
sed 's/^ //' <<EOF >dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
EOF
LIBC=""
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
;;
15)
UNAME_MACHINE="alphaev5"
;;
14)
UNAME_MACHINE="alphaev56"
;;
10)
UNAME_MACHINE="alphapca56"
;;
16)
UNAME_MACHINE="alphaev6"
;;
esac
objdump --private-headers dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
cat >dummy.c <<EOF
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __MIPSEB__
printf ("%s-unknown-linux-gnu\n", argv[1]);
#endif
#ifdef __MIPSEL__
printf ("%sel-unknown-linux-gnu\n", argv[1]);
#endif
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
else
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
# If ld does not provide *any* "supported emulations:"
# that means it is gnuoldld.
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
case "${UNAME_MACHINE}" in
i?86)
VENDOR=pc;
;;
*)
VENDOR=unknown;
;;
esac
# Determine whether the default compiler is a.out or elf
cat >dummy.c <<EOF
#include <features.h>
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
#else
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
#endif
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
fi ;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename.
i?86:DYNIX/ptx:4*:*)
echo i386-sequent-sysv4
exit 0 ;;
i?86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
exit 0 ;;
i?86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
pc:*:*:*)
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
exit 0 ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit 0 ;;
paragon:*:*:*)
echo i860-intel-osf1
exit 0 ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
exit 0 ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4.3${OS_REL} && exit 0
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4 && exit 0 ;;
m68*:LynxOS:2.*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
i?86:LynxOS:2.*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
echo ${UNAME_MACHINE}-sni-sysv4
else
echo ns32k-sni-sysv
fi
exit 0 ;;
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit 0 ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
exit 0 ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit 0 ;;
news*:NEWS-OS:*:6*)
echo mips-sony-newsos6
exit 0 ;;
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
cat >dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
#endif
main ()
{
#if defined (sony)
#if defined (MIPSEB)
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
I don't know.... */
printf ("mips-sony-bsd\n"); exit (0);
#else
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
#else
""
#endif
); exit (0);
#endif
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
printf ("arm-acorn-riscix"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
printf ("m68k-hp-bsd\n"); exit (0);
#endif
#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
#if defined (MULTIMAX) || defined (n16)
#if defined (UMAXV)
printf ("ns32k-encore-sysv\n"); exit (0);
#else
#if defined (CMU)
printf ("ns32k-encore-mach\n"); exit (0);
#else
printf ("ns32k-encore-bsd\n"); exit (0);
#endif
#endif
#endif
#if defined (__386BSD__)
printf ("i386-pc-bsd\n"); exit (0);
#endif
#if defined (sequent)
#if defined (i386)
printf ("i386-sequent-dynix\n"); exit (0);
#endif
#if defined (ns32000)
printf ("ns32k-sequent-dynix\n"); exit (0);
#endif
#endif
#if defined (_SEQUENT_)
struct utsname un;
uname(&un);
if (strncmp(un.version, "V2", 2) == 0) {
printf ("i386-sequent-ptx2\n"); exit (0);
}
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
printf ("i386-sequent-ptx1\n"); exit (0);
}
printf ("i386-sequent-ptx\n"); exit (0);
#endif
#if defined (vax)
#if !defined (ultrix)
printf ("vax-dec-bsd\n"); exit (0);
#else
printf ("vax-dec-ultrix\n"); exit (0);
#endif
#endif
#if defined (alliant) && defined (i860)
printf ("i860-alliant-bsd\n"); exit (0);
#endif
exit (1);
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
# Apollos put the system type in the environment.
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
# Convex versions that predate uname can use getsysinfo(1)
if [ -x /usr/convex/getsysinfo ]
then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
exit 0 ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit 0 ;;
c34*)
echo c34-convex-bsd
exit 0 ;;
c38*)
echo c38-convex-bsd
exit 0 ;;
c4*)
echo c4-convex-bsd
exit 0 ;;
esac
fi
#echo '(Unable to guess system type)' 1>&2
exit 1

954
config.sub vendored
View File

@@ -1,954 +0,0 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
if [ x$1 = x ]
then
echo Configuration name missing. 1>&2
echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
echo "or $0 ALIAS" 1>&2
echo where ALIAS is a recognized configuration type. 1>&2
exit 1
fi
# First pass through any local machine types.
case $1 in
*local*)
echo $1
exit 0
;;
*)
;;
esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
linux-gnu*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple)
os=
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco5)
os=sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*)
os=-lynxos
;;
-ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
;;
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;;
-psos*)
os=-psos
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
| arme[lb] | pyramid | mn10200 | mn10300 \
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
| mipstx39 | mipstx39el \
| sparc | sparclet | sparclite | sparc64 | v850)
basic_machine=$basic_machine-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i[3456]86)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
| alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mipstx39-* | mipstx39el-* \
| f301-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
am29k)
basic_machine=a29k-none
os=-bsd
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
;;
amiga | amiga-*)
basic_machine=m68k-cbm
;;
amigaos | amigados)
basic_machine=m68k-cbm
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-cbm
os=-sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=-sysv
;;
aux)
basic_machine=m68k-apple
os=-aux
;;
balance)
basic_machine=ns32k-sequent
os=-dynix
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
;;
convex-c2)
basic_machine=c2-convex
os=-bsd
;;
convex-c32)
basic_machine=c32-convex
os=-bsd
;;
convex-c34)
basic_machine=c34-convex
os=-bsd
;;
convex-c38)
basic_machine=c38-convex
os=-bsd
;;
cray | ymp)
basic_machine=ymp-cray
os=-unicos
;;
cray2)
basic_machine=cray2-cray
os=-unicos
;;
[ctj]90-cray)
basic_machine=c90-cray
os=-unicos
;;
crds | unos)
basic_machine=m68k-crds
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
delta88)
basic_machine=m88k-motorola
os=-sysv3
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
;;
dpx2* | dpx2*-bull)
basic_machine=m68k-bull
os=-sysv3
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
;;
elxsi)
basic_machine=elxsi-elxsi
os=-bsd
;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
fx2800)
basic_machine=i860-alliant
;;
genix)
basic_machine=ns32k-ns
;;
gmicro)
basic_machine=tron-gmicro
os=-sysv
;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
h8300hms)
basic_machine=h8300-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
;;
hp300-*)
basic_machine=m68k-hp
;;
hp300bsd)
basic_machine=m68k-hp
os=-bsd
;;
hp300hpux)
basic_machine=m68k-hp
os=-hpux
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hppa-next)
os=-nextstep3
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i[3456]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i[3456]86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i[3456]86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i[3456]86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
-irix*)
;;
*)
os=-irix4
;;
esac
;;
isi68 | isi)
basic_machine=m68k-isi
os=-sysv
;;
m88k-omron*)
basic_machine=m88k-omron
;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
;;
merlin)
basic_machine=ns32k-utek
os=-sysv
;;
miniframe)
basic_machine=m68000-convergent
;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
;;
mips*-linux*)
basic_machine=mips-unknown
os=-linux-gnu
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
;;
news1000)
basic_machine=m68030-sony
os=-newsos
;;
news-3600 | risc-news)
basic_machine=mips-sony
os=-newsos
;;
next | m*-next )
basic_machine=m68k-next
case $os in
-nextstep* )
;;
-ns2*)
os=-nextstep2
;;
*)
os=-nextstep3
;;
esac
;;
nh3000)
basic_machine=m68k-harris
os=-cxux
;;
nh[45]000)
basic_machine=m88k-harris
os=-cxux
;;
nindy960)
basic_machine=i960-intel
os=-nindy
;;
np1)
basic_machine=np1-gould
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
paragon)
basic_machine=i860-intel
os=-osf
;;
pbd)
basic_machine=sparc-tti
;;
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5)
basic_machine=i586-intel
;;
pentiumpro | p6)
basic_machine=i686-intel
;;
pentium-* | p5-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
k5)
# We don't have specific support for AMD's K5 yet, so just call it a Pentium
basic_machine=i586-amd
;;
nexen)
# We don't have specific support for Nexgen yet, so just call it a Pentium
basic_machine=i586-nexgen
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=rs6000-ibm
;;
ppc) basic_machine=powerpc-unknown
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
sequent)
basic_machine=i386-sequent
;;
sh)
basic_machine=sh-hitachi
os=-hms
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
;;
spur)
basic_machine=spur-unknown
;;
sun2)
basic_machine=m68000-sun
;;
sun2os3)
basic_machine=m68000-sun
os=-sunos3
;;
sun2os4)
basic_machine=m68000-sun
os=-sunos4
;;
sun3os3)
basic_machine=m68k-sun
os=-sunos3
;;
sun3os4)
basic_machine=m68k-sun
os=-sunos4
;;
sun4os3)
basic_machine=sparc-sun
os=-sunos3
;;
sun4os4)
basic_machine=sparc-sun
os=-sunos4
;;
sun4sol2)
basic_machine=sparc-sun
os=-solaris2
;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
sun4)
basic_machine=sparc-sun
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
udi29k)
basic_machine=a29k-amd
os=-udi
;;
ultra3)
basic_machine=a29k-nyu
os=-sym1
;;
vaxv)
basic_machine=vax-dec
os=-sysv
;;
vms)
basic_machine=vax-dec
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
;;
vxworks68)
basic_machine=m68k-wrs
os=-vxworks
;;
vxworks29k)
basic_machine=a29k-wrs
os=-vxworks
;;
xmp)
basic_machine=xmp-cray
os=-unicos
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
none)
basic_machine=none-none
os=-none
;;
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
else
basic_machine=mips-mips
fi
;;
romp)
basic_machine=romp-ibm
;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
sparc)
basic_machine=sparc-sun
;;
cydra)
basic_machine=cydra-cydrome
;;
orion)
basic_machine=orion-highlevel
;;
orion105)
basic_machine=clipper-highlevel
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
;;
*-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-solaris)
os=-solaris2
;;
-svr4*)
os=-sysv4
;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
-osfrose*)
os=-osfrose
;;
-osf*)
os=-osf
;;
-utek*)
os=-bsd
;;
-dynix*)
os=-bsd
;;
-acis*)
os=-aos
;;
-ctix* | -uts*)
os=-sysv
;;
-ns2 )
os=-nextstep2
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
-sinix*)
os=-sysv4
;;
-triton*)
os=-sysv3
;;
-oss*)
os=-sysv3
;;
-svr4)
os=-sysv4
;;
-svr3)
os=-sysv3
;;
-sysvr4)
os=-sysv4
;;
# This must come after -sysvr4.
-sysv*)
;;
-xenix)
os=-xenix
;;
-none)
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
exit 1
;;
esac
else
# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.
# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system. Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
case $basic_machine in
*-acorn)
os=-riscix1.2
;;
arm*-semi)
os=-aout
;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
os=-ultrix4.2
;;
m68*-apollo)
os=-domain
;;
i386-sun)
os=-sunos4.0.2
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
*-ibm)
os=-aix
;;
*-hp)
os=-hpux
;;
*-hitachi)
os=-hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=-sysv
;;
*-cbm)
os=-amigaos
;;
*-dg)
os=-dgux
;;
*-dolphin)
os=-sysv3
;;
m68k-ccur)
os=-rtu
;;
m88k-omron*)
os=-luna
;;
*-next )
os=-nextstep
;;
*-sequent)
os=-ptx
;;
*-crds)
os=-unos
;;
*-ns)
os=-genix
;;
i370-*)
os=-mvs
;;
*-next)
os=-nextstep3
;;
*-gould)
os=-sysv
;;
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
os=-irix
;;
*-siemens)
os=-sysv4
;;
*-masscomp)
os=-rtu
;;
f301-fujitsu)
os=-uxpv
;;
*)
os=-none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
*-unknown)
case $os in
-riscix*)
vendor=acorn
;;
-sunos*)
vendor=sun
;;
-aix*)
vendor=ibm
;;
-hpux*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
-unos*)
vendor=crds
;;
-dgux*)
vendor=dg
;;
-luna*)
vendor=omron
;;
-genix*)
vendor=ns
;;
-mvs*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-vxsim* | -vxworks*)
vendor=wrs
;;
-aux*)
vendor=apple
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
echo $basic_machine$os

2011
configure vendored

File diff suppressed because it is too large Load Diff

95
croptest.in Executable file
View File

@@ -0,0 +1,95 @@
#!/bin/bash
set -u
set -e
trap onexit INT
trap onexit TERM
trap onexit EXIT
onexit()
{
if [ -d $OUTDIR ]; then
rm -rf $OUTDIR
fi
}
runme()
{
echo \*\*\* $*
$*
}
IMAGE=vgl_6548_0026a.bmp
WIDTH=128
HEIGHT=95
IMGDIR=@CMAKE_CURRENT_SOURCE_DIR@/testimages
OUTDIR=`mktemp -d /tmp/__croptest_output.XXXXXX`
EXEDIR=@CMAKE_CURRENT_BINARY_DIR@
if [ -d $OUTDIR ]; then
rm -rf $OUTDIR
fi
mkdir -p $OUTDIR
exec >$EXEDIR/croptest.log
echo "============================================================"
echo "$IMAGE ($WIDTH x $HEIGHT)"
echo "============================================================"
echo
for PROGARG in "" -progressive; do
cp $IMGDIR/$IMAGE $OUTDIR
basename=`basename $IMAGE .bmp`
echo "------------------------------------------------------------"
echo "Generating test images"
echo "------------------------------------------------------------"
echo
runme $EXEDIR/cjpeg $PROGARG -grayscale -outfile $OUTDIR/${basename}_GRAY.jpg $IMGDIR/${basename}.bmp
runme $EXEDIR/cjpeg $PROGARG -sample 2x2 -outfile $OUTDIR/${basename}_420.jpg $IMGDIR/${basename}.bmp
runme $EXEDIR/cjpeg $PROGARG -sample 2x1 -outfile $OUTDIR/${basename}_422.jpg $IMGDIR/${basename}.bmp
runme $EXEDIR/cjpeg $PROGARG -sample 1x2 -outfile $OUTDIR/${basename}_440.jpg $IMGDIR/${basename}.bmp
runme $EXEDIR/cjpeg $PROGARG -sample 1x1 -outfile $OUTDIR/${basename}_444.jpg $IMGDIR/${basename}.bmp
echo
for NSARG in "" -nosmooth; do
for COLORSARG in "" "-colors 256 -dither none -onepass"; do
for Y in {0..16}; do
for H in {1..16}; do
X=$(( (Y*16)%128 ))
W=$(( WIDTH-X-7 ))
if [ $Y -le 15 ]; then
CROPSPEC="${W}x${H}+${X}+${Y}"
else
Y2=$(( HEIGHT-H ));
CROPSPEC="${W}x${H}+${X}+${Y2}"
fi
echo "------------------------------------------------------------"
echo $PROGARG $NSARG $COLORSARG -crop $CROPSPEC
echo "------------------------------------------------------------"
echo
for samp in GRAY 420 422 440 444; do
$EXEDIR/djpeg $NSARG $COLORSARG -rgb -outfile $OUTDIR/${basename}_${samp}_full.ppm $OUTDIR/${basename}_${samp}.jpg
convert -crop $CROPSPEC $OUTDIR/${basename}_${samp}_full.ppm $OUTDIR/${basename}_${samp}_ref.ppm
runme $EXEDIR/djpeg $NSARG $COLORSARG -crop $CROPSPEC -rgb -outfile $OUTDIR/${basename}_${samp}.ppm $OUTDIR/${basename}_${samp}.jpg
runme cmp $OUTDIR/${basename}_${samp}.ppm $OUTDIR/${basename}_${samp}_ref.ppm
done
echo
done
done
done
done
done
echo SUCCESS!

250
djpeg.1
View File

@@ -1,4 +1,4 @@
.TH DJPEG 1 "22 August 1997"
.TH DJPEG 1 "17 June 2024"
.SH NAME
djpeg \- decompress a JPEG file to an image file
.SH SYNOPSIS
@@ -15,8 +15,7 @@ djpeg \- decompress a JPEG file to an image file
.B djpeg
decompresses the named JPEG file, or the standard input if no file is named,
and produces an image file on the standard output. PBMPLUS (PPM/PGM), BMP,
GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected.
(RLE is supported only if the URT library is available.)
GIF, or Targa output format can be selected.
.SH OPTIONS
All switch names may be abbreviated; for example,
.B \-grayscale
@@ -29,43 +28,46 @@ Upper and lower case are equivalent (thus
.B \-BMP
is the same as
.BR \-bmp ).
British spellings are also accepted (e.g.,
British spellings are also accepted (e.g.
.BR \-greyscale ),
though for brevity these are not mentioned below.
.PP
The basic switches are:
.TP
.BI \-colors " N"
Reduce image to at most N colors. This reduces the number of colors used in
the output image, so that it can be displayed on a colormapped display or
stored in a colormapped file format. For example, if you have an 8-bit
display, you'd need to reduce to 256 or fewer colors.
Reduce image to at most N colors [legacy feature]. This reduces the number of
colors used in the output image so that it can be stored in a colormapped file
format. This feature cannot be used when decompressing lossless JPEG images.
.TP
.BI \-quantize " N"
Same as
.BR \-colors .
.B \-colors
is the recommended name,
is the recommended name.
.B \-quantize
is provided only for backwards compatibility.
is provided only for backward compatibility.
.TP
.B \-fast
Select recommended processing options for fast, low quality output. (The
default options are chosen for highest quality output.) Currently, this is
equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR.
Select recommended processing options for low-quality output [legacy feature].
(The default options are chosen for highest-quality output.) Currently, this
is equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR. On
modern CPUs, these settings have little or no performance benefit and are
retained solely for backward compatibility.
.TP
.B \-grayscale
Force gray-scale output even if JPEG file is color. Useful for viewing on
monochrome displays; also,
.B djpeg
runs noticeably faster in this mode.
Force grayscale output even if JPEG file is full-color. This feature cannot be
used when decompressing full-color lossless JPEG images.
.TP
.B \-rgb
Force RGB output even if JPEG file is grayscale. This feature cannot be used
when decompressing grayscale lossless JPEG images.
.TP
.BI \-scale " M/N"
Scale the output image by a factor M/N. Currently the scale factor must be
1/1, 1/2, 1/4, or 1/8. Scaling is handy if the image is larger than your
screen; also,
.B djpeg
runs much faster when scaling down the output.
M/8, where M is an integer between 1 and 16 inclusive, or any reduced fraction
thereof (such as 1/2, 3/4, etc.) Scaling is handy if the image is larger than
your screen. This feature cannot be used when decompressing lossless JPEG
images.
.TP
.B \-bmp
Select BMP output format (Windows flavor). 8-bit colormapped format is
@@ -73,76 +75,114 @@ emitted if
.B \-colors
or
.B \-grayscale
is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
format is emitted.
is specified, or if the JPEG file is grayscale; otherwise, 24-bit full-color
format is emitted. This format can only be used when decompressing
8-bit-per-sample JPEG images.
.TP
.B \-gif
Select GIF output format. Since GIF does not support more than 256 colors,
Select GIF output format (LZW-compressed) [legacy feature]. Since GIF does not
support more than 256 colors,
.B \-colors 256
is assumed (unless you specify a smaller number of colors).
is assumed (unless you specify a smaller number of colors). If you specify
.BR \-fast,
the default number of colors is 216. This format can only be used when
decompressing 8-bit-per-sample or 12-bit-per-sample lossy JPEG images.
.TP
.B \-gif0
Select GIF output format (uncompressed) [legacy feature]. Since GIF does not
support more than 256 colors,
.B \-colors 256
is assumed (unless you specify a smaller number of colors). If you specify
.BR \-fast,
the default number of colors is 216. This format can only be used when
decompressing 8-bit-per-sample or 12-bit-per-sample lossy JPEG images.
.TP
.B \-os2
Select BMP output format (OS/2 1.x flavor). 8-bit colormapped format is
emitted if
Select BMP output format (OS/2 1.x flavor) [legacy feature]. 8-bit colormapped
format is emitted if
.B \-colors
or
.B \-grayscale
is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
format is emitted.
is specified, or if the JPEG file is grayscale; otherwise, 24-bit full-color
format is emitted. This format can only be used when decompressing
8-bit-per-sample JPEG images.
.TP
.B \-pnm
Select PBMPLUS (PPM/PGM) output format (this is the default format).
PGM is emitted if the JPEG file is gray-scale or if
PGM is emitted if the JPEG file is grayscale or if
.B \-grayscale
is specified; otherwise PPM is emitted.
.TP
.B \-rle
Select RLE output format. (Requires URT library.)
.TP
.B \-targa
Select Targa output format. Gray-scale format is emitted if the JPEG file is
gray-scale or if
Select Targa output format [legacy feature]. Grayscale format is emitted if
the JPEG file is grayscale or if
.B \-grayscale
is specified; otherwise, colormapped format is emitted if
.B \-colors
is specified; otherwise, 24-bit full-color format is emitted.
is specified; otherwise, 24-bit full-color format is emitted. This format can
only be used when decompressing 8-bit-per-sample JPEG images.
.PP
Switches for advanced users:
.TP
.B \-dct int
Use integer DCT method (default).
Use accurate integer DCT method (default).
.TP
.B \-dct fast
Use fast integer DCT (less accurate).
Use less accurate integer DCT method [legacy feature].
When the Independent JPEG Group's software was first released in 1991, the
decompression time for a 1-megapixel JPEG image on a mainstream PC was measured
in minutes. Thus, the \fBfast\fR integer DCT algorithm provided noticeable
performance benefits. On modern CPUs running libjpeg-turbo, however, the
decompression time for a 1-megapixel JPEG image is measured in milliseconds,
and thus the performance benefits of the \fBfast\fR algorithm are much less
noticeable. On modern x86/x86-64 CPUs that support AVX2 instructions, the
\fBfast\fR and \fBint\fR methods have similar performance. On other types of
CPUs, the \fBfast\fR method is generally about 5-15% faster than the \fBint\fR
method.
If the JPEG image was compressed using a quality level of 85 or below, then
there should be little or no perceptible quality difference between the two
algorithms. When decompressing images that were compressed using quality
levels above 85, however, the difference between the \fBfast\fR and \fBint\fR
methods becomes more pronounced. With images compressed using quality=97, for
instance, the \fBfast\fR method incurs generally about a 4-6 dB loss in PSNR
relative to the \fBint\fR method, but this can be larger for some images. If
you can avoid it, do not use the \fBfast\fR method when decompressing images
that were compressed using quality levels above 97. The algorithm often
degenerates for such images and can actually produce a more lossy output image
than if the JPEG image had been compressed using lower quality levels.
.TP
.B \-dct float
Use floating-point DCT method.
The float method is very slightly more accurate than the int method, but is
much slower unless your machine has very fast floating-point hardware. Also
note that results of the floating-point method may vary slightly across
machines, while the integer methods should give the same results everywhere.
The fast integer method is much less accurate than the other two.
Use floating-point DCT method [legacy feature].
The \fBfloat\fR method does not produce significantly more accurate results
than the \fBint\fR method, and it is much slower. The \fBfloat\fR method may
also give different results on different machines due to varying roundoff
behavior, whereas the integer methods should give the same results on all
machines.
.TP
.B \-dither fs
Use Floyd-Steinberg dithering in color quantization.
Use Floyd-Steinberg dithering when quantizing colors [legacy feature].
.TP
.B \-dither ordered
Use ordered dithering in color quantization.
Use ordered dithering when quantizing colors [legacy feature].
.TP
.B \-dither none
Do not use dithering in color quantization.
By default, Floyd-Steinberg dithering is applied when quantizing colors; this
is slow but usually produces the best results. Ordered dither is a compromise
between speed and quality; no dithering is fast but usually looks awful. Note
that these switches have no effect unless color quantization is being done.
Ordered dither is only available in
Do not use dithering when quantizing colors [legacy feature]. By default,
Floyd-Steinberg dithering is applied when quantizing colors. This is slower
but usually produces the best results. Ordered dithering is a compromise
between speed and quality. No dithering is faster but usually looks awful.
Note that these switches have no effect unless color quantization is being
done. Ordered dithering is only available in
.B \-onepass
mode.
.TP
.BI \-icc " file"
Extract ICC color management profile to the specified file.
.TP
.BI \-map " file"
Quantize to the colors used in the specified image file. This is useful for
producing multiple files with identical color maps, or for forcing a
predefined set of colors to be used. The
Quantize to the colors used in the specified image file [legacy feature]. This
is useful for producing multiple files with identical color maps, or for
forcing a predefined set of colors to be used. The
.I file
must be a GIF or PPM file. This option overrides
.B \-colors
@@ -153,25 +193,64 @@ and
Use a faster, lower-quality upsampling routine.
.TP
.B \-onepass
Use one-pass instead of two-pass color quantization. The one-pass method is
faster and needs less memory, but it produces a lower-quality image.
Use one-pass instead of two-pass color quantization [legacy feature]. The
one-pass method needs less memory, but it produces a lower-quality image.
.B \-onepass
is ignored unless you also say
is ignored unless you also specify
.B \-colors
.IR N .
Also, the one-pass method is always used for gray-scale output (the two-pass
method is no improvement then).
Also, the one-pass method is always used for grayscale output. (The two-pass
method has no improvement in that case.)
.TP
.BI \-maxmemory " N"
Set limit for amount of memory to use in processing large images. Value is
in thousands of bytes, or millions of bytes if "M" is attached to the
number. For example,
.B \-max 4m
selects 4000000 bytes. If more space is needed, temporary files will be used.
selects 4000000 bytes. If more space is needed, an error will occur.
.TP
.BI \-maxscans " N"
Abort if the JPEG image contains more than
.I N
scans. This feature demonstrates a method by which applications can guard
against denial-of-service attacks instigated by specially-crafted malformed
JPEG images containing numerous scans with missing image data or image data
consisting only of "EOB runs" (a feature of progressive JPEG images that allows
potentially hundreds of thousands of adjoining zero-value pixels to be
represented using only a few bytes.) Attempting to decompress such malformed
JPEG images can cause excessive CPU activity, since the decompressor must fully
process each scan (even if the scan is corrupt) before it can proceed to the
next scan.
.TP
.BI \-outfile " name"
Send output image to the named file, not to standard output.
.TP
.BI \-memsrc
Load input file into memory before decompressing. This feature was implemented
mainly as a way of testing the in-memory source manager (jpeg_mem_src().)
.TP
.BI \-report
Report decompression progress.
.TP
.BI \-skip " Y0,Y1"
Decompress all rows of the JPEG image except those between Y0 and Y1
(inclusive.) Note that if decompression scaling is being used, then Y0 and Y1
are relative to the scaled image dimensions.
.TP
.BI \-crop " WxH+X+Y"
Decompress only a rectangular subregion of the image, starting at point X,Y
with width W and height H. If necessary, X will be shifted left to the nearest
iMCU boundary, and the width will be increased accordingly. Note that if
decompression scaling is being used, then X, Y, W, and H are relative to the
scaled image dimensions. Currently this option only works with the
PBMPLUS (PPM/PGM), GIF, and Targa output formats.
.TP
.BI \-strict
Treat all warnings as fatal. This feature also demonstrates a method by which
applications can guard against attacks instigated by specially-crafted
malformed JPEG images. Enabling this option will cause the decompressor to
abort if the JPEG image contains incomplete or corrupt image data.
.TP
.B \-verbose
Enable debug printout. More
.BR \-v 's
@@ -180,44 +259,18 @@ give more output. Also, version information is printed at startup.
.B \-debug
Same as
.BR \-verbose .
.TP
.B \-version
Print version information and exit.
.SH EXAMPLES
.LP
This example decompresses the JPEG file foo.jpg, quantizes it to
256 colors, and saves the output in 8-bit BMP format in foo.bmp:
This example decompresses the JPEG file foo.jpg and saves the output in 8-bit
BMP format in foo.bmp:
.IP
.B djpeg \-colors 256 \-bmp
.B djpeg \-bmp
.I foo.jpg
.B >
.I foo.bmp
.SH HINTS
To get a quick preview of an image, use the
.B \-grayscale
and/or
.B \-scale
switches.
.B \-grayscale \-scale 1/8
is the fastest case.
.PP
Several options are available that trade off image quality to gain speed.
.B \-fast
turns on the recommended settings.
.PP
.B \-dct fast
and/or
.B \-nosmooth
gain speed at a small sacrifice in quality.
When producing a color-quantized image,
.B \-onepass \-dither ordered
is fast but much lower quality than the default behavior.
.B \-dither none
may give acceptable results in two-pass mode, but is seldom tolerable in
one-pass mode.
.PP
If you are fortunate enough to have very fast floating point hardware,
\fB\-dct float\fR may be even faster than \fB\-dct fast\fR. But on most
machines \fB\-dct float\fR is slower than \fB\-dct int\fR; in this case it is
not worth using, because its theoretical accuracy advantage is too small to be
significant in practice.
.SH ENVIRONMENT
.TP
.B JPEGMEM
@@ -242,12 +295,7 @@ Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
.SH AUTHOR
Independent JPEG Group
.SH BUGS
Arithmetic coding is not supported for legal reasons.
.PP
To avoid the Unisys LZW patent,
.B djpeg
produces uncompressed GIF files. These are larger than they should be, but
are readable by standard GIF decoders.
.PP
Still not as fast as we'd like.
This file was modified by The libjpeg-turbo Project to include only information
relevant to libjpeg-turbo, to wordsmith certain sections, and to describe
features not present in libjpeg.

703
djpeg.c

File diff suppressed because it is too large Load Diff

89
doc/html/annotated.html Normal file
View File

@@ -0,0 +1,89 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TurboJPEG: Data Structures</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">TurboJPEG<span id="projectnumber">&#160;3.0.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">Data Structures</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
<table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structtjregion.html" target="_self">tjregion</a></td><td class="desc">Cropping region </td></tr>
<tr id="row_1_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structtjscalingfactor.html" target="_self">tjscalingfactor</a></td><td class="desc">Scaling factor </td></tr>
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structtjtransform.html" target="_self">tjtransform</a></td><td class="desc">Lossless transform </td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>

BIN
doc/html/bc_s.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

BIN
doc/html/bc_sd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

88
doc/html/classes.html Normal file
View File

@@ -0,0 +1,88 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TurboJPEG: Data Structure Index</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">TurboJPEG<span id="projectnumber">&#160;3.0.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">Data Structure Index</div></div>
</div><!--header-->
<div class="contents">
<div class="qindex"><a class="qindex" href="#letter_T">T</a></div>
<div class="classindex">
<dl class="classindex even">
<dt class="alphachar"><a id="letter_T" name="letter_T">T</a></dt>
<dd><a class="el" href="structtjregion.html">tjregion</a></dd><dd><a class="el" href="structtjscalingfactor.html">tjscalingfactor</a></dd><dd><a class="el" href="structtjtransform.html">tjtransform</a></dd></dl>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>

BIN
doc/html/closed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

12
doc/html/doc.svg Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="16" height="24" viewBox="0 0 80 60" id="doc" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<g style="fill:#4665A2">
<path d="m 14,-1.1445312 c -2.824372,0 -5.1445313,2.320159 -5.1445312,5.1445312 v 72 c 0,2.824372 2.3201592,5.144531 5.1445312,5.144531 h 52 c 2.824372,0 5.144531,-2.320159 5.144531,-5.144531 V 23.699219 a 1.1447968,1.1447968 0 0 0 -0.01563,-0.1875 C 70.977847,22.605363 70.406495,21.99048 70.007812,21.591797 L 48.208984,-0.20898438 C 47.606104,-0.81186474 46.804652,-1.1445313 46,-1.1445312 Z m 1.144531,6.2890624 H 42.855469 V 24 c 0,1.724372 1.420159,3.144531 3.144531,3.144531 H 64.855469 V 74.855469 H 15.144531 Z m 34,4.4179688 L 60.4375,20.855469 H 49.144531 Z"/>
</g>
<g style="fill:#D8DFEE;stroke-width:0">
<path d="M 3.0307167,13.993174 V 7.0307167 h 2.7576792 2.7576792 v 1.8826151 c 0,1.2578262 0.0099,1.9287572 0.029818,2.0216512 0.03884,0.181105 0.168631,0.348218 0.33827,0.43554 l 0.1355017,0.06975 1.9598092,0.0079 1.959809,0.0078 v 4.749829 4.749829 H 8 3.0307167 Z" transform="matrix(5,0,0,5,0,-30)" />
<path d="M 9.8293515,9.0581469 V 7.9456453 l 1.1058025,1.1055492 c 0.608191,0.6080521 1.105802,1.1086775 1.105802,1.1125015 0,0.0038 -0.497611,0.007 -1.105802,0.007 H 9.8293515 Z" transform="matrix(5,0,0,5,0,-30)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

12
doc/html/docd.svg Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="16" height="24" viewBox="0 0 80 60" id="doc" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<g style="fill:#C4CFE5">
<path d="m 14,-1.1445312 c -2.824372,0 -5.1445313,2.320159 -5.1445312,5.1445312 v 72 c 0,2.824372 2.3201592,5.144531 5.1445312,5.144531 h 52 c 2.824372,0 5.144531,-2.320159 5.144531,-5.144531 V 23.699219 a 1.1447968,1.1447968 0 0 0 -0.01563,-0.1875 C 70.977847,22.605363 70.406495,21.99048 70.007812,21.591797 L 48.208984,-0.20898438 C 47.606104,-0.81186474 46.804652,-1.1445313 46,-1.1445312 Z m 1.144531,6.2890624 H 42.855469 V 24 c 0,1.724372 1.420159,3.144531 3.144531,3.144531 H 64.855469 V 74.855469 H 15.144531 Z m 34,4.4179688 L 60.4375,20.855469 H 49.144531 Z"/>
</g>
<g style="fill:#4665A2;stroke-width:0">
<path d="M 3.0307167,13.993174 V 7.0307167 h 2.7576792 2.7576792 v 1.8826151 c 0,1.2578262 0.0099,1.9287572 0.029818,2.0216512 0.03884,0.181105 0.168631,0.348218 0.33827,0.43554 l 0.1355017,0.06975 1.9598092,0.0079 1.959809,0.0078 v 4.749829 4.749829 H 8 3.0307167 Z" transform="matrix(5,0,0,5,0,-30)" />
<path d="M 9.8293515,9.0581469 V 7.9456453 l 1.1058025,1.1055492 c 0.608191,0.6080521 1.105802,1.1086775 1.105802,1.1125015 0,0.0038 -0.497611,0.007 -1.105802,0.007 H 9.8293515 Z" transform="matrix(5,0,0,5,0,-30)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,7 @@
code {
color: #4665A2;
}
th.markdownTableHeadNone {
color: black;
}

2027
doc/html/doxygen.css Normal file

File diff suppressed because it is too large Load Diff

28
doc/html/doxygen.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 15 KiB

192
doc/html/dynsections.js Normal file
View File

@@ -0,0 +1,192 @@
/*
@licstart The following is the entire license notice for the JavaScript code in this file.
The MIT License (MIT)
Copyright (C) 1997-2020 by Dimitri van Heesch
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@licend The above is the entire license notice for the JavaScript code in this file
*/
function toggleVisibility(linkObj)
{
var base = $(linkObj).attr('id');
var summary = $('#'+base+'-summary');
var content = $('#'+base+'-content');
var trigger = $('#'+base+'-trigger');
var src=$(trigger).attr('src');
if (content.is(':visible')===true) {
content.hide();
summary.show();
$(linkObj).addClass('closed').removeClass('opened');
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
} else {
content.show();
summary.hide();
$(linkObj).removeClass('closed').addClass('opened');
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
}
return false;
}
function updateStripes()
{
$('table.directory tr').
removeClass('even').filter(':visible:even').addClass('even');
$('table.directory tr').
removeClass('odd').filter(':visible:odd').addClass('odd');
}
function toggleLevel(level)
{
$('table.directory tr').each(function() {
var l = this.id.split('_').length-1;
var i = $('#img'+this.id.substring(3));
var a = $('#arr'+this.id.substring(3));
if (l<level+1) {
i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
a.html('&#9660;');
$(this).show();
} else if (l==level+1) {
i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
a.html('&#9658;');
$(this).show();
} else {
$(this).hide();
}
});
updateStripes();
}
function toggleFolder(id)
{
// the clicked row
var currentRow = $('#row_'+id);
// all rows after the clicked row
var rows = currentRow.nextAll("tr");
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
// only match elements AFTER this one (can't hide elements before)
var childRows = rows.filter(function() { return this.id.match(re); });
// first row is visible we are HIDING
if (childRows.filter(':first').is(':visible')===true) {
// replace down arrow by right arrow for current row
var currentRowSpans = currentRow.find("span");
currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
currentRowSpans.filter(".arrow").html('&#9658;');
rows.filter("[id^=row_"+id+"]").hide(); // hide all children
} else { // we are SHOWING
// replace right arrow by down arrow for current row
var currentRowSpans = currentRow.find("span");
currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
currentRowSpans.filter(".arrow").html('&#9660;');
// replace down arrows by right arrows for child rows
var childRowsSpans = childRows.find("span");
childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
childRowsSpans.filter(".arrow").html('&#9658;');
childRows.show(); //show all children
}
updateStripes();
}
function toggleInherit(id)
{
var rows = $('tr.inherit.'+id);
var img = $('tr.inherit_header.'+id+' img');
var src = $(img).attr('src');
if (rows.filter(':first').is(':visible')===true) {
rows.css('display','none');
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
} else {
rows.css('display','table-row'); // using show() causes jump in firefox
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
}
}
var opened=true;
// in case HTML_COLORSTYLE is LIGHT or DARK the vars will be replaced, so we write them out explicitly and use double quotes
var plusImg = [ "var(--fold-plus-image)", "var(--fold-plus-image-relpath)" ];
var minusImg = [ "var(--fold-minus-image)", "var(--fold-minus-image-relpath)" ];
// toggle all folding blocks
function codefold_toggle_all(relPath) {
if (opened) {
$('#fold_all').css('background-image',plusImg[relPath]);
$('div[id^=foldopen]').hide();
$('div[id^=foldclosed]').show();
} else {
$('#fold_all').css('background-image',minusImg[relPath]);
$('div[id^=foldopen]').show();
$('div[id^=foldclosed]').hide();
}
opened=!opened;
}
// toggle single folding block
function codefold_toggle(id) {
$('#foldopen'+id).toggle();
$('#foldclosed'+id).toggle();
}
function init_codefold(relPath) {
$('span[class=lineno]').css(
{'padding-right':'4px',
'margin-right':'2px',
'display':'inline-block',
'width':'54px',
'background':'linear-gradient(var(--fold-line-color),var(--fold-line-color)) no-repeat 46px/2px 100%'
});
// add global toggle to first line
$('span[class=lineno]:first').append('<span class="fold" id="fold_all" '+
'onclick="javascript:codefold_toggle_all('+relPath+');" '+
'style="background-image:'+minusImg[relPath]+';"></span>');
// add vertical lines to other rows
$('span[class=lineno]').not(':eq(0)').append('<span class="fold"></span>');
// add toggle controls to lines with fold divs
$('div[class=foldopen]').each(function() {
// extract specific id to use
var id = $(this).attr('id').replace('foldopen','');
// extract start and end foldable fragment attributes
var start = $(this).attr('data-start');
var end = $(this).attr('data-end');
// replace normal fold span with controls for the first line of a foldable fragment
$(this).find('span[class=fold]:first').replaceWith('<span class="fold" '+
'onclick="javascript:codefold_toggle(\''+id+'\');" '+
'style="background-image:'+minusImg[relPath]+';"></span>');
// append div for folded (closed) representation
$(this).after('<div id="foldclosed'+id+'" class="foldclosed" style="display:none;"></div>');
// extract the first line from the "open" section to represent closed content
var line = $(this).children().first().clone();
// remove any glow that might still be active on the original line
$(line).removeClass('glow');
if (start) {
// if line already ends with a start marker (e.g. trailing {), remove it
$(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),''));
}
// replace minus with plus symbol
$(line).find('span[class=fold]').css('background-image',plusImg[relPath]);
// append ellipsis
$(line).append(' '+start+'<a href="javascript:codefold_toggle(\''+id+'\')">&#8230;</a>'+end);
// insert constructed line into closed div
$('#foldclosed'+id).html(line);
});
}
/* @license-end */

11
doc/html/folderclosed.svg Normal file
View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<g style="fill:#4665A2;">
<path d="M1,5.998l-0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm2,-0l-0,16.002c-0,0.796 0.316,1.559 0.879,2.121c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121c0,-3.486 0,-8.514 0,-12c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998Z"/>
</g>
<g style="fill:#D8DFEE;stroke-width:0;">
<path d="M 5.6063709,24.951908 C 4.3924646,24.775461 3.4197129,23.899792 3.1031586,22.698521 L 3.0216155,22.389078 V 13.997725 5.6063709 L 3.1037477,5.2982247 C 3.3956682,4.2029881 4.1802788,3.412126 5.2787258,3.105917 5.5646428,3.0262132 5.6154982,3.0244963 8.0611641,3.0119829 l 2.4911989,-0.012746 1.932009,1.9300342 c 1.344142,1.3427669 1.976319,1.9498819 2.07763,1.9952626 0.137456,0.061571 0.474218,0.066269 6.006826,0.083795 l 5.861206,0.018568 0.29124,0.081916 c 1.094895,0.3079569 1.890116,1.109428 2.175567,2.192667 l 0.08154,0.3094425 V 16 22.389078 l -0.08154,0.309443 c -0.28446,1.079482 -1.086411,1.888085 -2.175567,2.193614 l -0.29124,0.0817 -10.302616,0.0049 c -5.700217,0.0027 -10.4001945,-0.0093 -10.5210471,-0.02684 z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<g style="fill:#C4CFE5;">
<path d="M1,5.998l-0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm2,-0l-0,16.002c-0,0.796 0.316,1.559 0.879,2.121c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121c0,-3.486 0,-8.514 0,-12c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998Z"/>
</g>
<g style="fill:#4665A2;stroke-width:0;">
<path d="M 5.6063709,24.951908 C 4.3924646,24.775461 3.4197129,23.899792 3.1031586,22.698521 L 3.0216155,22.389078 V 13.997725 5.6063709 L 3.1037477,5.2982247 C 3.3956682,4.2029881 4.1802788,3.412126 5.2787258,3.105917 5.5646428,3.0262132 5.6154982,3.0244963 8.0611641,3.0119829 l 2.4911989,-0.012746 1.932009,1.9300342 c 1.344142,1.3427669 1.976319,1.9498819 2.07763,1.9952626 0.137456,0.061571 0.474218,0.066269 6.006826,0.083795 l 5.861206,0.018568 0.29124,0.081916 c 1.094895,0.3079569 1.890116,1.109428 2.175567,2.192667 l 0.08154,0.3094425 V 16 22.389078 l -0.08154,0.309443 c -0.28446,1.079482 -1.086411,1.888085 -2.175567,2.193614 l -0.29124,0.0817 -10.302616,0.0049 c -5.700217,0.0027 -10.4001945,-0.0093 -10.5210471,-0.02684 z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

17
doc/html/folderopen.svg Normal file
View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<g style="fill:#4665A2;">
<path
d="M1,5.998l0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm28,14.415l-3.456,-5.925c-0.538,-0.921 -1.524,-1.488 -2.591,-1.488c-0,0 -12.905,0 -12.906,0c-1.067,0 -2.053,0.567 -2.591,1.488l-4.453,7.635c0.03,0.751 0.342,1.465 0.876,1.998c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121l0,-1.587Zm0,-3.969l0,-6.444c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998l0,12.16l2.729,-4.677c0.896,-1.536 2.54,-2.481 4.318,-2.481c3.354,0 9.552,0 12.906,0c1.778,0 3.422,0.945 4.318,2.481l1.729,2.963Z"
id="path2" />
</g>
<g style="fill:#D8DFEE;stroke-width:0;">
<path
d="M 5.3879408,24.913408 C 4.1598821,24.650818 3.1571088,23.558656 3.053503,22.370876 L 3.0312746,22.116041 5.2606813,18.293515 C 6.486855,16.191126 7.5598351,14.372696 7.6450818,14.25256 8.0043056,13.746312 8.5423079,13.363007 9.2104664,13.137285 l 0.2548351,-0.08609 6.9294785,-0.0097 c 6.805096,-0.0095 6.934944,-0.0084 7.234011,0.06267 0.695577,0.165199 1.290483,0.557253 1.714887,1.130141 0.08158,0.110125 0.938747,1.556711 1.90481,3.214634 l 1.756479,3.014406 -0.0186,0.971942 c -0.01387,0.724723 -0.03365,1.032131 -0.07778,1.208575 -0.242792,0.970733 -0.88732,1.735415 -1.772382,2.102793 -0.58835,0.244217 0.247209,0.227436 -11.161974,0.224159 -9.0281537,-0.0026 -10.3636023,-0.0098 -10.5862902,-0.05746 z"
id="path199" /><path
d="M 3.0126385,11.849829 3.0235061,5.5881684 3.1020974,5.2969283 C 3.3478146,4.3863605 3.93576,3.6757372 4.756668,3.2971229 5.3293315,3.0330025 5.1813272,3.0450949 8.0130385,3.0310668 l 2.5522875,-0.012644 1.918693,1.9107086 c 1.404146,1.3983023 1.964459,1.9332518 2.089351,1.9947704 l 0.170657,0.084062 5.897611,0.019367 c 5.553257,0.018236 5.910365,0.023213 6.116041,0.085231 1.102257,0.3323708 1.857042,1.1184422 2.154229,2.2435244 0.05645,0.2137228 0.06373,0.5643981 0.07519,3.6220748 0.0076,2.032169 -5.42e-4,3.370979 -0.02041,3.349261 -0.0182,-0.0199 -0.414296,-0.691472 -0.880217,-1.492382 -0.46592,-0.80091 -0.93093,-1.577954 -1.033354,-1.726764 -0.735716,-1.0689 -1.983568,-1.844244 -3.315972,-2.060353 -0.280375,-0.04548 -1.345158,-0.05334 -7.238708,-0.05347 -4.713933,-1.09e-4 -6.9931825,0.01221 -7.1717862,0.03874 -1.3002273,0.193134 -2.4770512,0.889916 -3.283628,1.944192 -0.1076466,0.140705 -0.8359664,1.353438 -1.6184885,2.694963 L 3.0017709,18.11149 Z"
id="path201" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

12
doc/html/folderopend.svg Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<g style="fill:#C4CFE5;">
<path d="M1,5.998l0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm28,14.415l-3.456,-5.925c-0.538,-0.921 -1.524,-1.488 -2.591,-1.488c-0,0 -12.905,0 -12.906,0c-1.067,0 -2.053,0.567 -2.591,1.488l-4.453,7.635c0.03,0.751 0.342,1.465 0.876,1.998c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121l0,-1.587Zm0,-3.969l0,-6.444c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998l0,12.16l2.729,-4.677c0.896,-1.536 2.54,-2.481 4.318,-2.481c3.354,0 9.552,0 12.906,0c1.778,0 3.422,0.945 4.318,2.481l1.729,2.963Z"/>
</g>
<g style="fill:#4665A2;stroke-width:0;">
<path d="M 5.3879408,24.913408 C 4.1598821,24.650818 3.1571088,23.558656 3.053503,22.370876 L 3.0312746,22.116041 5.2606813,18.293515 C 6.486855,16.191126 7.5598351,14.372696 7.6450818,14.25256 8.0043056,13.746312 8.5423079,13.363007 9.2104664,13.137285 l 0.2548351,-0.08609 6.9294785,-0.0097 c 6.805096,-0.0095 6.934944,-0.0084 7.234011,0.06267 0.695577,0.165199 1.290483,0.557253 1.714887,1.130141 0.08158,0.110125 0.938747,1.556711 1.90481,3.214634 l 1.756479,3.014406 -0.0186,0.971942 c -0.01387,0.724723 -0.03365,1.032131 -0.07778,1.208575 -0.242792,0.970733 -0.88732,1.735415 -1.772382,2.102793 -0.58835,0.244217 0.247209,0.227436 -11.161974,0.224159 -9.0281537,-0.0026 -10.3636023,-0.0098 -10.5862902,-0.05746 z" />
<path d="M 3.0126385,11.849829 3.0235061,5.5881684 3.1020974,5.2969283 C 3.3478146,4.3863605 3.93576,3.6757372 4.756668,3.2971229 5.3293315,3.0330025 5.1813272,3.0450949 8.0130385,3.0310668 l 2.5522875,-0.012644 1.918693,1.9107086 c 1.404146,1.3983023 1.964459,1.9332518 2.089351,1.9947704 l 0.170657,0.084062 5.897611,0.019367 c 5.553257,0.018236 5.910365,0.023213 6.116041,0.085231 1.102257,0.3323708 1.857042,1.1184422 2.154229,2.2435244 0.05645,0.2137228 0.06373,0.5643981 0.07519,3.6220748 0.0076,2.032169 -5.42e-4,3.370979 -0.02041,3.349261 -0.0182,-0.0199 -0.414296,-0.691472 -0.880217,-1.492382 -0.46592,-0.80091 -0.93093,-1.577954 -1.033354,-1.726764 -0.735716,-1.0689 -1.983568,-1.844244 -3.315972,-2.060353 -0.280375,-0.04548 -1.345158,-0.05334 -7.238708,-0.05347 -4.713933,-1.09e-4 -6.9931825,0.01221 -7.1717862,0.03874 -1.3002273,0.193134 -2.4770512,0.889916 -3.283628,1.944192 -0.1076466,0.140705 -0.8359664,1.353438 -1.6184885,2.694963 L 3.0017709,18.11149 Z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

92
doc/html/functions.html Normal file
View File

@@ -0,0 +1,92 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TurboJPEG: Data Fields</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">TurboJPEG<span id="projectnumber">&#160;3.0.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="contents">
<div class="textblock">Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:</div><ul>
<li>customFilter&#160;:&#160;<a class="el" href="structtjtransform.html#a0dc7697d59a7abe48afc629e96cbc1d2">tjtransform</a></li>
<li>data&#160;:&#160;<a class="el" href="structtjtransform.html#a688fe8f1a8ecc12a538d9e561cf338e3">tjtransform</a></li>
<li>denom&#160;:&#160;<a class="el" href="structtjscalingfactor.html#aefbcdf3e9e62274b2d312c695f133ce3">tjscalingfactor</a></li>
<li>h&#160;:&#160;<a class="el" href="structtjregion.html#aecefc45a26f4d8b60dd4d825c1710115">tjregion</a></li>
<li>num&#160;:&#160;<a class="el" href="structtjscalingfactor.html#a9b011e57f981ee23083e2c1aa5e640ec">tjscalingfactor</a></li>
<li>op&#160;:&#160;<a class="el" href="structtjtransform.html#a2525aab4ba6978a1c273f74fef50e498">tjtransform</a></li>
<li>options&#160;:&#160;<a class="el" href="structtjtransform.html#ac0e74655baa4402209a21e1ae481c8f6">tjtransform</a></li>
<li>r&#160;:&#160;<a class="el" href="structtjtransform.html#ac324e5e442abec8a961e5bf219db12cf">tjtransform</a></li>
<li>w&#160;:&#160;<a class="el" href="structtjregion.html#ab6eb73ceef584fc23c8c8097926dce42">tjregion</a></li>
<li>x&#160;:&#160;<a class="el" href="structtjregion.html#a4b6a37a93997091b26a75831fa291ad9">tjregion</a></li>
<li>y&#160;:&#160;<a class="el" href="structtjregion.html#a7b3e0c24cfe87acc80e334cafdcf22c2">tjregion</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>

View File

@@ -0,0 +1,92 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TurboJPEG: Data Fields - Variables</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">TurboJPEG<span id="projectnumber">&#160;3.0.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="contents">
<div class="textblock">Here is a list of all documented variables with links to the struct/union documentation for each field:</div><ul>
<li>customFilter&#160;:&#160;<a class="el" href="structtjtransform.html#a0dc7697d59a7abe48afc629e96cbc1d2">tjtransform</a></li>
<li>data&#160;:&#160;<a class="el" href="structtjtransform.html#a688fe8f1a8ecc12a538d9e561cf338e3">tjtransform</a></li>
<li>denom&#160;:&#160;<a class="el" href="structtjscalingfactor.html#aefbcdf3e9e62274b2d312c695f133ce3">tjscalingfactor</a></li>
<li>h&#160;:&#160;<a class="el" href="structtjregion.html#aecefc45a26f4d8b60dd4d825c1710115">tjregion</a></li>
<li>num&#160;:&#160;<a class="el" href="structtjscalingfactor.html#a9b011e57f981ee23083e2c1aa5e640ec">tjscalingfactor</a></li>
<li>op&#160;:&#160;<a class="el" href="structtjtransform.html#a2525aab4ba6978a1c273f74fef50e498">tjtransform</a></li>
<li>options&#160;:&#160;<a class="el" href="structtjtransform.html#ac0e74655baa4402209a21e1ae481c8f6">tjtransform</a></li>
<li>r&#160;:&#160;<a class="el" href="structtjtransform.html#ac324e5e442abec8a961e5bf219db12cf">tjtransform</a></li>
<li>w&#160;:&#160;<a class="el" href="structtjregion.html#ab6eb73ceef584fc23c8c8097926dce42">tjregion</a></li>
<li>x&#160;:&#160;<a class="el" href="structtjregion.html#a4b6a37a93997091b26a75831fa291ad9">tjregion</a></li>
<li>y&#160;:&#160;<a class="el" href="structtjregion.html#a7b3e0c24cfe87acc80e334cafdcf22c2">tjregion</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>

File diff suppressed because it is too large Load Diff

82
doc/html/index.html Normal file
View File

@@ -0,0 +1,82 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TurboJPEG: Main Page</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">TurboJPEG<span id="projectnumber">&#160;3.0.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">TurboJPEG Documentation</div></div>
</div><!--header-->
<div class="contents">
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>

34
doc/html/jquery.js vendored Normal file

File diff suppressed because one or more lines are too long

136
doc/html/menu.js Normal file
View File

@@ -0,0 +1,136 @@
/*
@licstart The following is the entire license notice for the JavaScript code in this file.
The MIT License (MIT)
Copyright (C) 1997-2020 by Dimitri van Heesch
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@licend The above is the entire license notice for the JavaScript code in this file
*/
function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
function makeTree(data,relPath) {
var result='';
if ('children' in data) {
result+='<ul>';
for (var i in data.children) {
var url;
var link;
link = data.children[i].url;
if (link.substring(0,1)=='^') {
url = link.substring(1);
} else {
url = relPath+link;
}
result+='<li><a href="'+url+'">'+
data.children[i].text+'</a>'+
makeTree(data.children[i],relPath)+'</li>';
}
result+='</ul>';
}
return result;
}
var searchBoxHtml;
if (searchEnabled) {
if (serverSide) {
searchBoxHtml='<div id="MSearchBox" class="MSearchBoxInactive">'+
'<div class="left">'+
'<form id="FSearchBox" action="'+relPath+searchPage+
'" method="get"><span id="MSearchSelectExt">&#160;</span>'+
'<input type="text" id="MSearchField" name="query" value="" placeholder="'+search+
'" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)"'+
' onblur="searchBox.OnSearchFieldFocus(false)"/>'+
'</form>'+
'</div>'+
'<div class="right"></div>'+
'</div>';
} else {
searchBoxHtml='<div id="MSearchBox" class="MSearchBoxInactive">'+
'<span class="left">'+
'<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()"'+
' onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>'+
'<input type="text" id="MSearchField" value="" placeholder="'+search+
'" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" '+
'onblur="searchBox.OnSearchFieldFocus(false)" '+
'onkeyup="searchBox.OnSearchFieldChange(event)"/>'+
'</span>'+
'<span class="right"><a id="MSearchClose" '+
'href="javascript:searchBox.CloseResultsWindow()">'+
'<img id="MSearchCloseImg" border="0" src="'+relPath+
'search/close.svg" alt=""/></a>'+
'</span>'+
'</div>';
}
}
$('#main-nav').before('<div class="sm sm-dox"><input id="main-menu-state" type="checkbox"/>'+
'<label class="main-menu-btn" for="main-menu-state">'+
'<span class="main-menu-btn-icon"></span> '+
'Toggle main menu visibility</label>'+
'<span id="searchBoxPos1" style="position:absolute;right:8px;top:8px;height:36px;"></span>'+
'</div>');
$('#main-nav').append(makeTree(menudata,relPath));
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
if (searchBoxHtml) {
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
}
var $mainMenuState = $('#main-menu-state');
var prevWidth = 0;
if ($mainMenuState.length) {
function initResizableIfExists() {
if (typeof initResizable==='function') initResizable();
}
// animate mobile menu
$mainMenuState.change(function(e) {
var $menu = $('#main-menu');
var options = { duration: 250, step: initResizableIfExists };
if (this.checked) {
options['complete'] = function() { $menu.css('display', 'block') };
$menu.hide().slideDown(options);
} else {
options['complete'] = function() { $menu.css('display', 'none') };
$menu.show().slideUp(options);
}
});
// set default menu visibility
function resetState() {
var $menu = $('#main-menu');
var $mainMenuState = $('#main-menu-state');
var newWidth = $(window).outerWidth();
if (newWidth!=prevWidth) {
if ($(window).outerWidth()<768) {
$mainMenuState.prop('checked',false); $menu.hide();
$('#searchBoxPos1').html(searchBoxHtml);
$('#searchBoxPos2').hide();
} else {
$menu.show();
$('#searchBoxPos1').empty();
$('#searchBoxPos2').html(searchBoxHtml);
$('#searchBoxPos2').show();
}
if (typeof searchBox!=='undefined') {
searchBox.CloseResultsWindow();
}
prevWidth = newWidth;
}
}
$(window).ready(function() { resetState(); initResizableIfExists(); });
$(window).resize(resetState);
}
$('#main-menu').smartmenus();
}
/* @license-end */

33
doc/html/menudata.js Normal file
View File

@@ -0,0 +1,33 @@
/*
@licstart The following is the entire license notice for the JavaScript code in this file.
The MIT License (MIT)
Copyright (C) 1997-2020 by Dimitri van Heesch
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@licend The above is the entire license notice for the JavaScript code in this file
*/
var menudata={children:[
{text:"Main Page",url:"index.html"},
{text:"Topics",url:"topics.html"},
{text:"Data Structures",url:"annotated.html",children:[
{text:"Data Structures",url:"annotated.html"},
{text:"Data Structure Index",url:"classes.html"},
{text:"Data Fields",url:"functions.html",children:[
{text:"All",url:"functions.html"},
{text:"Variables",url:"functions_vars.html"}]}]}]}

8
doc/html/minus.svg Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="12px" height="12px" viewBox="0 0 105.83333 105.83333" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<g>
<rect style="fill:#808080;stroke-width:0" width="105.83333" height="105.83334" x="4.2409692e-08" y="-1.2701158e-06" ry="0" />
<rect style="fill:#fcfcfc;stroke-width:0" width="79.375" height="79.375" x="13.229166" y="13.229166" />
<rect style="fill:#808080;stroke-width:0" width="52.916668" height="15.874998" x="26.458332" y="44.979168" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 582 B

8
doc/html/minusd.svg Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="12px" height="12px" viewBox="0 0 105.83333 105.83333" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<g>
<rect style="fill:#808080;stroke-width:0" width="105.83333" height="105.83334" x="4.2409692e-08" y="-1.2701158e-06" ry="0" />
<rect style="fill:#000000;stroke-width:0" width="79.375" height="79.375" x="13.229166" y="13.229166" />
<rect style="fill:#808080;stroke-width:0" width="52.916668" height="15.874998" x="26.458332" y="44.979168" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 582 B

BIN
doc/html/nav_f.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

BIN
doc/html/nav_fd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

BIN
doc/html/nav_g.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 B

BIN
doc/html/nav_h.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 B

BIN
doc/html/nav_hd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

BIN
doc/html/open.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

9
doc/html/plus.svg Normal file
View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="12px" height="12px" viewBox="0 0 105.83333 105.83333" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<g>
<rect style="fill:#808080;stroke-width:0" width="105.83333" height="105.83334" x="4.2409692e-08" y="-1.2701158e-06" ry="0" />
<rect style="fill:#fcfcfc;stroke-width:0" width="79.375" height="79.375" x="13.229166" y="13.229166" />
<rect style="fill:#808080;stroke-width:0" width="52.916668" height="15.874998" x="26.458332" y="44.979168" />
<rect style="fill:#808080;stroke-width:0" width="15.874998" height="52.916668" x="44.979168" y="26.458332" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 696 B

9
doc/html/plusd.svg Normal file
View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="12px" height="12px" viewBox="0 0 105.83333 105.83333" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<g>
<rect style="fill:#808080;stroke-width:0" width="105.83333" height="105.83334" x="4.2409692e-08" y="-1.2701158e-06" ry="0" />
<rect style="fill:#000000;stroke-width:0" width="79.375" height="79.375" x="13.229166" y="13.229166" />
<rect style="fill:#808080;stroke-width:0" width="52.916668" height="15.874998" x="26.458332" y="44.979168" />
<rect style="fill:#808080;stroke-width:0" width="15.874998" height="52.916668" x="44.979168" y="26.458332" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 696 B

4
doc/html/search/all_0.js Normal file
View File

@@ -0,0 +1,4 @@
var searchData=
[
['customfilter_0',['customFilter',['../structtjtransform.html#a0dc7697d59a7abe48afc629e96cbc1d2',1,'tjtransform']]]
];

5
doc/html/search/all_1.js Normal file
View File

@@ -0,0 +1,5 @@
var searchData=
[
['data_0',['data',['../structtjtransform.html#a688fe8f1a8ecc12a538d9e561cf338e3',1,'tjtransform']]],
['denom_1',['denom',['../structtjscalingfactor.html#aefbcdf3e9e62274b2d312c695f133ce3',1,'tjscalingfactor']]]
];

4
doc/html/search/all_2.js Normal file
View File

@@ -0,0 +1,4 @@
var searchData=
[
['format_20notes_0',['YUV Image Format Notes',['../group___turbo_j_p_e_g.html#autotoc_md0',1,'']]]
];

4
doc/html/search/all_3.js Normal file
View File

@@ -0,0 +1,4 @@
var searchData=
[
['h_0',['h',['../structtjregion.html#aecefc45a26f4d8b60dd4d825c1710115',1,'tjregion']]]
];

4
doc/html/search/all_4.js Normal file
View File

@@ -0,0 +1,4 @@
var searchData=
[
['image_20format_20notes_0',['YUV Image Format Notes',['../group___turbo_j_p_e_g.html#autotoc_md0',1,'']]]
];

5
doc/html/search/all_5.js Normal file
View File

@@ -0,0 +1,5 @@
var searchData=
[
['notes_0',['YUV Image Format Notes',['../group___turbo_j_p_e_g.html#autotoc_md0',1,'']]],
['num_1',['num',['../structtjscalingfactor.html#a9b011e57f981ee23083e2c1aa5e640ec',1,'tjscalingfactor']]]
];

5
doc/html/search/all_6.js Normal file
View File

@@ -0,0 +1,5 @@
var searchData=
[
['op_0',['op',['../structtjtransform.html#a2525aab4ba6978a1c273f74fef50e498',1,'tjtransform']]],
['options_1',['options',['../structtjtransform.html#ac0e74655baa4402209a21e1ae481c8f6',1,'tjtransform']]]
];

4
doc/html/search/all_7.js Normal file
View File

@@ -0,0 +1,4 @@
var searchData=
[
['r_0',['r',['../structtjtransform.html#ac324e5e442abec8a961e5bf219db12cf',1,'tjtransform']]]
];

142
doc/html/search/all_8.js Normal file
View File

@@ -0,0 +1,142 @@
var searchData=
[
['tj3alloc_0',['tj3Alloc',['../group___turbo_j_p_e_g.html#ga1a2c96d8b47530b6e6050ba6f10b7c57',1,'turbojpeg.h']]],
['tj3compress12_1',['tj3Compress12',['../group___turbo_j_p_e_g.html#ga9a1968c384ec7abb6122830253ebf570',1,'turbojpeg.h']]],
['tj3compress16_2',['tj3Compress16',['../group___turbo_j_p_e_g.html#ga77901b71d0471784f318ada31ff4e7bd',1,'turbojpeg.h']]],
['tj3compress8_3',['tj3Compress8',['../group___turbo_j_p_e_g.html#ga2cc418a2dab709ad7f30f5b25905f138',1,'turbojpeg.h']]],
['tj3compressfromyuv8_4',['tj3CompressFromYUV8',['../group___turbo_j_p_e_g.html#ga041c870d9c669eb3f385c78f4346c43f',1,'turbojpeg.h']]],
['tj3compressfromyuvplanes8_5',['tj3CompressFromYUVPlanes8',['../group___turbo_j_p_e_g.html#gac9f5ace3e73805b476c95dda9f8d0cd0',1,'turbojpeg.h']]],
['tj3decodeyuv8_6',['tj3DecodeYUV8',['../group___turbo_j_p_e_g.html#gaa1eb574f38b1c1de43a6c7aafcf68d8c',1,'turbojpeg.h']]],
['tj3decodeyuvplanes8_7',['tj3DecodeYUVPlanes8',['../group___turbo_j_p_e_g.html#gad366f1915f82c1ad4e7e37ebe073ca89',1,'turbojpeg.h']]],
['tj3decompress12_8',['tj3Decompress12',['../group___turbo_j_p_e_g.html#ga39b848f01781ad74a5b3941c012b6199',1,'turbojpeg.h']]],
['tj3decompress16_9',['tj3Decompress16',['../group___turbo_j_p_e_g.html#gaa074e63f9beb0b3ff42b833a4049df6e',1,'turbojpeg.h']]],
['tj3decompress8_10',['tj3Decompress8',['../group___turbo_j_p_e_g.html#ga1169c7c1a26ec18c9e6122cb8ae64013',1,'turbojpeg.h']]],
['tj3decompressheader_11',['tj3DecompressHeader',['../group___turbo_j_p_e_g.html#ga96d2c4b3432f9d88ad14758ae240b8d1',1,'turbojpeg.h']]],
['tj3decompresstoyuv8_12',['tj3DecompressToYUV8',['../group___turbo_j_p_e_g.html#ga1e6bf6a19fec3f9fa7534348879d8320',1,'turbojpeg.h']]],
['tj3decompresstoyuvplanes8_13',['tj3DecompressToYUVPlanes8',['../group___turbo_j_p_e_g.html#ga934373482dbbf257f2280505b6ff4fb5',1,'turbojpeg.h']]],
['tj3destroy_14',['tj3Destroy',['../group___turbo_j_p_e_g.html#ga53fbadf4560e95a65b8f5ab81703fe82',1,'turbojpeg.h']]],
['tj3encodeyuv8_15',['tj3EncodeYUV8',['../group___turbo_j_p_e_g.html#ga2a8d50f130bde10f0a04030f8cc59936',1,'turbojpeg.h']]],
['tj3encodeyuvplanes8_16',['tj3EncodeYUVPlanes8',['../group___turbo_j_p_e_g.html#gae2e9df38790e9bddc249d04cb158a4cf',1,'turbojpeg.h']]],
['tj3free_17',['tj3Free',['../group___turbo_j_p_e_g.html#gaddb84fb6c81769e9faa0f5a63b296606',1,'turbojpeg.h']]],
['tj3get_18',['tj3Get',['../group___turbo_j_p_e_g.html#ga34af9ba3183bdf0ec7c8f47bb9a4c84f',1,'turbojpeg.h']]],
['tj3geterrorcode_19',['tj3GetErrorCode',['../group___turbo_j_p_e_g.html#gab8c8279f1415fe425ff30dbbc56013bd',1,'turbojpeg.h']]],
['tj3geterrorstr_20',['tj3GetErrorStr',['../group___turbo_j_p_e_g.html#ga5a23ad0776c5333cda0d7c6d826e9d29',1,'turbojpeg.h']]],
['tj3getscalingfactors_21',['tj3GetScalingFactors',['../group___turbo_j_p_e_g.html#gaf9253e0c2e9f464142d389673da085fa',1,'turbojpeg.h']]],
['tj3init_22',['tj3Init',['../group___turbo_j_p_e_g.html#ga69c09d39f97ec30250ad3605ace7e5df',1,'turbojpeg.h']]],
['tj3jpegbufsize_23',['tj3JPEGBufSize',['../group___turbo_j_p_e_g.html#gac6285e58e35a35d871d7162ec5a929c4',1,'turbojpeg.h']]],
['tj3loadimage12_24',['tj3LoadImage12',['../group___turbo_j_p_e_g.html#gaa1d3772cfdb53afa21aae3c606238d44',1,'turbojpeg.h']]],
['tj3loadimage16_25',['tj3LoadImage16',['../group___turbo_j_p_e_g.html#gace4240b665dc47742cbb3b76b03dfd69',1,'turbojpeg.h']]],
['tj3loadimage8_26',['tj3LoadImage8',['../group___turbo_j_p_e_g.html#ga884023536e70985616126a073f662001',1,'turbojpeg.h']]],
['tj3saveimage12_27',['tj3SaveImage12',['../group___turbo_j_p_e_g.html#ga7c64b5106d04267a46aad85f9714ad90',1,'turbojpeg.h']]],
['tj3saveimage16_28',['tj3SaveImage16',['../group___turbo_j_p_e_g.html#ga0fd87851f4266aca24bf4594dd0c0e71',1,'turbojpeg.h']]],
['tj3saveimage8_29',['tj3SaveImage8',['../group___turbo_j_p_e_g.html#gaa4ec838988e469cc15618e4690cc8722',1,'turbojpeg.h']]],
['tj3set_30',['tj3Set',['../group___turbo_j_p_e_g.html#gaddf92640bfee3e8622218c713e77e7db',1,'turbojpeg.h']]],
['tj3setcroppingregion_31',['tj3SetCroppingRegion',['../group___turbo_j_p_e_g.html#gaa49c7bd4c9431667a043cfc93388ba1c',1,'turbojpeg.h']]],
['tj3setscalingfactor_32',['tj3SetScalingFactor',['../group___turbo_j_p_e_g.html#ga89da17ee1e43ff423382cbc145803c75',1,'turbojpeg.h']]],
['tj3transform_33',['tj3Transform',['../group___turbo_j_p_e_g.html#gaff23ba1dcabed456794b844791613920',1,'turbojpeg.h']]],
['tj3yuvbufsize_34',['tj3YUVBufSize',['../group___turbo_j_p_e_g.html#gaaebaa16973a0f550a66eca5765ed0546',1,'turbojpeg.h']]],
['tj3yuvplaneheight_35',['tj3YUVPlaneHeight',['../group___turbo_j_p_e_g.html#ga969767ec8180cc3edd99cf507f87299b',1,'turbojpeg.h']]],
['tj3yuvplanesize_36',['tj3YUVPlaneSize',['../group___turbo_j_p_e_g.html#gacc19d265edce76b46146f59579f9438d',1,'turbojpeg.h']]],
['tj3yuvplanewidth_37',['tj3YUVPlaneWidth',['../group___turbo_j_p_e_g.html#gac99d1933ede1d59fcada9a826e88eb2d',1,'turbojpeg.h']]],
['tj_5fnumcs_38',['TJ_NUMCS',['../group___turbo_j_p_e_g.html#ga39f57a6fb02d9cf32e7b6890099b5a71',1,'turbojpeg.h']]],
['tj_5fnumerr_39',['TJ_NUMERR',['../group___turbo_j_p_e_g.html#ga79bde1b4a3e2351e00887e47781b966e',1,'turbojpeg.h']]],
['tj_5fnuminit_40',['TJ_NUMINIT',['../group___turbo_j_p_e_g.html#ga5e0e8c784295c636f0bf8dab93c4bddf',1,'turbojpeg.h']]],
['tj_5fnumpf_41',['TJ_NUMPF',['../group___turbo_j_p_e_g.html#ga7010a4402f54a45ba822ad8675a4655e',1,'turbojpeg.h']]],
['tj_5fnumsamp_42',['TJ_NUMSAMP',['../group___turbo_j_p_e_g.html#ga5ef3d169162ce77ce348e292a0b7477c',1,'turbojpeg.h']]],
['tj_5fnumxop_43',['TJ_NUMXOP',['../group___turbo_j_p_e_g.html#ga0f6dbd18adf38b7d46ac547f0f4d562c',1,'turbojpeg.h']]],
['tjalphaoffset_44',['tjAlphaOffset',['../group___turbo_j_p_e_g.html#ga5af0ab065feefd526debf1e20c43e837',1,'turbojpeg.h']]],
['tjblueoffset_45',['tjBlueOffset',['../group___turbo_j_p_e_g.html#ga84e2e35d3f08025f976ec1ec53693dea',1,'turbojpeg.h']]],
['tjcs_46',['TJCS',['../group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720',1,'turbojpeg.h']]],
['tjcs_5fcmyk_47',['TJCS_CMYK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a6c8b636152ac8195b869587db315ee53',1,'turbojpeg.h']]],
['tjcs_5fgray_48',['TJCS_GRAY',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720ab3e7d6a87f695e45b81c1b5262b5a50a',1,'turbojpeg.h']]],
['tjcs_5frgb_49',['TJCS_RGB',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555',1,'turbojpeg.h']]],
['tjcs_5fycbcr_50',['TJCS_YCbCr',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75',1,'turbojpeg.h']]],
['tjcs_5fycck_51',['TJCS_YCCK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e',1,'turbojpeg.h']]],
['tjerr_52',['TJERR',['../group___turbo_j_p_e_g.html#gafbc17cfa57d0d5d11fea35ac025950fe',1,'turbojpeg.h']]],
['tjerr_5ffatal_53',['TJERR_FATAL',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950feafc9cceeada13122b09e4851e3788039a',1,'turbojpeg.h']]],
['tjerr_5fwarning_54',['TJERR_WARNING',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950fea342dd6e2aedb47bb257b4e7568329b59',1,'turbojpeg.h']]],
['tjgreenoffset_55',['tjGreenOffset',['../group___turbo_j_p_e_g.html#ga82d6e35da441112a411da41923c0ba2f',1,'turbojpeg.h']]],
['tjhandle_56',['tjhandle',['../group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763',1,'turbojpeg.h']]],
['tjinit_57',['TJINIT',['../group___turbo_j_p_e_g.html#ga3850bbee1313e752e667b4eb08b1e086',1,'turbojpeg.h']]],
['tjinit_5fcompress_58',['TJINIT_COMPRESS',['../group___turbo_j_p_e_g.html#gga3850bbee1313e752e667b4eb08b1e086aa45ac279e3dc6ffabc4b0f45864da796',1,'turbojpeg.h']]],
['tjinit_5fdecompress_59',['TJINIT_DECOMPRESS',['../group___turbo_j_p_e_g.html#gga3850bbee1313e752e667b4eb08b1e086a4b8ca1ef700699b71350700bf95c2167',1,'turbojpeg.h']]],
['tjinit_5ftransform_60',['TJINIT_TRANSFORM',['../group___turbo_j_p_e_g.html#gga3850bbee1313e752e667b4eb08b1e086a8d58a2a4c45b3e0cd349746544a6e0c2',1,'turbojpeg.h']]],
['tjmcuheight_61',['tjMCUHeight',['../group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf',1,'turbojpeg.h']]],
['tjmcuwidth_62',['tjMCUWidth',['../group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c',1,'turbojpeg.h']]],
['tjparam_63',['TJPARAM',['../group___turbo_j_p_e_g.html#gaa0f6be63ba78278299c9f5c12031fe82',1,'turbojpeg.h']]],
['tjparam_5farithmetic_64',['TJPARAM_ARITHMETIC',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a1c756757384308145602c040524aebf7',1,'turbojpeg.h']]],
['tjparam_5fbottomup_65',['TJPARAM_BOTTOMUP',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a924657172695ed6cb0b128219546fcce',1,'turbojpeg.h']]],
['tjparam_5fcolorspace_66',['TJPARAM_COLORSPACE',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a46a10d46309514907d0c39fcd86c324c',1,'turbojpeg.h']]],
['tjparam_5fdensityunits_67',['TJPARAM_DENSITYUNITS',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a4c045981bd8a303521a401dbbe1df208',1,'turbojpeg.h']]],
['tjparam_5ffastdct_68',['TJPARAM_FASTDCT',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a6914692ac6ec5567787d592b7563f627',1,'turbojpeg.h']]],
['tjparam_5ffastupsample_69',['TJPARAM_FASTUPSAMPLE',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a0e051ac106f7b7402b690a5daf4869c0',1,'turbojpeg.h']]],
['tjparam_5fjpegheight_70',['TJPARAM_JPEGHEIGHT',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a8f76673be73f2b659440a9572a65a95f',1,'turbojpeg.h']]],
['tjparam_5fjpegwidth_71',['TJPARAM_JPEGWIDTH',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a02ab77fb294a0c9061a78cd424c82dd8',1,'turbojpeg.h']]],
['tjparam_5flossless_72',['TJPARAM_LOSSLESS',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a249f35f0770792b19f995e603bb17c6f',1,'turbojpeg.h']]],
['tjparam_5flosslesspsv_73',['TJPARAM_LOSSLESSPSV',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82abcc997d40e5bec84817c12b76ef84159',1,'turbojpeg.h']]],
['tjparam_5flosslesspt_74',['TJPARAM_LOSSLESSPT',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a4a6c6f25764ecaf4231a36bff844e46a',1,'turbojpeg.h']]],
['tjparam_5fmaxmemory_75',['TJPARAM_MAXMEMORY',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a0de0a8281da45d1fc984edc8918f7dd2',1,'turbojpeg.h']]],
['tjparam_5fmaxpixels_76',['TJPARAM_MAXPIXELS',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82ac4e95dd2ecd766854feee579406eae68',1,'turbojpeg.h']]],
['tjparam_5fnorealloc_77',['TJPARAM_NOREALLOC',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82ae64ffb358bc7b194fd48e0f27750b29b',1,'turbojpeg.h']]],
['tjparam_5foptimize_78',['TJPARAM_OPTIMIZE',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a8f0af9afc0b36443751f9ee82b760aa6',1,'turbojpeg.h']]],
['tjparam_5fprecision_79',['TJPARAM_PRECISION',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8',1,'turbojpeg.h']]],
['tjparam_5fprogressive_80',['TJPARAM_PROGRESSIVE',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a1716f242b3859905b4a317dae8cfb75f',1,'turbojpeg.h']]],
['tjparam_5fquality_81',['TJPARAM_QUALITY',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a0467e8792621f2d817dc2af563d3186c',1,'turbojpeg.h']]],
['tjparam_5frestartblocks_82',['TJPARAM_RESTARTBLOCKS',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a343c72883b7160f23f3ef46fc548a0ec',1,'turbojpeg.h']]],
['tjparam_5frestartrows_83',['TJPARAM_RESTARTROWS',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a714367585952fe5c863f0dba5bd37e5c',1,'turbojpeg.h']]],
['tjparam_5fscanlimit_84',['TJPARAM_SCANLIMIT',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82ac478910e20ecf61b914f9824d80f8167',1,'turbojpeg.h']]],
['tjparam_5fstoponwarning_85',['TJPARAM_STOPONWARNING',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a555e2212079fa49b30bcd2879c6c8ddb',1,'turbojpeg.h']]],
['tjparam_5fsubsamp_86',['TJPARAM_SUBSAMP',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a2a3494a8215d3de4fdbaeb2ba6f6b03a',1,'turbojpeg.h']]],
['tjparam_5fxdensity_87',['TJPARAM_XDENSITY',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a4de5c9d7cab5be806143a43c3b0e0877',1,'turbojpeg.h']]],
['tjparam_5fydensity_88',['TJPARAM_YDENSITY',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82abda48f2df7eb9b88e2b7621efb017eba',1,'turbojpeg.h']]],
['tjpf_89',['TJPF',['../group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a',1,'turbojpeg.h']]],
['tjpf_5fabgr_90',['TJPF_ABGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa1ba1a7f1631dbeaa49a0a85fc4a40081',1,'turbojpeg.h']]],
['tjpf_5fargb_91',['TJPF_ARGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aae8f846ed9d9de99b6e1dfe448848765c',1,'turbojpeg.h']]],
['tjpf_5fbgr_92',['TJPF_BGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aab10624437fb8ef495a0b153e65749839',1,'turbojpeg.h']]],
['tjpf_5fbgra_93',['TJPF_BGRA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aac037ff1845cf9b74bb81a3659c2b9fb4',1,'turbojpeg.h']]],
['tjpf_5fbgrx_94',['TJPF_BGRX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa2a1fbf569ca79897eae886e3376ca4c8',1,'turbojpeg.h']]],
['tjpf_5fcmyk_95',['TJPF_CMYK',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b',1,'turbojpeg.h']]],
['tjpf_5fgray_96',['TJPF_GRAY',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a',1,'turbojpeg.h']]],
['tjpf_5frgb_97',['TJPF_RGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7ce93230bff449518ce387c17e6ed37c',1,'turbojpeg.h']]],
['tjpf_5frgba_98',['TJPF_RGBA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12',1,'turbojpeg.h']]],
['tjpf_5frgbx_99',['TJPF_RGBX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa83973bebb7e2dc6fa8bae89ff3f42e01',1,'turbojpeg.h']]],
['tjpf_5funknown_100',['TJPF_UNKNOWN',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed',1,'turbojpeg.h']]],
['tjpf_5fxbgr_101',['TJPF_XBGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af',1,'turbojpeg.h']]],
['tjpf_5fxrgb_102',['TJPF_XRGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84',1,'turbojpeg.h']]],
['tjpixelsize_103',['tjPixelSize',['../group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c',1,'turbojpeg.h']]],
['tjredoffset_104',['tjRedOffset',['../group___turbo_j_p_e_g.html#gadd9b446742ac8a3923f7992c7988fea8',1,'turbojpeg.h']]],
['tjregion_105',['tjregion',['../structtjregion.html',1,'']]],
['tjsamp_106',['TJSAMP',['../group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074',1,'turbojpeg.h']]],
['tjsamp_5f411_107',['TJSAMP_411',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a28ec62575e5ea295c3fde3001dc628e2',1,'turbojpeg.h']]],
['tjsamp_5f420_108',['TJSAMP_420',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737',1,'turbojpeg.h']]],
['tjsamp_5f422_109',['TJSAMP_422',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a136130902cc578f11f32429b59368404',1,'turbojpeg.h']]],
['tjsamp_5f440_110',['TJSAMP_440',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974',1,'turbojpeg.h']]],
['tjsamp_5f441_111',['TJSAMP_441',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3351696e1dd34a083a35b6be8b90122d',1,'turbojpeg.h']]],
['tjsamp_5f444_112',['TJSAMP_444',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074afb8da4f44197837bdec0a4f593dacae3',1,'turbojpeg.h']]],
['tjsamp_5fgray_113',['TJSAMP_GRAY',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248',1,'turbojpeg.h']]],
['tjsamp_5funknown_114',['TJSAMP_UNKNOWN',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074ac124fa8f6cb41147e3d670dfbdfb7173',1,'turbojpeg.h']]],
['tjscaled_115',['TJSCALED',['../group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df',1,'turbojpeg.h']]],
['tjscalingfactor_116',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]],
['tjtransform_117',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#ga504805ec0161f1b505397ca0118bf8fd',1,'tjtransform:&#160;turbojpeg.h']]],
['tjuncropped_118',['TJUNCROPPED',['../group___turbo_j_p_e_g.html#ga6f192ad58a5a5802e145149d83c643bf',1,'turbojpeg.h']]],
['tjunscaled_119',['TJUNSCALED',['../group___turbo_j_p_e_g.html#ga7880644a0849161ad20933536169ee19',1,'turbojpeg.h']]],
['tjxop_120',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]],
['tjxop_5fhflip_121',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]],
['tjxop_5fnone_122',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]],
['tjxop_5frot180_123',['TJXOP_ROT180',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a140952eb8dd0300accfcc22726d69692',1,'turbojpeg.h']]],
['tjxop_5frot270_124',['TJXOP_ROT270',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a3064ee5dfb7f032df332818587567a08',1,'turbojpeg.h']]],
['tjxop_5frot90_125',['TJXOP_ROT90',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a43b2bbb23bc4bd548422d43fbe9af128',1,'turbojpeg.h']]],
['tjxop_5ftranspose_126',['TJXOP_TRANSPOSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a31060aed199f886afdd417f80499c32d',1,'turbojpeg.h']]],
['tjxop_5ftransverse_127',['TJXOP_TRANSVERSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866af3b14d488aea6ece9e5b3df73a74d6a4',1,'turbojpeg.h']]],
['tjxop_5fvflip_128',['TJXOP_VFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a324eddfbec53b7e691f61e56929d0d5d',1,'turbojpeg.h']]],
['tjxopt_5farithmetic_129',['TJXOPT_ARITHMETIC',['../group___turbo_j_p_e_g.html#gaecaaa3b7e2af812592c015d83207f010',1,'turbojpeg.h']]],
['tjxopt_5fcopynone_130',['TJXOPT_COPYNONE',['../group___turbo_j_p_e_g.html#ga153b468cfb905d0de61706c838986fe8',1,'turbojpeg.h']]],
['tjxopt_5fcrop_131',['TJXOPT_CROP',['../group___turbo_j_p_e_g.html#ga9c771a757fc1294add611906b89ab2d2',1,'turbojpeg.h']]],
['tjxopt_5fgray_132',['TJXOPT_GRAY',['../group___turbo_j_p_e_g.html#ga3acee7b48ade1b99e5588736007c2589',1,'turbojpeg.h']]],
['tjxopt_5fnooutput_133',['TJXOPT_NOOUTPUT',['../group___turbo_j_p_e_g.html#gafbf992bbf6e006705886333703ffab31',1,'turbojpeg.h']]],
['tjxopt_5foptimize_134',['TJXOPT_OPTIMIZE',['../group___turbo_j_p_e_g.html#ga6bedf37aa9e1122f3ec9f7302ca59117',1,'turbojpeg.h']]],
['tjxopt_5fperfect_135',['TJXOPT_PERFECT',['../group___turbo_j_p_e_g.html#ga50e03cb5ed115330e212417429600b00',1,'turbojpeg.h']]],
['tjxopt_5fprogressive_136',['TJXOPT_PROGRESSIVE',['../group___turbo_j_p_e_g.html#gad2371c80674584ecc1a7d75e564cf026',1,'turbojpeg.h']]],
['tjxopt_5ftrim_137',['TJXOPT_TRIM',['../group___turbo_j_p_e_g.html#ga319826b7eb1583c0595bbe7b95428709',1,'turbojpeg.h']]],
['turbojpeg_138',['TurboJPEG',['../group___turbo_j_p_e_g.html',1,'']]]
];

4
doc/html/search/all_9.js Normal file
View File

@@ -0,0 +1,4 @@
var searchData=
[
['w_0',['w',['../structtjregion.html#ab6eb73ceef584fc23c8c8097926dce42',1,'tjregion']]]
];

4
doc/html/search/all_a.js Normal file
View File

@@ -0,0 +1,4 @@
var searchData=
[
['x_0',['x',['../structtjregion.html#a4b6a37a93997091b26a75831fa291ad9',1,'tjregion']]]
];

5
doc/html/search/all_b.js Normal file
View File

@@ -0,0 +1,5 @@
var searchData=
[
['y_0',['y',['../structtjregion.html#a7b3e0c24cfe87acc80e334cafdcf22c2',1,'tjregion']]],
['yuv_20image_20format_20notes_1',['YUV Image Format Notes',['../group___turbo_j_p_e_g.html#autotoc_md0',1,'']]]
];

View File

@@ -0,0 +1,6 @@
var searchData=
[
['tjregion_0',['tjregion',['../structtjregion.html',1,'']]],
['tjscalingfactor_1',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]],
['tjtransform_2',['tjtransform',['../structtjtransform.html',1,'']]]
];

18
doc/html/search/close.svg Normal file
View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 11 11"
height="11"
width="11"
id="svg2"
version="1.1">
<defs
id="defs6" />
<path
id="path12"
d="M 5.5 0.5 A 5 5 0 0 0 0.5 5.5 A 5 5 0 0 0 5.5 10.5 A 5 5 0 0 0 10.5 5.5 A 5 5 0 0 0 5.5 0.5 z M 3.5820312 3 A 0.58291923 0.58291923 0 0 1 4 3.1757812 L 5.5 4.6757812 L 7 3.1757812 A 0.58291923 0.58291923 0 0 1 7.4003906 3 A 0.58291923 0.58291923 0 0 1 7.8242188 4 L 6.3242188 5.5 L 7.8242188 7 A 0.58291923 0.58291923 0 1 1 7 7.8242188 L 5.5 6.3242188 L 4 7.8242188 A 0.58291923 0.58291923 0 1 1 3.1757812 7 L 4.6757812 5.5 L 3.1757812 4 A 0.58291923 0.58291923 0 0 1 3.5820312 3 z "
style="stroke-width:1.09870648;fill:#bababa;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 947 B

View File

@@ -0,0 +1,10 @@
var searchData=
[
['tjcs_0',['TJCS',['../group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720',1,'turbojpeg.h']]],
['tjerr_1',['TJERR',['../group___turbo_j_p_e_g.html#gafbc17cfa57d0d5d11fea35ac025950fe',1,'turbojpeg.h']]],
['tjinit_2',['TJINIT',['../group___turbo_j_p_e_g.html#ga3850bbee1313e752e667b4eb08b1e086',1,'turbojpeg.h']]],
['tjparam_3',['TJPARAM',['../group___turbo_j_p_e_g.html#gaa0f6be63ba78278299c9f5c12031fe82',1,'turbojpeg.h']]],
['tjpf_4',['TJPF',['../group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a',1,'turbojpeg.h']]],
['tjsamp_5',['TJSAMP',['../group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074',1,'turbojpeg.h']]],
['tjxop_6',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]]
];

View File

@@ -0,0 +1,67 @@
var searchData=
[
['tjcs_5fcmyk_0',['TJCS_CMYK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a6c8b636152ac8195b869587db315ee53',1,'turbojpeg.h']]],
['tjcs_5fgray_1',['TJCS_GRAY',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720ab3e7d6a87f695e45b81c1b5262b5a50a',1,'turbojpeg.h']]],
['tjcs_5frgb_2',['TJCS_RGB',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555',1,'turbojpeg.h']]],
['tjcs_5fycbcr_3',['TJCS_YCbCr',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75',1,'turbojpeg.h']]],
['tjcs_5fycck_4',['TJCS_YCCK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e',1,'turbojpeg.h']]],
['tjerr_5ffatal_5',['TJERR_FATAL',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950feafc9cceeada13122b09e4851e3788039a',1,'turbojpeg.h']]],
['tjerr_5fwarning_6',['TJERR_WARNING',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950fea342dd6e2aedb47bb257b4e7568329b59',1,'turbojpeg.h']]],
['tjinit_5fcompress_7',['TJINIT_COMPRESS',['../group___turbo_j_p_e_g.html#gga3850bbee1313e752e667b4eb08b1e086aa45ac279e3dc6ffabc4b0f45864da796',1,'turbojpeg.h']]],
['tjinit_5fdecompress_8',['TJINIT_DECOMPRESS',['../group___turbo_j_p_e_g.html#gga3850bbee1313e752e667b4eb08b1e086a4b8ca1ef700699b71350700bf95c2167',1,'turbojpeg.h']]],
['tjinit_5ftransform_9',['TJINIT_TRANSFORM',['../group___turbo_j_p_e_g.html#gga3850bbee1313e752e667b4eb08b1e086a8d58a2a4c45b3e0cd349746544a6e0c2',1,'turbojpeg.h']]],
['tjparam_5farithmetic_10',['TJPARAM_ARITHMETIC',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a1c756757384308145602c040524aebf7',1,'turbojpeg.h']]],
['tjparam_5fbottomup_11',['TJPARAM_BOTTOMUP',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a924657172695ed6cb0b128219546fcce',1,'turbojpeg.h']]],
['tjparam_5fcolorspace_12',['TJPARAM_COLORSPACE',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a46a10d46309514907d0c39fcd86c324c',1,'turbojpeg.h']]],
['tjparam_5fdensityunits_13',['TJPARAM_DENSITYUNITS',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a4c045981bd8a303521a401dbbe1df208',1,'turbojpeg.h']]],
['tjparam_5ffastdct_14',['TJPARAM_FASTDCT',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a6914692ac6ec5567787d592b7563f627',1,'turbojpeg.h']]],
['tjparam_5ffastupsample_15',['TJPARAM_FASTUPSAMPLE',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a0e051ac106f7b7402b690a5daf4869c0',1,'turbojpeg.h']]],
['tjparam_5fjpegheight_16',['TJPARAM_JPEGHEIGHT',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a8f76673be73f2b659440a9572a65a95f',1,'turbojpeg.h']]],
['tjparam_5fjpegwidth_17',['TJPARAM_JPEGWIDTH',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a02ab77fb294a0c9061a78cd424c82dd8',1,'turbojpeg.h']]],
['tjparam_5flossless_18',['TJPARAM_LOSSLESS',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a249f35f0770792b19f995e603bb17c6f',1,'turbojpeg.h']]],
['tjparam_5flosslesspsv_19',['TJPARAM_LOSSLESSPSV',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82abcc997d40e5bec84817c12b76ef84159',1,'turbojpeg.h']]],
['tjparam_5flosslesspt_20',['TJPARAM_LOSSLESSPT',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a4a6c6f25764ecaf4231a36bff844e46a',1,'turbojpeg.h']]],
['tjparam_5fmaxmemory_21',['TJPARAM_MAXMEMORY',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a0de0a8281da45d1fc984edc8918f7dd2',1,'turbojpeg.h']]],
['tjparam_5fmaxpixels_22',['TJPARAM_MAXPIXELS',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82ac4e95dd2ecd766854feee579406eae68',1,'turbojpeg.h']]],
['tjparam_5fnorealloc_23',['TJPARAM_NOREALLOC',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82ae64ffb358bc7b194fd48e0f27750b29b',1,'turbojpeg.h']]],
['tjparam_5foptimize_24',['TJPARAM_OPTIMIZE',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a8f0af9afc0b36443751f9ee82b760aa6',1,'turbojpeg.h']]],
['tjparam_5fprecision_25',['TJPARAM_PRECISION',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a781db82741934e8cd008d308597c59d8',1,'turbojpeg.h']]],
['tjparam_5fprogressive_26',['TJPARAM_PROGRESSIVE',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a1716f242b3859905b4a317dae8cfb75f',1,'turbojpeg.h']]],
['tjparam_5fquality_27',['TJPARAM_QUALITY',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a0467e8792621f2d817dc2af563d3186c',1,'turbojpeg.h']]],
['tjparam_5frestartblocks_28',['TJPARAM_RESTARTBLOCKS',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a343c72883b7160f23f3ef46fc548a0ec',1,'turbojpeg.h']]],
['tjparam_5frestartrows_29',['TJPARAM_RESTARTROWS',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a714367585952fe5c863f0dba5bd37e5c',1,'turbojpeg.h']]],
['tjparam_5fscanlimit_30',['TJPARAM_SCANLIMIT',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82ac478910e20ecf61b914f9824d80f8167',1,'turbojpeg.h']]],
['tjparam_5fstoponwarning_31',['TJPARAM_STOPONWARNING',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a555e2212079fa49b30bcd2879c6c8ddb',1,'turbojpeg.h']]],
['tjparam_5fsubsamp_32',['TJPARAM_SUBSAMP',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a2a3494a8215d3de4fdbaeb2ba6f6b03a',1,'turbojpeg.h']]],
['tjparam_5fxdensity_33',['TJPARAM_XDENSITY',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82a4de5c9d7cab5be806143a43c3b0e0877',1,'turbojpeg.h']]],
['tjparam_5fydensity_34',['TJPARAM_YDENSITY',['../group___turbo_j_p_e_g.html#ggaa0f6be63ba78278299c9f5c12031fe82abda48f2df7eb9b88e2b7621efb017eba',1,'turbojpeg.h']]],
['tjpf_5fabgr_35',['TJPF_ABGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa1ba1a7f1631dbeaa49a0a85fc4a40081',1,'turbojpeg.h']]],
['tjpf_5fargb_36',['TJPF_ARGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aae8f846ed9d9de99b6e1dfe448848765c',1,'turbojpeg.h']]],
['tjpf_5fbgr_37',['TJPF_BGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aab10624437fb8ef495a0b153e65749839',1,'turbojpeg.h']]],
['tjpf_5fbgra_38',['TJPF_BGRA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aac037ff1845cf9b74bb81a3659c2b9fb4',1,'turbojpeg.h']]],
['tjpf_5fbgrx_39',['TJPF_BGRX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa2a1fbf569ca79897eae886e3376ca4c8',1,'turbojpeg.h']]],
['tjpf_5fcmyk_40',['TJPF_CMYK',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b',1,'turbojpeg.h']]],
['tjpf_5fgray_41',['TJPF_GRAY',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a',1,'turbojpeg.h']]],
['tjpf_5frgb_42',['TJPF_RGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7ce93230bff449518ce387c17e6ed37c',1,'turbojpeg.h']]],
['tjpf_5frgba_43',['TJPF_RGBA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12',1,'turbojpeg.h']]],
['tjpf_5frgbx_44',['TJPF_RGBX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa83973bebb7e2dc6fa8bae89ff3f42e01',1,'turbojpeg.h']]],
['tjpf_5funknown_45',['TJPF_UNKNOWN',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed',1,'turbojpeg.h']]],
['tjpf_5fxbgr_46',['TJPF_XBGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af',1,'turbojpeg.h']]],
['tjpf_5fxrgb_47',['TJPF_XRGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84',1,'turbojpeg.h']]],
['tjsamp_5f411_48',['TJSAMP_411',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a28ec62575e5ea295c3fde3001dc628e2',1,'turbojpeg.h']]],
['tjsamp_5f420_49',['TJSAMP_420',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737',1,'turbojpeg.h']]],
['tjsamp_5f422_50',['TJSAMP_422',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a136130902cc578f11f32429b59368404',1,'turbojpeg.h']]],
['tjsamp_5f440_51',['TJSAMP_440',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974',1,'turbojpeg.h']]],
['tjsamp_5f441_52',['TJSAMP_441',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3351696e1dd34a083a35b6be8b90122d',1,'turbojpeg.h']]],
['tjsamp_5f444_53',['TJSAMP_444',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074afb8da4f44197837bdec0a4f593dacae3',1,'turbojpeg.h']]],
['tjsamp_5fgray_54',['TJSAMP_GRAY',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248',1,'turbojpeg.h']]],
['tjsamp_5funknown_55',['TJSAMP_UNKNOWN',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074ac124fa8f6cb41147e3d670dfbdfb7173',1,'turbojpeg.h']]],
['tjxop_5fhflip_56',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]],
['tjxop_5fnone_57',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]],
['tjxop_5frot180_58',['TJXOP_ROT180',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a140952eb8dd0300accfcc22726d69692',1,'turbojpeg.h']]],
['tjxop_5frot270_59',['TJXOP_ROT270',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a3064ee5dfb7f032df332818587567a08',1,'turbojpeg.h']]],
['tjxop_5frot90_60',['TJXOP_ROT90',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a43b2bbb23bc4bd548422d43fbe9af128',1,'turbojpeg.h']]],
['tjxop_5ftranspose_61',['TJXOP_TRANSPOSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a31060aed199f886afdd417f80499c32d',1,'turbojpeg.h']]],
['tjxop_5ftransverse_62',['TJXOP_TRANSVERSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866af3b14d488aea6ece9e5b3df73a74d6a4',1,'turbojpeg.h']]],
['tjxop_5fvflip_63',['TJXOP_VFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a324eddfbec53b7e691f61e56929d0d5d',1,'turbojpeg.h']]]
];

View File

@@ -0,0 +1,41 @@
var searchData=
[
['tj3alloc_0',['tj3Alloc',['../group___turbo_j_p_e_g.html#ga1a2c96d8b47530b6e6050ba6f10b7c57',1,'turbojpeg.h']]],
['tj3compress12_1',['tj3Compress12',['../group___turbo_j_p_e_g.html#ga9a1968c384ec7abb6122830253ebf570',1,'turbojpeg.h']]],
['tj3compress16_2',['tj3Compress16',['../group___turbo_j_p_e_g.html#ga77901b71d0471784f318ada31ff4e7bd',1,'turbojpeg.h']]],
['tj3compress8_3',['tj3Compress8',['../group___turbo_j_p_e_g.html#ga2cc418a2dab709ad7f30f5b25905f138',1,'turbojpeg.h']]],
['tj3compressfromyuv8_4',['tj3CompressFromYUV8',['../group___turbo_j_p_e_g.html#ga041c870d9c669eb3f385c78f4346c43f',1,'turbojpeg.h']]],
['tj3compressfromyuvplanes8_5',['tj3CompressFromYUVPlanes8',['../group___turbo_j_p_e_g.html#gac9f5ace3e73805b476c95dda9f8d0cd0',1,'turbojpeg.h']]],
['tj3decodeyuv8_6',['tj3DecodeYUV8',['../group___turbo_j_p_e_g.html#gaa1eb574f38b1c1de43a6c7aafcf68d8c',1,'turbojpeg.h']]],
['tj3decodeyuvplanes8_7',['tj3DecodeYUVPlanes8',['../group___turbo_j_p_e_g.html#gad366f1915f82c1ad4e7e37ebe073ca89',1,'turbojpeg.h']]],
['tj3decompress12_8',['tj3Decompress12',['../group___turbo_j_p_e_g.html#ga39b848f01781ad74a5b3941c012b6199',1,'turbojpeg.h']]],
['tj3decompress16_9',['tj3Decompress16',['../group___turbo_j_p_e_g.html#gaa074e63f9beb0b3ff42b833a4049df6e',1,'turbojpeg.h']]],
['tj3decompress8_10',['tj3Decompress8',['../group___turbo_j_p_e_g.html#ga1169c7c1a26ec18c9e6122cb8ae64013',1,'turbojpeg.h']]],
['tj3decompressheader_11',['tj3DecompressHeader',['../group___turbo_j_p_e_g.html#ga96d2c4b3432f9d88ad14758ae240b8d1',1,'turbojpeg.h']]],
['tj3decompresstoyuv8_12',['tj3DecompressToYUV8',['../group___turbo_j_p_e_g.html#ga1e6bf6a19fec3f9fa7534348879d8320',1,'turbojpeg.h']]],
['tj3decompresstoyuvplanes8_13',['tj3DecompressToYUVPlanes8',['../group___turbo_j_p_e_g.html#ga934373482dbbf257f2280505b6ff4fb5',1,'turbojpeg.h']]],
['tj3destroy_14',['tj3Destroy',['../group___turbo_j_p_e_g.html#ga53fbadf4560e95a65b8f5ab81703fe82',1,'turbojpeg.h']]],
['tj3encodeyuv8_15',['tj3EncodeYUV8',['../group___turbo_j_p_e_g.html#ga2a8d50f130bde10f0a04030f8cc59936',1,'turbojpeg.h']]],
['tj3encodeyuvplanes8_16',['tj3EncodeYUVPlanes8',['../group___turbo_j_p_e_g.html#gae2e9df38790e9bddc249d04cb158a4cf',1,'turbojpeg.h']]],
['tj3free_17',['tj3Free',['../group___turbo_j_p_e_g.html#gaddb84fb6c81769e9faa0f5a63b296606',1,'turbojpeg.h']]],
['tj3get_18',['tj3Get',['../group___turbo_j_p_e_g.html#ga34af9ba3183bdf0ec7c8f47bb9a4c84f',1,'turbojpeg.h']]],
['tj3geterrorcode_19',['tj3GetErrorCode',['../group___turbo_j_p_e_g.html#gab8c8279f1415fe425ff30dbbc56013bd',1,'turbojpeg.h']]],
['tj3geterrorstr_20',['tj3GetErrorStr',['../group___turbo_j_p_e_g.html#ga5a23ad0776c5333cda0d7c6d826e9d29',1,'turbojpeg.h']]],
['tj3getscalingfactors_21',['tj3GetScalingFactors',['../group___turbo_j_p_e_g.html#gaf9253e0c2e9f464142d389673da085fa',1,'turbojpeg.h']]],
['tj3init_22',['tj3Init',['../group___turbo_j_p_e_g.html#ga69c09d39f97ec30250ad3605ace7e5df',1,'turbojpeg.h']]],
['tj3jpegbufsize_23',['tj3JPEGBufSize',['../group___turbo_j_p_e_g.html#gac6285e58e35a35d871d7162ec5a929c4',1,'turbojpeg.h']]],
['tj3loadimage12_24',['tj3LoadImage12',['../group___turbo_j_p_e_g.html#gaa1d3772cfdb53afa21aae3c606238d44',1,'turbojpeg.h']]],
['tj3loadimage16_25',['tj3LoadImage16',['../group___turbo_j_p_e_g.html#gace4240b665dc47742cbb3b76b03dfd69',1,'turbojpeg.h']]],
['tj3loadimage8_26',['tj3LoadImage8',['../group___turbo_j_p_e_g.html#ga884023536e70985616126a073f662001',1,'turbojpeg.h']]],
['tj3saveimage12_27',['tj3SaveImage12',['../group___turbo_j_p_e_g.html#ga7c64b5106d04267a46aad85f9714ad90',1,'turbojpeg.h']]],
['tj3saveimage16_28',['tj3SaveImage16',['../group___turbo_j_p_e_g.html#ga0fd87851f4266aca24bf4594dd0c0e71',1,'turbojpeg.h']]],
['tj3saveimage8_29',['tj3SaveImage8',['../group___turbo_j_p_e_g.html#gaa4ec838988e469cc15618e4690cc8722',1,'turbojpeg.h']]],
['tj3set_30',['tj3Set',['../group___turbo_j_p_e_g.html#gaddf92640bfee3e8622218c713e77e7db',1,'turbojpeg.h']]],
['tj3setcroppingregion_31',['tj3SetCroppingRegion',['../group___turbo_j_p_e_g.html#gaa49c7bd4c9431667a043cfc93388ba1c',1,'turbojpeg.h']]],
['tj3setscalingfactor_32',['tj3SetScalingFactor',['../group___turbo_j_p_e_g.html#ga89da17ee1e43ff423382cbc145803c75',1,'turbojpeg.h']]],
['tj3transform_33',['tj3Transform',['../group___turbo_j_p_e_g.html#gaff23ba1dcabed456794b844791613920',1,'turbojpeg.h']]],
['tj3yuvbufsize_34',['tj3YUVBufSize',['../group___turbo_j_p_e_g.html#gaaebaa16973a0f550a66eca5765ed0546',1,'turbojpeg.h']]],
['tj3yuvplaneheight_35',['tj3YUVPlaneHeight',['../group___turbo_j_p_e_g.html#ga969767ec8180cc3edd99cf507f87299b',1,'turbojpeg.h']]],
['tj3yuvplanesize_36',['tj3YUVPlaneSize',['../group___turbo_j_p_e_g.html#gacc19d265edce76b46146f59579f9438d',1,'turbojpeg.h']]],
['tj3yuvplanewidth_37',['tj3YUVPlaneWidth',['../group___turbo_j_p_e_g.html#gac99d1933ede1d59fcada9a826e88eb2d',1,'turbojpeg.h']]]
];

View File

@@ -0,0 +1,4 @@
var searchData=
[
['turbojpeg_0',['TurboJPEG',['../group___turbo_j_p_e_g.html',1,'']]]
];

24
doc/html/search/mag.svg Normal file
View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 20 19"
height="19"
width="20"
id="svg2"
version="1.1">
<defs
id="defs6" />
<circle
r="3.5"
cy="8.5"
cx="5.5"
id="path4611"
style="fill:#000000;fill-opacity:0;stroke:#656565;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
<path
id="path4630"
d="m 8.1085854,11.109059 2.7823556,2.782356"
style="fill:none;stroke:#656565;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 804 B

24
doc/html/search/mag_d.svg Normal file
View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 20 19"
height="19"
width="20"
id="svg2"
version="1.1">
<defs
id="defs6" />
<circle
r="3.5"
cy="8.5"
cx="5.5"
id="path4611"
style="fill:#000000;fill-opacity:0;stroke:#C5C5C5;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
<path
id="path4630"
d="m 8.1085854,11.109059 2.7823556,2.782356"
style="fill:none;stroke:#C5C5C5;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 804 B

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
xmlns="http://www.w3.org/2000/svg"
version="1.1"
id="svg2"
width="20"
height="19"
viewBox="0 0 20 19"
>
<defs
id="defs6" />
<circle
style="fill:#000000;fill-opacity:0;stroke:#656565;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
id="path4611"
cx="5.5"
cy="8.5"
r="3.5" />
<path
style="fill:#656565;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,7 13.5,10 16,7 Z"
id="path4609"
/>
<path
style="fill:none;stroke:#656565;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 8.1085854,11.109059 2.7823556,2.782356"
id="path4630"
/>
</svg>

After

Width:  |  Height:  |  Size: 1019 B

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
xmlns="http://www.w3.org/2000/svg"
version="1.1"
id="svg2"
width="20"
height="19"
viewBox="0 0 20 19"
>
<defs
id="defs6" />
<circle
style="fill:#000000;fill-opacity:0;stroke:#c5C5C5;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
id="path4611"
cx="5.5"
cy="8.5"
r="3.5" />
<path
style="fill:#c5C5C5;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,7 13.5,10 16,7 Z"
id="path4609"
/>
<path
style="fill:none;stroke:#c5C5C5;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 8.1085854,11.109059 2.7823556,2.782356"
id="path4630"
/>
</svg>

After

Width:  |  Height:  |  Size: 1019 B

291
doc/html/search/search.css Normal file
View File

@@ -0,0 +1,291 @@
/*---------------- Search Box positioning */
#main-menu > li:last-child {
/* This <li> object is the parent of the search bar */
display: flex;
justify-content: center;
align-items: center;
height: 36px;
margin-right: 1em;
}
/*---------------- Search box styling */
.SRPage * {
font-weight: normal;
line-height: normal;
}
dark-mode-toggle {
margin-left: 5px;
display: flex;
float: right;
}
#MSearchBox {
display: inline-block;
white-space : nowrap;
background: var(--search-background-color);
border-radius: 0.65em;
box-shadow: var(--search-box-shadow);
z-index: 102;
}
#MSearchBox .left {
display: inline-block;
vertical-align: middle;
height: 1.4em;
}
#MSearchSelect {
display: inline-block;
vertical-align: middle;
width: 20px;
height: 19px;
background-image: var(--search-magnification-select-image);
margin: 0 0 0 0.3em;
padding: 0;
}
#MSearchSelectExt {
display: inline-block;
vertical-align: middle;
width: 10px;
height: 19px;
background-image: var(--search-magnification-image);
margin: 0 0 0 0.5em;
padding: 0;
}
#MSearchField {
display: inline-block;
vertical-align: middle;
width: 7.5em;
height: 19px;
margin: 0 0.15em;
padding: 0;
line-height: 1em;
border:none;
color: var(--search-foreground-color);
outline: none;
font-family: var(--font-family-search);
-webkit-border-radius: 0px;
border-radius: 0px;
background: none;
}
@media(hover: none) {
/* to avoid zooming on iOS */
#MSearchField {
font-size: 16px;
}
}
#MSearchBox .right {
display: inline-block;
vertical-align: middle;
width: 1.4em;
height: 1.4em;
}
#MSearchClose {
display: none;
font-size: inherit;
background : none;
border: none;
margin: 0;
padding: 0;
outline: none;
}
#MSearchCloseImg {
padding: 0.3em;
margin: 0;
}
.MSearchBoxActive #MSearchField {
color: var(--search-active-color);
}
/*---------------- Search filter selection */
#MSearchSelectWindow {
display: none;
position: absolute;
left: 0; top: 0;
border: 1px solid var(--search-filter-border-color);
background-color: var(--search-filter-background-color);
z-index: 10001;
padding-top: 4px;
padding-bottom: 4px;
-moz-border-radius: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
}
.SelectItem {
font: 8pt var(--font-family-search);
padding-left: 2px;
padding-right: 12px;
border: 0px;
}
span.SelectionMark {
margin-right: 4px;
font-family: var(--font-family-monospace);
outline-style: none;
text-decoration: none;
}
a.SelectItem {
display: block;
outline-style: none;
color: var(--search-filter-foreground-color);
text-decoration: none;
padding-left: 6px;
padding-right: 12px;
}
a.SelectItem:focus,
a.SelectItem:active {
color: var(--search-filter-foreground-color);
outline-style: none;
text-decoration: none;
}
a.SelectItem:hover {
color: var(--search-filter-highlight-text-color);
background-color: var(--search-filter-highlight-bg-color);
outline-style: none;
text-decoration: none;
cursor: pointer;
display: block;
}
/*---------------- Search results window */
iframe#MSearchResults {
/*width: 60ex;*/
height: 15em;
}
#MSearchResultsWindow {
display: none;
position: absolute;
left: 0; top: 0;
border: 1px solid var(--search-results-border-color);
background-color: var(--search-results-background-color);
z-index:10000;
width: 300px;
height: 400px;
overflow: auto;
}
/* ----------------------------------- */
#SRIndex {
clear:both;
}
.SREntry {
font-size: 10pt;
padding-left: 1ex;
}
.SRPage .SREntry {
font-size: 8pt;
padding: 1px 5px;
}
div.SRPage {
margin: 5px 2px;
background-color: var(--search-results-background-color);
}
.SRChildren {
padding-left: 3ex; padding-bottom: .5em
}
.SRPage .SRChildren {
display: none;
}
.SRSymbol {
font-weight: bold;
color: var(--search-results-foreground-color);
font-family: var(--font-family-search);
text-decoration: none;
outline: none;
}
a.SRScope {
display: block;
color: var(--search-results-foreground-color);
font-family: var(--font-family-search);
font-size: 8pt;
text-decoration: none;
outline: none;
}
a.SRSymbol:focus, a.SRSymbol:active,
a.SRScope:focus, a.SRScope:active {
text-decoration: underline;
}
span.SRScope {
padding-left: 4px;
font-family: var(--font-family-search);
}
.SRPage .SRStatus {
padding: 2px 5px;
font-size: 8pt;
font-style: italic;
font-family: var(--font-family-search);
}
.SRResult {
display: none;
}
div.searchresults {
margin-left: 10px;
margin-right: 10px;
}
/*---------------- External search page results */
.pages b {
color: white;
padding: 5px 5px 3px 5px;
background-image: var(--nav-gradient-active-image-parent);
background-repeat: repeat-x;
text-shadow: 0 1px 1px #000000;
}
.pages {
line-height: 17px;
margin-left: 4px;
text-decoration: none;
}
.hl {
font-weight: bold;
}
#searchresults {
margin-bottom: 20px;
}
.searchpages {
margin-top: 10px;
}

840
doc/html/search/search.js Normal file
View File

@@ -0,0 +1,840 @@
/*
@licstart The following is the entire license notice for the JavaScript code in this file.
The MIT License (MIT)
Copyright (C) 1997-2020 by Dimitri van Heesch
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@licend The above is the entire license notice for the JavaScript code in this file
*/
function convertToId(search)
{
var result = '';
for (i=0;i<search.length;i++)
{
var c = search.charAt(i);
var cn = c.charCodeAt(0);
if (c.match(/[a-z0-9\u0080-\uFFFF]/))
{
result+=c;
}
else if (cn<16)
{
result+="_0"+cn.toString(16);
}
else
{
result+="_"+cn.toString(16);
}
}
return result;
}
function getXPos(item)
{
var x = 0;
if (item.offsetWidth)
{
while (item && item!=document.body)
{
x += item.offsetLeft;
item = item.offsetParent;
}
}
return x;
}
function getYPos(item)
{
var y = 0;
if (item.offsetWidth)
{
while (item && item!=document.body)
{
y += item.offsetTop;
item = item.offsetParent;
}
}
return y;
}
var searchResults = new SearchResults("searchResults");
/* A class handling everything associated with the search panel.
Parameters:
name - The name of the global variable that will be
storing this instance. Is needed to be able to set timeouts.
resultPath - path to use for external files
*/
function SearchBox(name, resultsPath, extension)
{
if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); }
if (!extension || extension == "") { extension = ".html"; }
// ---------- Instance variables
this.name = name;
this.resultsPath = resultsPath;
this.keyTimeout = 0;
this.keyTimeoutLength = 500;
this.closeSelectionTimeout = 300;
this.lastSearchValue = "";
this.lastResultsPage = "";
this.hideTimeout = 0;
this.searchIndex = 0;
this.searchActive = false;
this.extension = extension;
// ----------- DOM Elements
this.DOMSearchField = function()
{ return document.getElementById("MSearchField"); }
this.DOMSearchSelect = function()
{ return document.getElementById("MSearchSelect"); }
this.DOMSearchSelectWindow = function()
{ return document.getElementById("MSearchSelectWindow"); }
this.DOMPopupSearchResults = function()
{ return document.getElementById("MSearchResults"); }
this.DOMPopupSearchResultsWindow = function()
{ return document.getElementById("MSearchResultsWindow"); }
this.DOMSearchClose = function()
{ return document.getElementById("MSearchClose"); }
this.DOMSearchBox = function()
{ return document.getElementById("MSearchBox"); }
// ------------ Event Handlers
// Called when focus is added or removed from the search field.
this.OnSearchFieldFocus = function(isActive)
{
this.Activate(isActive);
}
this.OnSearchSelectShow = function()
{
var searchSelectWindow = this.DOMSearchSelectWindow();
var searchField = this.DOMSearchSelect();
var left = getXPos(searchField);
var top = getYPos(searchField);
top += searchField.offsetHeight;
// show search selection popup
searchSelectWindow.style.display='block';
searchSelectWindow.style.left = left + 'px';
searchSelectWindow.style.top = top + 'px';
// stop selection hide timer
if (this.hideTimeout)
{
clearTimeout(this.hideTimeout);
this.hideTimeout=0;
}
return false; // to avoid "image drag" default event
}
this.OnSearchSelectHide = function()
{
this.hideTimeout = setTimeout(this.CloseSelectionWindow.bind(this),
this.closeSelectionTimeout);
}
// Called when the content of the search field is changed.
this.OnSearchFieldChange = function(evt)
{
if (this.keyTimeout) // kill running timer
{
clearTimeout(this.keyTimeout);
this.keyTimeout = 0;
}
var e = (evt) ? evt : window.event; // for IE
if (e.keyCode==40 || e.keyCode==13)
{
if (e.shiftKey==1)
{
this.OnSearchSelectShow();
var win=this.DOMSearchSelectWindow();
for (i=0;i<win.childNodes.length;i++)
{
var child = win.childNodes[i]; // get span within a
if (child.className=='SelectItem')
{
child.focus();
return;
}
}
return;
}
else
{
var elem = searchResults.NavNext(0);
if (elem) elem.focus();
}
}
else if (e.keyCode==27) // Escape out of the search field
{
e.stopPropagation();
this.DOMSearchField().blur();
this.DOMPopupSearchResultsWindow().style.display = 'none';
this.DOMSearchClose().style.display = 'none';
this.lastSearchValue = '';
this.Activate(false);
return;
}
// strip whitespaces
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
if (searchValue != this.lastSearchValue) // search value has changed
{
if (searchValue != "") // non-empty search
{
// set timer for search update
this.keyTimeout = setTimeout(this.Search.bind(this),
this.keyTimeoutLength);
}
else // empty search field
{
this.DOMPopupSearchResultsWindow().style.display = 'none';
this.DOMSearchClose().style.display = 'none';
this.lastSearchValue = '';
}
}
}
this.SelectItemCount = function(id)
{
var count=0;
var win=this.DOMSearchSelectWindow();
for (i=0;i<win.childNodes.length;i++)
{
var child = win.childNodes[i]; // get span within a
if (child.className=='SelectItem')
{
count++;
}
}
return count;
}
this.SelectItemSet = function(id)
{
var i,j=0;
var win=this.DOMSearchSelectWindow();
for (i=0;i<win.childNodes.length;i++)
{
var child = win.childNodes[i]; // get span within a
if (child.className=='SelectItem')
{
var node = child.firstChild;
if (j==id)
{
node.innerHTML='&#8226;';
}
else
{
node.innerHTML='&#160;';
}
j++;
}
}
}
// Called when an search filter selection is made.
// set item with index id as the active item
this.OnSelectItem = function(id)
{
this.searchIndex = id;
this.SelectItemSet(id);
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
if (searchValue!="" && this.searchActive) // something was found -> do a search
{
this.Search();
}
}
this.OnSearchSelectKey = function(evt)
{
var e = (evt) ? evt : window.event; // for IE
if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
{
this.searchIndex++;
this.OnSelectItem(this.searchIndex);
}
else if (e.keyCode==38 && this.searchIndex>0) // Up
{
this.searchIndex--;
this.OnSelectItem(this.searchIndex);
}
else if (e.keyCode==13 || e.keyCode==27)
{
e.stopPropagation();
this.OnSelectItem(this.searchIndex);
this.CloseSelectionWindow();
this.DOMSearchField().focus();
}
return false;
}
// --------- Actions
// Closes the results window.
this.CloseResultsWindow = function()
{
this.DOMPopupSearchResultsWindow().style.display = 'none';
this.DOMSearchClose().style.display = 'none';
this.Activate(false);
}
this.CloseSelectionWindow = function()
{
this.DOMSearchSelectWindow().style.display = 'none';
}
// Performs a search.
this.Search = function()
{
this.keyTimeout = 0;
// strip leading whitespace
var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
var code = searchValue.toLowerCase().charCodeAt(0);
var idxChar = searchValue.substr(0, 1).toLowerCase();
if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
{
idxChar = searchValue.substr(0, 2);
}
var jsFile;
var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);
if (idx!=-1)
{
var hexCode=idx.toString(16);
jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js';
}
var loadJS = function(url, impl, loc){
var scriptTag = document.createElement('script');
scriptTag.src = url;
scriptTag.onload = impl;
scriptTag.onreadystatechange = impl;
loc.appendChild(scriptTag);
}
var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
var domSearchBox = this.DOMSearchBox();
var domPopupSearchResults = this.DOMPopupSearchResults();
var domSearchClose = this.DOMSearchClose();
var resultsPath = this.resultsPath;
var handleResults = function() {
document.getElementById("Loading").style.display="none";
if (typeof searchData !== 'undefined') {
createResults(resultsPath);
document.getElementById("NoMatches").style.display="none";
}
if (idx!=-1) {
searchResults.Search(searchValue);
} else { // no file with search results => force empty search results
searchResults.Search('====');
}
if (domPopupSearchResultsWindow.style.display!='block')
{
domSearchClose.style.display = 'inline-block';
var left = getXPos(domSearchBox) + 150;
var top = getYPos(domSearchBox) + 20;
domPopupSearchResultsWindow.style.display = 'block';
left -= domPopupSearchResults.offsetWidth;
var maxWidth = document.body.clientWidth;
var maxHeight = document.body.clientHeight;
var width = 300;
if (left<10) left=10;
if (width+left+8>maxWidth) width=maxWidth-left-8;
var height = 400;
if (height+top+8>maxHeight) height=maxHeight-top-8;
domPopupSearchResultsWindow.style.top = top + 'px';
domPopupSearchResultsWindow.style.left = left + 'px';
domPopupSearchResultsWindow.style.width = width + 'px';
domPopupSearchResultsWindow.style.height = height + 'px';
}
}
if (jsFile) {
loadJS(jsFile, handleResults, this.DOMPopupSearchResultsWindow());
} else {
handleResults();
}
this.lastSearchValue = searchValue;
}
// -------- Activation Functions
// Activates or deactivates the search panel, resetting things to
// their default values if necessary.
this.Activate = function(isActive)
{
if (isActive || // open it
this.DOMPopupSearchResultsWindow().style.display == 'block'
)
{
this.DOMSearchBox().className = 'MSearchBoxActive';
this.searchActive = true;
}
else if (!isActive) // directly remove the panel
{
this.DOMSearchBox().className = 'MSearchBoxInactive';
this.searchActive = false;
this.lastSearchValue = ''
this.lastResultsPage = '';
this.DOMSearchField().value = '';
}
}
}
// -----------------------------------------------------------------------
// The class that handles everything on the search results page.
function SearchResults(name)
{
// The number of matches from the last run of <Search()>.
this.lastMatchCount = 0;
this.lastKey = 0;
this.repeatOn = false;
// Toggles the visibility of the passed element ID.
this.FindChildElement = function(id)
{
var parentElement = document.getElementById(id);
var element = parentElement.firstChild;
while (element && element!=parentElement)
{
if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren')
{
return element;
}
if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes())
{
element = element.firstChild;
}
else if (element.nextSibling)
{
element = element.nextSibling;
}
else
{
do
{
element = element.parentNode;
}
while (element && element!=parentElement && !element.nextSibling);
if (element && element!=parentElement)
{
element = element.nextSibling;
}
}
}
}
this.Toggle = function(id)
{
var element = this.FindChildElement(id);
if (element)
{
if (element.style.display == 'block')
{
element.style.display = 'none';
}
else
{
element.style.display = 'block';
}
}
}
// Searches for the passed string. If there is no parameter,
// it takes it from the URL query.
//
// Always returns true, since other documents may try to call it
// and that may or may not be possible.
this.Search = function(search)
{
if (!search) // get search word from URL
{
search = window.location.search;
search = search.substring(1); // Remove the leading '?'
search = unescape(search);
}
search = search.replace(/^ +/, ""); // strip leading spaces
search = search.replace(/ +$/, ""); // strip trailing spaces
search = search.toLowerCase();
search = convertToId(search);
var resultRows = document.getElementsByTagName("div");
var matches = 0;
var i = 0;
while (i < resultRows.length)
{
var row = resultRows.item(i);
if (row.className == "SRResult")
{
var rowMatchName = row.id.toLowerCase();
rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
if (search.length<=rowMatchName.length &&
rowMatchName.substr(0, search.length)==search)
{
row.style.display = 'block';
matches++;
}
else
{
row.style.display = 'none';
}
}
i++;
}
document.getElementById("Searching").style.display='none';
if (matches == 0) // no results
{
document.getElementById("NoMatches").style.display='block';
}
else // at least one result
{
document.getElementById("NoMatches").style.display='none';
}
this.lastMatchCount = matches;
return true;
}
// return the first item with index index or higher that is visible
this.NavNext = function(index)
{
var focusItem;
while (1)
{
var focusName = 'Item'+index;
focusItem = document.getElementById(focusName);
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
{
break;
}
else if (!focusItem) // last element
{
break;
}
focusItem=null;
index++;
}
return focusItem;
}
this.NavPrev = function(index)
{
var focusItem;
while (1)
{
var focusName = 'Item'+index;
focusItem = document.getElementById(focusName);
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
{
break;
}
else if (!focusItem) // last element
{
break;
}
focusItem=null;
index--;
}
return focusItem;
}
this.ProcessKeys = function(e)
{
if (e.type == "keydown")
{
this.repeatOn = false;
this.lastKey = e.keyCode;
}
else if (e.type == "keypress")
{
if (!this.repeatOn)
{
if (this.lastKey) this.repeatOn = true;
return false; // ignore first keypress after keydown
}
}
else if (e.type == "keyup")
{
this.lastKey = 0;
this.repeatOn = false;
}
return this.lastKey!=0;
}
this.Nav = function(evt,itemIndex)
{
var e = (evt) ? evt : window.event; // for IE
if (e.keyCode==13) return true;
if (!this.ProcessKeys(e)) return false;
if (this.lastKey==38) // Up
{
var newIndex = itemIndex-1;
var focusItem = this.NavPrev(newIndex);
if (focusItem)
{
var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
if (child && child.style.display == 'block') // children visible
{
var n=0;
var tmpElem;
while (1) // search for last child
{
tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
if (tmpElem)
{
focusItem = tmpElem;
}
else // found it!
{
break;
}
n++;
}
}
}
if (focusItem)
{
focusItem.focus();
}
else // return focus to search field
{
document.getElementById("MSearchField").focus();
}
}
else if (this.lastKey==40) // Down
{
var newIndex = itemIndex+1;
var focusItem;
var item = document.getElementById('Item'+itemIndex);
var elem = this.FindChildElement(item.parentNode.parentNode.id);
if (elem && elem.style.display == 'block') // children visible
{
focusItem = document.getElementById('Item'+itemIndex+'_c0');
}
if (!focusItem) focusItem = this.NavNext(newIndex);
if (focusItem) focusItem.focus();
}
else if (this.lastKey==39) // Right
{
var item = document.getElementById('Item'+itemIndex);
var elem = this.FindChildElement(item.parentNode.parentNode.id);
if (elem) elem.style.display = 'block';
}
else if (this.lastKey==37) // Left
{
var item = document.getElementById('Item'+itemIndex);
var elem = this.FindChildElement(item.parentNode.parentNode.id);
if (elem) elem.style.display = 'none';
}
else if (this.lastKey==27) // Escape
{
e.stopPropagation();
searchBox.CloseResultsWindow();
document.getElementById("MSearchField").focus();
}
else if (this.lastKey==13) // Enter
{
return true;
}
return false;
}
this.NavChild = function(evt,itemIndex,childIndex)
{
var e = (evt) ? evt : window.event; // for IE
if (e.keyCode==13) return true;
if (!this.ProcessKeys(e)) return false;
if (this.lastKey==38) // Up
{
if (childIndex>0)
{
var newIndex = childIndex-1;
document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
}
else // already at first child, jump to parent
{
document.getElementById('Item'+itemIndex).focus();
}
}
else if (this.lastKey==40) // Down
{
var newIndex = childIndex+1;
var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
if (!elem) // last child, jump to parent next parent
{
elem = this.NavNext(itemIndex+1);
}
if (elem)
{
elem.focus();
}
}
else if (this.lastKey==27) // Escape
{
e.stopPropagation();
searchBox.CloseResultsWindow();
document.getElementById("MSearchField").focus();
}
else if (this.lastKey==13) // Enter
{
return true;
}
return false;
}
}
function setKeyActions(elem,action)
{
elem.setAttribute('onkeydown',action);
elem.setAttribute('onkeypress',action);
elem.setAttribute('onkeyup',action);
}
function setClassAttr(elem,attr)
{
elem.setAttribute('class',attr);
elem.setAttribute('className',attr);
}
function createResults(resultsPath)
{
var results = document.getElementById("SRResults");
results.innerHTML = '';
for (var e=0; e<searchData.length; e++)
{
var id = searchData[e][0];
var srResult = document.createElement('div');
srResult.setAttribute('id','SR_'+id);
setClassAttr(srResult,'SRResult');
var srEntry = document.createElement('div');
setClassAttr(srEntry,'SREntry');
var srLink = document.createElement('a');
srLink.setAttribute('id','Item'+e);
setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');
setClassAttr(srLink,'SRSymbol');
srLink.innerHTML = searchData[e][1][0];
srEntry.appendChild(srLink);
if (searchData[e][1].length==2) // single result
{
srLink.setAttribute('href',resultsPath+searchData[e][1][1][0]);
srLink.setAttribute('onclick','searchBox.CloseResultsWindow()');
if (searchData[e][1][1][1])
{
srLink.setAttribute('target','_parent');
}
else
{
srLink.setAttribute('target','_blank');
}
var srScope = document.createElement('span');
setClassAttr(srScope,'SRScope');
srScope.innerHTML = searchData[e][1][1][2];
srEntry.appendChild(srScope);
}
else // multiple results
{
srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")');
var srChildren = document.createElement('div');
setClassAttr(srChildren,'SRChildren');
for (var c=0; c<searchData[e][1].length-1; c++)
{
var srChild = document.createElement('a');
srChild.setAttribute('id','Item'+e+'_c'+c);
setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');
setClassAttr(srChild,'SRScope');
srChild.setAttribute('href',resultsPath+searchData[e][1][c+1][0]);
srChild.setAttribute('onclick','searchBox.CloseResultsWindow()');
if (searchData[e][1][c+1][1])
{
srChild.setAttribute('target','_parent');
}
else
{
srChild.setAttribute('target','_blank');
}
srChild.innerHTML = searchData[e][1][c+1][2];
srChildren.appendChild(srChild);
}
srEntry.appendChild(srChildren);
}
srResult.appendChild(srEntry);
results.appendChild(srResult);
}
}
function init_search()
{
var results = document.getElementById("MSearchSelectWindow");
results.tabIndex=0;
for (var key in indexSectionLabels)
{
var link = document.createElement('a');
link.setAttribute('class','SelectItem');
link.setAttribute('onclick','searchBox.OnSelectItem('+key+')');
link.href='javascript:void(0)';
link.innerHTML='<span class="SelectionMark">&#160;</span>'+indexSectionLabels[key];
results.appendChild(link);
}
searchBox.OnSelectItem(0);
var input = document.getElementById("MSearchSelect");
var searchSelectWindow = document.getElementById("MSearchSelectWindow");
input.tabIndex=0;
input.addEventListener("keydown", function(event) {
if (event.keyCode==13 || event.keyCode==40) {
event.preventDefault();
if (searchSelectWindow.style.display == 'block') {
searchBox.CloseSelectionWindow();
} else {
searchBox.OnSearchSelectShow();
searchBox.DOMSearchSelectWindow().focus();
}
}
});
}
/* @license-end */

View File

@@ -0,0 +1,36 @@
var indexSectionsWithContent =
{
0: "cdfhinortwxy",
1: "t",
2: "t",
3: "cdhnortwxy",
4: "t",
5: "t",
6: "t",
7: "t"
};
var indexSectionNames =
{
0: "all",
1: "classes",
2: "functions",
3: "variables",
4: "typedefs",
5: "enums",
6: "enumvalues",
7: "groups"
};
var indexSectionLabels =
{
0: "All",
1: "Data Structures",
2: "Functions",
3: "Variables",
4: "Typedefs",
5: "Enumerations",
6: "Enumerator",
7: "Modules"
};

View File

@@ -0,0 +1,5 @@
var searchData=
[
['tjhandle_0',['tjhandle',['../group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763',1,'turbojpeg.h']]],
['tjtransform_1',['tjtransform',['../group___turbo_j_p_e_g.html#ga504805ec0161f1b505397ca0118bf8fd',1,'turbojpeg.h']]]
];

View File

@@ -0,0 +1,4 @@
var searchData=
[
['customfilter_0',['customFilter',['../structtjtransform.html#a0dc7697d59a7abe48afc629e96cbc1d2',1,'tjtransform']]]
];

View File

@@ -0,0 +1,5 @@
var searchData=
[
['data_0',['data',['../structtjtransform.html#a688fe8f1a8ecc12a538d9e561cf338e3',1,'tjtransform']]],
['denom_1',['denom',['../structtjscalingfactor.html#aefbcdf3e9e62274b2d312c695f133ce3',1,'tjscalingfactor']]]
];

View File

@@ -0,0 +1,4 @@
var searchData=
[
['h_0',['h',['../structtjregion.html#aecefc45a26f4d8b60dd4d825c1710115',1,'tjregion']]]
];

View File

@@ -0,0 +1,4 @@
var searchData=
[
['num_0',['num',['../structtjscalingfactor.html#a9b011e57f981ee23083e2c1aa5e640ec',1,'tjscalingfactor']]]
];

View File

@@ -0,0 +1,5 @@
var searchData=
[
['op_0',['op',['../structtjtransform.html#a2525aab4ba6978a1c273f74fef50e498',1,'tjtransform']]],
['options_1',['options',['../structtjtransform.html#ac0e74655baa4402209a21e1ae481c8f6',1,'tjtransform']]]
];

Some files were not shown because too many files have changed in this diff Show More