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.
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.)
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
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.)
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 1264349e2fCloses#76
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
* 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
...
* 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'
...
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.
...
* 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.
...
* 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
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.
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().)
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.)
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
<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".
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
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.
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
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.
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
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.
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.
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
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.
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.
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.
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.)
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.)
... 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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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:
6bad905034488dd7bf174f4d057c1fd3198afc43
* 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)
* 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)
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.
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
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:
f561944ff7962c8ab21f
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:
dcd9d84f10b0d87b811f70cd5c8a493e58d9a064837b19542f73dc43ccc8a82b71a261c1b1188c21305c89284e7f443f99954c2b53b77d
Unified version with fixes:
1004a3cd05
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
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
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.)
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:
2cb4d4133036c94e050d
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.
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.
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.
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
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.
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.
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.
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.
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.
(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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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
#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.
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
* 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
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.
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)
-- 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
-- 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
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
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.
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.
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.
"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..
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.
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.
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
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.)
* 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.
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.
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.
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.
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.
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>
* 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
* 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
* 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
* 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
* 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.
...
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
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
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
-----
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
-----
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
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>
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
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.
if trellis_quant is enabled, increment total number of
passes by optimization beginning pass number.
Signed-off-by: Arjun Sreedharan <arjun024@gmail.com>
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.
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.
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
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
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.
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
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.
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
Optimizes quantization matrix by minimizing reconstruction error based
on quantized coefficients.
Feature is controlled by cinfo->trellis_q_opt; disabled by default.
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.
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.
-- 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
-- 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.
-- 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
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
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.
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
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.
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.
Multiple trellis iterations may improve coding performance as Huffman
tables are updated with each iteration. In practice the benefit appears
to be very minimal
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
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
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
-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
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.
First implementation of scan optimisation as done by jpgcrush. Many
parameters are currently hardcoded which should be changed.
Implementation is missing for monochrome.
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
-- 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.
-- 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
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}.
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
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.
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.
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.
MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world's deployed decoders.
MozJPEG is based on [libjpeg-turbo](https://github.com/libjpeg-turbo/libjpeg-turbo). It's compatible with libjpeg API and ABI, and can be used as a drop-in replacement for libjpeg. MozJPEG makes tradeoffs that are intended to benefit Web use cases and focuses solely on improving encoding, so it's best used as part of a Web encoding workflow.
MozJPEG is meant to be used as a library in graphics programs and image processing tools. We include a demo `cjpeg` tool, but it's not intended for serious use. We encourage authors of graphics programs to use MozJPEG's [C API](libjpeg.txt) 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 using libjpeg.
<trclass="memdesc:ga0f6dbd18adf38b7d46ac547f0f4d562c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The number of transform operations. <ahref="#ga0f6dbd18adf38b7d46ac547f0f4d562c">More...</a><br/></td></tr>
<trclass="memdesc:ga50e03cb5ed115330e212417429600b00"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This option will cause <aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> to return an error if the transform is not perfect. <ahref="#ga50e03cb5ed115330e212417429600b00">More...</a><br/></td></tr>
<trclass="memdesc:ga50e03cb5ed115330e212417429600b00"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This option will cause <aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> to return an error if the transform is not perfect. <ahref="#ga50e03cb5ed115330e212417429600b00">More...</a><br/></td></tr>
<trclass="memdesc:ga319826b7eb1583c0595bbe7b95428709"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This option will cause <aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> to discard any partial MCU blocks that cannot be transformed. <ahref="#ga319826b7eb1583c0595bbe7b95428709">More...</a><br/></td></tr>
<trclass="memdesc:ga319826b7eb1583c0595bbe7b95428709"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This option will cause <aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> to discard any partial MCU blocks that cannot be transformed. <ahref="#ga319826b7eb1583c0595bbe7b95428709">More...</a><br/></td></tr>
<trclass="memdesc:ga9c771a757fc1294add611906b89ab2d2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This option will enable lossless cropping. <ahref="#ga9c771a757fc1294add611906b89ab2d2">More...</a><br/></td></tr>
@@ -144,7 +144,7 @@ Macros</h2></td></tr>
<trclass="memdesc:ga3acee7b48ade1b99e5588736007c2589"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This option will discard the color data in the input image and produce a grayscale output image. <ahref="#ga3acee7b48ade1b99e5588736007c2589">More...</a><br/></td></tr>
<trclass="memdesc:gafbf992bbf6e006705886333703ffab31"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This option will prevent <aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> from outputting a JPEG image for this particular transform (this can be used in conjunction with a custom filter to capture the transformed DCT coefficients without transcoding them.) <ahref="#gafbf992bbf6e006705886333703ffab31">More...</a><br/></td></tr>
<trclass="memdesc:gafbf992bbf6e006705886333703ffab31"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This option will prevent <aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> from outputting a JPEG image for this particular transform (this can be used in conjunction with a custom filter to capture the transformed DCT coefficients without transcoding them.) <ahref="#gafbf992bbf6e006705886333703ffab31">More...</a><br/></td></tr>
<trclass="memdesc:ga0aba955473315e405295d978f0c16511"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Pad the given width to the nearest 32-bit boundary. <ahref="#ga0aba955473315e405295d978f0c16511">More...</a><br/></td></tr>
<trclass="memdesc:ga2de531af4e7e6c4f124908376b354866"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Transform operations for <aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a><ahref="group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866">More...</a><br/></td></tr>
<trclass="memdesc:ga2de531af4e7e6c4f124908376b354866"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Transform operations for <aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a><ahref="group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866">More...</a><br/></td></tr>
<trclass="memitem:gaba62b7a98f960839b588579898495cf2"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#gaba62b7a98f960839b588579898495cf2">tjCompress2</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegSubsamp, int jpegQual, int flags)</td></tr>
<trclass="memdesc:gaba62b7a98f960839b588579898495cf2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Compress an RGB, grayscale, or CMYK image into a JPEG image. <ahref="#gaba62b7a98f960839b588579898495cf2">More...</a><br/></td></tr>
<trclass="memitem:ga0b931126c7a615ddc3bbd0cca6698d67"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga0b931126c7a615ddc3bbd0cca6698d67">tjCompressFromYUV</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char *srcBuf, int width, int pad, int height, int subsamp, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegQual, int flags)</td></tr>
<trclass="memdesc:ga0b931126c7a615ddc3bbd0cca6698d67"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Compress a YUV planar image into a JPEG image. <ahref="#ga0b931126c7a615ddc3bbd0cca6698d67">More...</a><br/></td></tr>
<trclass="memitem:gaa89a1982cb4556b12ae7af4439991af6"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#gaa89a1982cb4556b12ae7af4439991af6">tjCompressFromYUVPlanes</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char **srcPlanes, int width, int *strides, int height, int subsamp, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegQual, int flags)</td></tr>
<trclass="memdesc:gaa89a1982cb4556b12ae7af4439991af6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Compress a set of Y, U (Cb), and V (Cr) image planes into a JPEG image. <ahref="#gaa89a1982cb4556b12ae7af4439991af6">More...</a><br/></td></tr>
<trclass="memitem:gaf38f2ed44bdc88e730e08b632fa6e88e"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#gaf38f2ed44bdc88e730e08b632fa6e88e">tjCompress2</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegSubsamp, int jpegQual, int flags)</td></tr>
<trclass="memdesc:gaf38f2ed44bdc88e730e08b632fa6e88e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Compress an RGB, grayscale, or CMYK image into a JPEG image. <ahref="#gaf38f2ed44bdc88e730e08b632fa6e88e">More...</a><br/></td></tr>
<trclass="memitem:ga6f6de375d6ec0020faba627e37e5a060"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga6f6de375d6ec0020faba627e37e5a060">tjCompressFromYUV</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int width, int pad, int height, int subsamp, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegQual, int flags)</td></tr>
<trclass="memdesc:ga6f6de375d6ec0020faba627e37e5a060"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Compress a YUV planar image into a JPEG image. <ahref="#ga6f6de375d6ec0020faba627e37e5a060">More...</a><br/></td></tr>
<trclass="memitem:ga0b84c682d8accf097d7a743c965d3464"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga0b84c682d8accf097d7a743c965d3464">tjCompressFromYUVPlanes</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char **srcPlanes, int width, const int *strides, int height, int subsamp, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegQual, int flags)</td></tr>
<trclass="memdesc:ga0b84c682d8accf097d7a743c965d3464"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Compress a set of Y, U (Cb), and V (Cr) image planes into a JPEG image. <ahref="#ga0b84c682d8accf097d7a743c965d3464">More...</a><br/></td></tr>
<trclass="memitem:gaccc5bca7f12fcdcc302e6e1c6d4b311b"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT unsigned long DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#gaccc5bca7f12fcdcc302e6e1c6d4b311b">tjBufSize</a> (int width, int height, int jpegSubsamp)</td></tr>
<trclass="memdesc:gaccc5bca7f12fcdcc302e6e1c6d4b311b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The maximum size of the buffer (in bytes) required to hold a JPEG image with the given parameters. <ahref="#gaccc5bca7f12fcdcc302e6e1c6d4b311b">More...</a><br/></td></tr>
<trclass="memitem:ga1a209696c6a80748f20e134b3c64789f"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f">tjPlaneHeight</a> (int componentID, int height, int subsamp)</td></tr>
<trclass="memdesc:ga1a209696c6a80748f20e134b3c64789f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The plane height of a YUV image plane with the given parameters. <ahref="#ga1a209696c6a80748f20e134b3c64789f">More...</a><br/></td></tr>
<trclass="memitem:ga0a5ffbf7cb58a5b6a8201114fe889360"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga0a5ffbf7cb58a5b6a8201114fe889360">tjEncodeYUV3</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char *dstBuf, int pad, int subsamp, int flags)</td></tr>
<trclass="memdesc:ga0a5ffbf7cb58a5b6a8201114fe889360"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Encode an RGB or grayscale image into a YUV planar image. <ahref="#ga0a5ffbf7cb58a5b6a8201114fe889360">More...</a><br/></td></tr>
<trclass="memitem:gaa791db8598853ddcad24e42897ef1269"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#gaa791db8598853ddcad24e42897ef1269">tjEncodeYUVPlanes</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char **dstPlanes, int *strides, int subsamp, int flags)</td></tr>
<trclass="memdesc:gaa791db8598853ddcad24e42897ef1269"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Encode an RGB or grayscale image into separate Y, U (Cb), and V (Cr) image planes. <ahref="#gaa791db8598853ddcad24e42897ef1269">More...</a><br/></td></tr>
<trclass="memitem:gaabe05acd734990053ad1294b5ef239aa"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#gaabe05acd734990053ad1294b5ef239aa">tjEncodeYUV3</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char *dstBuf, int pad, int subsamp, int flags)</td></tr>
<trclass="memdesc:gaabe05acd734990053ad1294b5ef239aa"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Encode an RGB or grayscale image into a YUV planar image. <ahref="#gaabe05acd734990053ad1294b5ef239aa">More...</a><br/></td></tr>
<trclass="memitem:ga8a65ed3bd12df57c219d46afbc9008f1"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga8a65ed3bd12df57c219d46afbc9008f1">tjEncodeYUVPlanes</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat, unsigned char **dstPlanes, int *strides, int subsamp, int flags)</td></tr>
<trclass="memdesc:ga8a65ed3bd12df57c219d46afbc9008f1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Encode an RGB or grayscale image into separate Y, U (Cb), and V (Cr) image planes. <ahref="#ga8a65ed3bd12df57c219d46afbc9008f1">More...</a><br/></td></tr>
<trclass="memitem:gacd0fac3af74b3511d39b4781b7103086"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#gacd0fac3af74b3511d39b4781b7103086">tjDecompressHeader3</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char *jpegBuf, unsigned long jpegSize, int *width, int *height, int *jpegSubsamp, int *jpegColorspace)</td></tr>
<trclass="memdesc:gacd0fac3af74b3511d39b4781b7103086"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieve information about a JPEG image without decompressing it. <ahref="#gacd0fac3af74b3511d39b4781b7103086">More...</a><br/></td></tr>
<trclass="memitem:ga3fced455e504e8ff4fbad28ba94a3020"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga3fced455e504e8ff4fbad28ba94a3020">tjDecompressHeader3</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, int *width, int *height, int *jpegSubsamp, int *jpegColorspace)</td></tr>
<trclass="memdesc:ga3fced455e504e8ff4fbad28ba94a3020"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieve information about a JPEG image without decompressing it. <ahref="#ga3fced455e504e8ff4fbad28ba94a3020">More...</a><br/></td></tr>
<trclass="memdesc:ga6449044b9af402999ccf52f401333be8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a list of fractional scaling factors that the JPEG decompressor in this implementation of TurboJPEG supports. <ahref="#ga6449044b9af402999ccf52f401333be8">More...</a><br/></td></tr>
<trclass="memitem:gada69cc6443d1bb493b40f1626259e5e9"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#gada69cc6443d1bb493b40f1626259e5e9">tjDecompress2</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
<trclass="memdesc:gada69cc6443d1bb493b40f1626259e5e9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Decompress a JPEG image to an RGB, grayscale, or CMYK image. <ahref="#gada69cc6443d1bb493b40f1626259e5e9">More...</a><br/></td></tr>
<trclass="memitem:ga7c08b340ad7f8e85d407bd9e81d44d07"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga7c08b340ad7f8e85d407bd9e81d44d07">tjDecompressToYUV2</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf, int width, int pad, int height, int flags)</td></tr>
<trclass="memdesc:ga7c08b340ad7f8e85d407bd9e81d44d07"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Decompress a JPEG image to a YUV planar image. <ahref="#ga7c08b340ad7f8e85d407bd9e81d44d07">More...</a><br/></td></tr>
<trclass="memitem:ga0828a38ae29631ac28b6857cefb0eebf"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga0828a38ae29631ac28b6857cefb0eebf">tjDecompressToYUVPlanes</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char *jpegBuf, unsigned long jpegSize, unsigned char **dstPlanes, int width, int *strides, int height, int flags)</td></tr>
<trclass="memdesc:ga0828a38ae29631ac28b6857cefb0eebf"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Decompress a JPEG image into separate Y, U (Cb), and V (Cr) image planes. <ahref="#ga0828a38ae29631ac28b6857cefb0eebf">More...</a><br/></td></tr>
<trclass="memitem:ga132ae2c2cadcf64c8bb0f3bdf69da3ed"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga132ae2c2cadcf64c8bb0f3bdf69da3ed">tjDecodeYUV</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char *srcBuf, int pad, int subsamp, unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
<trclass="memdesc:ga132ae2c2cadcf64c8bb0f3bdf69da3ed"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Decode a YUV planar image into an RGB or grayscale image. <ahref="#ga132ae2c2cadcf64c8bb0f3bdf69da3ed">More...</a><br/></td></tr>
<trclass="memitem:ga6cb5b0e1101a2b20edea576e11faf93d"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga6cb5b0e1101a2b20edea576e11faf93d">tjDecodeYUVPlanes</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char **srcPlanes, int *strides, int subsamp, unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
<trclass="memdesc:ga6cb5b0e1101a2b20edea576e11faf93d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Decode a set of Y, U (Cb), and V (Cr) image planes into an RGB or grayscale image. <ahref="#ga6cb5b0e1101a2b20edea576e11faf93d">More...</a><br/></td></tr>
<trclass="memitem:gad8026a417e16a76313bc0a6c9e8b2ba2"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#gad8026a417e16a76313bc0a6c9e8b2ba2">tjDecompress2</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
<trclass="memdesc:gad8026a417e16a76313bc0a6c9e8b2ba2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Decompress a JPEG image to an RGB, grayscale, or CMYK image. <ahref="#gad8026a417e16a76313bc0a6c9e8b2ba2">More...</a><br/></td></tr>
<trclass="memitem:ga39e08906528db5a764670ea48d344b09"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga39e08906528db5a764670ea48d344b09">tjDecompressToYUV2</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf, int width, int pad, int height, int flags)</td></tr>
<trclass="memdesc:ga39e08906528db5a764670ea48d344b09"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Decompress a JPEG image to a YUV planar image. <ahref="#ga39e08906528db5a764670ea48d344b09">More...</a><br/></td></tr>
<trclass="memitem:ga38d0ef90692663b3ffb5b16da2541512"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga38d0ef90692663b3ffb5b16da2541512">tjDecompressToYUVPlanes</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char **dstPlanes, int width, int *strides, int height, int flags)</td></tr>
<trclass="memdesc:ga38d0ef90692663b3ffb5b16da2541512"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Decompress a JPEG image into separate Y, U (Cb), and V (Cr) image planes. <ahref="#ga38d0ef90692663b3ffb5b16da2541512">More...</a><br/></td></tr>
<trclass="memitem:ga077c61027b875afecd5a1613bf18b3c1"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga077c61027b875afecd5a1613bf18b3c1">tjDecodeYUV</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *srcBuf, int pad, int subsamp, unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
<trclass="memdesc:ga077c61027b875afecd5a1613bf18b3c1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Decode a YUV planar image into an RGB or grayscale image. <ahref="#ga077c61027b875afecd5a1613bf18b3c1">More...</a><br/></td></tr>
<trclass="memitem:gaf42f19b7a496eb18bdc84fe61ee6d3e2"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#gaf42f19b7a496eb18bdc84fe61ee6d3e2">tjDecodeYUVPlanes</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char **srcPlanes, const int *strides, int subsamp, unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat, int flags)</td></tr>
<trclass="memdesc:gaf42f19b7a496eb18bdc84fe61ee6d3e2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Decode a set of Y, U (Cb), and V (Cr) image planes into an RGB or grayscale image. <ahref="#gaf42f19b7a496eb18bdc84fe61ee6d3e2">More...</a><br/></td></tr>
<trclass="memdesc:ga3155b775bfbac9dbba869b95a0367902"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Create a new TurboJPEG transformer instance. <ahref="#ga3155b775bfbac9dbba869b95a0367902">More...</a><br/></td></tr>
<trclass="memitem:gae403193ceb4aafb7e0f56ab587b48616"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616">tjTransform</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, <aclass="el"href="structtjtransform.html">tjtransform</a> *transforms, int flags)</td></tr>
<trclass="memdesc:gae403193ceb4aafb7e0f56ab587b48616"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Losslessly transform a JPEG image into another JPEG image. <ahref="#gae403193ceb4aafb7e0f56ab587b48616">More...</a><br/></td></tr>
<trclass="memitem:gad02cd42b69f193a0623a9c801788df3a"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a">tjTransform</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle, const unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, <aclass="el"href="structtjtransform.html">tjtransform</a> *transforms, int flags)</td></tr>
<trclass="memdesc:gad02cd42b69f193a0623a9c801788df3a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Losslessly transform a JPEG image into another JPEG image. <ahref="#gad02cd42b69f193a0623a9c801788df3a">More...</a><br/></td></tr>
<trclass="memitem:ga674adee917b95ad4a896f1ba39e12540"><tdclass="memItemLeft"align="right"valign="top">DLLEXPORT int DLLCALL </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group___turbo_j_p_e_g.html#ga674adee917b95ad4a896f1ba39e12540">tjDestroy</a> (<aclass="el"href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> handle)</td></tr>
<trclass="memdesc:ga674adee917b95ad4a896f1ba39e12540"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Destroy a TurboJPEG compressor, decompressor, or transformer instance. <ahref="#ga674adee917b95ad4a896f1ba39e12540">More...</a><br/></td></tr>
<p>If passed to <aclass="el"href="group___turbo_j_p_e_g.html#gaba62b7a98f960839b588579898495cf2"title="Compress an RGB, grayscale, or CMYK image into a JPEG image.">tjCompress2()</a> or <aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a>, this flag will cause those functions to generate an error if the JPEG image buffer is invalid or too small rather than attempting to allocate or reallocate that buffer. This reproduces the behavior of earlier versions of TurboJPEG. </p>
<p>If passed to <aclass="el"href="group___turbo_j_p_e_g.html#gaf38f2ed44bdc88e730e08b632fa6e88e"title="Compress an RGB, grayscale, or CMYK image into a JPEG image.">tjCompress2()</a> or <aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a>, this flag will cause those functions to generate an error if the JPEG image buffer is invalid or too small rather than attempting to allocate or reallocate that buffer. This reproduces the behavior of earlier versions of TurboJPEG. </p>
</div>
</div>
@@ -517,7 +517,7 @@ Variables</h2></td></tr>
</div><divclass="memdoc">
<p>This option will enable lossless cropping. </p>
<p>See <aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> for more information. </p>
<p>See <aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> for more information. </p>
</div>
</div>
@@ -545,7 +545,7 @@ Variables</h2></td></tr>
</table>
</div><divclass="memdoc">
<p>This option will prevent <aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> from outputting a JPEG image for this particular transform (this can be used in conjunction with a custom filter to capture the transformed DCT coefficients without transcoding them.) </p>
<p>This option will prevent <aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> from outputting a JPEG image for this particular transform (this can be used in conjunction with a custom filter to capture the transformed DCT coefficients without transcoding them.) </p>
</div>
</div>
@@ -559,7 +559,7 @@ Variables</h2></td></tr>
</table>
</div><divclass="memdoc">
<p>This option will cause <aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> to return an error if the transform is not perfect. </p>
<p>This option will cause <aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> to return an error if the transform is not perfect. </p>
<p>Lossless transforms operate on MCU blocks, whose size depends on the level of chrominance subsampling used (see <aclass="el"href="group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c"title="MCU block width (in pixels) for a given level of chrominance subsampling.">tjMCUWidth</a> and <aclass="el"href="group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf"title="MCU block height (in pixels) for a given level of chrominance subsampling.">tjMCUHeight</a>.) If the image's width or height is not evenly divisible by the MCU block size, then there will be partial MCU blocks on the right and/or bottom edges. It is not possible to move these partial MCU blocks to the top or left of the image, so any transform that would require that is "imperfect." If this option is not specified, then any partial MCU blocks that cannot be transformed will be left in place, which will create odd-looking strips on the right or bottom edge of the image. </p>
</div>
@@ -574,7 +574,7 @@ Variables</h2></td></tr>
</table>
</div><divclass="memdoc">
<p>This option will cause <aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> to discard any partial MCU blocks that cannot be transformed. </p>
<p>This option will cause <aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> to discard any partial MCU blocks that cannot be transformed. </p>
</div>
</div>
@@ -761,7 +761,7 @@ Variables</h2></td></tr>
</table>
</div><divclass="memdoc">
<p>Transform operations for <aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a></p>
<p>Transform operations for <aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a></p>
<p>Do not transform the position of the image pixels. </p>
@@ -812,7 +812,7 @@ Variables</h2></td></tr>
</div><divclass="memdoc">
<p>Allocate an image buffer for use with TurboJPEG. </p>
<p>You should always use this function to allocate the JPEG destination buffer(s) for <aclass="el"href="group___turbo_j_p_e_g.html#gaba62b7a98f960839b588579898495cf2"title="Compress an RGB, grayscale, or CMYK image into a JPEG image.">tjCompress2()</a> and <aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> unless you are disabling automatic buffer (re)allocation (by setting <aclass="el"href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963"title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a>.)</p>
<p>You should always use this function to allocate the JPEG destination buffer(s) for <aclass="el"href="group___turbo_j_p_e_g.html#gaf38f2ed44bdc88e730e08b632fa6e88e"title="Compress an RGB, grayscale, or CMYK image into a JPEG image.">tjCompress2()</a> and <aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> unless you are disabling automatic buffer (re)allocation (by setting <aclass="el"href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963"title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a>.)</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">bytes</td><td>the number of bytes to allocate</td></tr>
@@ -1942,7 +1942,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
</div><divclass="memdoc">
<p>Free an image buffer previously allocated by TurboJPEG. </p>
<p>You should always use this function to free JPEG destination buffer(s) that were automatically (re)allocated by <aclass="el"href="group___turbo_j_p_e_g.html#gaba62b7a98f960839b588579898495cf2"title="Compress an RGB, grayscale, or CMYK image into a JPEG image.">tjCompress2()</a> or <aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> or that were manually allocated using <aclass="el"href="group___turbo_j_p_e_g.html#ga5c9234bda6d993cdaffdd89bf81a00ff"title="Allocate an image buffer for use with TurboJPEG.">tjAlloc()</a>.</p>
<p>You should always use this function to free JPEG destination buffer(s) that were automatically (re)allocated by <aclass="el"href="group___turbo_j_p_e_g.html#gaf38f2ed44bdc88e730e08b632fa6e88e"title="Compress an RGB, grayscale, or CMYK image into a JPEG image.">tjCompress2()</a> or <aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a> or that were manually allocated using <aclass="el"href="group___turbo_j_p_e_g.html#ga5c9234bda6d993cdaffdd89bf81a00ff"title="Allocate an image buffer for use with TurboJPEG.">tjAlloc()</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">buffer</td><td>address of the buffer to free</td></tr>
@@ -2199,7 +2199,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
['tjtransform',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616',1,'tjTransform(tjhandle handle, unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, tjtransform *transforms, int flags): turbojpeg.h'],['../group___turbo_j_p_e_g.html#gaa29f3189c41be12ec5dee7caec318a31',1,'tjtransform(): turbojpeg.h']]],
['tjtransform',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a',1,'tjTransform(tjhandle handle, const unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, tjtransform *transforms, int flags): turbojpeg.h'],['../group___turbo_j_p_e_g.html#gaa29f3189c41be12ec5dee7caec318a31',1,'tjtransform(): turbojpeg.h']]],
<tr><tdclass="paramname">arrayRegion</td><td><aclass="el"href="structtjregion.html"title="Cropping region.">tjregion</a> structure containing the width and height of the array pointed to by <code>coeffs</code> as well as its offset relative to the component plane. TurboJPEG implementations may choose to split each component plane into multiple DCT coefficient arrays and call the callback function once for each array.</td></tr>
<tr><tdclass="paramname">planeRegion</td><td><aclass="el"href="structtjregion.html"title="Cropping region.">tjregion</a> structure containing the width and height of the component plane to which <code>coeffs</code> belongs</td></tr>
<tr><tdclass="paramname">componentID</td><td>ID number of the component plane to which <code>coeffs</code> belongs (Y, Cb, and Cr have, respectively, ID's of 0, 1, and 2 in typical JPEG images.)</td></tr>
<tr><tdclass="paramname">transformID</td><td>ID number of the transformed image to which <code>coeffs</code> belongs. This is the same as the index of the transform in the <code>transforms</code> array that was passed to <aclass="el"href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a>.</td></tr>
<tr><tdclass="paramname">transformID</td><td>ID number of the transformed image to which <code>coeffs</code> belongs. This is the same as the index of the transform in the <code>transforms</code> array that was passed to <aclass="el"href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a"title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a>.</td></tr>
<tr><tdclass="paramname">transform</td><td>a pointer to a <aclass="el"href="structtjtransform.html"title="Lossless transform.">tjtransform</a> structure that specifies the parameters and/or cropping region for this transform</td></tr>
<li><ahref="org/libjpegturbo/turbojpeg/TJCompressor.html"title="class in org.libjpegturbo.turbojpeg"target="classFrame">TJCompressor</a></li>
<li><ahref="org/libjpegturbo/turbojpeg/TJCustomFilter.html"title="interface in org.libjpegturbo.turbojpeg"target="classFrame"><i>TJCustomFilter</i></a></li>
<li><ahref="org/libjpegturbo/turbojpeg/TJDecompressor.html"title="class in org.libjpegturbo.turbojpeg"target="classFrame">TJDecompressor</a></li>
<li><ahref="org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg"target="classFrame">TJException</a></li>
<li><ahref="org/libjpegturbo/turbojpeg/TJScalingFactor.html"title="class in org.libjpegturbo.turbojpeg"target="classFrame">TJScalingFactor</a></li>
<li><ahref="org/libjpegturbo/turbojpeg/TJTransform.html"title="class in org.libjpegturbo.turbojpeg"target="classFrame">TJTransform</a></li>
<li><ahref="org/libjpegturbo/turbojpeg/TJTransformer.html"title="class in org.libjpegturbo.turbojpeg"target="classFrame">TJTransformer</a></li>
source image stored in <code>yuvImage</code> with the newly created
instance.</div>
</dd>
<dt><ahref="./org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJException</span></a> - Exception in <ahref="./org/libjpegturbo/turbojpeg/package-summary.html">org.libjpegturbo.turbojpeg</a></dt>
<dd> </dd>
<dt><spanclass="strong"><ahref="./org/libjpegturbo/turbojpeg/TJException.html#TJException()">TJException()</a></span> - Constructor for exception org.libjpegturbo.turbojpeg.<ahref="./org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></dt>
<dd> </dd>
<dt><spanclass="strong"><ahref="./org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.String,%20java.lang.Throwable)">TJException(String, Throwable)</a></span> - Constructor for exception org.libjpegturbo.turbojpeg.<ahref="./org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></dt>
<dd> </dd>
<dt><spanclass="strong"><ahref="./org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.String)">TJException(String)</a></span> - Constructor for exception org.libjpegturbo.turbojpeg.<ahref="./org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></dt>
<dd> </dd>
<dt><spanclass="strong"><ahref="./org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.Throwable)">TJException(Throwable)</a></span> - Constructor for exception org.libjpegturbo.turbojpeg.<ahref="./org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></dt>
<dd> </dd>
<dt><ahref="./org/libjpegturbo/turbojpeg/TJScalingFactor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJScalingFactor</span></a> - Class in <ahref="./org/libjpegturbo/turbojpeg/package-summary.html">org.libjpegturbo.turbojpeg</a></dt>
<divclass="block">Returns the maximum size of the buffer (in bytes) required to hold a JPEG
image with the given width, height, and level of chrominance subsampling.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>width</code> - the width (in pixels) of the JPEG image</dd><dd><code>height</code> - the height (in pixels) of the JPEG image</dd><dd><code>jpegSubsamp</code> - the level of chrominance subsampling to be used when
generating the JPEG image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html"title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>the maximum size of the buffer (in bytes) required to hold a JPEG
image with the given width, height, and level of chrominance subsampling.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
image with the given width, height, and level of chrominance subsampling.</dd></dl>
</li>
</ul>
<aname="bufSizeYUV(int, int, int, int)">
@@ -1114,17 +1093,14 @@ public static final int FLAG_FORCESSE3</pre>
<divclass="block">Returns the size of the buffer (in bytes) required to hold a YUV planar
image with the given width, height, and level of chrominance subsampling.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>width</code> - the width (in pixels) of the YUV image</dd><dd><code>pad</code> - the width of each line in each plane of the image is padded to
the nearest multiple of this number of bytes (must be a power of 2.)</dd><dd><code>height</code> - the height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html"title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>the size of the buffer (in bytes) required to hold a YUV planar
image with the given width, height, and level of chrominance subsampling.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
image with the given width, height, and level of chrominance subsampling.</dd></dl>
</li>
</ul>
<aname="bufSizeYUV(int, int, int)">
@@ -1136,11 +1112,8 @@ public static final int FLAG_FORCESSE3</pre>
<pre>@Deprecated
public static int bufSizeYUV(int width,
<divclass="block">Returns the plane width of a YUV image plane with the given parameters.
Refer to <ahref="../../../org/libjpegturbo/turbojpeg/YUVImage.html"title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane width.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
2 = V/Cr)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV image
(one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html"title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>the plane width of a YUV image plane with the given parameters.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
<dt><spanclass="strong">Returns:</span></dt><dd>the plane width of a YUV image plane with the given parameters.</dd></dl>
</li>
</ul>
<aname="planeHeight(int, int, int)">
@@ -1196,16 +1163,13 @@ public static int bufSizeYUV(int width,
<divclass="block">Returns the plane height of a YUV image plane with the given parameters.
Refer to <ahref="../../../org/libjpegturbo/turbojpeg/YUVImage.html"title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> for a description of plane height.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>componentID</code> - ID number of the image plane (0 = Y, 1 = U/Cb,
2 = V/Cr)</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV image
(one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html"title="class in org.libjpegturbo.turbojpeg"><code>TJ.SAMP_*</code></a>)</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>the plane height of a YUV image plane with the given parameters.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
<dt><spanclass="strong">Returns:</span></dt><dd>the plane height of a YUV image plane with the given parameters.</dd></dl>
</li>
</ul>
<aname="getScalingFactors()">
@@ -1214,14 +1178,11 @@ public static int bufSizeYUV(int width,
<ulclass="blockListLast">
<liclass="blockList">
<h4>getScalingFactors</h4>
<pre>public static <ahref="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html"title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[] getScalingFactors()
throws java.lang.Exception</pre>
<pre>public static <ahref="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html"title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a>[] getScalingFactors()</pre>
<divclass="block">Returns a list of fractional scaling factors that the JPEG decompressor in
this implementation of TurboJPEG supports.</div>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>a list of fractional scaling factors that the JPEG decompressor in
this implementation of TurboJPEG supports.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
this implementation of TurboJPEG supports.</dd></dl>
throws <ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
<divclass="block">Create a TurboJPEG compressor instance and associate the uncompressed
source image stored in <code>srcImage</code> with the newly created
instance.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>srcImage</code> - see <ahref="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>x</code> - see <ahref="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>y</code> - see <ahref="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>width</code> - see <ahref="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>pitch</code> - see <ahref="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>height</code> - see <ahref="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>setSourceImage(byte[], int, int, int, int, int, int)</code></a> for description</dd><dd><code>pixelFormat</code> - pixel format of the source image (one of
<ahref="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd><dd><code>height</code> - see
<ahref="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>setSourceImage(BufferedImage, int, int, int, int)</code></a> for description</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
<dd><code><ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
throws <ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
<divclass="block">Associate an uncompressed RGB or grayscale source image with this
compressor instance.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>srcImage</code> - a <code>BufferedImage</code> instance containing RGB or
grayscale pixels to be compressed or encoded</dd><dd><code>x</code> - x offset (in pixels) of the region in the source image from which
grayscale pixels to be compressed or encoded. This image is not modified.</dd><dd><code>x</code> - x offset (in pixels) of the region in the source image from which
the JPEG or YUV image should be compressed/encoded</dd><dd><code>y</code> - y offset (in pixels) of the region in the source image from which
the JPEG or YUV image should be compressed/encoded</dd><dd><code>width</code> - width (in pixels) of the region in the source image from
which the JPEG or YUV image should be compressed/encoded (0 = use the
<pre>public void setSourceImage(<ahref="../../../org/libjpegturbo/turbojpeg/YUVImage.html"title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)
throws java.lang.Exception</pre>
throws <ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
<divclass="block">Associate an uncompressed YUV planar source image with this compressor
instance.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>srcImage</code> - YUV planar image to be compressed</dd>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>srcImage</code> - YUV planar image to be compressed. This image is not
modified.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
<dd><code><ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
<divclass="block">Set the level of chrominance subsampling for subsequent compress/encode
operations. When pixels are converted from RGB to YCbCr (see
<ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCbCr"><code>TJ.CS_YCbCr</code></a>) or from CMYK to YCCK (see <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#CS_YCCK"><code>TJ.CS_YCCK</code></a>) as part
<dt><spanclass="strong">Returns:</span></dt><dd>a buffer containing a JPEG image. The length of this buffer will
not be equal to the size of the JPEG image. Use <ahref="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#getCompressedSize()"><code>getCompressedSize()</code></a> to obtain the size of the JPEG image.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
<dd><code><ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
<pre>public void encodeYUV(<ahref="../../../org/libjpegturbo/turbojpeg/YUVImage.html"title="class in org.libjpegturbo.turbojpeg">YUVImage</a> dstImage,
int flags)
throws java.lang.Exception</pre>
throws <ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
<divclass="block">Encode the uncompressed source image associated with this compressor
instance into a YUV planar image and store it in the given
<code>YUVImage</code> instance. This method uses the accelerated color
<pre>public <ahref="../../../org/libjpegturbo/turbojpeg/YUVImage.html"title="class in org.libjpegturbo.turbojpeg">YUVImage</a> encodeYUV(int pad,
int flags)
throws java.lang.Exception</pre>
throws <ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
<divclass="block">Encode the uncompressed source image associated with this compressor
instance into a unified YUV planar image buffer and return a
<code>YUVImage</code> instance containing the encoded image. This method
<pre>public <ahref="../../../org/libjpegturbo/turbojpeg/YUVImage.html"title="class in org.libjpegturbo.turbojpeg">YUVImage</a> encodeYUV(int[] strides,
int flags)
throws java.lang.Exception</pre>
throws <ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
<divclass="block">Encode the uncompressed source image associated with this compressor
instance into separate Y, U (Cb), and V (Cr) image planes and return a
<code>YUVImage</code> instance containing the encoded image planes. This
<ahref="../../../org/libjpegturbo/turbojpeg/TJTransform.html"title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)
throws java.lang.Exception</pre>
throws <ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
<divclass="block">A callback function that can be used to modify the DCT coefficients after
they are losslessly transformed but before they are transcoded to a new
JPEG image. This allows for custom filters or other transformations to be
@@ -165,7 +165,7 @@
transform in the <code>transforms</code> array that was passed to <ahref="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a>.</dd><dd><code>transform</code> - a <ahref="../../../org/libjpegturbo/turbojpeg/TJTransform.html"title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instance that specifies the
parameters and/or cropping region for this transform</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
<dd><code><ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html"title="interface in org.libjpegturbo.turbojpeg"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Next Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Next Class</span></a></li>
throws <ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
<divclass="block">Create a TurboJPEG decompressor instance and associate the JPEG source
image of length <code>imageSize</code> bytes stored in
<code>jpegImage</code> with the newly created instance.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
<dd><code><ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
<pre>public TJDecompressor(<ahref="../../../org/libjpegturbo/turbojpeg/YUVImage.html"title="class in org.libjpegturbo.turbojpeg">YUVImage</a> yuvImage)
throws java.lang.Exception</pre>
throws <ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
<divclass="block">Create a TurboJPEG decompressor instance and associate the YUV planar
source image stored in <code>yuvImage</code> with the newly created
instance.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>yuvImage</code> - <ahref="../../../org/libjpegturbo/turbojpeg/YUVImage.html"title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a YUV planar
image to be decoded</dd>
image to be decoded. This image is not modified.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
<dd><code><ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
throws <ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
<divclass="block">Associate the JPEG image of length <code>imageSize</code> bytes stored in
<code>jpegImage</code> with this decompressor instance. This image will
be used as the source image for subsequent decompress operations.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
<dd><code><ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
<pre>public void setSourceImage(<ahref="../../../org/libjpegturbo/turbojpeg/YUVImage.html"title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)
throws java.lang.Exception</pre>
<pre>public void setSourceImage(<ahref="../../../org/libjpegturbo/turbojpeg/YUVImage.html"title="class in org.libjpegturbo.turbojpeg">YUVImage</a> srcImage)</pre>
<divclass="block">Associate the specified YUV planar source image with this decompressor
instance. Subsequent decompress operations will decode this image into an
RGB or grayscale destination image.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>srcImage</code> - <ahref="../../../org/libjpegturbo/turbojpeg/YUVImage.html"title="class in org.libjpegturbo.turbojpeg"><code>YUVImage</code></a> instance containing a YUV planar image to
<pre>public void decompressToYUV(<ahref="../../../org/libjpegturbo/turbojpeg/YUVImage.html"title="class in org.libjpegturbo.turbojpeg">YUVImage</a> dstImage,
int flags)
throws java.lang.Exception</pre>
throws <ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
<divclass="block">Decompress the JPEG source image associated with this decompressor
instance into a YUV planar image and store it in the given
<code>YUVImage</code> instance. This method performs JPEG decompression
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html"title="interface in org.libjpegturbo.turbojpeg"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Next Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Next Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Next Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Next Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJTransform.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Next Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../org/libjpegturbo/turbojpeg/TJTransform.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">Next Class</span></a></li>
<ahref="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html"title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)
throws java.lang.Exception</pre>
<ahref="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html"title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)</pre>
<divclass="block">Create a new lossless transform instance with the given parameters.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>x</code> - the left boundary of the cropping region. This must be evenly
divisible by the MCU block width (see <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#getMCUWidth(int)"><code>TJ.getMCUWidth(int)</code></a>)</dd><dd><code>y</code> - the upper boundary of the cropping region. This must be evenly
<code>x</code>).</dd><dd><code>h</code> - the height of the cropping region. Setting this to 0 is the
equivalent of setting it to (height of the source JPEG image -
<code>y</code>).</dd><dd><code>op</code> - one of the transform operations (<code>OP_*</code>)</dd><dd><code>options</code> - the bitwise OR of one or more of the transform options
(<code>OPT_*</code>)</dd><dd><code>cf</code> - an instance of an object that implements the <ahref="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html"title="interface in org.libjpegturbo.turbojpeg"><code>TJCustomFilter</code></a> interface, or null if no custom filter is needed</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
(<code>OPT_*</code>)</dd><dd><code>cf</code> - an instance of an object that implements the <ahref="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html"title="interface in org.libjpegturbo.turbojpeg"><code>TJCustomFilter</code></a> interface, or null if no custom filter is needed</dd></dl>
<ahref="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html"title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)
throws java.lang.Exception</pre>
<ahref="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html"title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf)</pre>
<divclass="block">Create a new lossless transform instance with the given parameters.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>r</code> - a <code>Rectangle</code> instance that specifies the cropping
region. See <ahref="../../../org/libjpegturbo/turbojpeg/TJTransform.html#TJTransform(int,%20int,%20int,%20int,%20int,%20int,%20org.libjpegturbo.turbojpeg.TJCustomFilter)"><code>TJTransform(int, int, int, int, int, int, TJCustomFilter)</code></a> for more
detail.</dd><dd><code>op</code> - one of the transform operations (<code>OP_*</code>)</dd><dd><code>options</code> - the bitwise OR of one or more of the transform options
(<code>OPT_*</code>)</dd><dd><code>cf</code> - an instance of an object that implements the <ahref="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html"title="interface in org.libjpegturbo.turbojpeg"><code>TJCustomFilter</code></a> interface, or null if no custom filter is needed</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
(<code>OPT_*</code>)</dd><dd><code>cf</code> - an instance of an object that implements the <ahref="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html"title="interface in org.libjpegturbo.turbojpeg"><code>TJCustomFilter</code></a> interface, or null if no custom filter is needed</dd></dl>
throws <ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
<divclass="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
image of length <code>imageSize</code> bytes stored in
<code>jpegImage</code> with the newly created instance.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
<dd><code><ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
<pre>public <ahref="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html"title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a>[] transform(<ahref="../../../org/libjpegturbo/turbojpeg/TJTransform.html"title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
int flags)
throws java.lang.Exception</pre>
throws <ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
<divclass="block">Losslessly transform the JPEG image associated with this transformer
instance and return an array of <ahref="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html"title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
which has a transformed JPEG image associated with it.</div>
<dt><spanclass="strong">Returns:</span></dt><dd>an array of <ahref="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html"title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
which has a transformed JPEG image associated with it.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
<dd><code><ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
<divclass="block">Create a new <code>YUVImage</code> instance backed by separate image
planes, and allocate memory for the image planes.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes
strides for all planes will be set to their respective plane widths. When
using this constructor, the stride for each plane must be equal to or
greater than the plane width.</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV
image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
<divclass="block">Create a new <code>YUVImage</code> instance backed by a unified image
buffer, and allocate memory for the image buffer.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - Each line of each plane in the YUV image buffer will be padded
to this number of bytes (must be a power of 2.)</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV
image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
to each plane or to specify that this <code>YUVImage</code> instance is a
subregion of a larger image (in which case, <code>strides[i]</code> should
be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the new YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
instance, if each line in each plane of the buffer is padded to the
nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
to each plane or to specify that this <code>YUVImage</code> image is a
subregion of a larger image (in which case, <code>strides[i]</code> should
be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
<divclass="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
image data. Use <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
instance, if each line in each plane of the buffer is padded to the
nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
image (one of <ahref="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="../../../org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJException</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="../../../org/libjpegturbo/turbojpeg/TJ.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJ</span></a></li>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="../../../org/libjpegturbo/turbojpeg/TJCompressor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJCompressor</span></a></li>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJDecompressor</span></a>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="../../../org/libjpegturbo/turbojpeg/TJCompressor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJCompressor</span></a> (implements java.io.Closeable)</li>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJDecompressor</span></a> (implements java.io.Closeable)
<ul>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="../../../org/libjpegturbo/turbojpeg/TJTransformer.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJTransformer</span></a></li>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="org/libjpegturbo/turbojpeg/TJException.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJException</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="org/libjpegturbo/turbojpeg/TJ.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJ</span></a></li>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="org/libjpegturbo/turbojpeg/TJCompressor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJCompressor</span></a></li>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="org/libjpegturbo/turbojpeg/TJDecompressor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJDecompressor</span></a>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="org/libjpegturbo/turbojpeg/TJCompressor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJCompressor</span></a> (implements java.io.Closeable)</li>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="org/libjpegturbo/turbojpeg/TJDecompressor.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJDecompressor</span></a> (implements java.io.Closeable)
<ul>
<litype="circle">org.libjpegturbo.turbojpeg.<ahref="org/libjpegturbo/turbojpeg/TJTransformer.html"title="class in org.libjpegturbo.turbojpeg"><spanclass="strong">TJTransformer</span></a></li>
* Processes exactly one iMCU row per call, unless suspended.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.