Merge libjpeg-turbo r1220
* commit '93ddfcfc1a814789ed64d967a6118616753bb9d5': (65 commits)
Use clz/bsr instructions on ARM for bit counting rather than the lookup table (reduces memory footprint and can improve performance in some cases.)
Make iOS build instructions more generic and applicable to all versions of Xcode; modify iOS build procedure for Xcode 5.0 and later to fix a build issue with Xcode 5.1.
Update build instructions to reflect the use of pkgbuild/productbuild
Remove any claims of support for OS X 10.4 "Tiger" (the packaging system overhaul produces packages that require Leopard or later, and I haven't been able to test Tiger for years anyhow.) Update TurboJPEG shared library version.
Migrate Mac packaging system to pkgbuild, since PackageMaker is no longer supported.
Remove the sections about replacing libjpeg at run time and compile time. These were written before O/S distributions started shipping libjpeg-turbo, and they are either pedantic or no longer relevant. Also remove any text that assumes the use of our official project binaries. Notes specific to the official binaries have been moved into the project wiki.
Fix Windows build
Since we're now maintaining our own Cygwin pseudo-repository directories instead of recommending that users install these packages from a local source, it makes more sense to name the packages according to Cygwin specs, so they can be copied as-is into the pseudo-repository.
39dbc2db9718f9af2f62eb486fd73328fe8bf5e8
Fix 'make dist'
RHEL 6 (and probably other platforms as well) sets _defaultdocdir=%{_datadir}/doc, which screws things up, since we're overriding _datadir. Since we intend _defaultdocdir to be /usr/share/doc, just be explicit about it.
Fix compiler warning about unused function when building with the libjpeg v6b API/ABI
Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC
Enable silent build (can be overridden with 'make V=1') if the version of autotools being used is new enough.
Extend YUVImage class to allow reuse of the same buffer with different metadata; port TJBench changes that treat YUV encoding/decoding as an intermediate step of the JPEG compression/decompression pipeline rather than a separate test case; add YUV encode/decode tests to the Java version of tjbenchtest
formatting tweaks
Fix an error that occurred when trying to use the lossless transform feature without specifying -quiet; formatting tweak
Move the garbage collection of the JPEG tiles into the decompression function to increase the chances that tiled decompression of large images will succeed without an OutOfMemoryError.
Generate the Java documentation using javadoc 7, to improve readability.
This should have been checked in with the previous commit.
...
Conflicts:
BUILDING.txt
configure.ac
jversion.h
release/Info.plist.in
release/ReadMe.rtf
tjbench.c
turbojpeg.c
This commit is contained in:
79
BUILDING.txt
79
BUILDING.txt
@@ -50,12 +50,12 @@ Build Requirements
|
||||
is suggested that you install Apple GCC v4.2 through MacPorts.
|
||||
|
||||
-- If building the MozJPEG Java wrapper, JDK or OpenJDK 1.5 or later is
|
||||
required. Some systems, such as OS X 10.4, Solaris 10 and later, and Red
|
||||
Hat Enterprise Linux 5 and later, have this pre-installed. On OS X 10.5 and
|
||||
later, it will be necessary to install the Java Developer Package, which can
|
||||
be downloaded from http://developer.apple.com/downloads (Apple ID required.)
|
||||
For systems that do not have a JDK installed, you can obtain the Oracle Java
|
||||
Development Kit from http://www.java.com.
|
||||
required. Some systems, such as Solaris 10 and later and Red Hat Enterprise
|
||||
Linux 5 and later, have this pre-installed. On OS X 10.5 and later, it will
|
||||
be necessary to install the Java Developer Package, which can be downloaded
|
||||
from http://developer.apple.com/downloads (Apple ID required.) For systems
|
||||
that do not have a JDK installed, you can obtain the Oracle Java Development
|
||||
Kit from http://www.java.com.
|
||||
|
||||
|
||||
==================
|
||||
@@ -243,12 +243,12 @@ to the configure command line.
|
||||
Add
|
||||
|
||||
--host x86_64-apple-darwin NASM=/opt/local/bin/nasm \
|
||||
CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-mmacosx-version-min=10.4 -O3' \
|
||||
LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-mmacosx-version-min=10.4'
|
||||
CFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
|
||||
-mmacosx-version-min=10.5 -O3' \
|
||||
LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
|
||||
-mmacosx-version-min=10.5'
|
||||
|
||||
to the configure command line. The OS X 10.4 SDK, and NASM 2.07 or later from
|
||||
to the configure command line. The OS X 10.5 SDK, and NASM 2.07 or later from
|
||||
MacPorts, must be installed.
|
||||
|
||||
|
||||
@@ -258,12 +258,12 @@ MacPorts, must be installed.
|
||||
Add
|
||||
|
||||
--host i686-apple-darwin \
|
||||
CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-mmacosx-version-min=10.4 -O3 -m32' \
|
||||
LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-mmacosx-version-min=10.4 -m32'
|
||||
CFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
|
||||
-mmacosx-version-min=10.5 -O3 -m32' \
|
||||
LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
|
||||
-mmacosx-version-min=10.5 -m32'
|
||||
|
||||
to the configure command line. The OS X 10.4 SDK must be installed.
|
||||
to the configure command line. The OS X 10.5 SDK must be installed.
|
||||
|
||||
|
||||
64-bit Library Build on 64-bit Solaris
|
||||
@@ -333,31 +333,40 @@ examples accordingly.
|
||||
|
||||
Additional build requirements:
|
||||
|
||||
gas-preprocessor.pl (https://github.com/yuvi/gas-preprocessor) should be
|
||||
installed in your PATH.
|
||||
gas-preprocessor.pl
|
||||
(https://sourceforge.net/p/libjpeg-turbo/code/HEAD/tree/gas-preprocessor)
|
||||
should be installed in your PATH.
|
||||
|
||||
Set the following shell variables for simplicity:
|
||||
|
||||
Xcode 3.2.x / iOS 4.3 SDK:
|
||||
IOS_PLATFORMDIR="/Developer/Platforms/iPhoneOS.platform"
|
||||
IOS_SYSROOT="$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS4.3.sdk"
|
||||
IOS_GCC="$IOS_PLATFORMDIR/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2"
|
||||
Xcode 4.2 and earlier:
|
||||
IOS_PLATFORMDIR=/Developer/Platforms/iPhoneOS.platform
|
||||
Xcode 4.3 and later:
|
||||
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||
|
||||
Xcode 4.5.x / iOS 6.0 SDK:
|
||||
IOS_PLATFORMDIR="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform"
|
||||
IOS_SYSROOT="$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS6.0.sdk"
|
||||
IOS_GCC="$IOS_PLATFORMDIR/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2"
|
||||
IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk
|
||||
|
||||
Xcode 4.6.x and earlier:
|
||||
IOS_GCC=$IOS_PLATFORMDIR/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
|
||||
Xcode 5.0.x and later:
|
||||
IOS_GCC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
|
||||
ARM v6 only (up to and including iPhone 3G):
|
||||
[NOTE: Requires Xcode 4.4.x or earlier]
|
||||
IOS_CFLAGS="-march=armv6 -mcpu=arm1176jzf-s -mfpu=vfp"
|
||||
|
||||
ARM v7 only (iPhone 3GS-4S, iPad 1st-3rd Generation):
|
||||
Xcode 4.6.x and earlier:
|
||||
IOS_CFLAGS="-march=armv7 -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon"
|
||||
Xcode 5.0.x and later:
|
||||
IOS_CFLAGS="-arch armv7"
|
||||
|
||||
ARM v7s only (iPhone 5, iPad 4th Generation):
|
||||
[NOTE: Requires Xcode 4.5 or later]
|
||||
Xcode 4.6.x and earlier:
|
||||
IOS_CFLAGS="-march=armv7s -mcpu=swift -mtune=swift -mfpu=neon"
|
||||
Xcode 5.0.x and later:
|
||||
IOS_CFLAGS="-arch armv7s"
|
||||
|
||||
Follow the procedure under "Building libmozjpeg" above, adding
|
||||
|
||||
@@ -366,8 +375,16 @@ Follow the procedure under "Building libmozjpeg" above, adding
|
||||
CFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT -O3 $IOS_CFLAGS" \
|
||||
LDFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT $IOS_CFLAGS"
|
||||
|
||||
to the configure command line. If using Xcode 5.0.x or later, also add
|
||||
|
||||
CCASFLAGS="-no-integrated-as $IOS_CFLAGS"
|
||||
|
||||
to the configure command line.
|
||||
|
||||
NOTE: You can also add -miphoneos-version-min={version} to $IOS_CFLAGS above
|
||||
in order to support older versions of iOS than the default version supported by
|
||||
the SDK.
|
||||
|
||||
Once built, lipo can be used to combine the ARM v6, v7, and/or v7s variants
|
||||
into a universal library.
|
||||
|
||||
@@ -695,11 +712,11 @@ make deb
|
||||
|
||||
make dmg
|
||||
|
||||
Create Macintosh package/disk image. This requires the PackageMaker
|
||||
application, which must be installed in /Developer/Applications/Utilities.
|
||||
Note that PackageMaker is not included in recent releases of Xcode, but it
|
||||
can be obtained by downloading the "Auxiliary Tools for Xcode" package from
|
||||
http://developer.apple.com/downloads.
|
||||
Create Macintosh package/disk image. This requires pkgbuild and
|
||||
productbuild, which are installed by default on OS X 10.7 and later and which
|
||||
can be obtained by installing Xcode 3.2.6 (with the "Unix Development"
|
||||
option) on OS X 10.6. Packages built in this manner can be installed on OS X
|
||||
10.5 and later, but they must be built on OS X 10.6 or later.
|
||||
|
||||
make udmg [BUILDDIR32={32-bit build directory}]
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Setup
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
cmake_minimum_required(VERSION 2.8.8)
|
||||
cmake_policy(SET CMP0022 OLD)
|
||||
|
||||
project(libmozjpeg C)
|
||||
set(VERSION 2.0.1)
|
||||
|
||||
@@ -1,27 +1,52 @@
|
||||
1.4 pre-beta
|
||||
============
|
||||
|
||||
[1] The TurboJPEG API can now be used to generate YUV images with an arbitrary
|
||||
line padding (previously, it only supported 4-byte padding, which was
|
||||
compatible with X Video.) Also, the decompress-to-YUV function has been
|
||||
extended to support image scaling.
|
||||
[1] New features in the TurboJPEG API:
|
||||
-- YUV planar images can now be generated with an arbitrary line padding
|
||||
(previously only 4-byte padding, which was compatible with X Video, was
|
||||
supported.)
|
||||
-- The decompress-to-YUV function has been extended to support image scaling.
|
||||
-- JPEG images can now be compressed from YUV planar source images.
|
||||
-- YUV planar images can now be decoded into RGB or grayscale images.
|
||||
-- 4:1:1 subsampling is now supported. This is mainly included for
|
||||
compatibility, since 4:1:1 is not fully accelerated in libjpeg-turbo and has no
|
||||
significant advantages relative to 4:2:0.
|
||||
-- CMYK images are now supported. This feature allows CMYK source images to be
|
||||
compressed to YCCK JPEGs and YCCK or CMYK JPEGs to be decompressed to CMYK
|
||||
destination images. Conversion between CMYK and RGB or YUV images is not
|
||||
supported. Such conversion requires a color management system and is out of
|
||||
scope for a codec library.
|
||||
-- The handling of YUV images in the Java API has been significantly refactored
|
||||
and should now be much more intuitive.
|
||||
-- The Java API now supports encoding a YUV image from an arbitrary position in
|
||||
a large image buffer.
|
||||
|
||||
[2] Added SIMD acceleration for DSPr2-capable MIPS platforms. This speeds up
|
||||
the compression of full-color JPEGs by 70-80% on such platforms and
|
||||
decompression by 25-35%.
|
||||
|
||||
[3] Added support for 4:1:1 subsampling to the TurboJPEG API. This is mainly
|
||||
included for compatibility, since 4:1:1 is not fully accelerated in
|
||||
libjpeg-turbo and has no significant advantages relative to 4:2:0.
|
||||
[3] If an application attempts to decompress a Huffman-coded JPEG image whose
|
||||
header does not contain Huffman tables, libjpeg-turbo will now insert the
|
||||
default Huffman tables. In order to save space, many motion JPEG video frames
|
||||
are encoded without the default Huffman tables, so these frames can now be
|
||||
successfully decompressed by libjpeg-turbo without additional work on the part
|
||||
of the application. An application can still override the Huffman tables, for
|
||||
instance to re-use tables from a previous frame of the same video.
|
||||
|
||||
[4] Added support for CMYK images to the TurboJPEG API. This feature allows
|
||||
CMYK source images to be compressed to YCCK JPEGs and YCCK or CMYK JPEGs to be
|
||||
decompressed to CMYK destination images. Conversion between CMYK and RGB
|
||||
images is not supported. Such conversion requires a color management system
|
||||
and is out of scope for a codec library.
|
||||
[4] The Mac packaging system now uses pkgbuild and productbuild rather than
|
||||
PackageMaker (which is obsolete and no longer supported.) This means that
|
||||
OS X 10.6 "Snow Leopard" or later must be used when packaging libjpeg-turbo,
|
||||
although the packages produced can be installed on OS X 10.5 "Leopard" or
|
||||
later. OS X 10.4 "Tiger" is no longer supported.
|
||||
|
||||
[5] The TurboJPEG API can now be used to compress JPEG images from YUV planar
|
||||
source images.
|
||||
[5] The Huffman encoder now uses clz and bsr instructions for bit counting on
|
||||
ARM platforms rather than a lookup table. This reduces the memory footprint
|
||||
by 64k, which may be important for some mobile applications. Out of four
|
||||
Android devices that were tested, two demonstrated a small loss (~3-4% on
|
||||
average) with ARMv6 code and a small gain (also ~3-4%) with ARMv7 code when
|
||||
enabling this new feature, but the other two devices demonstrated a
|
||||
significant performance gain across the board (~10-20%.) Actual mileage may
|
||||
vary.
|
||||
|
||||
|
||||
1.3.1
|
||||
@@ -48,6 +73,20 @@ omitted at compile time".
|
||||
[4] Fixed a couple of issues whereby malformed JPEG images would cause
|
||||
libjpeg-turbo to use uninitialized memory during decompression.
|
||||
|
||||
[5] Fixed an error ("Buffer passed to JPEG library is too small") that occurred
|
||||
when calling the TurboJPEG YUV encoding function with a very small (< 5x5)
|
||||
source image, and added a unit test to check for this error.
|
||||
|
||||
[6] The Java classes should now build properly under Visual Studio 2010 and
|
||||
later.
|
||||
|
||||
[7] Fixed an issue that prevented SRPMs generated using the in-tree packaging
|
||||
tools from being rebuilt on certain newer Linux distributions.
|
||||
|
||||
[8] Numerous minor fixes to eliminate compilation and build/packaging system
|
||||
warnings, fix cosmetic issues, improve documentation clarity, and other general
|
||||
source cleanup.
|
||||
|
||||
|
||||
1.3.0
|
||||
=====
|
||||
|
||||
@@ -162,7 +162,7 @@ dist_example_DATA = example.c
|
||||
|
||||
EXTRA_DIST = win release $(DOCS) testimages CMakeLists.txt \
|
||||
sharedlib/CMakeLists.txt cmakescripts libjpeg.map.in doc doxygen.config \
|
||||
jccolext.c jdcolext.c jdmrgext.c
|
||||
jccolext.c jdcolext.c jdmrgext.c jstdhuff.c
|
||||
|
||||
dist-hook:
|
||||
rm -rf `find $(distdir) -name .svn`
|
||||
@@ -335,8 +335,10 @@ testclean:
|
||||
|
||||
tjtest:
|
||||
sh ./tjbenchtest
|
||||
sh ./tjbenchtest -yuv
|
||||
if WITH_JAVA
|
||||
sh ./tjbenchtest.java
|
||||
sh ./tjbenchtest.java -yuv
|
||||
endif
|
||||
|
||||
|
||||
|
||||
127
README-turbo.txt
127
README-turbo.txt
@@ -81,131 +81,6 @@ JPEG images:
|
||||
There is no significant performance advantage to either API when both are used
|
||||
to perform similar operations.
|
||||
|
||||
======================
|
||||
Installation Directory
|
||||
======================
|
||||
|
||||
This document assumes that libjpeg-turbo will be installed in the default
|
||||
directory (/opt/libjpeg-turbo on Un*x and Mac systems and
|
||||
c:\libjpeg-turbo[-gcc][64] on Windows systems. If your installation of
|
||||
libjpeg-turbo resides in a different directory, then adjust the instructions
|
||||
accordingly.
|
||||
|
||||
=============================
|
||||
Replacing libjpeg at Run Time
|
||||
=============================
|
||||
|
||||
Un*x
|
||||
----
|
||||
|
||||
If a Un*x application is dynamically linked with libjpeg, then you can replace
|
||||
libjpeg with libjpeg-turbo at run time by manipulating LD_LIBRARY_PATH.
|
||||
For instance:
|
||||
|
||||
[Using libjpeg]
|
||||
> time cjpeg <vgl_5674_0098.ppm >vgl_5674_0098.jpg
|
||||
real 0m0.392s
|
||||
user 0m0.074s
|
||||
sys 0m0.020s
|
||||
|
||||
[Using libjpeg-turbo]
|
||||
> export LD_LIBRARY_PATH=/opt/libjpeg-turbo/{lib}:$LD_LIBRARY_PATH
|
||||
> time cjpeg <vgl_5674_0098.ppm >vgl_5674_0098.jpg
|
||||
real 0m0.109s
|
||||
user 0m0.029s
|
||||
sys 0m0.010s
|
||||
|
||||
({lib} = lib32 or lib64, depending on whether you wish to use the 32-bit or the
|
||||
64-bit version of libjpeg-turbo.)
|
||||
|
||||
System administrators can also replace the libjpeg symlinks in /usr/lib* with
|
||||
links to the libjpeg-turbo dynamic library located in /opt/libjpeg-turbo/{lib}.
|
||||
This will effectively accelerate every application that uses the libjpeg
|
||||
dynamic library on the system.
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
If a Windows application is dynamically linked with libjpeg, then you can
|
||||
replace libjpeg with libjpeg-turbo at run time by backing up the application's
|
||||
copy of jpeg62.dll, jpeg7.dll, or jpeg8.dll (assuming the application has its
|
||||
own local copy of this library) and copying the corresponding DLL from
|
||||
libjpeg-turbo into the application's install directory. The official
|
||||
libjpeg-turbo binary packages only provide jpeg62.dll. If the application uses
|
||||
jpeg7.dll or jpeg8.dll instead, then it will be necessary to build
|
||||
libjpeg-turbo from source (see "libjpeg v7 and v8 API/ABI Emulation" below.)
|
||||
|
||||
The following information is specific to the official libjpeg-turbo binary
|
||||
packages for Visual C++:
|
||||
|
||||
-- jpeg62.dll requires the Visual C++ 2008 C run-time DLL (msvcr90.dll).
|
||||
msvcr90.dll ships with more recent versions of Windows, but users of older
|
||||
Windows releases can obtain it from the Visual C++ 2008 Redistributable
|
||||
Package, which is available as a free download from Microsoft's web site.
|
||||
|
||||
-- Features of the libjpeg API that require passing a C run-time structure,
|
||||
such as a file handle, from an application to the library will probably not
|
||||
work with jpeg62.dll, unless the application is also built to use the Visual
|
||||
C++ 2008 C run-time DLL. In particular, this affects jpeg_stdio_dest() and
|
||||
jpeg_stdio_src().
|
||||
|
||||
Mac
|
||||
---
|
||||
|
||||
Mac applications typically embed their own copies of the libjpeg dylib inside
|
||||
the (hidden) application bundle, so it is not possible to globally replace
|
||||
libjpeg on OS X systems. Replacing the application's version of the libjpeg
|
||||
dylib would generally involve copying libjpeg.*.dylib from libjpeg-turbo into
|
||||
the appropriate place in the application bundle and using install_name_tool to
|
||||
repoint the libjpeg-turbo dylib to its new directory. This requires an
|
||||
advanced knowledge of OS X and would not survive an upgrade or a re-install of
|
||||
the application. Thus, it is not recommended for most users.
|
||||
|
||||
========================================
|
||||
Using libjpeg-turbo in Your Own Programs
|
||||
========================================
|
||||
|
||||
For the most part, libjpeg-turbo should work identically to libjpeg, so in
|
||||
most cases, an application can be built against libjpeg and then run against
|
||||
libjpeg-turbo. On Un*x systems and Cygwin, you can build against libjpeg-turbo
|
||||
instead of libjpeg by setting
|
||||
|
||||
CPATH=/opt/libjpeg-turbo/include
|
||||
and
|
||||
LIBRARY_PATH=/opt/libjpeg-turbo/{lib}
|
||||
|
||||
({lib} = lib32 or lib64, depending on whether you are building a 32-bit or a
|
||||
64-bit application.)
|
||||
|
||||
If using MinGW, then set
|
||||
|
||||
CPATH=/c/libjpeg-turbo-gcc[64]/include
|
||||
and
|
||||
LIBRARY_PATH=/c/libjpeg-turbo-gcc[64]/lib
|
||||
|
||||
Building against libjpeg-turbo is useful, for instance, if you want to build an
|
||||
application that leverages the libjpeg-turbo colorspace extensions (see below.)
|
||||
On Un*x systems, you would still need to manipulate LD_LIBRARY_PATH or create
|
||||
appropriate symlinks to use libjpeg-turbo at run time. On such systems, you
|
||||
can pass -R /opt/libjpeg-turbo/{lib} to the linker to force the use of
|
||||
libjpeg-turbo at run time rather than libjpeg (also useful if you want to
|
||||
leverage the colorspace extensions), or you can link against the libjpeg-turbo
|
||||
static library.
|
||||
|
||||
To force a Un*x or MinGW application to link against the static version of
|
||||
libjpeg-turbo, you can use the following linker options:
|
||||
|
||||
-Wl,-Bstatic -ljpeg -Wl,-Bdynamic
|
||||
|
||||
On OS X, simply add /opt/libjpeg-turbo/lib/libjpeg.a to the linker command
|
||||
line.
|
||||
|
||||
To build Visual C++ applications using libjpeg-turbo, add
|
||||
c:\libjpeg-turbo[64]\include to the system or user INCLUDE environment
|
||||
variable and c:\libjpeg-turbo[64]\lib to the system or user LIB environment
|
||||
variable, and then link against either jpeg.lib (to use the DLL version of
|
||||
libjpeg-turbo) or jpeg-static.lib (to use the static version of libjpeg-turbo.)
|
||||
|
||||
=====================
|
||||
Colorspace Extensions
|
||||
=====================
|
||||
@@ -265,7 +140,7 @@ compression and decompression structures. Unfortunately, due to the exposed
|
||||
nature of those structures, extending them also necessitated breaking backward
|
||||
ABI compatibility with previous libjpeg releases. Thus, programs that were
|
||||
built to use libjpeg v7 or v8 did not work with libjpeg-turbo, since it is
|
||||
based on the libjpeg v6b code base. Although libjpeg v7 and v8 are still not
|
||||
based on the libjpeg v6b code base. Although libjpeg v7 and v8 are not
|
||||
as widely used as v6b, enough programs (including a few Linux distros) made
|
||||
the switch that there was a demand to emulate the libjpeg v7 and v8 ABIs
|
||||
in libjpeg-turbo. It should be noted, however, that this feature was added
|
||||
|
||||
33
acinclude.m4
33
acinclude.m4
@@ -210,3 +210,36 @@ AC_DEFUN([AC_CHECK_COMPATIBLE_MIPSEL_ASSEMBLER_IFELSE],[
|
||||
$2
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_CHECK_COMPATIBLE_ARM64_ASSEMBLER_IFELSE],[
|
||||
ac_good_gnu_arm_assembler=no
|
||||
ac_save_CC="$CC"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CCASFLAGS -x assembler-with-cpp"
|
||||
CC="$CCAS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
.text
|
||||
movi v0.16b, #100]])], ac_good_gnu_arm_assembler=yes)
|
||||
|
||||
ac_use_gas_preprocessor=no
|
||||
if test "x$ac_good_gnu_arm_assembler" = "xno" ; then
|
||||
CC="gas-preprocessor.pl $CCAS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
.text
|
||||
movi v0.16b, #100]])], ac_use_gas_preprocessor=yes)
|
||||
fi
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
CC="$ac_save_CC"
|
||||
|
||||
if test "x$ac_use_gas_preprocessor" = "xyes" ; then
|
||||
CCAS="gas-preprocessor.pl $CCAS"
|
||||
AC_SUBST([CCAS])
|
||||
ac_good_gnu_arm_assembler=yes
|
||||
fi
|
||||
|
||||
if test "x$ac_good_gnu_arm_assembler" = "xyes" ; then
|
||||
$1
|
||||
else
|
||||
$2
|
||||
fi
|
||||
])
|
||||
|
||||
6
bmp.c
6
bmp.c
@@ -169,7 +169,7 @@ int loadbmp(char *filename, unsigned char **buf, int *w, int *h,
|
||||
nlines);
|
||||
}
|
||||
cinfo.next_scanline+=nlines;
|
||||
}
|
||||
}
|
||||
|
||||
(*src->finish_input)(&cinfo, src);
|
||||
|
||||
@@ -236,7 +236,7 @@ int savebmp(char *filename, unsigned char *buf, int w, int h, int srcpf,
|
||||
_throw("savebmp(): Could not initialize PPM writer");
|
||||
}
|
||||
|
||||
dst->output_file=file;
|
||||
dst->output_file=file;
|
||||
(*dst->start_output)(&dinfo, dst);
|
||||
(*dinfo.mem->realize_virt_arrays)((j_common_ptr)&dinfo);
|
||||
|
||||
@@ -258,7 +258,7 @@ int savebmp(char *filename, unsigned char *buf, int w, int h, int srcpf,
|
||||
}
|
||||
(*dst->put_pixel_rows)(&dinfo, dst, nlines);
|
||||
dinfo.output_scanline+=nlines;
|
||||
}
|
||||
}
|
||||
|
||||
(*dst->finish_output)(&dinfo, dst);
|
||||
|
||||
|
||||
22
configure.ac
22
configure.ac
@@ -17,8 +17,9 @@ SAVED_CFLAGS=${CFLAGS}
|
||||
SAVED_CPPFLAGS=${CPPFLAGS}
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||
AM_PROG_AS
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_INSTALL
|
||||
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||
AC_PROG_LIBTOOL
|
||||
@@ -434,7 +435,23 @@ if test "x${with_simd}" != "xno"; then
|
||||
AC_MSG_ERROR([SIMD support can't be enabled.])
|
||||
else
|
||||
AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.])
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
aarch64*)
|
||||
AC_MSG_RESULT([yes (arm64)])
|
||||
AC_MSG_CHECKING([if the assembler is GNU-compatible and can be used])
|
||||
AC_CHECK_COMPATIBLE_ARM64_ASSEMBLER_IFELSE(
|
||||
[AC_MSG_RESULT([yes])
|
||||
simd_arch=aarch64],
|
||||
[AC_MSG_RESULT([no])
|
||||
with_simd=no])
|
||||
if test "x${with_simd}" = "xno"; then
|
||||
if test "x${require_simd}" = "xyes"; then
|
||||
AC_MSG_ERROR([SIMD support can't be enabled.])
|
||||
else
|
||||
AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.])
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
mipsel*)
|
||||
@@ -476,6 +493,7 @@ AM_CONDITIONAL([WITH_SSE_FLOAT_DCT], [test "x$simd_arch" = "xx86_64" -o "x$simd_
|
||||
AM_CONDITIONAL([SIMD_I386], [test "x$simd_arch" = "xi386"])
|
||||
AM_CONDITIONAL([SIMD_X86_64], [test "x$simd_arch" = "xx86_64"])
|
||||
AM_CONDITIONAL([SIMD_ARM], [test "x$simd_arch" = "xarm"])
|
||||
AM_CONDITIONAL([SIMD_ARM_64], [test "x$simd_arch" = "xaarch64"])
|
||||
AM_CONDITIONAL([SIMD_MIPSEL], [test "x$simd_arch" = "xmipsel"])
|
||||
AM_CONDITIONAL([X86_64], [test "x$host_cpu" = "xx86_64" -o "x$host_cpu" = "xamd64"])
|
||||
AM_CONDITIONAL([WITH_TURBOJPEG], [test "x$with_turbojpeg" != "xno"])
|
||||
@@ -513,8 +531,6 @@ AC_CONFIG_FILES([pkgscripts/libmozjpeg.spec.tmpl:release/libmozjpeg.spec.in])
|
||||
AC_CONFIG_FILES([pkgscripts/makecygwinpkg.tmpl:release/makecygwinpkg.in])
|
||||
AC_CONFIG_FILES([pkgscripts/makedpkg.tmpl:release/makedpkg.in])
|
||||
AC_CONFIG_FILES([pkgscripts/makemacpkg.tmpl:release/makemacpkg.in])
|
||||
AC_CONFIG_FILES([pkgscripts/Description.plist:release/Description.plist.in])
|
||||
AC_CONFIG_FILES([pkgscripts/Info.plist:release/Info.plist.in])
|
||||
AC_CONFIG_FILES([pkgscripts/uninstall.tmpl:release/uninstall.in])
|
||||
if test "x$with_turbojpeg" != "xno"; then
|
||||
AC_CONFIG_FILES([tjbenchtest])
|
||||
|
||||
@@ -255,6 +255,9 @@ Functions</h2></td></tr>
|
||||
<tr class="memitem:ga7c08b340ad7f8e85d407bd9e81d44d07"><td class="memItemLeft" align="right" valign="top">DLLEXPORT int DLLCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga7c08b340ad7f8e85d407bd9e81d44d07">tjDecompressToYUV2</a> (<a class="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>
|
||||
<tr class="memdesc:ga7c08b340ad7f8e85d407bd9e81d44d07"><td class="mdescLeft"> </td><td class="mdescRight">Decompress a JPEG image to a YUV planar image. <a href="#ga7c08b340ad7f8e85d407bd9e81d44d07">More...</a><br/></td></tr>
|
||||
<tr class="separator:ga7c08b340ad7f8e85d407bd9e81d44d07"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga132ae2c2cadcf64c8bb0f3bdf69da3ed"><td class="memItemLeft" align="right" valign="top">DLLEXPORT int DLLCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga132ae2c2cadcf64c8bb0f3bdf69da3ed">tjDecodeYUV</a> (<a class="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>
|
||||
<tr class="memdesc:ga132ae2c2cadcf64c8bb0f3bdf69da3ed"><td class="mdescLeft"> </td><td class="mdescRight">Decode a YUV planar image into an RGB or grayscale image. <a href="#ga132ae2c2cadcf64c8bb0f3bdf69da3ed">More...</a><br/></td></tr>
|
||||
<tr class="separator:ga132ae2c2cadcf64c8bb0f3bdf69da3ed"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3155b775bfbac9dbba869b95a0367902"><td class="memItemLeft" align="right" valign="top">DLLEXPORT <a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> DLLCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga3155b775bfbac9dbba869b95a0367902">tjInitTransform</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga3155b775bfbac9dbba869b95a0367902"><td class="mdescLeft"> </td><td class="mdescRight">Create a new TurboJPEG transformer instance. <a href="#ga3155b775bfbac9dbba869b95a0367902">More...</a><br/></td></tr>
|
||||
<tr class="separator:ga3155b775bfbac9dbba869b95a0367902"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@@ -1064,6 +1067,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Compress a YUV planar image into a JPEG image. </p>
|
||||
<p>Note that, if the width or height of the YUV image is not an even multiple of the MCU block size (see <a class="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 <a class="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>), then an intermediate buffer copy will be performed within TurboJPEG.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG compressor or transformer instance </td></tr>
|
||||
@@ -1086,6 +1090,100 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 if an error occurred (see <a class="el" href="group___turbo_j_p_e_g.html#ga9af79c908ec131b1ae8d52fe40375abf" title="Returns a descriptive error message explaining why the last command failed.">tjGetErrorStr()</a>.) </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ga132ae2c2cadcf64c8bb0f3bdf69da3ed"></a>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">DLLEXPORT int DLLCALL tjDecodeYUV </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763">tjhandle</a> </td>
|
||||
<td class="paramname"><em>handle</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">unsigned char * </td>
|
||||
<td class="paramname"><em>srcBuf</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>pad</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>subsamp</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">unsigned char * </td>
|
||||
<td class="paramname"><em>dstBuf</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>width</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>pitch</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>height</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>pixelFormat</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>flags</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Decode a YUV planar image into an RGB or grayscale image. </p>
|
||||
<p>This function uses the accelerated color conversion routines in the underlying codec but does not execute any of the other steps in the JPEG decompression process. The Y, U (Cb), and V (Cr) image planes should be stored sequentially in the source buffer, and the size of each plane is determined by the width and height of the source image, as well as the specified padding and level of chrominance subsampling. If the chrominance components are subsampled along the horizontal dimension, then the width of the luminance plane should be padded to the nearest multiple of 2 in the input image (same goes for the height of the luminance plane, if the chrominance components are subsampled along the vertical dimension.) </p>
|
||||
<p>NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the convention of the digital video community, the TurboJPEG API uses "YUV" to refer to an image format consisting of Y, Cb, and Cr image planes.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">handle</td><td>a handle to a TurboJPEG decompressor or transformer instance </td></tr>
|
||||
<tr><td class="paramname">srcBuf</td><td>pointer to an image buffer containing a YUV planar image to be decoded. The size of this buffer should match the value returned by <a class="el" href="group___turbo_j_p_e_g.html#gaf451664a62c1f6c7cc5a6401f32908c9" title="The size of the buffer (in bytes) required to hold a YUV planar image with the given parameters...">tjBufSizeYUV2()</a> for the given image width, height, padding, and level of chrominance subsampling. </td></tr>
|
||||
<tr><td class="paramname">pad</td><td>Use this parameter to specify that the width of each line in each plane of the YUV source image is padded to the nearest multiple of this number of bytes (must be a power of 2.) </td></tr>
|
||||
<tr><td class="paramname">subsamp</td><td>the level of chrominance subsampling used in the YUV source image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.) </td></tr>
|
||||
<tr><td class="paramname">dstBuf</td><td>pointer to an image buffer that will receive the decoded image. This buffer should normally be <code>pitch * height</code> bytes in size, but the <code>dstBuf</code> pointer can also be used to decode into a specific region of a larger buffer. </td></tr>
|
||||
<tr><td class="paramname">width</td><td>width (in pixels) of the source and destination images </td></tr>
|
||||
<tr><td class="paramname">pitch</td><td>bytes per line of the destination image. Normally, this should be <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code> if the destination image is unpadded, or <code><a class="el" href="group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511" title="Pad the given width to the nearest 32-bit boundary.">TJPAD</a>(width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat])</code> if each line of the destination image should be padded to the nearest 32-bit boundary, as is the case for Windows bitmaps. You can also be clever and use the pitch parameter to skip lines, etc. Setting this parameter to 0 is the equivalent of setting it to <code>width * <a class="el" href="group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c" title="Pixel size (in bytes) for a given pixel format.">tjPixelSize</a>[pixelFormat]</code>. </td></tr>
|
||||
<tr><td class="paramname">height</td><td>height (in pixels) of the source and destination images </td></tr>
|
||||
<tr><td class="paramname">pixelFormat</td><td>pixel format of the destination image (see <a class="el" href="group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a">Pixel formats</a>.) </td></tr>
|
||||
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec">flags</a>.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 if an error occurred (see <a class="el" href="group___turbo_j_p_e_g.html#ga9af79c908ec131b1ae8d52fe40375abf" title="Returns a descriptive error message explaining why the last command failed.">tjGetErrorStr()</a>.) </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="gada69cc6443d1bb493b40f1626259e5e9"></a>
|
||||
@@ -1422,7 +1520,7 @@ If you choose option 1, <code>*jpegSize</code> should be set to the size of your
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Encode an RGB or grayscale image into a YUV planar image. </p>
|
||||
<p>This function uses the accelerated color conversion routines in TurboJPEG's underlying codec but does not execute any of the other steps in the JPEG compression process. The Y, U (Cb), and V (Cr) image planes are stored sequentially into the destination buffer, and the size of each plane is determined by the width and height of the source image, as well as the specified padding and level of chrominance subsampling. If the chrominance components are subsampled along the horizontal dimension, then the width of the luminance plane is padded to the nearest multiple of 2 in the output image (same goes for the height of the luminance plane, if the chrominance components are subsampled along the vertical dimension.) </p>
|
||||
<p>This function uses the accelerated color conversion routines in the underlying codec but does not execute any of the other steps in the JPEG compression process. The Y, U (Cb), and V (Cr) image planes are stored sequentially into the destination buffer, and the size of each plane is determined by the width and height of the source image, as well as the specified padding and level of chrominance subsampling. If the chrominance components are subsampled along the horizontal dimension, then the width of the luminance plane is padded to the nearest multiple of 2 in the output image (same goes for the height of the luminance plane, if the chrominance components are subsampled along the vertical dimension.) </p>
|
||||
<p>NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the convention of the digital video community, the TurboJPEG API uses "YUV" to refer to an image format consisting of Y, Cb, and Cr image planes.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
|
||||
@@ -16,6 +16,7 @@ var searchData=
|
||||
['tjcs_5frgb',['TJCS_RGB',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555',1,'turbojpeg.h']]],
|
||||
['tjcs_5fycbcr',['TJCS_YCbCr',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75',1,'turbojpeg.h']]],
|
||||
['tjcs_5fycck',['TJCS_YCCK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e',1,'turbojpeg.h']]],
|
||||
['tjdecodeyuv',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga132ae2c2cadcf64c8bb0f3bdf69da3ed',1,'turbojpeg.h']]],
|
||||
['tjdecompress2',['tjDecompress2',['../group___turbo_j_p_e_g.html#gada69cc6443d1bb493b40f1626259e5e9',1,'turbojpeg.h']]],
|
||||
['tjdecompressheader3',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#gacd0fac3af74b3511d39b4781b7103086',1,'turbojpeg.h']]],
|
||||
['tjdecompresstoyuv2',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga7c08b340ad7f8e85d407bd9e81d44d07',1,'turbojpeg.h']]],
|
||||
|
||||
@@ -5,6 +5,7 @@ var searchData=
|
||||
['tjbufsizeyuv2',['tjBufSizeYUV2',['../group___turbo_j_p_e_g.html#gaf451664a62c1f6c7cc5a6401f32908c9',1,'turbojpeg.h']]],
|
||||
['tjcompress2',['tjCompress2',['../group___turbo_j_p_e_g.html#gaba62b7a98f960839b588579898495cf2',1,'turbojpeg.h']]],
|
||||
['tjcompressfromyuv',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#ga0b931126c7a615ddc3bbd0cca6698d67',1,'turbojpeg.h']]],
|
||||
['tjdecodeyuv',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga132ae2c2cadcf64c8bb0f3bdf69da3ed',1,'turbojpeg.h']]],
|
||||
['tjdecompress2',['tjDecompress2',['../group___turbo_j_p_e_g.html#gada69cc6443d1bb493b40f1626259e5e9',1,'turbojpeg.h']]],
|
||||
['tjdecompressheader3',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#gacd0fac3af74b3511d39b4781b7103086',1,'turbojpeg.h']]],
|
||||
['tjdecompresstoyuv2',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga7c08b340ad7f8e85d407bd9e81d44d07',1,'turbojpeg.h']]],
|
||||
|
||||
@@ -8,12 +8,13 @@ set(JAVA_CLASSNAMES org/libjpegturbo/turbojpeg/TJ
|
||||
org/libjpegturbo/turbojpeg/TJScalingFactor
|
||||
org/libjpegturbo/turbojpeg/TJTransform
|
||||
org/libjpegturbo/turbojpeg/TJTransformer
|
||||
org/libjpegturbo/turbojpeg/YUVImage
|
||||
TJUnitTest
|
||||
TJExample
|
||||
TJBench)
|
||||
|
||||
if(MSVC_IDE)
|
||||
set(OBJDIR "${CMAKE_CURRENT_BINARY_DIR}/$(OutDir)")
|
||||
set(OBJDIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
|
||||
else()
|
||||
set(OBJDIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
@@ -13,6 +13,7 @@ JAVASOURCES = org/libjpegturbo/turbojpeg/TJ.java \
|
||||
org/libjpegturbo/turbojpeg/TJScalingFactor.java \
|
||||
org/libjpegturbo/turbojpeg/TJTransform.java \
|
||||
org/libjpegturbo/turbojpeg/TJTransformer.java \
|
||||
org/libjpegturbo/turbojpeg/YUVImage.java \
|
||||
TJExample.java \
|
||||
TJUnitTest.java \
|
||||
TJBench.java
|
||||
@@ -34,6 +35,7 @@ JAVA_CLASSES = org/libjpegturbo/turbojpeg/TJ.class \
|
||||
org/libjpegturbo/turbojpeg/TJScalingFactor.class \
|
||||
org/libjpegturbo/turbojpeg/TJTransform.class \
|
||||
org/libjpegturbo/turbojpeg/TJTransformer.class \
|
||||
org/libjpegturbo/turbojpeg/YUVImage.class \
|
||||
TJExample.class \
|
||||
TJUnitTest.class \
|
||||
TJBench.class
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2009-2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2009-2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -34,12 +34,8 @@ import org.libjpegturbo.turbojpeg.*;
|
||||
|
||||
class TJBench {
|
||||
|
||||
static final int YUVENCODE = 1;
|
||||
static final int YUVDECODE = 2;
|
||||
static final int YUVCOMPRESS = 3;
|
||||
|
||||
static int flags = 0, yuv = 0, quiet = 0, pf = TJ.PF_BGR, yuvpad = 1;
|
||||
static boolean compOnly, decompOnly, doTile;
|
||||
static int flags = 0, quiet = 0, pf = TJ.PF_BGR, yuvpad = 1, warmup = 1;
|
||||
static boolean compOnly, decompOnly, doTile, doYUV;
|
||||
|
||||
static final String[] pixFormatStr = {
|
||||
"RGB", "BGR", "RGBX", "BGRX", "XBGR", "XRGB", "GRAY"
|
||||
@@ -134,68 +130,97 @@ class TJBench {
|
||||
|
||||
|
||||
/* Decompression test */
|
||||
static void decompTest(byte[] srcBuf, byte[][] jpegBuf, int[] jpegSize,
|
||||
byte[] dstBuf, int w, int h, int subsamp,
|
||||
int jpegQual, String fileName, int tilew, int tileh)
|
||||
throws Exception {
|
||||
static void decomp(byte[] srcBuf, byte[][] jpegBuf, int[] jpegSize,
|
||||
byte[] dstBuf, int w, int h, int subsamp, int jpegQual,
|
||||
String fileName, int tilew, int tileh) throws Exception {
|
||||
String qualStr = new String(""), sizeStr, tempStr;
|
||||
TJDecompressor tjd;
|
||||
double start, elapsed;
|
||||
int ps = TJ.getPixelSize(pf), i;
|
||||
double elapsed, elapsedDecode;
|
||||
int ps = TJ.getPixelSize(pf), i, iter = 0;
|
||||
int scaledw = sf.getScaled(w);
|
||||
int scaledh = sf.getScaled(h);
|
||||
int yuvSize = TJ.bufSizeYUV(scaledw, yuvpad, scaledh, subsamp), bufsize;
|
||||
int pitch = scaledw * ps;
|
||||
YUVImage yuvImage = null;
|
||||
|
||||
if (jpegQual > 0)
|
||||
qualStr = new String("_Q" + jpegQual);
|
||||
|
||||
tjd = new TJDecompressor();
|
||||
|
||||
int bufSize = (yuv == YUVDECODE ? yuvSize : pitch * scaledh);
|
||||
if (dstBuf == null)
|
||||
dstBuf = new byte[bufSize];
|
||||
dstBuf = new byte[pitch * scaledh];
|
||||
|
||||
/* Set the destination buffer to gray so we know whether the decompressor
|
||||
attempted to write to it */
|
||||
Arrays.fill(dstBuf, (byte)127);
|
||||
|
||||
/* Execute once to preload cache */
|
||||
tjd.setJPEGImage(jpegBuf[0], jpegSize[0]);
|
||||
if (yuv == YUVDECODE)
|
||||
tjd.decompressToYUV(dstBuf, scaledw, yuvpad, scaledh, flags);
|
||||
else
|
||||
tjd.decompress(dstBuf, scaledw, pitch, scaledh, pf, flags);
|
||||
|
||||
/* Benchmark */
|
||||
for (i = 0, start = getTime(); (elapsed = getTime() - start) < benchTime;
|
||||
i++) {
|
||||
int tile = 0;
|
||||
if (yuv == YUVDECODE)
|
||||
tjd.decompressToYUV(dstBuf, scaledw, yuvpad, scaledh, flags);
|
||||
else {
|
||||
for (int y = 0; y < h; y += tileh) {
|
||||
for (int x = 0; x < w; x += tilew, tile++) {
|
||||
int width = doTile ? Math.min(tilew, w - x) : scaledw;
|
||||
int height = doTile ? Math.min(tileh, h - y) : scaledh;
|
||||
tjd.setJPEGImage(jpegBuf[tile], jpegSize[tile]);
|
||||
tjd.decompress(dstBuf, x, y, width, pitch, height, pf, flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (doYUV) {
|
||||
int width = doTile ? tilew : scaledw;
|
||||
int height = doTile ? tileh : scaledh;
|
||||
yuvImage = new YUVImage(width, yuvpad, height, subsamp);
|
||||
Arrays.fill(yuvImage.getBuf(), (byte)127);
|
||||
}
|
||||
|
||||
/* Benchmark */
|
||||
iter -= warmup;
|
||||
elapsed = elapsedDecode = 0.0;
|
||||
while (true) {
|
||||
int tile = 0;
|
||||
double start = getTime();
|
||||
for (int y = 0; y < h; y += tileh) {
|
||||
for (int x = 0; x < w; x += tilew, tile++) {
|
||||
int width = doTile ? Math.min(tilew, w - x) : scaledw;
|
||||
int height = doTile ? Math.min(tileh, h - y) : scaledh;
|
||||
tjd.setSourceImage(jpegBuf[tile], jpegSize[tile]);
|
||||
if (doYUV) {
|
||||
yuvImage.setBuf(yuvImage.getBuf(), width, yuvpad, height, subsamp);
|
||||
tjd.decompressToYUV(yuvImage, flags);
|
||||
double startDecode = getTime();
|
||||
tjd.setSourceImage(yuvImage);
|
||||
tjd.decompress(dstBuf, x, y, width, pitch, height, pf, flags);
|
||||
if (iter >= 0)
|
||||
elapsedDecode += getTime() - startDecode;
|
||||
} else
|
||||
tjd.decompress(dstBuf, x, y, width, pitch, height, pf, flags);
|
||||
}
|
||||
}
|
||||
iter++;
|
||||
if (iter >= 1) {
|
||||
elapsed += getTime() - start;
|
||||
if (elapsed >= benchTime)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(doYUV)
|
||||
elapsed -= elapsedDecode;
|
||||
|
||||
tjd = null;
|
||||
for (i = 0; i < jpegBuf.length; i++)
|
||||
jpegBuf[i] = null;
|
||||
jpegBuf = null; jpegSize = null;
|
||||
System.gc();
|
||||
|
||||
if (quiet != 0)
|
||||
System.out.println(
|
||||
sigFig((double)(w * h) / 1000000. * (double)i / elapsed, 4));
|
||||
else {
|
||||
System.out.format("D--> Frame rate: %f fps\n",
|
||||
(double)i / elapsed);
|
||||
System.out.format(" Dest. throughput: %f Megapixels/sec\n",
|
||||
(double)(w * h) / 1000000. * (double)i / elapsed);
|
||||
if (quiet != 0) {
|
||||
System.out.format("%-6s%s",
|
||||
sigFig((double)(w * h) / 1000000. * (double)iter / elapsed, 4),
|
||||
quiet == 2 ? "\n" : " ");
|
||||
if (doYUV)
|
||||
System.out.format("%s\n",
|
||||
sigFig((double)(w * h) / 1000000. * (double)iter / elapsedDecode, 4));
|
||||
else if (quiet != 2)
|
||||
System.out.print("\n");
|
||||
} else {
|
||||
System.out.format("%s --> Frame rate: %f fps\n",
|
||||
(doYUV ? "Decomp to YUV":"Decompress "),
|
||||
(double)iter / elapsed);
|
||||
System.out.format(" Throughput: %f Megapixels/sec\n",
|
||||
(double)(w * h) / 1000000. * (double)iter / elapsed);
|
||||
if (doYUV) {
|
||||
System.out.format("YUV Decode --> Frame rate: %f fps\n",
|
||||
(double)iter / elapsedDecode);
|
||||
System.out.format(" Throughput: %f Megapixels/sec\n",
|
||||
(double)(w * h) / 1000000. * (double)iter / elapsedDecode);
|
||||
}
|
||||
}
|
||||
|
||||
if (sf.getNum() != 1 || sf.getDenom() != 1)
|
||||
@@ -205,130 +230,57 @@ class TJBench {
|
||||
else
|
||||
sizeStr = new String("full");
|
||||
if (decompOnly)
|
||||
tempStr = new String(fileName + "_" + sizeStr +
|
||||
(yuv != 0 ? ".yuv" : ".bmp"));
|
||||
tempStr = new String(fileName + "_" + sizeStr + ".bmp");
|
||||
else
|
||||
tempStr = new String(fileName + "_" + subName[subsamp] + qualStr +
|
||||
"_" + sizeStr + (yuv != 0 ? ".yuv" : ".bmp"));
|
||||
"_" + sizeStr + ".bmp");
|
||||
|
||||
if (yuv == YUVDECODE) {
|
||||
FileOutputStream fos = new FileOutputStream(tempStr);
|
||||
fos.write(dstBuf, 0, yuvSize);
|
||||
fos.close();
|
||||
} else {
|
||||
saveImage(tempStr, dstBuf, scaledw, scaledh, pf);
|
||||
int ndx = tempStr.indexOf('.');
|
||||
tempStr = new String(tempStr.substring(0, ndx) + "-err.bmp");
|
||||
if (srcBuf != null && sf.getNum() == 1 && sf.getDenom() == 1) {
|
||||
if (quiet == 0)
|
||||
System.out.println("Compression error written to " + tempStr + ".");
|
||||
if (subsamp == TJ.SAMP_GRAY) {
|
||||
for (int y = 0, index = 0; y < h; y++, index += pitch) {
|
||||
for (int x = 0, index2 = index; x < w; x++, index2 += ps) {
|
||||
int rindex = index2 + TJ.getRedOffset(pf);
|
||||
int gindex = index2 + TJ.getGreenOffset(pf);
|
||||
int bindex = index2 + TJ.getBlueOffset(pf);
|
||||
int lum = (int)((double)(srcBuf[rindex] & 0xff) * 0.299 +
|
||||
(double)(srcBuf[gindex] & 0xff) * 0.587 +
|
||||
(double)(srcBuf[bindex] & 0xff) * 0.114 + 0.5);
|
||||
if (lum > 255) lum = 255;
|
||||
if (lum < 0) lum = 0;
|
||||
dstBuf[rindex] = (byte)Math.abs((dstBuf[rindex] & 0xff) - lum);
|
||||
dstBuf[gindex] = (byte)Math.abs((dstBuf[gindex] & 0xff) - lum);
|
||||
dstBuf[bindex] = (byte)Math.abs((dstBuf[bindex] & 0xff) - lum);
|
||||
}
|
||||
saveImage(tempStr, dstBuf, scaledw, scaledh, pf);
|
||||
int ndx = tempStr.indexOf('.');
|
||||
tempStr = new String(tempStr.substring(0, ndx) + "-err.bmp");
|
||||
if (srcBuf != null && sf.getNum() == 1 && sf.getDenom() == 1) {
|
||||
if (quiet == 0)
|
||||
System.out.println("Compression error written to " + tempStr + ".");
|
||||
if (subsamp == TJ.SAMP_GRAY) {
|
||||
for (int y = 0, index = 0; y < h; y++, index += pitch) {
|
||||
for (int x = 0, index2 = index; x < w; x++, index2 += ps) {
|
||||
int rindex = index2 + TJ.getRedOffset(pf);
|
||||
int gindex = index2 + TJ.getGreenOffset(pf);
|
||||
int bindex = index2 + TJ.getBlueOffset(pf);
|
||||
int lum = (int)((double)(srcBuf[rindex] & 0xff) * 0.299 +
|
||||
(double)(srcBuf[gindex] & 0xff) * 0.587 +
|
||||
(double)(srcBuf[bindex] & 0xff) * 0.114 + 0.5);
|
||||
if (lum > 255) lum = 255;
|
||||
if (lum < 0) lum = 0;
|
||||
dstBuf[rindex] = (byte)Math.abs((dstBuf[rindex] & 0xff) - lum);
|
||||
dstBuf[gindex] = (byte)Math.abs((dstBuf[gindex] & 0xff) - lum);
|
||||
dstBuf[bindex] = (byte)Math.abs((dstBuf[bindex] & 0xff) - lum);
|
||||
}
|
||||
} else {
|
||||
for (int y = 0; y < h; y++)
|
||||
for (int x = 0; x < w * ps; x++)
|
||||
dstBuf[pitch * y + x] =
|
||||
(byte)Math.abs((dstBuf[pitch * y + x] & 0xff) -
|
||||
(srcBuf[pitch * y + x] & 0xff));
|
||||
}
|
||||
saveImage(tempStr, dstBuf, w, h, pf);
|
||||
} else {
|
||||
for (int y = 0; y < h; y++)
|
||||
for (int x = 0; x < w * ps; x++)
|
||||
dstBuf[pitch * y + x] =
|
||||
(byte)Math.abs((dstBuf[pitch * y + x] & 0xff) -
|
||||
(srcBuf[pitch * y + x] & 0xff));
|
||||
}
|
||||
saveImage(tempStr, dstBuf, w, h, pf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void doTestYUV(byte[] srcBuf, int w, int h, int subsamp,
|
||||
String fileName) throws Exception {
|
||||
TJCompressor tjc;
|
||||
byte[] dstBuf;
|
||||
double start, elapsed;
|
||||
int ps = TJ.getPixelSize(pf), i;
|
||||
int yuvSize = 0;
|
||||
|
||||
yuvSize = TJ.bufSizeYUV(w, h, subsamp);
|
||||
dstBuf = new byte[yuvSize];
|
||||
|
||||
if (quiet == 0)
|
||||
System.out.format(">>>>> %s (%s) <--> YUV %s <<<<<\n",
|
||||
pixFormatStr[pf],
|
||||
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "Bottom-up" : "Top-down",
|
||||
subNameLong[subsamp]);
|
||||
|
||||
if (quiet == 1)
|
||||
System.out.format("%s\t%s\t%s\tN/A\t", pixFormatStr[pf],
|
||||
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "BU" : "TD",
|
||||
subNameLong[subsamp]);
|
||||
|
||||
tjc = new TJCompressor(srcBuf, w, 0, h, pf);
|
||||
tjc.setSubsamp(subsamp);
|
||||
|
||||
/* Execute once to preload cache */
|
||||
tjc.encodeYUV(dstBuf, flags);
|
||||
|
||||
/* Benchmark */
|
||||
for (i = 0, start = getTime();
|
||||
(elapsed = getTime() - start) < benchTime; i++)
|
||||
tjc.encodeYUV(dstBuf, flags);
|
||||
|
||||
if (quiet == 1)
|
||||
System.out.format("%-4d %-4d\t", w, h);
|
||||
if (quiet != 0) {
|
||||
System.out.format("%s%c%s%c",
|
||||
sigFig((double)(w * h) / 1000000. * (double) i / elapsed, 4),
|
||||
quiet == 2 ? '\n' : '\t',
|
||||
sigFig((double)(w * h * ps) / (double)yuvSize, 4),
|
||||
quiet == 2 ? '\n' : '\t');
|
||||
} else {
|
||||
System.out.format("\n%s size: %d x %d\n", "Image", w, h);
|
||||
System.out.format("C--> Frame rate: %f fps\n",
|
||||
(double)i / elapsed);
|
||||
System.out.format(" Output image size: %d bytes\n", yuvSize);
|
||||
System.out.format(" Compression ratio: %f:1\n",
|
||||
(double)(w * h * ps) / (double)yuvSize);
|
||||
System.out.format(" Source throughput: %f Megapixels/sec\n",
|
||||
(double)(w * h) / 1000000. * (double)i / elapsed);
|
||||
System.out.format(" Output bit stream: %f Megabits/sec\n",
|
||||
(double)yuvSize * 8. / 1000000. * (double)i / elapsed);
|
||||
}
|
||||
String tempStr = fileName + "_" + subName[subsamp] + ".yuv";
|
||||
FileOutputStream fos = new FileOutputStream(tempStr);
|
||||
fos.write(dstBuf, 0, yuvSize);
|
||||
fos.close();
|
||||
if (quiet == 0)
|
||||
System.out.println("Reference image written to " + tempStr);
|
||||
}
|
||||
|
||||
|
||||
static void doTest(byte[] srcBuf, int w, int h, int subsamp, int jpegQual,
|
||||
String fileName) throws Exception {
|
||||
static void fullTest(byte[] srcBuf, int w, int h, int subsamp, int jpegQual,
|
||||
String fileName) throws Exception {
|
||||
TJCompressor tjc;
|
||||
byte[] tmpBuf;
|
||||
byte[][] jpegBuf;
|
||||
int[] jpegSize;
|
||||
double start, elapsed;
|
||||
int totalJpegSize = 0, tilew, tileh, i;
|
||||
int ps = (yuv == YUVCOMPRESS ? 3 : TJ.getPixelSize(pf));
|
||||
double start, elapsed, elapsedEncode;
|
||||
int totalJpegSize = 0, tilew, tileh, i, iter;
|
||||
int ps = TJ.getPixelSize(pf);
|
||||
int ntilesw = 1, ntilesh = 1, pitch = w * ps;
|
||||
String pfStr = (yuv == YUVCOMPRESS ? "YUV" : pixFormatStr[pf]);
|
||||
|
||||
if (yuv == YUVENCODE) {
|
||||
doTestYUV(srcBuf, w, h, subsamp, fileName);
|
||||
return;
|
||||
}
|
||||
String pfStr = pixFormatStr[pf];
|
||||
YUVImage yuvImage = null;
|
||||
|
||||
tmpBuf = new byte[pitch * h];
|
||||
|
||||
@@ -353,61 +305,94 @@ class TJBench {
|
||||
|
||||
/* Compression test */
|
||||
if (quiet == 1)
|
||||
System.out.format("%s\t%s\t%s\t%d\t", pfStr,
|
||||
System.out.format("%-4s (%s) %-5s %-3d ", pfStr,
|
||||
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "BU" : "TD",
|
||||
subNameLong[subsamp], jpegQual);
|
||||
if (yuv != YUVCOMPRESS)
|
||||
for (i = 0; i < h; i++)
|
||||
System.arraycopy(srcBuf, w * ps * i, tmpBuf, pitch * i, w * ps);
|
||||
if (yuv == YUVCOMPRESS)
|
||||
tjc.setSourceImageYUV(srcBuf, tilew, yuvpad, tileh);
|
||||
else
|
||||
tjc.setSourceImage(srcBuf, tilew, pitch, tileh, pf);
|
||||
for (i = 0; i < h; i++)
|
||||
System.arraycopy(srcBuf, w * ps * i, tmpBuf, pitch * i, w * ps);
|
||||
tjc.setJPEGQuality(jpegQual);
|
||||
tjc.setSubsamp(subsamp);
|
||||
|
||||
/* Execute once to preload cache */
|
||||
tjc.compress(jpegBuf[0], flags);
|
||||
if (doYUV) {
|
||||
yuvImage = new YUVImage(tilew, yuvpad, tileh, subsamp);
|
||||
Arrays.fill(yuvImage.getBuf(), (byte)127);
|
||||
}
|
||||
|
||||
/* Benchmark */
|
||||
for (i = 0, start = getTime();
|
||||
(elapsed = getTime() - start) < benchTime; i++) {
|
||||
iter = -warmup;
|
||||
elapsed = elapsedEncode = 0.0;
|
||||
while (true) {
|
||||
int tile = 0;
|
||||
totalJpegSize = 0;
|
||||
start = getTime();
|
||||
for (int y = 0; y < h; y += tileh) {
|
||||
for (int x = 0; x < w; x += tilew, tile++) {
|
||||
int width = Math.min(tilew, w - x);
|
||||
int height = Math.min(tileh, h - y);
|
||||
if (yuv != YUVCOMPRESS)
|
||||
tjc.setSourceImage(srcBuf, x, y, width, pitch, height, pf);
|
||||
tjc.setSourceImage(srcBuf, x, y, width, pitch, height, pf);
|
||||
if (doYUV) {
|
||||
double startEncode = getTime();
|
||||
yuvImage.setBuf(yuvImage.getBuf(), width, yuvpad, height,
|
||||
subsamp);
|
||||
tjc.encodeYUV(yuvImage, flags);
|
||||
if (iter >= 0)
|
||||
elapsedEncode += getTime() - startEncode;
|
||||
tjc.setSourceImage(yuvImage);
|
||||
}
|
||||
tjc.compress(jpegBuf[tile], flags);
|
||||
jpegSize[tile] = tjc.getCompressedSize();
|
||||
totalJpegSize += jpegSize[tile];
|
||||
}
|
||||
}
|
||||
iter++;
|
||||
if (iter >= 1) {
|
||||
elapsed += getTime() - start;
|
||||
if (elapsed >= benchTime)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (doYUV)
|
||||
elapsed -= elapsedEncode;
|
||||
|
||||
if (quiet == 1)
|
||||
System.out.format("%-4d %-4d\t", tilew, tileh);
|
||||
System.out.format("%-5d %-5d ", tilew, tileh);
|
||||
if (quiet != 0) {
|
||||
System.out.format("%s%c%s%c",
|
||||
sigFig((double)(w * h) / 1000000. * (double) i / elapsed, 4),
|
||||
quiet == 2 ? '\n' : '\t',
|
||||
if (doYUV)
|
||||
System.out.format("%-6s%s",
|
||||
sigFig((double)(w * h) / 1000000. * (double)iter / elapsedEncode, 4),
|
||||
quiet == 2 ? "\n" : " ");
|
||||
System.out.format("%-6s%s",
|
||||
sigFig((double)(w * h) / 1000000. * (double)iter / elapsed, 4),
|
||||
quiet == 2 ? "\n" : " ");
|
||||
System.out.format("%-6s%s",
|
||||
sigFig((double)(w * h * ps) / (double)totalJpegSize, 4),
|
||||
quiet == 2 ? '\n' : '\t');
|
||||
quiet == 2 ? "\n" : " ");
|
||||
} else {
|
||||
System.out.format("\n%s size: %d x %d\n", doTile ? "Tile" : "Image",
|
||||
tilew, tileh);
|
||||
System.out.format("C--> Frame rate: %f fps\n",
|
||||
(double)i / elapsed);
|
||||
System.out.format(" Output image size: %d bytes\n",
|
||||
if (doYUV) {
|
||||
System.out.format("Encode YUV --> Frame rate: %f fps\n",
|
||||
(double)iter / elapsedEncode);
|
||||
System.out.format(" Output image size: %d bytes\n",
|
||||
yuvImage.getSize());
|
||||
System.out.format(" Compression ratio: %f:1\n",
|
||||
(double)(w * h * ps) / (double)yuvImage.getSize());
|
||||
System.out.format(" Throughput: %f Megapixels/sec\n",
|
||||
(double)(w * h) / 1000000. * (double)iter / elapsedEncode);
|
||||
System.out.format(" Output bit stream: %f Megabits/sec\n",
|
||||
(double)yuvImage.getSize() * 8. / 1000000. * (double)iter / elapsedEncode);
|
||||
}
|
||||
System.out.format("%s --> Frame rate: %f fps\n",
|
||||
doYUV ? "Comp from YUV" : "Compress ",
|
||||
(double)iter / elapsed);
|
||||
System.out.format(" Output image size: %d bytes\n",
|
||||
totalJpegSize);
|
||||
System.out.format(" Compression ratio: %f:1\n",
|
||||
System.out.format(" Compression ratio: %f:1\n",
|
||||
(double)(w * h * ps) / (double)totalJpegSize);
|
||||
System.out.format(" Source throughput: %f Megapixels/sec\n",
|
||||
(double)(w * h) / 1000000. * (double)i / elapsed);
|
||||
System.out.format(" Output bit stream: %f Megabits/sec\n",
|
||||
(double)totalJpegSize * 8. / 1000000. * (double)i / elapsed);
|
||||
System.out.format(" Throughput: %f Megapixels/sec\n",
|
||||
(double)(w * h) / 1000000. * (double)iter / elapsed);
|
||||
System.out.format(" Output bit stream: %f Megabits/sec\n",
|
||||
(double)totalJpegSize * 8. / 1000000. * (double)iter / elapsed);
|
||||
}
|
||||
if (tilew == w && tileh == h) {
|
||||
String tempStr = fileName + "_" + subName[subsamp] + "_" + "Q" +
|
||||
@@ -421,27 +406,22 @@ class TJBench {
|
||||
|
||||
/* Decompression test */
|
||||
if (!compOnly)
|
||||
decompTest(srcBuf, jpegBuf, jpegSize, tmpBuf, w, h, subsamp, jpegQual,
|
||||
fileName, tilew, tileh);
|
||||
|
||||
for (i = 0; i < ntilesw * ntilesh; i++)
|
||||
jpegBuf[i] = null;
|
||||
jpegBuf = null; jpegSize = null;
|
||||
System.gc();
|
||||
decomp(srcBuf, jpegBuf, jpegSize, tmpBuf, w, h, subsamp, jpegQual,
|
||||
fileName, tilew, tileh);
|
||||
|
||||
if (tilew == w && tileh == h) break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void doDecompTest(String fileName) throws Exception {
|
||||
static void decompTest(String fileName) throws Exception {
|
||||
TJTransformer tjt;
|
||||
byte[][] jpegBuf;
|
||||
byte[][] jpegBuf = null;
|
||||
byte[] srcBuf;
|
||||
int[] jpegSize;
|
||||
int[] jpegSize = null;
|
||||
int totalJpegSize;
|
||||
int w = 0, h = 0, subsamp = -1, cs = -1, _w, _h, _tilew, _tileh,
|
||||
_ntilesw, _ntilesh, _subsamp, x, y;
|
||||
_ntilesw, _ntilesh, _subsamp, x, y, iter;
|
||||
int ntilesw = 1, ntilesh = 1;
|
||||
double start, elapsed;
|
||||
int ps = TJ.getPixelSize(pf), tile;
|
||||
@@ -458,7 +438,7 @@ class TJBench {
|
||||
|
||||
tjt = new TJTransformer();
|
||||
|
||||
tjt.setJPEGImage(srcBuf, srcSize);
|
||||
tjt.setSourceImage(srcBuf, srcSize);
|
||||
w = tjt.getWidth();
|
||||
h = tjt.getHeight();
|
||||
subsamp = tjt.getSubsamp();
|
||||
@@ -466,19 +446,20 @@ class TJBench {
|
||||
|
||||
if (quiet == 1) {
|
||||
System.out.println("All performance values in Mpixels/sec\n");
|
||||
System.out.format("Bitmap\tBitmap\tJPEG\tJPEG\t%s %s \tXform\tComp\tDecomp\n",
|
||||
System.out.format("Bitmap JPEG JPEG %s %s Xform Comp Decomp ",
|
||||
(doTile ? "Tile " : "Image"),
|
||||
(doTile ? "Tile " : "Image"));
|
||||
System.out.println("Format\tOrder\tCS\tSubsamp\tWidth Height\tPerf \tRatio\tPerf\n");
|
||||
} else if (quiet == 0) {
|
||||
if (yuv == YUVDECODE)
|
||||
System.out.format(">>>>> JPEG %s --> YUV <<<<<",
|
||||
formatName(subsamp, cs));
|
||||
else
|
||||
System.out.format(">>>>> JPEG %s --> %s (%s) <<<<<",
|
||||
formatName(subsamp, cs), pixFormatStr[pf],
|
||||
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "Bottom-up" : "Top-down");
|
||||
}
|
||||
if (doYUV)
|
||||
System.out.print("Decode");
|
||||
System.out.print("\n");
|
||||
System.out.print("Format CS Subsamp Width Height Perf Ratio Perf ");
|
||||
if (doYUV)
|
||||
System.out.print("Perf");
|
||||
System.out.println("\n");
|
||||
} else if (quiet == 0)
|
||||
System.out.format(">>>>> JPEG %s --> %s (%s) <<<<<\n",
|
||||
formatName(subsamp, cs), pixFormatStr[pf],
|
||||
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "Bottom-up" : "Top-down");
|
||||
|
||||
for (int tilew = doTile ? 16 : w, tileh = doTile ? 16 : h; ;
|
||||
tilew *= 2, tileh *= 2) {
|
||||
@@ -498,10 +479,10 @@ class TJBench {
|
||||
sf.getScaled(_h));
|
||||
System.out.println("");
|
||||
} else if (quiet == 1) {
|
||||
System.out.format("%s\t%s\t%s\t%s\t", pixFormatStr[pf],
|
||||
System.out.format("%-4s (%s) %-5s %-5s ", pixFormatStr[pf],
|
||||
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "BU" : "TD",
|
||||
csName[cs], subNameLong[subsamp]);
|
||||
System.out.format("%-4d %-4d\t", tilew, tileh);
|
||||
System.out.format("%-5d %-5d ", tilew, tileh);
|
||||
}
|
||||
|
||||
_subsamp = subsamp;
|
||||
@@ -530,6 +511,16 @@ class TJBench {
|
||||
_ntilesw = (_w + _tilew - 1) / _tilew;
|
||||
_ntilesh = (_h + _tileh - 1) / _tileh;
|
||||
|
||||
if (xformOp == TJTransform.OP_TRANSPOSE ||
|
||||
xformOp == TJTransform.OP_TRANSVERSE ||
|
||||
xformOp == TJTransform.OP_ROT90 ||
|
||||
xformOp == TJTransform.OP_ROT270) {
|
||||
if (_subsamp == TJ.SAMP_422)
|
||||
_subsamp = TJ.SAMP_440;
|
||||
else if (_subsamp == TJ.SAMP_440)
|
||||
_subsamp = TJ.SAMP_422;
|
||||
}
|
||||
|
||||
TJTransform[] t = new TJTransform[_ntilesw * _ntilesh];
|
||||
jpegBuf = new byte[_ntilesw * _ntilesh][TJ.bufSize(_tilew, _tileh, subsamp)];
|
||||
|
||||
@@ -548,37 +539,45 @@ class TJBench {
|
||||
}
|
||||
}
|
||||
|
||||
start = getTime();
|
||||
tjt.transform(jpegBuf, t, flags);
|
||||
jpegSize = tjt.getTransformedSizes();
|
||||
elapsed = getTime() - start;
|
||||
|
||||
iter = -warmup;
|
||||
elapsed = 0.;
|
||||
while (true) {
|
||||
start = getTime();
|
||||
tjt.transform(jpegBuf, t, flags);
|
||||
jpegSize = tjt.getTransformedSizes();
|
||||
iter++;
|
||||
if (iter >= 1) {
|
||||
elapsed += getTime() - start;
|
||||
if (elapsed >= benchTime)
|
||||
break;
|
||||
}
|
||||
}
|
||||
t = null;
|
||||
|
||||
for (tile = 0, totalJpegSize = 0; tile < _ntilesw * _ntilesh; tile++)
|
||||
totalJpegSize += jpegSize[tile];
|
||||
|
||||
if (quiet != 0) {
|
||||
System.out.format("%s%c%s%c",
|
||||
System.out.format("%-6s%s%-6s%s",
|
||||
sigFig((double)(w * h) / 1000000. / elapsed, 4),
|
||||
quiet == 2 ? '\n' : '\t',
|
||||
quiet == 2 ? "\n" : " ",
|
||||
sigFig((double)(w * h * ps) / (double)totalJpegSize, 4),
|
||||
quiet == 2 ? '\n' : '\t');
|
||||
quiet == 2 ? "\n" : " ");
|
||||
} else if (quiet == 0) {
|
||||
System.out.format("X--> Frame rate: %f fps\n",
|
||||
System.out.format("Transform --> Frame rate: %f fps\n",
|
||||
1.0 / elapsed);
|
||||
System.out.format(" Output image size: %lu bytes\n",
|
||||
System.out.format(" Output image size: %d bytes\n",
|
||||
totalJpegSize);
|
||||
System.out.format(" Compression ratio: %f:1\n",
|
||||
System.out.format(" Compression ratio: %f:1\n",
|
||||
(double)(w * h * ps) / (double)totalJpegSize);
|
||||
System.out.format(" Source throughput: %f Megapixels/sec\n",
|
||||
System.out.format(" Throughput: %f Megapixels/sec\n",
|
||||
(double)(w * h) / 1000000. / elapsed);
|
||||
System.out.format(" Output bit stream: %f Megabits/sec\n",
|
||||
System.out.format(" Output bit stream: %f Megabits/sec\n",
|
||||
(double)totalJpegSize * 8. / 1000000. / elapsed);
|
||||
}
|
||||
} else {
|
||||
if (quiet == 1)
|
||||
System.out.print("N/A\tN/A\t");
|
||||
System.out.print("N/A N/A ");
|
||||
jpegBuf = new byte[1][TJ.bufSize(_tilew, _tileh, subsamp)];
|
||||
jpegSize = new int[1];
|
||||
jpegSize[0] = srcSize;
|
||||
@@ -590,8 +589,8 @@ class TJBench {
|
||||
if (h == tileh)
|
||||
_tileh = _h;
|
||||
if ((xformOpt & TJTransform.OPT_NOOUTPUT) == 0)
|
||||
decompTest(null, jpegBuf, jpegSize, null, _w, _h, _subsamp, 0,
|
||||
fileName, _tilew, _tileh);
|
||||
decomp(null, jpegBuf, jpegSize, null, _w, _h, _subsamp, 0,
|
||||
fileName, _tilew, _tileh);
|
||||
else if (quiet == 1)
|
||||
System.out.println("N/A");
|
||||
|
||||
@@ -610,7 +609,7 @@ class TJBench {
|
||||
String className = new TJBench().getClass().getName();
|
||||
|
||||
System.out.println("\nUSAGE: java " + className);
|
||||
System.out.println(" <Inputfile (BMP|YUV)> <Quality> [options]\n");
|
||||
System.out.println(" <Inputfile (BMP)> <Quality> [options]\n");
|
||||
System.out.println(" java " + className);
|
||||
System.out.println(" <Inputfile (JPG)> [options]\n");
|
||||
System.out.println("Options:\n");
|
||||
@@ -618,32 +617,24 @@ class TJBench {
|
||||
System.out.println("-bottomup = Test bottom-up compression/decompression");
|
||||
System.out.println("-tile = Test performance of the codec when the image is encoded as separate");
|
||||
System.out.println(" tiles of varying sizes.");
|
||||
System.out.println("-forcemmx, -forcesse, -forcesse2, -forcesse3 =");
|
||||
System.out.println(" Force MMX, SSE, SSE2, or SSE3 code paths in the underlying codec");
|
||||
System.out.println("-rgb, -bgr, -rgbx, -bgrx, -xbgr, -xrgb =");
|
||||
System.out.println(" Test the specified color conversion path in the codec (default: BGR)");
|
||||
System.out.println(" Test the specified color conversion path in the codec (default = BGR)");
|
||||
System.out.println("-fastupsample = Use the fastest chrominance upsampling algorithm available in");
|
||||
System.out.println(" the underlying codec");
|
||||
System.out.println("-fastdct = Use the fastest DCT/IDCT algorithms available in the underlying");
|
||||
System.out.println(" codec");
|
||||
System.out.println("-accuratedct = Use the most accurate DCT/IDCT algorithms available in the");
|
||||
System.out.println(" underlying codec");
|
||||
System.out.println("-subsamp <s> = if compressing a JPEG image from a YUV planar source image,");
|
||||
System.out.println(" this specifies the level of chrominance subsampling used in the source");
|
||||
System.out.println(" image. Otherwise, this specifies the level of chrominance subsampling");
|
||||
System.out.println(" to use in the JPEG destination image. <s> = 444, 422, 440, 420, 411,");
|
||||
System.out.println(" or GRAY");
|
||||
System.out.println("-subsamp <s> = When testing JPEG compression, this option specifies the level");
|
||||
System.out.println(" of chrominance subsampling to use (<s> = 444, 422, 440, 420, 411, or");
|
||||
System.out.println(" GRAY). The default is to test Grayscale, 4:2:0, 4:2:2, and 4:4:4 in");
|
||||
System.out.println(" sequence.");
|
||||
System.out.println("-quiet = Output results in tabular rather than verbose format");
|
||||
System.out.println("-yuvencode = Encode RGB input as planar YUV rather than compressing as JPEG");
|
||||
System.out.println("-yuvdecode = Decode JPEG image to planar YUV rather than RGB");
|
||||
System.out.println("-yuvsize WxH = if compressing a JPEG image from a YUV planar source image, this");
|
||||
System.out.println(" specifies the width and height of the source image.");
|
||||
System.out.println("-yuvpad <p> = if compressing a JPEG image from a YUV planar source image, this");
|
||||
System.out.println(" specifies the number of bytes to which each row of each plane in the");
|
||||
System.out.println(" source image is padded. If decompressing a JPEG image to a YUV planar");
|
||||
System.out.println(" destination image, this specifies the row padding for each plane of the");
|
||||
System.out.println(" destination image. (default=1)");
|
||||
System.out.println("-scale M/N = scale down the width/height of the decompressed JPEG image by a");
|
||||
System.out.println("-yuv = Test YUV encoding/decoding functions");
|
||||
System.out.println("-yuvpad <p> = If testing YUV encoding/decoding, this specifies the number of");
|
||||
System.out.println(" bytes to which each row of each plane in the intermediate YUV image is");
|
||||
System.out.println(" padded (default = 1)");
|
||||
System.out.println("-scale M/N = Scale down the width/height of the decompressed JPEG image by a");
|
||||
System.out.print (" factor of M/N (M/N = ");
|
||||
for (i = 0; i < nsf; i++) {
|
||||
System.out.format("%d/%d", scalingFactors[i].getNum(),
|
||||
@@ -666,7 +657,9 @@ class TJBench {
|
||||
System.out.println("-grayscale = Perform lossless grayscale conversion prior to decompression");
|
||||
System.out.println(" test (can be combined with the other transforms above)");
|
||||
System.out.println("-benchtime <t> = Run each benchmark for at least <t> seconds (default = 5.0)");
|
||||
System.out.println("-componly = Stop after running compression tests. Do not test decompression.\n");
|
||||
System.out.println("-warmup <w> = Execute each benchmark <w> times to prime the cache before");
|
||||
System.out.println(" taking performance measurements (default = 1)");
|
||||
System.out.println("-componly = Stop after running compression tests. Do not test decompression.\n");
|
||||
System.out.println("NOTE: If the quality is specified as a range (e.g. 90-100), a separate");
|
||||
System.out.println("test will be performed for all quality values in the range.\n");
|
||||
System.exit(1);
|
||||
@@ -687,25 +680,10 @@ class TJBench {
|
||||
String tempStr = argv[0].toLowerCase();
|
||||
if (tempStr.endsWith(".jpg") || tempStr.endsWith(".jpeg"))
|
||||
decompOnly = true;
|
||||
if (tempStr.endsWith(".yuv"))
|
||||
yuv = YUVCOMPRESS;
|
||||
|
||||
System.out.println("");
|
||||
|
||||
if (argv.length > minArg) {
|
||||
for (int i = minArg; i < argv.length; i++) {
|
||||
if (argv[i].equalsIgnoreCase("-yuvencode")) {
|
||||
System.out.println("Testing YUV planar encoding\n");
|
||||
yuv = YUVENCODE; maxQual = minQual = 100;
|
||||
}
|
||||
if (argv[i].equalsIgnoreCase("-yuvdecode")) {
|
||||
System.out.println("Testing YUV planar decoding\n");
|
||||
yuv = YUVDECODE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!decompOnly && yuv != YUVENCODE) {
|
||||
if (!decompOnly) {
|
||||
minArg = 2;
|
||||
if (argv.length < minArg)
|
||||
usage();
|
||||
@@ -729,22 +707,6 @@ class TJBench {
|
||||
if (argv[i].equalsIgnoreCase("-tile")) {
|
||||
doTile = true; xformOpt |= TJTransform.OPT_CROP;
|
||||
}
|
||||
if (argv[i].equalsIgnoreCase("-forcesse3")) {
|
||||
System.out.println("Forcing SSE3 code\n");
|
||||
flags |= TJ.FLAG_FORCESSE3;
|
||||
}
|
||||
if (argv[i].equalsIgnoreCase("-forcesse2")) {
|
||||
System.out.println("Forcing SSE2 code\n");
|
||||
flags |= TJ.FLAG_FORCESSE2;
|
||||
}
|
||||
if (argv[i].equalsIgnoreCase("-forcesse")) {
|
||||
System.out.println("Forcing SSE code\n");
|
||||
flags |= TJ.FLAG_FORCESSE;
|
||||
}
|
||||
if (argv[i].equalsIgnoreCase("-forcemmx")) {
|
||||
System.out.println("Forcing MMX code\n");
|
||||
flags |= TJ.FLAG_FORCEMMX;
|
||||
}
|
||||
if (argv[i].equalsIgnoreCase("-fastupsample")) {
|
||||
System.out.println("Using fast upsampling code\n");
|
||||
flags |= TJ.FLAG_FASTUPSAMPLE;
|
||||
@@ -826,18 +788,9 @@ class TJBench {
|
||||
else
|
||||
usage();
|
||||
}
|
||||
if (argv[i].equalsIgnoreCase("-yuvsize") && i < argv.length - 1) {
|
||||
int temp1 = 0, temp2 = 0;
|
||||
Scanner scanner = new Scanner(argv[++i]).useDelimiter("x");
|
||||
try {
|
||||
temp1 = scanner.nextInt();
|
||||
temp2 = scanner.nextInt();
|
||||
} catch(Exception e) {}
|
||||
if (temp1 >= 1 && temp2 >= 1) {
|
||||
w = temp1;
|
||||
h = temp2;
|
||||
} else
|
||||
usage();
|
||||
if (argv[i].equalsIgnoreCase("-yuv")) {
|
||||
System.out.println("Testing YUV planar encoding/decoding\n");
|
||||
doYUV = true;
|
||||
}
|
||||
if (argv[i].equalsIgnoreCase("-yuvpad") && i < argv.length - 1) {
|
||||
int temp = 0;
|
||||
@@ -864,6 +817,16 @@ class TJBench {
|
||||
}
|
||||
if (argv[i].equalsIgnoreCase("-componly"))
|
||||
compOnly = true;
|
||||
if (argv[i].equalsIgnoreCase("-warmup") && i < argv.length - 1) {
|
||||
int temp = -1;
|
||||
try {
|
||||
temp = Integer.parseInt(argv[++i]);
|
||||
} catch (NumberFormatException e) {}
|
||||
if (temp >= 0) {
|
||||
warmup = temp;
|
||||
System.out.format("Warmup runs = %d\n\n", warmup);
|
||||
}
|
||||
}
|
||||
if (argv[i].equalsIgnoreCase("-?"))
|
||||
usage();
|
||||
}
|
||||
@@ -878,67 +841,60 @@ class TJBench {
|
||||
doTile = false;
|
||||
}
|
||||
|
||||
if (yuv != 0 && doTile) {
|
||||
System.out.println("Disabling tiled compression/decompression tests, because those tests do not");
|
||||
System.out.println("work when YUV encoding, compression, or decoding is enabled.\n");
|
||||
doTile = false;
|
||||
}
|
||||
|
||||
if (!decompOnly) {
|
||||
if(yuv == YUVCOMPRESS) {
|
||||
if (w < 1 || h < 1 || subsamp < 0 || subsamp >= TJ.NUMSAMP)
|
||||
throw new Exception("YUV image size and/or subsampling not specified");
|
||||
FileInputStream fis = new FileInputStream(argv[0]);
|
||||
int srcSize = (int)fis.getChannel().size();
|
||||
if (srcSize != TJ.bufSizeYUV(w, yuvpad, h, subsamp))
|
||||
throw new Exception("YUV image file is the wrong size");
|
||||
srcBuf = new byte[srcSize];
|
||||
fis.read(srcBuf, 0, srcSize);
|
||||
fis.close();
|
||||
}
|
||||
else {
|
||||
int[] width = new int[1], height = new int[1];
|
||||
srcBuf = loadImage(argv[0], width, height, pf);
|
||||
w = width[0]; h = height[0];
|
||||
int index = -1;
|
||||
if ((index = argv[0].indexOf('.')) >= 0)
|
||||
argv[0] = argv[0].substring(0, index);
|
||||
}
|
||||
int[] width = new int[1], height = new int[1];
|
||||
srcBuf = loadImage(argv[0], width, height, pf);
|
||||
w = width[0]; h = height[0];
|
||||
int index = -1;
|
||||
if ((index = argv[0].indexOf('.')) >= 0)
|
||||
argv[0] = argv[0].substring(0, index);
|
||||
}
|
||||
|
||||
if (quiet == 1 && !decompOnly) {
|
||||
System.out.println("All performance values in Mpixels/sec\n");
|
||||
System.out.format("Bitmap\tBitmap\tJPEG\tJPEG\t%s %s \tComp\tComp\tDecomp\n",
|
||||
System.out.format("Bitmap JPEG JPEG %s %s ",
|
||||
(doTile ? "Tile " : "Image"), (doTile ? "Tile " : "Image"));
|
||||
System.out.println("Format\tOrder\tSubsamp\tQual\tWidth Height\tPerf \tRatio\tPerf\n");
|
||||
if (doYUV)
|
||||
System.out.print("Encode ");
|
||||
System.out.print("Comp Comp Decomp ");
|
||||
if (doYUV)
|
||||
System.out.print("Decode");
|
||||
System.out.print("\n");
|
||||
System.out.print("Format Subsamp Qual Width Height ");
|
||||
if (doYUV)
|
||||
System.out.print("Perf ");
|
||||
System.out.print("Perf Ratio Perf ");
|
||||
if (doYUV)
|
||||
System.out.print("Perf");
|
||||
System.out.println("\n");
|
||||
}
|
||||
|
||||
if (decompOnly) {
|
||||
doDecompTest(argv[0]);
|
||||
decompTest(argv[0]);
|
||||
System.out.println("");
|
||||
System.exit(retval);
|
||||
}
|
||||
|
||||
System.gc();
|
||||
if (yuv == YUVCOMPRESS || (subsamp >= 0 && subsamp < TJ.NUMSAMP)) {
|
||||
if (subsamp >= 0 && subsamp < TJ.NUMSAMP) {
|
||||
for (int i = maxQual; i >= minQual; i--)
|
||||
doTest(srcBuf, w, h, subsamp, i, argv[0]);
|
||||
fullTest(srcBuf, w, h, subsamp, i, argv[0]);
|
||||
System.out.println("");
|
||||
} else {
|
||||
for (int i = maxQual; i >= minQual; i--)
|
||||
doTest(srcBuf, w, h, TJ.SAMP_GRAY, i, argv[0]);
|
||||
fullTest(srcBuf, w, h, TJ.SAMP_GRAY, i, argv[0]);
|
||||
System.out.println("");
|
||||
System.gc();
|
||||
for (int i = maxQual; i >= minQual; i--)
|
||||
doTest(srcBuf, w, h, TJ.SAMP_420, i, argv[0]);
|
||||
fullTest(srcBuf, w, h, TJ.SAMP_420, i, argv[0]);
|
||||
System.out.println("");
|
||||
System.gc();
|
||||
for (int i = maxQual; i >= minQual; i--)
|
||||
doTest(srcBuf, w, h, TJ.SAMP_422, i, argv[0]);
|
||||
fullTest(srcBuf, w, h, TJ.SAMP_422, i, argv[0]);
|
||||
System.out.println("");
|
||||
System.gc();
|
||||
for (int i = maxQual; i >= minQual; i--)
|
||||
doTest(srcBuf, w, h, TJ.SAMP_444, i, argv[0]);
|
||||
fullTest(srcBuf, w, h, TJ.SAMP_444, i, argv[0]);
|
||||
System.out.println("");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2011-2012 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2012, 2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -277,7 +277,7 @@ public class TJExample implements TJCustomFilter {
|
||||
scaleFactor.isOne()) {
|
||||
file = new File(argv[1]);
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
fos.write(tjd.getJPEGBuf(), 0, tjd.getJPEGSize());
|
||||
fos.write(tjd.getSourceBuf(), 0, tjd.getSourceSize());
|
||||
fos.close();
|
||||
System.exit(0);
|
||||
}
|
||||
@@ -324,11 +324,11 @@ public class TJExample implements TJCustomFilter {
|
||||
tjc.setSubsamp(outSubsamp);
|
||||
tjc.setJPEGQuality(outQual);
|
||||
if (img != null)
|
||||
jpegBuf = tjc.compress(img, flags);
|
||||
tjc.setSourceImage(img, 0, 0, 0, 0);
|
||||
else {
|
||||
tjc.setSourceImage(bmpBuf, width, 0, height, TJ.PF_BGRX);
|
||||
jpegBuf = tjc.compress(flags);
|
||||
tjc.setSourceImage(bmpBuf, 0, 0, width, 0, height, TJ.PF_BGRX);
|
||||
}
|
||||
jpegBuf = tjc.compress(flags);
|
||||
jpegSize = tjc.getCompressedSize();
|
||||
tjc.close();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -92,9 +92,7 @@ public class TJUnitTest {
|
||||
TJ.PF_RGB
|
||||
};
|
||||
|
||||
private static final int YUVENCODE = 1;
|
||||
private static final int YUVDECODE = 2;
|
||||
private static int yuv = 0;
|
||||
private static boolean doYUV = false;
|
||||
private static int pad = 4;
|
||||
private static boolean bi = false;
|
||||
|
||||
@@ -152,10 +150,6 @@ public class TJUnitTest {
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
private static double getTime() {
|
||||
return (double)System.nanoTime() / 1.0e9;
|
||||
}
|
||||
|
||||
private static void initBuf(byte[] buf, int w, int pitch, int h, int pf,
|
||||
int flags) throws Exception {
|
||||
int roffset = TJ.getRedOffset(pf);
|
||||
@@ -538,54 +532,6 @@ public class TJUnitTest {
|
||||
return ((v + (p) - 1) & (~((p) - 1)));
|
||||
}
|
||||
|
||||
private static void initBufYUV(byte[] buf, int w, int pad, int h,
|
||||
int subsamp) throws Exception {
|
||||
int row, col;
|
||||
int hsf = TJ.getMCUWidth(subsamp) / 8, vsf = TJ.getMCUHeight(subsamp) / 8;
|
||||
int pw = PAD(w, hsf), ph = PAD(h, vsf);
|
||||
int cw = pw / hsf, ch = ph / vsf;
|
||||
int ypitch = PAD(pw, pad), uvpitch = PAD(cw, pad);
|
||||
int halfway = 16, blockSize = 8;
|
||||
|
||||
Arrays.fill(buf, (byte)0);
|
||||
for (row = 0; row < ph; row++) {
|
||||
for (col = 0; col < pw; col++) {
|
||||
int index = ypitch * row + col;
|
||||
if (((row / blockSize) + (col / blockSize)) % 2 == 0) {
|
||||
if (row < halfway)
|
||||
buf[index] = (byte)255;
|
||||
else
|
||||
buf[index] = 0;
|
||||
} else {
|
||||
if (row < halfway)
|
||||
buf[index] = 76;
|
||||
else
|
||||
buf[index] = (byte)226;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (subsamp != TJ.SAMP_GRAY) {
|
||||
halfway = 16 / vsf;
|
||||
for (row = 0; row < ch; row++) {
|
||||
for (col = 0; col < cw; col++) {
|
||||
int uindex = ypitch * ph + (uvpitch * row + col),
|
||||
vindex = ypitch * ph + uvpitch * ch + (uvpitch * row + col);
|
||||
if (((row * vsf / blockSize) + (col * hsf / blockSize)) % 2 == 0) {
|
||||
buf[uindex] = buf[vindex] = (byte)128;
|
||||
} else {
|
||||
if (row < halfway) {
|
||||
buf[uindex] = 85;
|
||||
buf[vindex] = (byte)255;
|
||||
} else {
|
||||
buf[uindex] = 0;
|
||||
buf[vindex] = (byte)149;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int checkBufYUV(byte[] buf, int size, int w, int h,
|
||||
int subsamp, TJScalingFactor sf)
|
||||
throws Exception {
|
||||
@@ -690,96 +636,68 @@ public class TJUnitTest {
|
||||
private static int compTest(TJCompressor tjc, byte[] dstBuf, int w,
|
||||
int h, int pf, String baseName, int subsamp,
|
||||
int jpegQual, int flags) throws Exception {
|
||||
String tempstr;
|
||||
String tempStr;
|
||||
byte[] srcBuf = null;
|
||||
BufferedImage img = null;
|
||||
String pfStr;
|
||||
String pfStr, pfStrLong;
|
||||
String buStr = (flags & TJ.FLAG_BOTTOMUP) != 0 ? "BU" : "TD";
|
||||
String buStrLong = (flags & TJ.FLAG_BOTTOMUP) != 0 ?
|
||||
"Bottom-Up" : "Top-Down ";
|
||||
String buStr = (flags & TJ.FLAG_BOTTOMUP) != 0 ? "BU" : "TD";
|
||||
double t;
|
||||
int size = 0, ps, imgType = pf;
|
||||
|
||||
if (yuv == YUVDECODE) {
|
||||
System.out.format("YUV %s %s --> JPEG Q%d ... ", subNameLong[subsamp],
|
||||
buStrLong, jpegQual);
|
||||
srcBuf = new byte[TJ.bufSizeYUV(w, pad, h, subsamp)];
|
||||
initBufYUV(srcBuf, w, pad, h, subsamp);
|
||||
pfStr = "YUV";
|
||||
if (bi) {
|
||||
pf = biTypePF(imgType);
|
||||
pfStr = biTypeStr(imgType);
|
||||
pfStrLong = pfStr + " (" + pixFormatStr[pf] + ")";
|
||||
} else {
|
||||
if (bi) {
|
||||
pf = biTypePF(imgType);
|
||||
pfStr = biTypeStr(imgType);
|
||||
} else
|
||||
pfStr = pixFormatStr[pf];
|
||||
ps = TJ.getPixelSize(pf);
|
||||
pfStr = pixFormatStr[pf];
|
||||
pfStrLong = pfStr;
|
||||
}
|
||||
ps = TJ.getPixelSize(pf);
|
||||
|
||||
System.out.print(pfStr + " ");
|
||||
if (bi)
|
||||
System.out.print("(" + pixFormatStr[pf] + ") ");
|
||||
if (yuv == YUVENCODE)
|
||||
System.out.format("%s -> %s YUV ... ", buStrLong,
|
||||
subNameLong[subsamp]);
|
||||
else
|
||||
System.out.format("%s -> %s Q%d ... ", buStrLong, subNameLong[subsamp],
|
||||
jpegQual);
|
||||
|
||||
if (bi) {
|
||||
img = new BufferedImage(w, h, imgType);
|
||||
initImg(img, pf, flags);
|
||||
tempstr = baseName + "_enc_" + pfStr + "_" + buStr + "_" +
|
||||
subName[subsamp] + "_Q" + jpegQual + ".png";
|
||||
File file = new File(tempstr);
|
||||
ImageIO.write(img, "png", file);
|
||||
} else {
|
||||
srcBuf = new byte[w * h * ps + 1];
|
||||
initBuf(srcBuf, w, w * ps, h, pf, flags);
|
||||
}
|
||||
if (bi) {
|
||||
img = new BufferedImage(w, h, imgType);
|
||||
initImg(img, pf, flags);
|
||||
tempStr = baseName + "_enc_" + pfStr + "_" + buStr + "_" +
|
||||
subName[subsamp] + "_Q" + jpegQual + ".png";
|
||||
File file = new File(tempStr);
|
||||
ImageIO.write(img, "png", file);
|
||||
tjc.setSourceImage(img, 0, 0, 0, 0);
|
||||
} else {
|
||||
srcBuf = new byte[w * h * ps + 1];
|
||||
initBuf(srcBuf, w, w * ps, h, pf, flags);
|
||||
tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, pf);
|
||||
}
|
||||
Arrays.fill(dstBuf, (byte)0);
|
||||
|
||||
t = getTime();
|
||||
tjc.setSubsamp(subsamp);
|
||||
tjc.setJPEGQuality(jpegQual);
|
||||
tjc.setYUVPad(pad);
|
||||
if (bi) {
|
||||
if (yuv == YUVENCODE)
|
||||
tjc.encodeYUV(img, dstBuf, flags);
|
||||
else
|
||||
tjc.compress(img, dstBuf, flags);
|
||||
} else {
|
||||
if (yuv == YUVDECODE)
|
||||
tjc.setSourceImageYUV(srcBuf, w, pad, h);
|
||||
else
|
||||
tjc.setSourceImage(srcBuf, w, 0, h, pf);
|
||||
if (yuv == YUVENCODE)
|
||||
tjc.encodeYUV(dstBuf, flags);
|
||||
else
|
||||
tjc.compress(dstBuf, flags);
|
||||
}
|
||||
size = tjc.getCompressedSize();
|
||||
t = getTime() - t;
|
||||
|
||||
if (yuv == YUVENCODE)
|
||||
tempstr = baseName + "_enc_" + pfStr + "_" + buStr + "_" +
|
||||
subName[subsamp] + ".yuv";
|
||||
else
|
||||
tempstr = baseName + "_enc_" + pfStr + "_" + buStr + "_" +
|
||||
subName[subsamp] + "_Q" + jpegQual + ".jpg";
|
||||
writeJPEG(dstBuf, size, tempstr);
|
||||
|
||||
if (yuv == YUVENCODE) {
|
||||
if (checkBufYUV(dstBuf, size, w, h, subsamp,
|
||||
new TJScalingFactor(1, 1)) == 1)
|
||||
System.out.print("Passed.");
|
||||
if (doYUV) {
|
||||
System.out.format("%s %s -> YUV %s ... ", pfStrLong, buStrLong,
|
||||
subNameLong[subsamp]);
|
||||
YUVImage yuvImage = tjc.encodeYUV(pad, flags);
|
||||
if (checkBufYUV(yuvImage.getBuf(), yuvImage.getSize(), w, h, subsamp,
|
||||
new TJScalingFactor(1, 1)) == 1)
|
||||
System.out.print("Passed.\n");
|
||||
else {
|
||||
System.out.print("FAILED!");
|
||||
System.out.print("FAILED!\n");
|
||||
exitStatus = -1;
|
||||
}
|
||||
} else
|
||||
System.out.print("Done.");
|
||||
System.out.format(" %.6f ms\n", t * 1000.);
|
||||
System.out.println(" Result in " + tempstr);
|
||||
|
||||
System.out.format("YUV %s %s -> JPEG Q%d ... ", subNameLong[subsamp],
|
||||
buStrLong, jpegQual);
|
||||
tjc.setSourceImage(yuvImage);
|
||||
} else {
|
||||
System.out.format("%s %s -> %s Q%d ... ", pfStrLong, buStrLong,
|
||||
subNameLong[subsamp], jpegQual);
|
||||
}
|
||||
tjc.compress(dstBuf, flags);
|
||||
size = tjc.getCompressedSize();
|
||||
|
||||
tempStr = baseName + "_enc_" + pfStr + "_" + buStr + "_" +
|
||||
subName[subsamp] + "_Q" + jpegQual + ".jpg";
|
||||
writeJPEG(dstBuf, size, tempStr);
|
||||
System.out.println("Done.\n Result in " + tempStr);
|
||||
|
||||
return size;
|
||||
}
|
||||
@@ -788,41 +706,25 @@ public class TJUnitTest {
|
||||
int jpegSize, int w, int h, int pf,
|
||||
String baseName, int subsamp, int flags,
|
||||
TJScalingFactor sf) throws Exception {
|
||||
String pfStr, tempstr;
|
||||
double t;
|
||||
String pfStr, pfStrLong, tempStr;
|
||||
String buStrLong = (flags & TJ.FLAG_BOTTOMUP) != 0 ?
|
||||
"Bottom-Up" : "Top-Down ";
|
||||
int scaledWidth = sf.getScaled(w);
|
||||
int scaledHeight = sf.getScaled(h);
|
||||
int temp1, temp2, imgType = pf;
|
||||
BufferedImage img = null;
|
||||
byte[] dstBuf = null;
|
||||
|
||||
if (yuv == YUVENCODE) return;
|
||||
|
||||
if (bi) {
|
||||
pf = biTypePF(imgType);
|
||||
pfStr = biTypeStr(imgType);
|
||||
} else
|
||||
pfStrLong = pfStr + " (" + pixFormatStr[pf] + ")";
|
||||
} else {
|
||||
pfStr = pixFormatStr[pf];
|
||||
|
||||
System.out.print("JPEG -> ");
|
||||
if (yuv == YUVDECODE)
|
||||
System.out.print("YUV " + subNameLong[subsamp] + " ");
|
||||
else {
|
||||
System.out.print(pfStr + " ");
|
||||
if (bi)
|
||||
System.out.print("(" + pixFormatStr[pf] + ") ");
|
||||
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
||||
System.out.print("Bottom-Up ");
|
||||
else
|
||||
System.out.print("Top-Down ");
|
||||
pfStrLong = pfStr;
|
||||
}
|
||||
if (!sf.isOne())
|
||||
System.out.print(sf.getNum() + "/" + sf.getDenom() + " ... ");
|
||||
else
|
||||
System.out.print("... ");
|
||||
|
||||
t = getTime();
|
||||
tjd.setJPEGImage(jpegBuf, jpegSize);
|
||||
tjd.setSourceImage(jpegBuf, jpegSize);
|
||||
if (tjd.getWidth() != w || tjd.getHeight() != h ||
|
||||
tjd.getSubsamp() != subsamp)
|
||||
throw new Exception("Incorrect JPEG header");
|
||||
@@ -834,44 +736,52 @@ public class TJUnitTest {
|
||||
if (temp1 != scaledWidth || temp2 != scaledHeight)
|
||||
throw new Exception("Scaled size mismatch");
|
||||
|
||||
if (yuv == YUVDECODE)
|
||||
dstBuf = tjd.decompressToYUV(scaledWidth, pad, scaledHeight, flags);
|
||||
else {
|
||||
if (bi)
|
||||
img = tjd.decompress(scaledWidth, scaledHeight, imgType, flags);
|
||||
else
|
||||
dstBuf = tjd.decompress(scaledWidth, 0, scaledHeight, pf, flags);
|
||||
if (doYUV) {
|
||||
System.out.format("JPEG -> YUV %s ", subNameLong[subsamp]);
|
||||
if(!sf.isOne())
|
||||
System.out.format("%d/%d ... ", sf.getNum(), sf.getDenom());
|
||||
else System.out.print("... ");
|
||||
YUVImage yuvImage = tjd.decompressToYUV(scaledWidth, pad, scaledHeight,
|
||||
flags);
|
||||
if (checkBufYUV(yuvImage.getBuf(), yuvImage.getSize(), scaledWidth,
|
||||
scaledHeight, subsamp, sf) == 1)
|
||||
System.out.print("Passed.\n");
|
||||
else {
|
||||
System.out.print("FAILED!\n"); exitStatus = -1;
|
||||
}
|
||||
|
||||
System.out.format("YUV %s -> %s %s ... ", subNameLong[subsamp],
|
||||
pfStrLong, buStrLong);
|
||||
tjd.setSourceImage(yuvImage);
|
||||
} else {
|
||||
System.out.format("JPEG -> %s %s ", pfStrLong, buStrLong);
|
||||
if(!sf.isOne())
|
||||
System.out.format("%d/%d ... ", sf.getNum(), sf.getDenom());
|
||||
else System.out.print("... ");
|
||||
}
|
||||
t = getTime() - t;
|
||||
if (bi)
|
||||
img = tjd.decompress(scaledWidth, scaledHeight, imgType, flags);
|
||||
else
|
||||
dstBuf = tjd.decompress(scaledWidth, 0, scaledHeight, pf, flags);
|
||||
|
||||
if (bi) {
|
||||
tempstr = baseName + "_dec_" + pfStr + "_" +
|
||||
tempStr = baseName + "_dec_" + pfStr + "_" +
|
||||
(((flags & TJ.FLAG_BOTTOMUP) != 0) ? "BU" : "TD") + "_" +
|
||||
subName[subsamp] + "_" +
|
||||
(double)sf.getNum() / (double)sf.getDenom() + "x" + ".png";
|
||||
File file = new File(tempstr);
|
||||
File file = new File(tempStr);
|
||||
ImageIO.write(img, "png", file);
|
||||
}
|
||||
|
||||
if (yuv == YUVDECODE) {
|
||||
if (checkBufYUV(dstBuf, dstBuf.length, scaledWidth, scaledHeight,
|
||||
subsamp, sf) == 1)
|
||||
System.out.print("Passed.");
|
||||
else {
|
||||
System.out.print("FAILED!"); exitStatus = -1;
|
||||
}
|
||||
} else {
|
||||
if ((bi && checkImg(img, pf, subsamp, sf, flags) == 1) ||
|
||||
(!bi && checkBuf(dstBuf, scaledWidth,
|
||||
scaledWidth * TJ.getPixelSize(pf), scaledHeight, pf,
|
||||
subsamp, sf, flags) == 1))
|
||||
System.out.print("Passed.");
|
||||
else {
|
||||
System.out.print("FAILED!");
|
||||
exitStatus = -1;
|
||||
}
|
||||
if ((bi && checkImg(img, pf, subsamp, sf, flags) == 1) ||
|
||||
(!bi && checkBuf(dstBuf, scaledWidth,
|
||||
scaledWidth * TJ.getPixelSize(pf), scaledHeight, pf,
|
||||
subsamp, sf, flags) == 1))
|
||||
System.out.print("Passed.\n");
|
||||
else {
|
||||
System.out.print("FAILED!\n");
|
||||
exitStatus = -1;
|
||||
}
|
||||
System.out.format(" %.6f ms\n", t * 1000.);
|
||||
}
|
||||
|
||||
private static void decompTest(TJDecompressor tjd, byte[] jpegBuf,
|
||||
@@ -900,10 +810,7 @@ public class TJUnitTest {
|
||||
int size;
|
||||
byte[] dstBuf;
|
||||
|
||||
if (yuv == YUVENCODE)
|
||||
dstBuf = new byte[TJ.bufSizeYUV(w, pad, h, subsamp)];
|
||||
else
|
||||
dstBuf = new byte[TJ.bufSize(w, h, subsamp)];
|
||||
dstBuf = new byte[TJ.bufSize(w, h, subsamp)];
|
||||
|
||||
try {
|
||||
tjc = new TJCompressor();
|
||||
@@ -916,20 +823,16 @@ public class TJUnitTest {
|
||||
if (subsamp == TJ.SAMP_422 || subsamp == TJ.SAMP_420 ||
|
||||
subsamp == TJ.SAMP_440 || subsamp == TJ.SAMP_411)
|
||||
flags |= TJ.FLAG_FASTUPSAMPLE;
|
||||
if (i == 1) {
|
||||
if (yuv == YUVDECODE) {
|
||||
tjc.close();
|
||||
tjd.close();
|
||||
return;
|
||||
} else
|
||||
flags |= TJ.FLAG_BOTTOMUP;
|
||||
}
|
||||
if (i == 1)
|
||||
flags |= TJ.FLAG_BOTTOMUP;
|
||||
size = compTest(tjc, dstBuf, w, h, pf, baseName, subsamp, 100,
|
||||
flags);
|
||||
decompTest(tjd, dstBuf, size, w, h, pf, baseName, subsamp, flags);
|
||||
if (pf >= TJ.PF_RGBX && pf <= TJ.PF_XRGB && !bi)
|
||||
if (pf >= TJ.PF_RGBX && pf <= TJ.PF_XRGB && !bi) {
|
||||
System.out.print("\n");
|
||||
decompTest(tjd, dstBuf, size, w, h, pf + (TJ.PF_RGBA - TJ.PF_RGBX),
|
||||
baseName, subsamp, flags);
|
||||
}
|
||||
System.out.print("\n");
|
||||
}
|
||||
}
|
||||
@@ -945,7 +848,8 @@ public class TJUnitTest {
|
||||
|
||||
private static void bufSizeTest() throws Exception {
|
||||
int w, h, i, subsamp;
|
||||
byte[] srcBuf, jpegBuf;
|
||||
byte[] srcBuf, dstBuf = null;
|
||||
YUVImage dstImage = null;
|
||||
TJCompressor tjc = null;
|
||||
Random r = new Random();
|
||||
|
||||
@@ -959,22 +863,34 @@ public class TJUnitTest {
|
||||
if (h % 100 == 0)
|
||||
System.out.format("%04d x %04d\b\b\b\b\b\b\b\b\b\b\b", w, h);
|
||||
srcBuf = new byte[w * h * 4];
|
||||
jpegBuf = new byte[TJ.bufSize(w, h, subsamp)];
|
||||
if (doYUV)
|
||||
dstImage = new YUVImage(w, pad, h, subsamp);
|
||||
else
|
||||
dstBuf = new byte[TJ.bufSize(w, h, subsamp)];
|
||||
for (i = 0; i < w * h * 4; i++) {
|
||||
srcBuf[i] = (byte)(r.nextInt(2) * 255);
|
||||
}
|
||||
tjc.setSourceImage(srcBuf, w, 0, h, TJ.PF_BGRX);
|
||||
tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, TJ.PF_BGRX);
|
||||
tjc.setSubsamp(subsamp);
|
||||
tjc.setJPEGQuality(100);
|
||||
tjc.compress(jpegBuf, 0);
|
||||
if (doYUV)
|
||||
tjc.encodeYUV(dstImage, 0);
|
||||
else
|
||||
tjc.compress(dstBuf, 0);
|
||||
|
||||
srcBuf = new byte[h * w * 4];
|
||||
jpegBuf = new byte[TJ.bufSize(h, w, subsamp)];
|
||||
if (doYUV)
|
||||
dstImage = new YUVImage(h, pad, w, subsamp);
|
||||
else
|
||||
dstBuf = new byte[TJ.bufSize(h, w, subsamp)];
|
||||
for (i = 0; i < h * w * 4; i++) {
|
||||
srcBuf[i] = (byte)(r.nextInt(2) * 255);
|
||||
}
|
||||
tjc.setSourceImage(srcBuf, h, 0, w, TJ.PF_BGRX);
|
||||
tjc.compress(jpegBuf, 0);
|
||||
tjc.setSourceImage(srcBuf, 0, 0, h, 0, w, TJ.PF_BGRX);
|
||||
if (doYUV)
|
||||
tjc.encodeYUV(dstImage, 0);
|
||||
else
|
||||
tjc.compress(dstBuf, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -989,10 +905,9 @@ public class TJUnitTest {
|
||||
public static void main(String[] argv) {
|
||||
try {
|
||||
String testName = "javatest";
|
||||
boolean doyuv = false;
|
||||
for (int i = 0; i < argv.length; i++) {
|
||||
if (argv[i].equalsIgnoreCase("-yuv"))
|
||||
doyuv = true;
|
||||
doYUV = true;
|
||||
if (argv[i].equalsIgnoreCase("-noyuvpad"))
|
||||
pad = 1;
|
||||
if (argv[i].substring(0, 1).equalsIgnoreCase("-h") ||
|
||||
@@ -1003,10 +918,8 @@ public class TJUnitTest {
|
||||
testName = "javabitest";
|
||||
}
|
||||
}
|
||||
if (doyuv) {
|
||||
yuv = YUVENCODE;
|
||||
if (doYUV)
|
||||
_4byteFormats[4] = -1;
|
||||
}
|
||||
doTest(35, 39, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_444,
|
||||
testName);
|
||||
doTest(39, 41, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_444,
|
||||
@@ -1033,24 +946,17 @@ public class TJUnitTest {
|
||||
_4byteFormats[4] = -1;
|
||||
doTest(35, 39, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_GRAY,
|
||||
testName);
|
||||
if (!doyuv && !bi)
|
||||
if (!bi)
|
||||
bufSizeTest();
|
||||
if (doyuv && !bi) {
|
||||
yuv = YUVDECODE;
|
||||
if (doYUV && !bi) {
|
||||
System.out.print("\n--------------------\n\n");
|
||||
doTest(48, 48, onlyRGB, TJ.SAMP_444, "javatest_yuv0");
|
||||
doTest(35, 39, onlyRGB, TJ.SAMP_444, "javatest_yuv1");
|
||||
doTest(48, 48, onlyRGB, TJ.SAMP_422, "javatest_yuv0");
|
||||
doTest(39, 41, onlyRGB, TJ.SAMP_422, "javatest_yuv1");
|
||||
doTest(48, 48, onlyRGB, TJ.SAMP_420, "javatest_yuv0");
|
||||
doTest(41, 35, onlyRGB, TJ.SAMP_420, "javatest_yuv1");
|
||||
doTest(48, 48, onlyRGB, TJ.SAMP_440, "javatest_yuv0");
|
||||
doTest(35, 39, onlyRGB, TJ.SAMP_440, "javatest_yuv1");
|
||||
doTest(48, 48, onlyRGB, TJ.SAMP_411, "javatest_yuv0");
|
||||
doTest(39, 41, onlyRGB, TJ.SAMP_411, "javatest_yuv1");
|
||||
doTest(48, 48, onlyRGB, TJ.SAMP_GRAY, "javatest_yuv0");
|
||||
doTest(41, 35, onlyRGB, TJ.SAMP_GRAY, "javatest_yuv1");
|
||||
doTest(48, 48, onlyGray, TJ.SAMP_GRAY, "javatest_yuv0");
|
||||
doTest(35, 39, onlyGray, TJ.SAMP_GRAY, "javatest_yuv1");
|
||||
}
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -1,41 +1,23 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
All Classes
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white">
|
||||
<FONT size="+1" CLASS="FrameHeadingFont">
|
||||
<B>All Classes</B></FONT>
|
||||
<BR>
|
||||
|
||||
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJ</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><I>TJCustomFilter</I></A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>All Classes</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar">All Classes</h1>
|
||||
<div class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJ</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><i>TJCustomFilter</i></a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">YUVImage</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,41 +1,23 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
All Classes
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white">
|
||||
<FONT size="+1" CLASS="FrameHeadingFont">
|
||||
<B>All Classes</B></FONT>
|
||||
<BR>
|
||||
|
||||
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><I>TJCustomFilter</I></A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>All Classes</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar">All Classes</h1>
|
||||
<div class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><i>TJCustomFilter</i></a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,462 +1,479 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Constant Field Values
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Constant Field Values</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Constant Field Values";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?constant-values.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
|
||||
<li><a href="constant-values.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H1>
|
||||
Constant Field Values</H1>
|
||||
</CENTER>
|
||||
<HR SIZE="4" NOSHADE>
|
||||
<B>Contents</B><UL>
|
||||
<LI><A HREF="#org.libjpegturbo">org.libjpegturbo.*</A>
|
||||
</UL>
|
||||
|
||||
<A NAME="org.libjpegturbo"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left"><FONT SIZE="+2">
|
||||
org.libjpegturbo.*</FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="3">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.CS_CMYK"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#CS_CMYK">CS_CMYK</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>3</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.CS_GRAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#CS_GRAY">CS_GRAY</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.CS_RGB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#CS_RGB">CS_RGB</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>0</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.CS_YCbCr"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#CS_YCbCr">CS_YCbCr</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.CS_YCCK"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#CS_YCCK">CS_YCCK</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>4</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_ACCURATEDCT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>4096</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_BOTTOMUP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP">FLAG_BOTTOMUP</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTDCT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTDCT">FLAG_FASTDCT</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2048</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>256</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX">FLAG_FORCEMMX</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>8</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE">FLAG_FORCESSE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>16</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE2">FLAG_FORCESSE2</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>32</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE3">FLAG_FORCESSE3</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>128</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.NUMCS"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#NUMCS">NUMCS</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>5</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.NUMPF"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#NUMPF">NUMPF</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>12</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.NUMSAMP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#NUMSAMP">NUMSAMP</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>6</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_ABGR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_ABGR">PF_ABGR</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>9</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_ARGB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_ARGB">PF_ARGB</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>10</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_BGR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_BGR">PF_BGR</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_BGRA"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRA">PF_BGRA</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>8</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_BGRX"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX">PF_BGRX</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>3</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_CMYK"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_CMYK">PF_CMYK</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>11</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_GRAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_GRAY">PF_GRAY</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>6</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_RGB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_RGB">PF_RGB</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>0</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_RGBA"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBA">PF_RGBA</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>7</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_RGBX"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX">PF_RGBX</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_XBGR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR">PF_XBGR</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>4</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_XRGB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB">PF_XRGB</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>5</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_411"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_411">SAMP_411</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>5</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_420"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_420">SAMP_420</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_422"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_422">SAMP_422</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_440"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_440">SAMP_440</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>4</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_444"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_444">SAMP_444</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>0</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_GRAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_GRAY">SAMP_GRAY</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>3</CODE></TD>
|
||||
</TR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
<P>
|
||||
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="3">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.NUMOP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#NUMOP">NUMOP</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>8</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_HFLIP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_HFLIP">OP_HFLIP</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_NONE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_NONE">OP_NONE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>0</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT180"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT180">OP_ROT180</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>6</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT270"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT270">OP_ROT270</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>7</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT90"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT90">OP_ROT90</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>5</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSPOSE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_TRANSPOSE">OP_TRANSPOSE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>3</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSVERSE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_TRANSVERSE">OP_TRANSVERSE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>4</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_VFLIP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_VFLIP">OP_VFLIP</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_CROP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_CROP">OPT_CROP</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>4</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_GRAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_GRAY">OPT_GRAY</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>8</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_NOOUTPUT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_NOOUTPUT">OPT_NOOUTPUT</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>16</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_PERFECT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT">OPT_PERFECT</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_TRIM"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_TRIM">OPT_TRIM</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 title="Constant Field Values" class="title">Constant Field Values</h1>
|
||||
<h2 title="Contents">Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#org.libjpegturbo">org.libjpegturbo.*</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="constantValuesContainer"><a name="org.libjpegturbo">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 title="org.libjpegturbo">org.libjpegturbo.*</h2>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
|
||||
<caption><span>org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th scope="col">Constant Field</th>
|
||||
<th class="colLast" scope="col">Value</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_CMYK">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_CMYK">CS_CMYK</a></code></td>
|
||||
<td class="colLast"><code>3</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_GRAY">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_GRAY">CS_GRAY</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_RGB">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_RGB">CS_RGB</a></code></td>
|
||||
<td class="colLast"><code>0</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_YCbCr">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_YCbCr">CS_YCbCr</a></code></td>
|
||||
<td class="colLast"><code>1</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_YCCK">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_YCCK">CS_YCCK</a></code></td>
|
||||
<td class="colLast"><code>4</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_ACCURATEDCT">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</a></code></td>
|
||||
<td class="colLast"><code>4096</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_BOTTOMUP">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP">FLAG_BOTTOMUP</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTDCT">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTDCT">FLAG_FASTDCT</a></code></td>
|
||||
<td class="colLast"><code>2048</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</a></code></td>
|
||||
<td class="colLast"><code>256</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX">FLAG_FORCEMMX</a></code></td>
|
||||
<td class="colLast"><code>8</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE">FLAG_FORCESSE</a></code></td>
|
||||
<td class="colLast"><code>16</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE2">FLAG_FORCESSE2</a></code></td>
|
||||
<td class="colLast"><code>32</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE3">FLAG_FORCESSE3</a></code></td>
|
||||
<td class="colLast"><code>128</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMCS">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMCS">NUMCS</a></code></td>
|
||||
<td class="colLast"><code>5</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMPF">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMPF">NUMPF</a></code></td>
|
||||
<td class="colLast"><code>12</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMSAMP">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMSAMP">NUMSAMP</a></code></td>
|
||||
<td class="colLast"><code>6</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_ABGR">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_ABGR">PF_ABGR</a></code></td>
|
||||
<td class="colLast"><code>9</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_ARGB">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_ARGB">PF_ARGB</a></code></td>
|
||||
<td class="colLast"><code>10</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGR">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGR">PF_BGR</a></code></td>
|
||||
<td class="colLast"><code>1</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGRA">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRA">PF_BGRA</a></code></td>
|
||||
<td class="colLast"><code>8</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGRX">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX">PF_BGRX</a></code></td>
|
||||
<td class="colLast"><code>3</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_CMYK">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_CMYK">PF_CMYK</a></code></td>
|
||||
<td class="colLast"><code>11</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_GRAY">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_GRAY">PF_GRAY</a></code></td>
|
||||
<td class="colLast"><code>6</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGB">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGB">PF_RGB</a></code></td>
|
||||
<td class="colLast"><code>0</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGBA">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBA">PF_RGBA</a></code></td>
|
||||
<td class="colLast"><code>7</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGBX">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX">PF_RGBX</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_XBGR">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR">PF_XBGR</a></code></td>
|
||||
<td class="colLast"><code>4</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_XRGB">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB">PF_XRGB</a></code></td>
|
||||
<td class="colLast"><code>5</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_411">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_411">SAMP_411</a></code></td>
|
||||
<td class="colLast"><code>5</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_420">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_420">SAMP_420</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_422">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_422">SAMP_422</a></code></td>
|
||||
<td class="colLast"><code>1</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_440">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_440">SAMP_440</a></code></td>
|
||||
<td class="colLast"><code>4</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_444">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_444">SAMP_444</a></code></td>
|
||||
<td class="colLast"><code>0</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_GRAY">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_GRAY">SAMP_GRAY</a></code></td>
|
||||
<td class="colLast"><code>3</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<table border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
|
||||
<caption><span>org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th scope="col">Constant Field</th>
|
||||
<th class="colLast" scope="col">Value</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.NUMOP">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#NUMOP">NUMOP</a></code></td>
|
||||
<td class="colLast"><code>8</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_HFLIP">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_HFLIP">OP_HFLIP</a></code></td>
|
||||
<td class="colLast"><code>1</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_NONE">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_NONE">OP_NONE</a></code></td>
|
||||
<td class="colLast"><code>0</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT180">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT180">OP_ROT180</a></code></td>
|
||||
<td class="colLast"><code>6</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT270">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT270">OP_ROT270</a></code></td>
|
||||
<td class="colLast"><code>7</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT90">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT90">OP_ROT90</a></code></td>
|
||||
<td class="colLast"><code>5</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSPOSE">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_TRANSPOSE">OP_TRANSPOSE</a></code></td>
|
||||
<td class="colLast"><code>3</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSVERSE">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_TRANSVERSE">OP_TRANSVERSE</a></code></td>
|
||||
<td class="colLast"><code>4</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_VFLIP">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_VFLIP">OP_VFLIP</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_CROP">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_CROP">OPT_CROP</a></code></td>
|
||||
<td class="colLast"><code>4</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_GRAY">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_GRAY">OPT_GRAY</a></code></td>
|
||||
<td class="colLast"><code>8</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_NOOUTPUT">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_NOOUTPUT">OPT_NOOUTPUT</a></code></td>
|
||||
<td class="colLast"><code>16</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_PERFECT">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT">OPT_PERFECT</a></code></td>
|
||||
<td class="colLast"><code>1</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_TRIM">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_TRIM">OPT_TRIM</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?constant-values.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
|
||||
<li><a href="constant-values.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,208 +1,258 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Deprecated List
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Deprecated List</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Deprecated List";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?deprecated-list.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="deprecated-list.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li class="navBarCell1Rev">Deprecated</li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
|
||||
<li><a href="deprecated-list.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H2>
|
||||
<B>Deprecated API</B></H2>
|
||||
</CENTER>
|
||||
<HR SIZE="4" NOSHADE>
|
||||
<B>Contents</B><UL>
|
||||
<LI><A HREF="#field">Deprecated Fields</A>
|
||||
<LI><A HREF="#method">Deprecated Methods</A>
|
||||
</UL>
|
||||
|
||||
<A NAME="field"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Deprecated Fields</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX</A>
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE</A>
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE2">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2</A>
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE3">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3</A>
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
<A NAME="method"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Deprecated Methods</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int)">org.libjpegturbo.turbojpeg.TJ.bufSizeYUV(int, int, int)</A>
|
||||
<BR>
|
||||
<I>Use <A HREF="org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><CODE>TJ.bufSizeYUV(int, int, int, int)</CODE></A> instead.</I> </TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompress(byte[], int, int, int, int, int)</A>
|
||||
<BR>
|
||||
<I>Use
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><CODE>TJDecompressor.decompress(byte[], int, int, int, int, int, int, int)</CODE></A> instead.</I> </TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompressToYUV(byte[], int)</A>
|
||||
<BR>
|
||||
<I>Use <A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)"><CODE>TJDecompressor.decompressToYUV(byte[], int, int, int, int)</CODE></A>
|
||||
instead.</I> </TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompressToYUV(int)</A>
|
||||
<BR>
|
||||
<I>Use <A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)"><CODE>TJDecompressor.decompressToYUV(int, int, int, int)</CODE></A> instead.</I> </TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int)">org.libjpegturbo.turbojpeg.TJCompressor.setSourceImage(byte[], int, int, int, int)</A>
|
||||
<BR>
|
||||
<I>Use
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>TJCompressor.setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> instead.</I> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 title="Deprecated API" class="title">Deprecated API</h1>
|
||||
<h2 title="Contents">Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#field">Deprecated Fields</a></li>
|
||||
<li><a href="#method">Deprecated Methods</a></li>
|
||||
<li><a href="#constructor">Deprecated Constructors</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="contentContainer"><a name="field">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table border="0" cellpadding="3" cellspacing="0" summary="Deprecated Fields table, listing deprecated fields, and an explanation">
|
||||
<caption><span>Deprecated Fields</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Field and Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX</a></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE</a></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE2">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2</a></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE3">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="method">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table border="0" cellpadding="3" cellspacing="0" summary="Deprecated Methods table, listing deprecated methods, and an explanation">
|
||||
<caption><span>Deprecated Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int)">org.libjpegturbo.turbojpeg.TJ.bufSizeYUV(int, int, int)</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage, byte[], int)">org.libjpegturbo.turbojpeg.TJCompressor.compress(BufferedImage, byte[], int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[], int)"><code>TJCompressor.compress(byte[], int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage, int)">org.libjpegturbo.turbojpeg.TJCompressor.compress(BufferedImage, int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)"><code>TJCompressor.compress(int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompress(byte[], int, int, int, int, int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><code>TJDecompressor.decompress(byte[], int, int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompressToYUV(byte[], int)</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><code>TJDecompressor.decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompressToYUV(int)</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)"><code>TJDecompressor.decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage, byte[], int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(BufferedImage, byte[], int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)"><code>TJCompressor.encodeYUV(byte[], int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage, int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(BufferedImage, int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage, int, int, int, int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)"><code>TJCompressor.encodeYUV(int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[], int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(byte[], int)</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage, int)"><code>TJCompressor.encodeYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(int)</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int, int)"><code>TJCompressor.encodeYUV(int, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">org.libjpegturbo.turbojpeg.TJDecompressor.getJPEGBuf()</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceBuf()"><code>TJDecompressor.getSourceBuf()</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">org.libjpegturbo.turbojpeg.TJDecompressor.getJPEGSize()</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceSize()"><code>TJDecompressor.getSourceSize()</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[], int)">org.libjpegturbo.turbojpeg.TJDecompressor.setJPEGImage(byte[], int)</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[], int)"><code>TJDecompressor.setSourceImage(byte[], int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int)">org.libjpegturbo.turbojpeg.TJCompressor.setSourceImage(byte[], int, int, int, int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><code>TJCompressor.setSourceImage(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="constructor">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table border="0" cellpadding="3" cellspacing="0" summary="Deprecated Constructors table, listing deprecated constructors, and an explanation">
|
||||
<caption><span>Deprecated Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int)">org.libjpegturbo.turbojpeg.TJCompressor(byte[], int, int, int, int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)"><code>TJCompressor.TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?deprecated-list.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="deprecated-list.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li class="navBarCell1Rev">Deprecated</li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
|
||||
<li><a href="deprecated-list.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,207 +1,206 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
API Help
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>API Help</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="API Help";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?help-doc.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="help-doc.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li class="navBarCell1Rev">Help</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
|
||||
<li><a href="help-doc.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H1>
|
||||
How This API Document Is Organized</H1>
|
||||
</CENTER>
|
||||
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.<H3>
|
||||
Package</H3>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:<UL>
|
||||
<LI>Interfaces (italic)<LI>Classes<LI>Enums<LI>Exceptions<LI>Errors<LI>Annotation Types</UL>
|
||||
</BLOCKQUOTE>
|
||||
<H3>
|
||||
Class/Interface</H3>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:<UL>
|
||||
<LI>Class inheritance diagram<LI>Direct Subclasses<LI>All Known Subinterfaces<LI>All Known Implementing Classes<LI>Class/interface declaration<LI>Class/interface description
|
||||
<P>
|
||||
<LI>Nested Class Summary<LI>Field Summary<LI>Constructor Summary<LI>Method Summary
|
||||
<P>
|
||||
<LI>Field Detail<LI>Constructor Detail<LI>Method Detail</UL>
|
||||
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</BLOCKQUOTE>
|
||||
</BLOCKQUOTE>
|
||||
<H3>
|
||||
Annotation Type</H3>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
Each annotation type has its own separate page with the following sections:<UL>
|
||||
<LI>Annotation Type declaration<LI>Annotation Type description<LI>Required Element Summary<LI>Optional Element Summary<LI>Element Detail</UL>
|
||||
</BLOCKQUOTE>
|
||||
</BLOCKQUOTE>
|
||||
<H3>
|
||||
Enum</H3>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
Each enum has its own separate page with the following sections:<UL>
|
||||
<LI>Enum declaration<LI>Enum description<LI>Enum Constant Summary<LI>Enum Constant Detail</UL>
|
||||
</BLOCKQUOTE>
|
||||
<H3>
|
||||
Tree (Class Hierarchy)</H3>
|
||||
<BLOCKQUOTE>
|
||||
There is a <A HREF="overview-tree.html">Class Hierarchy</A> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.<UL>
|
||||
<LI>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.<LI>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</UL>
|
||||
</BLOCKQUOTE>
|
||||
<H3>
|
||||
Deprecated API</H3>
|
||||
<BLOCKQUOTE>
|
||||
The <A HREF="deprecated-list.html">Deprecated API</A> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</BLOCKQUOTE>
|
||||
<H3>
|
||||
Index</H3>
|
||||
<BLOCKQUOTE>
|
||||
The <A HREF="index-all.html">Index</A> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</BLOCKQUOTE>
|
||||
<H3>
|
||||
Prev/Next</H3>
|
||||
These links take you to the next or previous class, interface, package, or related page.<H3>
|
||||
Frames/No Frames</H3>
|
||||
These links show and hide the HTML frames. All pages are available with or without frames.
|
||||
<P>
|
||||
<H3>
|
||||
Serialized Form</H3>
|
||||
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
|
||||
<P>
|
||||
<H3>
|
||||
Constant Field Values</H3>
|
||||
The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.
|
||||
<P>
|
||||
<FONT SIZE="-1">
|
||||
<EM>
|
||||
This help file applies to API documentation generated using the standard doclet.</EM>
|
||||
</FONT>
|
||||
<BR>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 class="title">How This API Document Is Organized</h1>
|
||||
<div class="subTitle">This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.</div>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h2>Package</h2>
|
||||
<p>Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:</p>
|
||||
<ul>
|
||||
<li>Interfaces (italic)</li>
|
||||
<li>Classes</li>
|
||||
<li>Enums</li>
|
||||
<li>Exceptions</li>
|
||||
<li>Errors</li>
|
||||
<li>Annotation Types</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Class/Interface</h2>
|
||||
<p>Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:</p>
|
||||
<ul>
|
||||
<li>Class inheritance diagram</li>
|
||||
<li>Direct Subclasses</li>
|
||||
<li>All Known Subinterfaces</li>
|
||||
<li>All Known Implementing Classes</li>
|
||||
<li>Class/interface declaration</li>
|
||||
<li>Class/interface description</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Nested Class Summary</li>
|
||||
<li>Field Summary</li>
|
||||
<li>Constructor Summary</li>
|
||||
<li>Method Summary</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Field Detail</li>
|
||||
<li>Constructor Detail</li>
|
||||
<li>Method Detail</li>
|
||||
</ul>
|
||||
<p>Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Annotation Type</h2>
|
||||
<p>Each annotation type has its own separate page with the following sections:</p>
|
||||
<ul>
|
||||
<li>Annotation Type declaration</li>
|
||||
<li>Annotation Type description</li>
|
||||
<li>Required Element Summary</li>
|
||||
<li>Optional Element Summary</li>
|
||||
<li>Element Detail</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Enum</h2>
|
||||
<p>Each enum has its own separate page with the following sections:</p>
|
||||
<ul>
|
||||
<li>Enum declaration</li>
|
||||
<li>Enum description</li>
|
||||
<li>Enum Constant Summary</li>
|
||||
<li>Enum Constant Detail</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Tree (Class Hierarchy)</h2>
|
||||
<p>There is a <a href="overview-tree.html">Class Hierarchy</a> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.</p>
|
||||
<ul>
|
||||
<li>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.</li>
|
||||
<li>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Deprecated API</h2>
|
||||
<p>The <a href="deprecated-list.html">Deprecated API</a> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Index</h2>
|
||||
<p>The <a href="index-all.html">Index</a> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Prev/Next</h2>
|
||||
<p>These links take you to the next or previous class, interface, package, or related page.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Frames/No Frames</h2>
|
||||
<p>These links show and hide the HTML frames. All pages are available with or without frames.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>All Classes</h2>
|
||||
<p>The <a href="allclasses-noframe.html">All Classes</a> link shows all classes and interfaces except non-static nested types.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Serialized Form</h2>
|
||||
<p>Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Constant Field Values</h2>
|
||||
<p>The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<em>This help file applies to API documentation generated using the standard doclet.</em></div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?help-doc.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="help-doc.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li class="navBarCell1Rev">Help</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
|
||||
<li><a href="help-doc.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,9 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Generated Documentation (Untitled)
|
||||
</TITLE>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Generated Documentation (Untitled)</title>
|
||||
<script type="text/javascript">
|
||||
targetPage = "" + window.location.search;
|
||||
if (targetPage != "" && targetPage != "undefined")
|
||||
targetPage = targetPage.substring(1);
|
||||
@@ -49,21 +47,17 @@ Generated Documentation (Untitled)
|
||||
if (targetPage != "" && targetPage != "undefined")
|
||||
top.classFrame.location = top.targetPage;
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
</HEAD>
|
||||
<FRAMESET cols="20%,80%" title="" onLoad="top.loadFrames()">
|
||||
<FRAME src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)">
|
||||
<FRAME src="org/libjpegturbo/turbojpeg/package-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes">
|
||||
<NOFRAMES>
|
||||
<H2>
|
||||
Frame Alert</H2>
|
||||
|
||||
<P>
|
||||
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
|
||||
<BR>
|
||||
Link to<A HREF="org/libjpegturbo/turbojpeg/package-summary.html">Non-frame version.</A>
|
||||
</NOFRAMES>
|
||||
</FRAMESET>
|
||||
</HTML>
|
||||
</script>
|
||||
</head>
|
||||
<frameset cols="20%,80%" title="Documentation frame" onload="top.loadFrames()">
|
||||
<frame src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)">
|
||||
<frame src="org/libjpegturbo/turbojpeg/package-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes">
|
||||
<noframes>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<h2>Frame Alert</h2>
|
||||
<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="org/libjpegturbo/turbojpeg/package-summary.html">Non-frame version</a>.</p>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,238 +1,237 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
TJCustomFilter
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TJCustomFilter</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="TJCustomFilter";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TJCustomFilter.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJCustomFilter.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>
|
||||
<FONT SIZE="-1">
|
||||
org.libjpegturbo.turbojpeg</FONT>
|
||||
<BR>
|
||||
Interface TJCustomFilter</H2>
|
||||
<HR>
|
||||
<DL>
|
||||
<DT><PRE>public interface <B>TJCustomFilter</B></DL>
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
Custom filter callback interface
|
||||
<P>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
|
||||
<div class="header">
|
||||
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||
<h2 title="Interface TJCustomFilter" class="title">Interface TJCustomFilter</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <span class="strong">TJCustomFilter</span></pre>
|
||||
<div class="block">Custom filter callback interface</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> void</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html#customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)">customFilter</A></B>(java.nio.ShortBuffer coeffBuffer,
|
||||
java.awt.Rectangle bufferRegion,
|
||||
java.awt.Rectangle planeRegion,
|
||||
int componentID,
|
||||
int transformID,
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A> transform)</CODE>
|
||||
|
||||
<BR>
|
||||
A callback function that can be used to modify the DCT coefficients after
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html#customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)">customFilter</a></strong>(java.nio.ShortBuffer coeffBuffer,
|
||||
java.awt.Rectangle bufferRegion,
|
||||
java.awt.Rectangle planeRegion,
|
||||
int componentID,
|
||||
int transformID,
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)</code>
|
||||
<div class="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.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
JPEG image.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)"><!-- --></A><H3>
|
||||
customFilter</H3>
|
||||
<PRE>
|
||||
void <B>customFilter</B>(java.nio.ShortBuffer coeffBuffer,
|
||||
java.awt.Rectangle bufferRegion,
|
||||
java.awt.Rectangle planeRegion,
|
||||
int componentID,
|
||||
int transformID,
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A> transform)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>A callback function that can be used to modify the DCT coefficients after
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>customFilter</h4>
|
||||
<pre>void customFilter(java.nio.ShortBuffer coeffBuffer,
|
||||
java.awt.Rectangle bufferRegion,
|
||||
java.awt.Rectangle planeRegion,
|
||||
int componentID,
|
||||
int transformID,
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="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
|
||||
applied in the frequency domain.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>coeffBuffer</CODE> - a buffer containing transformed DCT coefficients.
|
||||
applied in the frequency domain.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>coeffBuffer</code> - a buffer containing transformed DCT coefficients.
|
||||
(NOTE: this buffer is not guaranteed to be valid once the callback
|
||||
returns, so applications wishing to hand off the DCT coefficients to
|
||||
another function or library should make a copy of them within the body of
|
||||
the callback.)<DD><CODE>bufferRegion</CODE> - rectangle containing the width and height of
|
||||
the callback.)</dd><dd><code>bufferRegion</code> - rectangle containing the width and height of
|
||||
<code>coeffBuffer</code> as well as its offset relative to the component
|
||||
plane. TurboJPEG implementations may choose to split each component plane
|
||||
into multiple DCT coefficient buffers and call the callback function once
|
||||
for each buffer.<DD><CODE>planeRegion</CODE> - rectangle containing the width and height of the
|
||||
component plane to which <code>coeffBuffer</code> belongs<DD><CODE>componentID</CODE> - ID number of the component plane to which
|
||||
for each buffer.</dd><dd><code>planeRegion</code> - rectangle containing the width and height of the
|
||||
component plane to which <code>coeffBuffer</code> belongs</dd><dd><code>componentID</code> - ID number of the component plane to which
|
||||
<code>coeffBuffer</code> belongs (Y, Cb, and Cr have, respectively, ID's
|
||||
of 0, 1, and 2 in typical JPEG images.)<DD><CODE>transformID</CODE> - ID number of the transformed image to which
|
||||
of 0, 1, and 2 in typical JPEG images.)</dd><dd><code>transformID</code> - ID number of the transformed image to which
|
||||
<code>coeffBuffer</code> belongs. This is the same as the index of the
|
||||
transform in the <code>transforms</code> array that was passed to <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><CODE>TJTransformer.transform()</CODE></A>.<DD><CODE>transform</CODE> - a <A HREF="../../../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
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DD>
|
||||
</DL>
|
||||
transform in the <code>transforms</code> array that was passed to <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><code>TJTransformer.transform()</code></a>.</dd><dd><code>transform</code> - a <a href="../../../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><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<HR>
|
||||
|
||||
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TJCustomFilter.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJCustomFilter.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,356 +1,336 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
TJScalingFactor
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TJScalingFactor</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="TJScalingFactor";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJScalingFactor.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TJScalingFactor.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJScalingFactor.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJScalingFactor.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>
|
||||
<FONT SIZE="-1">
|
||||
org.libjpegturbo.turbojpeg</FONT>
|
||||
<BR>
|
||||
Class TJScalingFactor</H2>
|
||||
<PRE>
|
||||
java.lang.Object
|
||||
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.libjpegturbo.turbojpeg.TJScalingFactor</B>
|
||||
</PRE>
|
||||
<HR>
|
||||
<DL>
|
||||
<DT><PRE>public class <B>TJScalingFactor</B><DT>extends java.lang.Object</DL>
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
Fractional scaling factor
|
||||
<P>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
|
||||
<div class="header">
|
||||
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||
<h2 title="Class TJScalingFactor" class="title">Class TJScalingFactor</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>org.libjpegturbo.turbojpeg.TJScalingFactor</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="strong">TJScalingFactor</span>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Fractional scaling factor</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#TJScalingFactor(int, int)">TJScalingFactor</A></B>(int num,
|
||||
int denom)</CODE>
|
||||
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#TJScalingFactor(int, int)">TJScalingFactor</a></strong>(int num,
|
||||
int denom)</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> boolean</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#equals(org.libjpegturbo.turbojpeg.TJScalingFactor)">equals</A></B>(<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A> other)</CODE>
|
||||
|
||||
<BR>
|
||||
Returns true or false, depending on whether this instance and
|
||||
<code>other</code> have the same numerator and denominator.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> int</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getDenom()">getDenom</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Returns denominator</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> int</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getNum()">getNum</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Returns numerator</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> int</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)">getScaled</A></B>(int dimension)</CODE>
|
||||
|
||||
<BR>
|
||||
Returns the scaled value of <code>dimension</code>.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> boolean</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#isOne()">isOne</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Returns true or false, depending on whether this instance is equal to
|
||||
1/1.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>boolean</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#equals(org.libjpegturbo.turbojpeg.TJScalingFactor)">equals</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a> other)</code>
|
||||
<div class="block">Returns true or false, depending on whether this instance and
|
||||
<code>other</code> have the same numerator and denominator.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getDenom()">getDenom</a></strong>()</code>
|
||||
<div class="block">Returns denominator</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getNum()">getNum</a></strong>()</code>
|
||||
<div class="block">Returns numerator</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)">getScaled</a></strong>(int dimension)</code>
|
||||
<div class="block">Returns the scaled value of <code>dimension</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>boolean</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#isOne()">isOne</a></strong>()</code>
|
||||
<div class="block">Returns true or false, depending on whether this instance is equal to
|
||||
1/1.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
||||
<B>Constructor Detail</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="TJScalingFactor(int, int)"><!-- --></A><H3>
|
||||
TJScalingFactor</H3>
|
||||
<PRE>
|
||||
public <B>TJScalingFactor</B>(int num,
|
||||
int denom)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DL>
|
||||
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DL>
|
||||
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="TJScalingFactor(int, int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>TJScalingFactor</h4>
|
||||
<pre>public TJScalingFactor(int num,
|
||||
int denom)
|
||||
throws java.lang.Exception</pre>
|
||||
<dl><dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="getNum()"><!-- --></A><H3>
|
||||
getNum</H3>
|
||||
<PRE>
|
||||
public int <B>getNum</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Returns numerator
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>numerator</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getDenom()"><!-- --></A><H3>
|
||||
getDenom</H3>
|
||||
<PRE>
|
||||
public int <B>getDenom</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Returns denominator
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>denominator</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getScaled(int)"><!-- --></A><H3>
|
||||
getScaled</H3>
|
||||
<PRE>
|
||||
public int <B>getScaled</B>(int dimension)</PRE>
|
||||
<DL>
|
||||
<DD>Returns the scaled value of <code>dimension</code>. This function
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="getNum()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getNum</h4>
|
||||
<pre>public int getNum()</pre>
|
||||
<div class="block">Returns numerator</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>numerator</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getDenom()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getDenom</h4>
|
||||
<pre>public int getDenom()</pre>
|
||||
<div class="block">Returns denominator</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>denominator</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getScaled(int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getScaled</h4>
|
||||
<pre>public int getScaled(int dimension)</pre>
|
||||
<div class="block">Returns the scaled value of <code>dimension</code>. This function
|
||||
performs the integer equivalent of
|
||||
<code>ceil(dimension * scalingFactor)</code>.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>the scaled value of <code>dimension</code></DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="equals(org.libjpegturbo.turbojpeg.TJScalingFactor)"><!-- --></A><H3>
|
||||
equals</H3>
|
||||
<PRE>
|
||||
public boolean <B>equals</B>(<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A> other)</PRE>
|
||||
<DL>
|
||||
<DD>Returns true or false, depending on whether this instance and
|
||||
<code>other</code> have the same numerator and denominator.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>true or false, depending on whether this instance and
|
||||
<code>other</code> have the same numerator and denominator</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="isOne()"><!-- --></A><H3>
|
||||
isOne</H3>
|
||||
<PRE>
|
||||
public boolean <B>isOne</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Returns true or false, depending on whether this instance is equal to
|
||||
1/1.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>true or false, depending on whether this instance is equal to
|
||||
1/1</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<code>ceil(dimension * scalingFactor)</code>.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the scaled value of <code>dimension</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="equals(org.libjpegturbo.turbojpeg.TJScalingFactor)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>equals</h4>
|
||||
<pre>public boolean equals(<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a> other)</pre>
|
||||
<div class="block">Returns true or false, depending on whether this instance and
|
||||
<code>other</code> have the same numerator and denominator.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>true or false, depending on whether this instance and
|
||||
<code>other</code> have the same numerator and denominator</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="isOne()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>isOne</h4>
|
||||
<pre>public boolean isOne()</pre>
|
||||
<div class="block">Returns true or false, depending on whether this instance is equal to
|
||||
1/1.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>true or false, depending on whether this instance is equal to
|
||||
1/1</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<HR>
|
||||
|
||||
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJScalingFactor.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TJScalingFactor.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJScalingFactor.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJScalingFactor.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,301 +1,291 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
TJTransformer
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TJTransformer</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="TJTransformer";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
||||
NEXT CLASS</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TJTransformer.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJTransformer.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">Field</a> | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>
|
||||
<FONT SIZE="-1">
|
||||
org.libjpegturbo.turbojpeg</FONT>
|
||||
<BR>
|
||||
Class TJTransformer</H2>
|
||||
<PRE>
|
||||
java.lang.Object
|
||||
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJDecompressor</A>
|
||||
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.libjpegturbo.turbojpeg.TJTransformer</B>
|
||||
</PRE>
|
||||
<HR>
|
||||
<DL>
|
||||
<DT><PRE>public class <B>TJTransformer</B><DT>extends <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></DL>
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
TurboJPEG lossless transformer
|
||||
<P>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
<div class="header">
|
||||
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||
<h2 title="Class TJTransformer" class="title">Class TJTransformer</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJDecompressor</a></li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>org.libjpegturbo.turbojpeg.TJTransformer</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="strong">TJTransformer</span>
|
||||
extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></pre>
|
||||
<div class="block">TurboJPEG lossless transformer</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
<A NAME="field_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Field Summary</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left"><B>Fields inherited from class org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></B></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#handle">handle</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBuf">jpegBuf</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBufSize">jpegBufSize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegColorspace">jpegColorspace</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegHeight">jpegHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegSubsamp">jpegSubsamp</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegWidth">jpegWidth</A></CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="field_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Field Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Fields inherited from class org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></h3>
|
||||
<code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#handle">handle</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBuf">jpegBuf</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBufSize">jpegBufSize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcColorspace">srcColorspace</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcHeight">srcHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcSubsamp">srcSubsamp</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#srcWidth">srcWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#yuvImage">yuvImage</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer()">TJTransformer</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Create a TurboJPEG lossless transformer instance.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[])">TJTransformer</A></B>(byte[] jpegImage)</CODE>
|
||||
|
||||
<BR>
|
||||
Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
image stored in <code>jpegImage</code> with the newly-created instance.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[], int)">TJTransformer</A></B>(byte[] jpegImage,
|
||||
int imageSize)</CODE>
|
||||
|
||||
<BR>
|
||||
Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer()">TJTransformer</a></strong>()</code>
|
||||
<div class="block">Create a TurboJPEG lossless transformer instance.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[])">TJTransformer</a></strong>(byte[] jpegImage)</code>
|
||||
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[], int)">TJTransformer</a></strong>(byte[] jpegImage,
|
||||
int imageSize)</code>
|
||||
<div class="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.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<code>jpegImage</code> with the newly created instance.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> int[]</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()">getTransformedSizes</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Returns an array containing the sizes of the transformed JPEG images from
|
||||
the most recent call to <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><CODE>transform()</CODE></A>.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> void</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)">transform</A></B>(byte[][] dstBufs,
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>[] transforms,
|
||||
int flags)</CODE>
|
||||
|
||||
<BR>
|
||||
Losslessly transform the JPEG image associated with this transformer
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>int[]</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()">getTransformedSizes</a></strong>()</code>
|
||||
<div class="block">Returns an array containing the sizes of the transformed JPEG images
|
||||
generated by the most recent transform operation.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)">transform</a></strong>(byte[][] dstBufs,
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||
int flags)</code>
|
||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||
instance into one or more JPEG images stored in the given destination
|
||||
buffers.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A>[]</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(org.libjpegturbo.turbojpeg.TJTransform[], int)">transform</A></B>(<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>[] transforms,
|
||||
int flags)</CODE>
|
||||
|
||||
<BR>
|
||||
Losslessly transform the JPEG image associated with this transformer
|
||||
instance and return an array of <A HREF="../../../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.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="methods_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left"><B>Methods inherited from class org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></B></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#close()">close</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[], int, int, int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int, int, int, int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()">finalize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)">getScaledHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)">getScaledWidth</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[], int)">setJPEGImage</A></CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
buffers.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a>[]</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(org.libjpegturbo.turbojpeg.TJTransform[], int)">transform</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||
int flags)</code>
|
||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||
instance and return an array of <a href="../../../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>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></h3>
|
||||
<code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#close()">close</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage, int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[], int, int, int, int, int, int, int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int, int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int, int, int, int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage, int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()">finalize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)">getScaledHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)">getScaledWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceBuf()">getSourceBuf</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSourceSize()">getSourceSize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[], int)">setJPEGImage</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[], int)">setSourceImage</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</a></code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
||||
<B>Constructor Detail</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="TJTransformer()"><!-- --></A><H3>
|
||||
TJTransformer</H3>
|
||||
<PRE>
|
||||
public <B>TJTransformer</B>()
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Create a TurboJPEG lossless transformer instance.
|
||||
<P>
|
||||
<DL>
|
||||
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="TJTransformer(byte[])"><!-- --></A><H3>
|
||||
TJTransformer</H3>
|
||||
<PRE>
|
||||
public <B>TJTransformer</B>(byte[] jpegImage)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
image stored in <code>jpegImage</code> with the newly-created instance.
|
||||
<P>
|
||||
<DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>jpegImage</CODE> - JPEG image buffer (size of the JPEG image is assumed to
|
||||
be the length of the array)
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="TJTransformer(byte[], int)"><!-- --></A><H3>
|
||||
TJTransformer</H3>
|
||||
<PRE>
|
||||
public <B>TJTransformer</B>(byte[] jpegImage,
|
||||
int imageSize)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="TJTransformer()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>TJTransformer</h4>
|
||||
<pre>public TJTransformer()
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Create a TurboJPEG lossless transformer instance.</div>
|
||||
<dl><dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="TJTransformer(byte[])">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>TJTransformer</h4>
|
||||
<pre>public TJTransformer(byte[] jpegImage)
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer (size of the JPEG image is assumed to
|
||||
be the length of the array)</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="TJTransformer(byte[], int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>TJTransformer</h4>
|
||||
<pre>public TJTransformer(byte[] jpegImage,
|
||||
int imageSize)
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="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.
|
||||
<P>
|
||||
<DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>jpegImage</CODE> - JPEG image buffer<DD><CODE>imageSize</CODE> - size of the JPEG image (in bytes)
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DL>
|
||||
|
||||
<code>jpegImage</code> with the newly created instance.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><!-- --></A><H3>
|
||||
transform</H3>
|
||||
<PRE>
|
||||
public void <B>transform</B>(byte[][] dstBufs,
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>[] transforms,
|
||||
int flags)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Losslessly transform the JPEG image associated with this transformer
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>transform</h4>
|
||||
<pre>public void transform(byte[][] dstBufs,
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||
int flags)
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||
instance into one or more JPEG images stored in the given destination
|
||||
buffers. Lossless transforms work by moving the raw coefficients from one
|
||||
JPEG image structure to another without altering the values of the
|
||||
@@ -306,121 +296,121 @@ public void <B>transform</B>(byte[][] dstBufs,
|
||||
size of the destination image. Thus, this method provides a means of
|
||||
generating multiple transformed images from the same source or of applying
|
||||
multiple transformations simultaneously, in order to eliminate the need to
|
||||
read the source coefficients multiple times.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>dstBufs</CODE> - an array of image buffers. <code>dstbufs[i]</code> will
|
||||
read the source coefficients multiple times.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBufs</code> - an array of image buffers. <code>dstbufs[i]</code> will
|
||||
receive a JPEG image that has been transformed using the parameters in
|
||||
<code>transforms[i]</code>. Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)"><CODE>TJ.bufSize(int, int, int)</CODE></A> to determine the
|
||||
<code>transforms[i]</code>. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)"><code>TJ.bufSize(int, int, int)</code></a> to determine the
|
||||
maximum size for each buffer based on the transformed or cropped width and
|
||||
height.<DD><CODE>transforms</CODE> - an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJTransform</CODE></A> instances, each of
|
||||
height and the level of subsampling used in the source image.</dd><dd><code>transforms</code> - an array of <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instances, each of
|
||||
which specifies the transform parameters and/or cropping region for the
|
||||
corresponding transformed output image<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A>
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="transform(org.libjpegturbo.turbojpeg.TJTransform[], int)"><!-- --></A><H3>
|
||||
transform</H3>
|
||||
<PRE>
|
||||
public <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A>[] <B>transform</B>(<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>[] transforms,
|
||||
int flags)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Losslessly transform the JPEG image associated with this transformer
|
||||
instance and return an array of <A HREF="../../../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.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>transforms</CODE> - an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJTransform</CODE></A> instances, each of
|
||||
corresponding transformed output image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="transform(org.libjpegturbo.turbojpeg.TJTransform[], int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>transform</h4>
|
||||
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a>[] transform(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||
int flags)
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||
instance and return an array of <a href="../../../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>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>transforms</code> - an array of <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instances, each of
|
||||
which specifies the transform parameters and/or cropping region for the
|
||||
corresponding transformed output image<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A>
|
||||
<DT><B>Returns:</B><DD>an array of <A HREF="../../../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
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getTransformedSizes()"><!-- --></A><H3>
|
||||
getTransformedSizes</H3>
|
||||
<PRE>
|
||||
public int[] <B>getTransformedSizes</B>()
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Returns an array containing the sizes of the transformed JPEG images from
|
||||
the most recent call to <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><CODE>transform()</CODE></A>.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>an array containing the sizes of the transformed JPEG images from
|
||||
the most recent call to <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><CODE>transform()</CODE></A>
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DD>
|
||||
</DL>
|
||||
corresponding transformed output image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||
<dt><span class="strong">Returns:</span></dt><dd>an array of <a href="../../../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><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getTransformedSizes()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>getTransformedSizes</h4>
|
||||
<pre>public int[] getTransformedSizes()
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Returns an array containing the sizes of the transformed JPEG images
|
||||
generated by the most recent transform operation.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>an array containing the sizes of the transformed JPEG images
|
||||
generated by the most recent transform operation</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<HR>
|
||||
|
||||
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
||||
NEXT CLASS</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TJTransformer.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJTransformer.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">Field</a> | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
569
java/doc/org/libjpegturbo/turbojpeg/YUVImage.html
Normal file
569
java/doc/org/libjpegturbo/turbojpeg/YUVImage.html
Normal file
@@ -0,0 +1,569 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>YUVImage</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="YUVImage";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li>Next Class</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/YUVImage.html" target="_top">Frames</a></li>
|
||||
<li><a href="YUVImage.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field_summary">Field</a> | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field_detail">Field</a> | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||
<h2 title="Class YUVImage" class="title">Class YUVImage</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>org.libjpegturbo.turbojpeg.YUVImage</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="strong">YUVImage</span>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">This class encapsulates a YUV planar image buffer and the metadata
|
||||
associated with it. The TurboJPEG API allows both the JPEG compression and
|
||||
decompression pipelines to be split into stages: YUV encode, compress from
|
||||
YUV, decompress to YUV, and YUV decode. A <code>YUVImage</code> instance
|
||||
serves as the destination image for YUV encode and decompress-to-YUV
|
||||
operations and as the source image for compress-from-YUV and YUV decode
|
||||
operations.
|
||||
<p>
|
||||
Technically, the JPEG format uses the YCbCr colorspace (which technically is
|
||||
not a "colorspace" but rather a "color transform"), but per the convention
|
||||
of the digital video community, the TurboJPEG API uses "YUV" to refer to an
|
||||
image format consisting of Y, Cb, and Cr image planes. In this image
|
||||
format, the Y, Cb (U), and Cr (V) planes are stored sequentially in the same
|
||||
image buffer, and the size of each plane is determined by the image width,
|
||||
height, line padding, and level of chrominance subsampling. If the
|
||||
chrominance components are subsampled along the horizontal dimension, then
|
||||
the width of the luminance plane would be padded to the nearest multiple of
|
||||
2 (same goes for the height of the luminance plane, if the chrominance
|
||||
components are subsampled along the vertical dimension.) For instance, if
|
||||
the source image is 35 x 35 pixels and 4:2:2 subsampling is used, then the
|
||||
luminance plane would be 36 x 35 bytes, and each of the chrominance planes
|
||||
would be 18 x 35 bytes. If you specify, for instance, a line padding of 4
|
||||
bytes on top of this, then the luminance plane would be 36 x 35 bytes, and
|
||||
each of the chrominance planes would be 20 x 35 bytes.</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="field_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Field Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
|
||||
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Field and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>protected long</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#handle">handle</a></strong></code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>protected byte[]</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvBuf">yuvBuf</a></strong></code> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>protected int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvHeight">yuvHeight</a></strong></code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>protected int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvPad">yuvPad</a></strong></code> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>protected int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvSubsamp">yuvSubsamp</a></strong></code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>protected int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvWidth">yuvWidth</a></strong></code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[], int, int, int, int)">YUVImage</a></strong>(byte[] yuvImage,
|
||||
int width,
|
||||
int pad,
|
||||
int height,
|
||||
int subsamp)</code>
|
||||
<div class="block">Create a <code>YUVImage</code> instance from an existing YUV planar image
|
||||
buffer.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int, int, int, int)">YUVImage</a></strong>(int width,
|
||||
int pad,
|
||||
int height,
|
||||
int subsamp)</code>
|
||||
<div class="block">Create a <code>YUVImage</code> instance with a new image buffer.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>byte[]</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getBuf()">getBuf</a></strong>()</code>
|
||||
<div class="block">Returns the YUV image buffer</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getHeight()">getHeight</a></strong>()</code>
|
||||
<div class="block">Returns the height of the YUV image.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getPad()">getPad</a></strong>()</code>
|
||||
<div class="block">Returns the line padding used in the YUV image buffer.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getSize()">getSize</a></strong>()</code>
|
||||
<div class="block">Returns the size (in bytes) of the YUV image buffer</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getSubsamp()">getSubsamp</a></strong>()</code>
|
||||
<div class="block">Returns the level of chrominance subsampling used in the YUV image.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getWidth()">getWidth</a></strong>()</code>
|
||||
<div class="block">Returns the width of the YUV image.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[], int, int, int, int)">setBuf</a></strong>(byte[] yuvImage,
|
||||
int width,
|
||||
int pad,
|
||||
int height,
|
||||
int subsamp)</code>
|
||||
<div class="block">Assign an existing YUV planar image buffer to this <code>YUVImage</code>
|
||||
instance.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ============ FIELD DETAIL =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="field_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Field Detail</h3>
|
||||
<a name="handle">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>handle</h4>
|
||||
<pre>protected long handle</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="yuvBuf">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>yuvBuf</h4>
|
||||
<pre>protected byte[] yuvBuf</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="yuvPad">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>yuvPad</h4>
|
||||
<pre>protected int yuvPad</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="yuvWidth">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>yuvWidth</h4>
|
||||
<pre>protected int yuvWidth</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="yuvHeight">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>yuvHeight</h4>
|
||||
<pre>protected int yuvHeight</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="yuvSubsamp">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>yuvSubsamp</h4>
|
||||
<pre>protected int yuvSubsamp</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="YUVImage(int, int, int, int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>YUVImage</h4>
|
||||
<pre>public YUVImage(int width,
|
||||
int pad,
|
||||
int height,
|
||||
int subsamp)
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Create a <code>YUVImage</code> instance with a new image buffer.</div>
|
||||
<dl><dt><span class="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 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="YUVImage(byte[], int, int, int, int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>YUVImage</h4>
|
||||
<pre>public YUVImage(byte[] yuvImage,
|
||||
int width,
|
||||
int pad,
|
||||
int height,
|
||||
int subsamp)
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Create a <code>YUVImage</code> instance from an existing YUV planar image
|
||||
buffer.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
||||
image data. See <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a> for a description of the image
|
||||
format. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for this
|
||||
buffer.</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 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="setBuf(byte[], int, int, int, int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setBuf</h4>
|
||||
<pre>public void setBuf(byte[] yuvImage,
|
||||
int width,
|
||||
int pad,
|
||||
int height,
|
||||
int subsamp)
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Assign an existing YUV planar image buffer to this <code>YUVImage</code>
|
||||
instance.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
||||
image data. See <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a> for a description of the image
|
||||
format. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for this
|
||||
buffer.</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 <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getWidth()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getWidth</h4>
|
||||
<pre>public int getWidth()
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Returns the width of the YUV image.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the width of the YUV image</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getHeight()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getHeight</h4>
|
||||
<pre>public int getHeight()
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Returns the height of the YUV image.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the height of the YUV image</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getPad()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getPad</h4>
|
||||
<pre>public int getPad()
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Returns the line padding used in the YUV image buffer.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the line padding used in the YUV image buffer</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getSubsamp()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getSubsamp</h4>
|
||||
<pre>public int getSubsamp()
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Returns the level of chrominance subsampling used in the YUV image. See
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the level of chrominance subsampling used in the YUV image</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getBuf()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getBuf</h4>
|
||||
<pre>public byte[] getBuf()
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Returns the YUV image buffer</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the YUV image buffer</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getSize()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>getSize</h4>
|
||||
<pre>public int getSize()
|
||||
throws java.lang.Exception</pre>
|
||||
<div class="block">Returns the size (in bytes) of the YUV image buffer</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the size (in bytes) of the YUV image buffer</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code>java.lang.Exception</code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li>Next Class</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/YUVImage.html" target="_top">Frames</a></li>
|
||||
<li><a href="YUVImage.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field_summary">Field</a> | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field_detail">Field</a> | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,51 +1,27 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
org.libjpegturbo.turbojpeg
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white">
|
||||
<FONT size="+1" CLASS="FrameTitleFont">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html" target="classFrame">org.libjpegturbo.turbojpeg</A></FONT>
|
||||
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
|
||||
<TR>
|
||||
<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
|
||||
Interfaces</FONT>
|
||||
<FONT CLASS="FrameItemFont">
|
||||
<BR>
|
||||
<A HREF="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><I>TJCustomFilter</I></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
|
||||
<TR>
|
||||
<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
|
||||
Classes</FONT>
|
||||
<FONT CLASS="FrameItemFont">
|
||||
<BR>
|
||||
<A HREF="TJ.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJ</A>
|
||||
<BR>
|
||||
<A HREF="TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</A>
|
||||
<BR>
|
||||
<A HREF="TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</A>
|
||||
<BR>
|
||||
<A HREF="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</A>
|
||||
<BR>
|
||||
<A HREF="TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</A>
|
||||
<BR>
|
||||
<A HREF="TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>org.libjpegturbo.turbojpeg</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar"><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html" target="classFrame">org.libjpegturbo.turbojpeg</a></h1>
|
||||
<div class="indexContainer">
|
||||
<h2 title="Interfaces">Interfaces</h2>
|
||||
<ul title="Interfaces">
|
||||
<li><a href="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><i>TJCustomFilter</i></a></li>
|
||||
</ul>
|
||||
<h2 title="Classes">Classes</h2>
|
||||
<ul title="Classes">
|
||||
<li><a href="TJ.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJ</a></li>
|
||||
<li><a href="TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</a></li>
|
||||
<li><a href="TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</a></li>
|
||||
<li><a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</a></li>
|
||||
<li><a href="TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</a></li>
|
||||
<li><a href="TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</a></li>
|
||||
<li><a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">YUVImage</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,185 +1,183 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
org.libjpegturbo.turbojpeg
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>org.libjpegturbo.turbojpeg</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="org.libjpegturbo.turbojpeg";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV PACKAGE
|
||||
NEXT PACKAGE</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/package-summary.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev Package</li>
|
||||
<li>Next Package</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/package-summary.html" target="_top">Frames</a></li>
|
||||
<li><a href="package-summary.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<H2>
|
||||
Package org.libjpegturbo.turbojpeg
|
||||
</H2>
|
||||
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Interface Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</A></B></TD>
|
||||
<TD>Custom filter callback interface</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<P>
|
||||
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Class Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A></B></TD>
|
||||
<TD>TurboJPEG utility class (cannot be instantiated)</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</A></B></TD>
|
||||
<TD>TurboJPEG compressor</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></B></TD>
|
||||
<TD>TurboJPEG decompressor</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A></B></TD>
|
||||
<TD>Fractional scaling factor</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A></B></TD>
|
||||
<TD>Lossless transform parameters</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</A></B></TD>
|
||||
<TD>TurboJPEG lossless transformer</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<P>
|
||||
<DL>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 title="Package" class="title">Package org.libjpegturbo.turbojpeg</h1>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Interface Summary table, listing interfaces, and an explanation">
|
||||
<caption><span>Interface Summary</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Interface</th>
|
||||
<th class="colLast" scope="col">Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">Custom filter callback interface</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
|
||||
<caption><span>Class Summary</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Class</th>
|
||||
<th class="colLast" scope="col">Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">TurboJPEG utility class (cannot be instantiated)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">TurboJPEG compressor</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">TurboJPEG decompressor</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">Fractional scaling factor</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">Lossless transform parameters</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">TurboJPEG lossless transformer</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">This class encapsulates a YUV planar image buffer and the metadata
|
||||
associated with it.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV PACKAGE
|
||||
NEXT PACKAGE</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/package-summary.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev Package</li>
|
||||
<li>Next Package</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/package-summary.html" target="_top">Frames</a></li>
|
||||
<li><a href="package-summary.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,159 +1,143 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
org.libjpegturbo.turbojpeg Class Hierarchy
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>org.libjpegturbo.turbojpeg Class Hierarchy</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="org.libjpegturbo.turbojpeg Class Hierarchy";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/package-tree.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="navBarCell1Rev">Tree</li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/package-tree.html" target="_top">Frames</a></li>
|
||||
<li><a href="package-tree.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H2>
|
||||
Hierarchy For Package org.libjpegturbo.turbojpeg
|
||||
</H2>
|
||||
</CENTER>
|
||||
<H2>
|
||||
Class Hierarchy
|
||||
</H2>
|
||||
<UL>
|
||||
<LI TYPE="circle">java.lang.Object<UL>
|
||||
<LI TYPE="circle">java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
|
||||
<UL>
|
||||
<LI TYPE="circle">java.awt.geom.Rectangle2D<UL>
|
||||
<LI TYPE="circle">java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
|
||||
<UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>TJTransform</B></A></UL>
|
||||
</UL>
|
||||
</UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><B>TJ</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJCompressor</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJDecompressor</B></A><UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><B>TJTransformer</B></A></UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJScalingFactor</B></A></UL>
|
||||
</UL>
|
||||
<H2>
|
||||
Interface Hierarchy
|
||||
</H2>
|
||||
<UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><B>TJCustomFilter</B></A></UL>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For Package org.libjpegturbo.turbojpeg</h1>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li type="circle">java.lang.Object
|
||||
<ul>
|
||||
<li type="circle">java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
|
||||
<ul>
|
||||
<li type="circle">java.awt.geom.Rectangle2D
|
||||
<ul>
|
||||
<li type="circle">java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransform</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJ</span></a></li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJCompressor</span></a></li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJDecompressor</span></a>
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransformer</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJScalingFactor</span></a></li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">YUVImage</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 title="Interface Hierarchy">Interface Hierarchy</h2>
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><span class="strong">TJCustomFilter</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/package-tree.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="navBarCell1Rev">Tree</li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/package-tree.html" target="_top">Frames</a></li>
|
||||
<li><a href="package-tree.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,161 +1,147 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Class Hierarchy
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Class Hierarchy</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Class Hierarchy";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?overview-tree.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="overview-tree.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="navBarCell1Rev">Tree</li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?overview-tree.html" target="_top">Frames</a></li>
|
||||
<li><a href="overview-tree.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H2>
|
||||
Hierarchy For All Packages</H2>
|
||||
</CENTER>
|
||||
<DL>
|
||||
<DT><B>Package Hierarchies:</B><DD><A HREF="org/libjpegturbo/turbojpeg/package-tree.html">org.libjpegturbo.turbojpeg</A></DL>
|
||||
<HR>
|
||||
<H2>
|
||||
Class Hierarchy
|
||||
</H2>
|
||||
<UL>
|
||||
<LI TYPE="circle">java.lang.Object<UL>
|
||||
<LI TYPE="circle">java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
|
||||
<UL>
|
||||
<LI TYPE="circle">java.awt.geom.Rectangle2D<UL>
|
||||
<LI TYPE="circle">java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
|
||||
<UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>TJTransform</B></A></UL>
|
||||
</UL>
|
||||
</UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><B>TJ</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJCompressor</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJDecompressor</B></A><UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><B>TJTransformer</B></A></UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJScalingFactor</B></A></UL>
|
||||
</UL>
|
||||
<H2>
|
||||
Interface Hierarchy
|
||||
</H2>
|
||||
<UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><B>TJCustomFilter</B></A></UL>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For All Packages</h1>
|
||||
<span class="strong">Package Hierarchies:</span>
|
||||
<ul class="horizontal">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">org.libjpegturbo.turbojpeg</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li type="circle">java.lang.Object
|
||||
<ul>
|
||||
<li type="circle">java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
|
||||
<ul>
|
||||
<li type="circle">java.awt.geom.Rectangle2D
|
||||
<ul>
|
||||
<li type="circle">java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransform</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJ</span></a></li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJCompressor</span></a></li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJDecompressor</span></a>
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransformer</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJScalingFactor</span></a></li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">YUVImage</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 title="Interface Hierarchy">Interface Hierarchy</h2>
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><span class="strong">TJCustomFilter</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?overview-tree.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="overview-tree.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="navBarCell1Rev">Tree</li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?overview-tree.html" target="_top">Frames</a></li>
|
||||
<li><a href="overview-tree.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
java/doc/resources/background.gif
Normal file
BIN
java/doc/resources/background.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 57 B |
BIN
java/doc/resources/tab.gif
Normal file
BIN
java/doc/resources/tab.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 291 B |
BIN
java/doc/resources/titlebar.gif
Normal file
BIN
java/doc/resources/titlebar.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
java/doc/resources/titlebar_end.gif
Normal file
BIN
java/doc/resources/titlebar_end.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 849 B |
@@ -1,200 +1,150 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Serialized Form
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Serialized Form</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Serialized Form";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?serialized-form.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="serialized-form.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?serialized-form.html" target="_top">Frames</a></li>
|
||||
<li><a href="serialized-form.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H1>
|
||||
Serialized Form</H1>
|
||||
</CENTER>
|
||||
<HR SIZE="4" NOSHADE>
|
||||
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="center"><FONT SIZE="+2">
|
||||
<B>Package</B> <B>org.libjpegturbo.turbojpeg</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Class <A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJTransform</A> extends java.awt.Rectangle implements Serializable</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
<B>serialVersionUID: </B>-127367705761430371L
|
||||
|
||||
<P>
|
||||
<A NAME="serializedForm"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
||||
<B>Serialized Fields</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<H3>
|
||||
op</H3>
|
||||
<PRE>
|
||||
int <B>op</B></PRE>
|
||||
<DL>
|
||||
<DD>Transform operation (one of <code>OP_*</code>)
|
||||
<P>
|
||||
<DL>
|
||||
</DL>
|
||||
</DL>
|
||||
<HR>
|
||||
<H3>
|
||||
options</H3>
|
||||
<PRE>
|
||||
int <B>options</B></PRE>
|
||||
<DL>
|
||||
<DD>Transform options (bitwise OR of one or more of <code>OPT_*</code>)
|
||||
<P>
|
||||
<DL>
|
||||
</DL>
|
||||
</DL>
|
||||
<HR>
|
||||
<H3>
|
||||
cf</H3>
|
||||
<PRE>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</A> <B>cf</B></PRE>
|
||||
<DL>
|
||||
<DD>Custom filter instance
|
||||
<P>
|
||||
<DL>
|
||||
</DL>
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 title="Serialized Form" class="title">Serialized Form</h1>
|
||||
</div>
|
||||
<div class="serializedFormContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h2 title="Package">Package org.libjpegturbo.turbojpeg</h2>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="org.libjpegturbo.turbojpeg.TJTransform">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Class <a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJTransform</a> extends java.awt.Rectangle implements Serializable</h3>
|
||||
<dl class="nameValue">
|
||||
<dt>serialVersionUID:</dt>
|
||||
<dd>-127367705761430371L</dd>
|
||||
</dl>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="serializedForm">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Serialized Fields</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>op</h4>
|
||||
<pre>int op</pre>
|
||||
<div class="block">Transform operation (one of <code>OP_*</code>)</div>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>options</h4>
|
||||
<pre>int options</pre>
|
||||
<div class="block">Transform options (bitwise OR of one or more of <code>OPT_*</code>)</div>
|
||||
</li>
|
||||
<li class="blockListLast">
|
||||
<h4>cf</h4>
|
||||
<pre><a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf</pre>
|
||||
<div class="block">Custom filter instance</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?serialized-form.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="serialized-form.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?serialized-form.html" target="_top">Frames</a></li>
|
||||
<li><a href="serialized-form.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,29 +1,474 @@
|
||||
/* Javadoc style sheet */
|
||||
|
||||
/* Define colors, fonts and other style attributes here to override the defaults */
|
||||
|
||||
/* Page background color */
|
||||
body { background-color: #FFFFFF; color:#000000 }
|
||||
|
||||
/* Headings */
|
||||
h1 { font-size: 145% }
|
||||
|
||||
/* Table colors */
|
||||
.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */
|
||||
.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */
|
||||
.TableRowColor { background: #FFFFFF; color:#000000 } /* White */
|
||||
|
||||
/* Font used in left-hand frame lists */
|
||||
.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
|
||||
.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
|
||||
.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
|
||||
|
||||
/* Navigation bar fonts and colors */
|
||||
.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */
|
||||
.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */
|
||||
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;}
|
||||
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;}
|
||||
|
||||
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
|
||||
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
|
||||
|
||||
/*
|
||||
Overall document style
|
||||
*/
|
||||
body {
|
||||
background-color:#ffffff;
|
||||
color:#353833;
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
font-size:76%;
|
||||
margin:0;
|
||||
}
|
||||
a:link, a:visited {
|
||||
text-decoration:none;
|
||||
color:#4c6b87;
|
||||
}
|
||||
a:hover, a:focus {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
}
|
||||
a:active {
|
||||
text-decoration:none;
|
||||
color:#4c6b87;
|
||||
}
|
||||
a[name] {
|
||||
color:#353833;
|
||||
}
|
||||
a[name]:hover {
|
||||
text-decoration:none;
|
||||
color:#353833;
|
||||
}
|
||||
pre {
|
||||
font-size:1.3em;
|
||||
}
|
||||
h1 {
|
||||
font-size:1.8em;
|
||||
}
|
||||
h2 {
|
||||
font-size:1.5em;
|
||||
}
|
||||
h3 {
|
||||
font-size:1.4em;
|
||||
}
|
||||
h4 {
|
||||
font-size:1.3em;
|
||||
}
|
||||
h5 {
|
||||
font-size:1.2em;
|
||||
}
|
||||
h6 {
|
||||
font-size:1.1em;
|
||||
}
|
||||
ul {
|
||||
list-style-type:disc;
|
||||
}
|
||||
code, tt {
|
||||
font-size:1.2em;
|
||||
}
|
||||
dt code {
|
||||
font-size:1.2em;
|
||||
}
|
||||
table tr td dt code {
|
||||
font-size:1.2em;
|
||||
vertical-align:top;
|
||||
}
|
||||
sup {
|
||||
font-size:.6em;
|
||||
}
|
||||
/*
|
||||
Document title and Copyright styles
|
||||
*/
|
||||
.clear {
|
||||
clear:both;
|
||||
height:0px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.aboutLanguage {
|
||||
float:right;
|
||||
padding:0px 21px;
|
||||
font-size:.8em;
|
||||
z-index:200;
|
||||
margin-top:-7px;
|
||||
}
|
||||
.legalCopy {
|
||||
margin-left:.5em;
|
||||
}
|
||||
.bar a, .bar a:link, .bar a:visited, .bar a:active {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
}
|
||||
.bar a:hover, .bar a:focus {
|
||||
color:#bb7a2a;
|
||||
}
|
||||
.tab {
|
||||
background-color:#0066FF;
|
||||
background-image:url(resources/titlebar.gif);
|
||||
background-position:left top;
|
||||
background-repeat:no-repeat;
|
||||
color:#ffffff;
|
||||
padding:8px;
|
||||
width:5em;
|
||||
font-weight:bold;
|
||||
}
|
||||
/*
|
||||
Navigation bar styles
|
||||
*/
|
||||
.bar {
|
||||
background-image:url(resources/background.gif);
|
||||
background-repeat:repeat-x;
|
||||
color:#FFFFFF;
|
||||
padding:.8em .5em .4em .8em;
|
||||
height:auto;/*height:1.8em;*/
|
||||
font-size:1em;
|
||||
margin:0;
|
||||
}
|
||||
.topNav {
|
||||
background-image:url(resources/background.gif);
|
||||
background-repeat:repeat-x;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.bottomNav {
|
||||
margin-top:10px;
|
||||
background-image:url(resources/background.gif);
|
||||
background-repeat:repeat-x;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.subNav {
|
||||
background-color:#dee3e9;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
float:left;
|
||||
width:100%;
|
||||
overflow:hidden;
|
||||
}
|
||||
.subNav div {
|
||||
clear:left;
|
||||
float:left;
|
||||
padding:0 0 5px 6px;
|
||||
}
|
||||
ul.navList, ul.subNavList {
|
||||
float:left;
|
||||
margin:0 25px 0 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.navList li{
|
||||
list-style:none;
|
||||
float:left;
|
||||
padding:3px 6px;
|
||||
}
|
||||
ul.subNavList li{
|
||||
list-style:none;
|
||||
float:left;
|
||||
font-size:90%;
|
||||
}
|
||||
.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
}
|
||||
.topNav a:hover, .bottomNav a:hover {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
}
|
||||
.navBarCell1Rev {
|
||||
background-image:url(resources/tab.gif);
|
||||
background-color:#a88834;
|
||||
color:#FFFFFF;
|
||||
margin: auto 5px;
|
||||
border:1px solid #c9aa44;
|
||||
}
|
||||
/*
|
||||
Page header and footer styles
|
||||
*/
|
||||
.header, .footer {
|
||||
clear:both;
|
||||
margin:0 20px;
|
||||
padding:5px 0 0 0;
|
||||
}
|
||||
.indexHeader {
|
||||
margin:10px;
|
||||
position:relative;
|
||||
}
|
||||
.indexHeader h1 {
|
||||
font-size:1.3em;
|
||||
}
|
||||
.title {
|
||||
color:#2c4557;
|
||||
margin:10px 0;
|
||||
}
|
||||
.subTitle {
|
||||
margin:5px 0 0 0;
|
||||
}
|
||||
.header ul {
|
||||
margin:0 0 25px 0;
|
||||
padding:0;
|
||||
}
|
||||
.footer ul {
|
||||
margin:20px 0 5px 0;
|
||||
}
|
||||
.header ul li, .footer ul li {
|
||||
list-style:none;
|
||||
font-size:1.2em;
|
||||
}
|
||||
/*
|
||||
Heading styles
|
||||
*/
|
||||
div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
|
||||
background-color:#dee3e9;
|
||||
border-top:1px solid #9eadc0;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:2px 5px;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList li.blockList h3 {
|
||||
background-color:#dee3e9;
|
||||
border-top:1px solid #9eadc0;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:2px 5px;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList h3 {
|
||||
padding:0;
|
||||
margin:15px 0;
|
||||
}
|
||||
ul.blockList li.blockList h2 {
|
||||
padding:0px 0 20px 0;
|
||||
}
|
||||
/*
|
||||
Page layout container styles
|
||||
*/
|
||||
.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
|
||||
clear:both;
|
||||
padding:10px 20px;
|
||||
position:relative;
|
||||
}
|
||||
.indexContainer {
|
||||
margin:10px;
|
||||
position:relative;
|
||||
font-size:1.0em;
|
||||
}
|
||||
.indexContainer h2 {
|
||||
font-size:1.1em;
|
||||
padding:0 0 3px 0;
|
||||
}
|
||||
.indexContainer ul {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
.indexContainer ul li {
|
||||
list-style:none;
|
||||
}
|
||||
.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
|
||||
font-size:1.1em;
|
||||
font-weight:bold;
|
||||
margin:10px 0 0 0;
|
||||
color:#4E4E4E;
|
||||
}
|
||||
.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
|
||||
margin:10px 0 10px 20px;
|
||||
}
|
||||
.serializedFormContainer dl.nameValue dt {
|
||||
margin-left:1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
font-weight:bold;
|
||||
}
|
||||
.serializedFormContainer dl.nameValue dd {
|
||||
margin:0 0 0 1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
}
|
||||
/*
|
||||
List styles
|
||||
*/
|
||||
ul.horizontal li {
|
||||
display:inline;
|
||||
font-size:0.9em;
|
||||
}
|
||||
ul.inheritance {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
ul.inheritance li {
|
||||
display:inline;
|
||||
list-style:none;
|
||||
}
|
||||
ul.inheritance li ul.inheritance {
|
||||
margin-left:15px;
|
||||
padding-left:15px;
|
||||
padding-top:1px;
|
||||
}
|
||||
ul.blockList, ul.blockListLast {
|
||||
margin:10px 0 10px 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.blockList li.blockList, ul.blockListLast li.blockList {
|
||||
list-style:none;
|
||||
margin-bottom:25px;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
|
||||
padding:0px 20px 5px 10px;
|
||||
border:1px solid #9eadc0;
|
||||
background-color:#f9f9f9;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
|
||||
padding:0 0 5px 8px;
|
||||
background-color:#ffffff;
|
||||
border:1px solid #9eadc0;
|
||||
border-top:none;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
|
||||
margin-left:0;
|
||||
padding-left:0;
|
||||
padding-bottom:15px;
|
||||
border:none;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
|
||||
list-style:none;
|
||||
border-bottom:none;
|
||||
padding-bottom:0;
|
||||
}
|
||||
table tr td dl, table tr td dl dt, table tr td dl dd {
|
||||
margin-top:0;
|
||||
margin-bottom:1px;
|
||||
}
|
||||
/*
|
||||
Table styles
|
||||
*/
|
||||
.contentContainer table, .classUseContainer table, .constantValuesContainer table {
|
||||
border-bottom:1px solid #9eadc0;
|
||||
width:100%;
|
||||
}
|
||||
.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table {
|
||||
width:100%;
|
||||
}
|
||||
.contentContainer .description table, .contentContainer .details table {
|
||||
border-bottom:none;
|
||||
}
|
||||
.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{
|
||||
vertical-align:top;
|
||||
padding-right:20px;
|
||||
}
|
||||
.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast,
|
||||
.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast,
|
||||
.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne,
|
||||
.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne {
|
||||
padding-right:3px;
|
||||
}
|
||||
.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption {
|
||||
position:relative;
|
||||
text-align:left;
|
||||
background-repeat:no-repeat;
|
||||
color:#FFFFFF;
|
||||
font-weight:bold;
|
||||
clear:none;
|
||||
overflow:hidden;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
caption a:link, caption a:hover, caption a:active, caption a:visited {
|
||||
color:#FFFFFF;
|
||||
}
|
||||
.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span {
|
||||
white-space:nowrap;
|
||||
padding-top:8px;
|
||||
padding-left:8px;
|
||||
display:block;
|
||||
float:left;
|
||||
background-image:url(resources/titlebar.gif);
|
||||
height:18px;
|
||||
}
|
||||
.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd {
|
||||
width:10px;
|
||||
background-image:url(resources/titlebar_end.gif);
|
||||
background-repeat:no-repeat;
|
||||
background-position:top right;
|
||||
position:relative;
|
||||
float:left;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList table {
|
||||
margin:0 0 12px 0px;
|
||||
width:100%;
|
||||
}
|
||||
.tableSubHeadingColor {
|
||||
background-color: #EEEEFF;
|
||||
}
|
||||
.altColor {
|
||||
background-color:#eeeeef;
|
||||
}
|
||||
.rowColor {
|
||||
background-color:#ffffff;
|
||||
}
|
||||
.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td {
|
||||
text-align:left;
|
||||
padding:3px 3px 3px 7px;
|
||||
}
|
||||
th.colFirst, th.colLast, th.colOne, .constantValuesContainer th {
|
||||
background:#dee3e9;
|
||||
border-top:1px solid #9eadc0;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
text-align:left;
|
||||
padding:3px 3px 3px 7px;
|
||||
}
|
||||
td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
|
||||
font-weight:bold;
|
||||
}
|
||||
td.colFirst, th.colFirst {
|
||||
border-left:1px solid #9eadc0;
|
||||
white-space:nowrap;
|
||||
}
|
||||
td.colLast, th.colLast {
|
||||
border-right:1px solid #9eadc0;
|
||||
}
|
||||
td.colOne, th.colOne {
|
||||
border-right:1px solid #9eadc0;
|
||||
border-left:1px solid #9eadc0;
|
||||
}
|
||||
table.overviewSummary {
|
||||
padding:0px;
|
||||
margin-left:0px;
|
||||
}
|
||||
table.overviewSummary td.colFirst, table.overviewSummary th.colFirst,
|
||||
table.overviewSummary td.colOne, table.overviewSummary th.colOne {
|
||||
width:25%;
|
||||
vertical-align:middle;
|
||||
}
|
||||
table.packageSummary td.colFirst, table.overviewSummary th.colFirst {
|
||||
width:25%;
|
||||
vertical-align:middle;
|
||||
}
|
||||
/*
|
||||
Content styles
|
||||
*/
|
||||
.description pre {
|
||||
margin-top:0;
|
||||
}
|
||||
.deprecatedContent {
|
||||
margin:0;
|
||||
padding:10px 0;
|
||||
}
|
||||
.docSummary {
|
||||
padding:0;
|
||||
}
|
||||
/*
|
||||
Formatting effect styles
|
||||
*/
|
||||
.sourceLineNo {
|
||||
color:green;
|
||||
padding:0 30px 0 0;
|
||||
}
|
||||
h1.hidden {
|
||||
visibility:hidden;
|
||||
overflow:hidden;
|
||||
font-size:.9em;
|
||||
}
|
||||
.block {
|
||||
display:block;
|
||||
margin:3px 0 0 0;
|
||||
}
|
||||
.strong {
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -48,28 +48,7 @@ public class TJCompressor {
|
||||
|
||||
/**
|
||||
* Create a TurboJPEG compressor instance and associate the uncompressed
|
||||
* source image stored in <code>srcImage</code> with the newly-created
|
||||
* instance.
|
||||
*
|
||||
* @param srcImage see {@link #setSourceImage} for description
|
||||
*
|
||||
* @param width see {@link #setSourceImage} for description
|
||||
*
|
||||
* @param pitch see {@link #setSourceImage} for description
|
||||
*
|
||||
* @param height see {@link #setSourceImage} for description
|
||||
*
|
||||
* @param pixelFormat pixel format of the source image (one of
|
||||
* {@link TJ TJ.PF_*})
|
||||
*/
|
||||
public TJCompressor(byte[] srcImage, int width, int pitch, int height,
|
||||
int pixelFormat) throws Exception {
|
||||
setSourceImage(srcImage, width, pitch, height, pixelFormat);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a TurboJPEG compressor instance and associate the uncompressed
|
||||
* source image stored in <code>srcImage</code> with the newly-created
|
||||
* source image stored in <code>srcImage</code> with the newly created
|
||||
* instance.
|
||||
*
|
||||
* @param srcImage see {@link #setSourceImage} for description
|
||||
@@ -85,7 +64,7 @@ public class TJCompressor {
|
||||
* @param height see {@link #setSourceImage} for description
|
||||
*
|
||||
* @param pixelFormat pixel format of the source image (one of
|
||||
* {@link TJ TJ.PF_*})
|
||||
* {@link TJ#PF_RGB TJ.PF_*})
|
||||
*/
|
||||
public TJCompressor(byte[] srcImage, int x, int y, int width, int pitch,
|
||||
int height, int pixelFormat) throws Exception {
|
||||
@@ -93,34 +72,70 @@ public class TJCompressor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate an uncompressed source image with this compressor instance.
|
||||
* @deprecated Use
|
||||
* {@link #TJCompressor(byte[], int, int, int, int, int, int)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public TJCompressor(byte[] srcImage, int width, int pitch, int height,
|
||||
int pixelFormat) throws Exception {
|
||||
setSourceImage(srcImage, width, pitch, height, pixelFormat);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a TurboJPEG compressor instance and associate the uncompressed
|
||||
* source image stored in <code>srcImage</code> with the newly created
|
||||
* instance.
|
||||
*
|
||||
* @param srcImage see
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||
*
|
||||
* @param x see
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||
*
|
||||
* @param y see
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||
*
|
||||
* @param width see
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||
*
|
||||
* @param height see
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||
*/
|
||||
public TJCompressor(BufferedImage srcImage, int x, int y, int width,
|
||||
int height) throws Exception {
|
||||
setSourceImage(srcImage, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate an uncompressed RGB, grayscale, or CMYK source image with this
|
||||
* compressor instance.
|
||||
*
|
||||
* @param srcImage image buffer containing RGB, grayscale, or CMYK pixels to
|
||||
* be compressed
|
||||
* be compressed or encoded
|
||||
*
|
||||
* @param x x offset (in pixels) of the region from which the JPEG image
|
||||
* should be compressed, relative to the start of <code>srcImage</code>.
|
||||
* @param x x offset (in pixels) of the region in the source image from which
|
||||
* the JPEG or YUV image should be compressed/encoded
|
||||
*
|
||||
* @param y y offset (in pixels) of the region from which the JPEG image
|
||||
* should be compressed, relative to the start of <code>srcImage</code>.
|
||||
* @param y y offset (in pixels) of the region in the source image from which
|
||||
* the JPEG or YUV image should be compressed/encoded
|
||||
*
|
||||
* @param width width (in pixels) of the region in the source image from
|
||||
* which the JPEG image should be compressed.
|
||||
* which the JPEG or YUV image should be compressed/encoded
|
||||
*
|
||||
* @param pitch bytes per line of the source image. Normally, this should be
|
||||
* <code>width * TJ.pixelSize(pixelFormat)</code> if the source image is
|
||||
* unpadded, but you can use this parameter to, for instance, specify that
|
||||
* the scanlines in the source image are padded to a 4-byte boundary or to
|
||||
* compress a JPEG image from a region of a larger source image. You can
|
||||
* also be clever and use this parameter to skip lines, etc. Setting this
|
||||
* parameter to 0 is the equivalent of setting it to <code>width *
|
||||
* TJ.pixelSize(pixelFormat)</code>.
|
||||
* compress/encode a JPEG or YUV image from a region of a larger source
|
||||
* image. You can also be clever and use this parameter to skip lines, etc.
|
||||
* Setting this parameter to 0 is the equivalent of setting it to
|
||||
* <code>width * TJ.pixelSize(pixelFormat)</code>.
|
||||
*
|
||||
* @param height height (in pixels) of the region in the source image from
|
||||
* which the JPEG image should be compressed.
|
||||
* which the JPEG or YUV image should be compressed/encoded
|
||||
*
|
||||
* @param pixelFormat pixel format of the source image (one of
|
||||
* {@link TJ TJ.PF_*})
|
||||
* {@link TJ#PF_RGB TJ.PF_*})
|
||||
*/
|
||||
public void setSourceImage(byte[] srcImage, int x, int y, int width,
|
||||
int pitch, int height, int pixelFormat)
|
||||
@@ -139,7 +154,8 @@ public class TJCompressor {
|
||||
srcPixelFormat = pixelFormat;
|
||||
srcX = x;
|
||||
srcY = y;
|
||||
srcIsYUV = false;
|
||||
srcBufInt = null;
|
||||
srcYUVImage = null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,147 +170,38 @@ public class TJCompressor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate an uncompressed YUV planar source image with this compressor
|
||||
* instance.
|
||||
*
|
||||
* @param srcImage image buffer containing a YUV planar image to be
|
||||
* compressed. The Y, U (Cb), and V (Cr) image planes should be stored
|
||||
* sequentially in the buffer, and the size of each plane is determined by
|
||||
* the specified width, height, and padding, as well as the level of
|
||||
* chrominance subsampling (specified using {@link #setSubsamp}.) If the
|
||||
* chrominance components are subsampled along the horizontal dimension, then
|
||||
* the width of the luminance plane should be padded to the nearest multiple
|
||||
* of 2 (same goes for the height of the luminance plane, if the chrominance
|
||||
* components are subsampled along the vertical dimension.) This is
|
||||
* irrespective of any additional padding specified in the <code>pad</code>
|
||||
* parameter.
|
||||
*
|
||||
* @param width width (in pixels) of the source image
|
||||
*
|
||||
* @param pad the line padding used in the source image. For instance, if
|
||||
* each line in each plane of the YUV image is padded to the nearest multiple
|
||||
* of 4 bytes, then <code>pad</code> should be set to 4.
|
||||
*
|
||||
* @param height height (in pixels) of the source image
|
||||
*/
|
||||
public void setSourceImageYUV(byte[] srcImage, int width, int pad,
|
||||
int height) throws Exception {
|
||||
if (handle == 0) init();
|
||||
if (srcImage == null || width < 1 || pad < 1 || height < 1)
|
||||
throw new Exception("Invalid argument in setSourceImageYUV()");
|
||||
srcBuf = srcImage;
|
||||
srcWidth = width;
|
||||
srcYUVPad = pad;
|
||||
srcHeight = height;
|
||||
srcIsYUV = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the level of chrominance subsampling for subsequent compress/encode
|
||||
* operations. When pixels are converted from RGB to YCbCr (see
|
||||
* {@link TJ#CS_YCbCr}) or from CMYK to YCCK (see {@link TJ#CS_YCCK}) as part
|
||||
* of the JPEG compression process, some of the Cb and Cr (chrominance)
|
||||
* components can be discarded or averaged together to produce a smaller
|
||||
* image with little perceptible loss of image clarity (the human eye is more
|
||||
* sensitive to small changes in brightness than to small changes in color.)
|
||||
* This is called "chrominance subsampling".
|
||||
* <p>
|
||||
* NOTE: When compressing a YUV planar image into a JPEG image, this method
|
||||
* also specifies the level of chrominance subsampling used in the source
|
||||
* image.
|
||||
*
|
||||
* @param newSubsamp the new level of chrominance subsampling (one of
|
||||
* {@link TJ TJ.SAMP_*})
|
||||
*/
|
||||
public void setSubsamp(int newSubsamp) throws Exception {
|
||||
if (newSubsamp < 0 || newSubsamp >= TJ.NUMSAMP)
|
||||
throw new Exception("Invalid argument in setSubsamp()");
|
||||
subsamp = newSubsamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the JPEG image quality level for subsequent compress operations.
|
||||
*
|
||||
* @param quality the new JPEG image quality level (1 to 100, 1 = worst,
|
||||
* 100 = best)
|
||||
*/
|
||||
public void setJPEGQuality(int quality) throws Exception {
|
||||
if (quality < 1 || quality > 100)
|
||||
throw new Exception("Invalid argument in setJPEGQuality()");
|
||||
jpegQuality = quality;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compress the uncompressed source image associated with this compressor
|
||||
* instance and output a JPEG image to the given destination buffer.
|
||||
*
|
||||
* @param dstBuf buffer that will receive the JPEG image. Use
|
||||
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
|
||||
* the image width, height, and level of chrominance subsampling.
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
*/
|
||||
public void compress(byte[] dstBuf, int flags) throws Exception {
|
||||
if (dstBuf == null || flags < 0)
|
||||
throw new Exception("Invalid argument in compress()");
|
||||
if (srcBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (jpegQuality < 0)
|
||||
throw new Exception("JPEG Quality not set");
|
||||
if (subsamp < 0)
|
||||
throw new Exception("Subsampling level not set");
|
||||
if (srcIsYUV)
|
||||
compressedSize = compressFromYUV(srcBuf, srcWidth, srcYUVPad, srcHeight,
|
||||
subsamp, dstBuf, jpegQuality, flags);
|
||||
else {
|
||||
if (srcX >= 0 && srcY >= 0)
|
||||
compressedSize = compress(srcBuf, srcX, srcY, srcWidth, srcPitch,
|
||||
srcHeight, srcPixelFormat, dstBuf, subsamp,
|
||||
jpegQuality, flags);
|
||||
else
|
||||
compressedSize = compress(srcBuf, srcWidth, srcPitch, srcHeight,
|
||||
srcPixelFormat, dstBuf, subsamp, jpegQuality,
|
||||
flags);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Compress the uncompressed source image associated with this compressor
|
||||
* instance and return a buffer containing a JPEG image.
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
*
|
||||
* @return a buffer containing a JPEG image. The length of this buffer will
|
||||
* not be equal to the size of the JPEG image. Use {@link
|
||||
* #getCompressedSize} to obtain the size of the JPEG image.
|
||||
*/
|
||||
public byte[] compress(int flags) throws Exception {
|
||||
if (srcWidth < 1 || srcHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
byte[] buf = new byte[TJ.bufSize(srcWidth, srcHeight, subsamp)];
|
||||
compress(buf, flags);
|
||||
return buf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compress the uncompressed source image stored in <code>srcImage</code>
|
||||
* and output a JPEG image to the given destination buffer.
|
||||
* Associate an uncompressed RGB or grayscale source image with this
|
||||
* compressor instance.
|
||||
*
|
||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
||||
* grayscale pixels to be compressed
|
||||
* grayscale pixels to be compressed or encoded
|
||||
*
|
||||
* @param dstBuf buffer that will receive the JPEG image. Use
|
||||
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
|
||||
* the image width, height, and level of chrominance subsampling.
|
||||
* @param x x offset (in pixels) of the region in the source image from which
|
||||
* the JPEG or YUV image should be compressed/encoded
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
* @param y y offset (in pixels) of the region in the source image from which
|
||||
* the JPEG or YUV image should be compressed/encoded
|
||||
*
|
||||
* @param width width (in pixels) of the region in the source image from
|
||||
* which the JPEG or YUV image should be compressed/encoded (0 = use the
|
||||
* width of the source image)
|
||||
*
|
||||
* @param height height (in pixels) of the region in the source image from
|
||||
* which the JPEG or YUV image should be compressed/encoded (0 = use the
|
||||
* height of the source image)
|
||||
*/
|
||||
public void compress(BufferedImage srcImage, byte[] dstBuf, int flags)
|
||||
throws Exception {
|
||||
if (srcImage == null || dstBuf == null || flags < 0)
|
||||
throw new Exception("Invalid argument in compress()");
|
||||
int width = srcImage.getWidth();
|
||||
int height = srcImage.getHeight();
|
||||
public void setSourceImage(BufferedImage srcImage, int x, int y, int width,
|
||||
int height) throws Exception {
|
||||
if (handle == 0) init();
|
||||
if (srcImage == null || x < 0 || y < 0 || width < 0 || height < 0)
|
||||
throw new Exception("Invalid argument in setSourceImage()");
|
||||
srcX = x;
|
||||
srcY = y;
|
||||
srcWidth = (width == 0) ? srcImage.getWidth(): width;
|
||||
srcHeight = (height == 0) ? srcImage.getHeight() : height;
|
||||
if (x + width > srcImage.getWidth() || y + height > srcImage.getHeight())
|
||||
throw new Exception("Compression region exceeds the bounds of the source image");
|
||||
|
||||
int pixelFormat;
|
||||
boolean intPixels = false;
|
||||
if (byteOrder == null)
|
||||
@@ -324,227 +231,293 @@ public class TJCompressor {
|
||||
default:
|
||||
throw new Exception("Unsupported BufferedImage format");
|
||||
}
|
||||
srcPixelFormat = pixelFormat;
|
||||
|
||||
WritableRaster wr = srcImage.getRaster();
|
||||
if (jpegQuality < 0)
|
||||
throw new Exception("JPEG Quality not set");
|
||||
if (subsamp < 0)
|
||||
throw new Exception("Subsampling level not set");
|
||||
if (intPixels) {
|
||||
SinglePixelPackedSampleModel sm =
|
||||
(SinglePixelPackedSampleModel)srcImage.getSampleModel();
|
||||
int stride = sm.getScanlineStride();
|
||||
srcStride = sm.getScanlineStride();
|
||||
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
||||
int[] buf = db.getData();
|
||||
if (srcX >= 0 && srcY >= 0)
|
||||
compressedSize = compress(buf, srcX, srcY, width, stride, height,
|
||||
pixelFormat, dstBuf, subsamp, jpegQuality,
|
||||
flags);
|
||||
else
|
||||
compressedSize = compress(buf, width, stride, height, pixelFormat,
|
||||
dstBuf, subsamp, jpegQuality, flags);
|
||||
srcBufInt = db.getData();
|
||||
srcBuf = null;
|
||||
} else {
|
||||
ComponentSampleModel sm =
|
||||
(ComponentSampleModel)srcImage.getSampleModel();
|
||||
int pixelSize = sm.getPixelStride();
|
||||
if (pixelSize != TJ.getPixelSize(pixelFormat))
|
||||
throw new Exception("Inconsistency between pixel format and pixel size in BufferedImage");
|
||||
int pitch = sm.getScanlineStride();
|
||||
srcPitch = sm.getScanlineStride();
|
||||
DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
|
||||
byte[] buf = db.getData();
|
||||
srcBuf = db.getData();
|
||||
srcBufInt = null;
|
||||
}
|
||||
srcYUVImage = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate an uncompressed YUV planar source image with this compressor
|
||||
* instance.
|
||||
*
|
||||
* @param srcImage YUV planar image to be compressed
|
||||
*/
|
||||
public void setSourceImage(YUVImage srcImage) throws Exception {
|
||||
if (handle == 0) init();
|
||||
if (srcImage == null)
|
||||
throw new Exception("Invalid argument in setSourceImage()");
|
||||
srcYUVImage = srcImage;
|
||||
srcBuf = null;
|
||||
srcBufInt = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the level of chrominance subsampling for subsequent compress/encode
|
||||
* operations. When pixels are converted from RGB to YCbCr (see
|
||||
* {@link TJ#CS_YCbCr}) or from CMYK to YCCK (see {@link TJ#CS_YCCK}) as part
|
||||
* of the JPEG compression process, some of the Cb and Cr (chrominance)
|
||||
* components can be discarded or averaged together to produce a smaller
|
||||
* image with little perceptible loss of image clarity (the human eye is more
|
||||
* sensitive to small changes in brightness than to small changes in color.)
|
||||
* This is called "chrominance subsampling".
|
||||
* <p>
|
||||
* NOTE: This method has no effect when compressing a JPEG image from a YUV
|
||||
* planar source. In that case, the level of chrominance subsampling in
|
||||
* the JPEG image is determined by the source. Further, this method has no
|
||||
* effect when encoding to a pre-allocated {@link YUVImage} instance. In
|
||||
* that case, the level of chrominance subsampling is determined by the
|
||||
* destination.
|
||||
*
|
||||
* @param newSubsamp the level of chrominance subsampling to use in
|
||||
* subsequent compress/encode oeprations (one of
|
||||
* {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||
*/
|
||||
public void setSubsamp(int newSubsamp) throws Exception {
|
||||
if (newSubsamp < 0 || newSubsamp >= TJ.NUMSAMP)
|
||||
throw new Exception("Invalid argument in setSubsamp()");
|
||||
subsamp = newSubsamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the JPEG image quality level for subsequent compress operations.
|
||||
*
|
||||
* @param quality the new JPEG image quality level (1 to 100, 1 = worst,
|
||||
* 100 = best)
|
||||
*/
|
||||
public void setJPEGQuality(int quality) throws Exception {
|
||||
if (quality < 1 || quality > 100)
|
||||
throw new Exception("Invalid argument in setJPEGQuality()");
|
||||
jpegQuality = quality;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compress the uncompressed source image associated with this compressor
|
||||
* instance and output a JPEG image to the given destination buffer.
|
||||
*
|
||||
* @param dstBuf buffer that will receive the JPEG image. Use
|
||||
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
|
||||
* the source image's width and height and the desired level of chrominance
|
||||
* subsampling.
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*/
|
||||
public void compress(byte[] dstBuf, int flags) throws Exception {
|
||||
if (dstBuf == null || flags < 0)
|
||||
throw new Exception("Invalid argument in compress()");
|
||||
if (srcBuf == null && srcBufInt == null && srcYUVImage == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (jpegQuality < 0)
|
||||
throw new Exception("JPEG Quality not set");
|
||||
if (subsamp < 0 && srcYUVImage == null)
|
||||
throw new Exception("Subsampling level not set");
|
||||
|
||||
if (srcYUVImage != null)
|
||||
compressedSize = compressFromYUV(srcYUVImage.getBuf(),
|
||||
srcYUVImage.getWidth(),
|
||||
srcYUVImage.getPad(),
|
||||
srcYUVImage.getHeight(),
|
||||
srcYUVImage.getSubsamp(),
|
||||
dstBuf, jpegQuality, flags);
|
||||
else if (srcBuf != null) {
|
||||
if (srcX >= 0 && srcY >= 0)
|
||||
compressedSize = compress(buf, srcX, srcY, width, pitch, height,
|
||||
pixelFormat, dstBuf, subsamp, jpegQuality,
|
||||
flags);
|
||||
compressedSize = compress(srcBuf, srcX, srcY, srcWidth, srcPitch,
|
||||
srcHeight, srcPixelFormat, dstBuf, subsamp,
|
||||
jpegQuality, flags);
|
||||
else
|
||||
compressedSize = compress(buf, width, pitch, height, pixelFormat,
|
||||
dstBuf, subsamp, jpegQuality, flags);
|
||||
compressedSize = compress(srcBuf, srcWidth, srcPitch, srcHeight,
|
||||
srcPixelFormat, dstBuf, subsamp, jpegQuality,
|
||||
flags);
|
||||
} else if (srcBufInt != null) {
|
||||
if (srcX >= 0 && srcY >= 0)
|
||||
compressedSize = compress(srcBufInt, srcX, srcY, srcWidth, srcStride,
|
||||
srcHeight, srcPixelFormat, dstBuf, subsamp,
|
||||
jpegQuality, flags);
|
||||
else
|
||||
compressedSize = compress(srcBufInt, srcWidth, srcStride, srcHeight,
|
||||
srcPixelFormat, dstBuf, subsamp, jpegQuality,
|
||||
flags);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Compress the uncompressed source image stored in <code>srcImage</code>
|
||||
* and return a buffer containing a JPEG image.
|
||||
* Compress the uncompressed source image associated with this compressor
|
||||
* instance and return a buffer containing a JPEG image.
|
||||
*
|
||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
||||
* grayscale pixels to be compressed
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return a buffer containing a JPEG image. The length of this buffer will
|
||||
* not be equal to the size of the JPEG image. Use {@link
|
||||
* #getCompressedSize} to obtain the size of the JPEG image.
|
||||
*/
|
||||
public byte[] compress(BufferedImage srcImage, int flags) throws Exception {
|
||||
int width = srcImage.getWidth();
|
||||
int height = srcImage.getHeight();
|
||||
byte[] buf = new byte[TJ.bufSize(width, height, subsamp)];
|
||||
compress(srcImage, buf, flags);
|
||||
public byte[] compress(int flags) throws Exception {
|
||||
if (srcWidth < 1 || srcHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
byte[] buf = new byte[TJ.bufSize(srcWidth, srcHeight, subsamp)];
|
||||
compress(buf, flags);
|
||||
return buf;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
||||
* {@link #compress(byte[], int)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void compress(BufferedImage srcImage, byte[] dstBuf, int flags)
|
||||
throws Exception {
|
||||
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||
compress(dstBuf, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the plane padding for subsequent YUV encode operations.
|
||||
*
|
||||
* @param pad the width of each line in each plane of the YUV image will be
|
||||
* padded to the nearest multiple of this number of bytes (must be a
|
||||
* power of 2.) The default padding is 4 bytes, which generates
|
||||
* images suitable for direct video display.
|
||||
* @deprecated Use
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
||||
* {@link #compress(int)} instead.
|
||||
*/
|
||||
public void setYUVPad(int pad) throws Exception {
|
||||
if(pad < 1 || ((pad & (pad - 1)) != 0))
|
||||
throw new Exception("Invalid argument in setYUVPad()");
|
||||
yuvPad = pad;
|
||||
@Deprecated
|
||||
public byte[] compress(BufferedImage srcImage, int flags) throws Exception {
|
||||
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||
return compress(flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode the uncompressed source image associated with this compressor
|
||||
* instance and output a YUV planar image to the given destination buffer.
|
||||
* This method uses the accelerated color conversion routines in TurboJPEG's
|
||||
* underlying codec but does not execute any of the other steps in the JPEG
|
||||
* compression process. The Y, U (Cb), and V (Cr) image planes are stored
|
||||
* sequentially into the destination buffer, and the size of each plane is
|
||||
* determined by the width and height of the source image, as well as the
|
||||
* specified padding and level of chrominance subsampling. If the
|
||||
* chrominance components are subsampled along the horizontal dimension, then
|
||||
* the width of the luminance plane is padded to the nearest multiple of 2 in
|
||||
* the output image (same goes for the height of the luminance plane, if the
|
||||
* chrominance components are subsampled along the vertical dimension.)
|
||||
* <p>
|
||||
* NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the
|
||||
* convention of the digital video community, the TurboJPEG API uses "YUV" to
|
||||
* refer to an image format consisting of Y, Cb, and Cr image planes.
|
||||
* instance into a YUV planar image and store it in the given
|
||||
* <code>YUVImage</code> instance. This method uses the accelerated color
|
||||
* conversion routines in TurboJPEG's underlying codec but does not execute
|
||||
* any of the other steps in the JPEG compression process. Encoding
|
||||
* CMYK source images to YUV is not supported.
|
||||
*
|
||||
* @param dstBuf buffer that will receive the YUV planar image. Use
|
||||
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
|
||||
* based on the image width, height, and level of chrominance subsampling.
|
||||
* @param dstImage {@link YUVImage} instance that will receive the YUV planar
|
||||
* image
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*/
|
||||
public void encodeYUV(YUVImage dstImage, int flags) throws Exception {
|
||||
if (dstImage == null || flags < 0)
|
||||
throw new Exception("Invalid argument in encodeYUV()");
|
||||
if (srcBuf == null && srcBufInt == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (srcYUVImage != null)
|
||||
throw new Exception("Source image is not correct type");
|
||||
if (subsamp < 0)
|
||||
throw new Exception("Subsampling level not set");
|
||||
if (srcWidth != dstImage.getWidth() || srcHeight != dstImage.getHeight())
|
||||
throw new Exception("Destination image is the wrong size");
|
||||
|
||||
if (srcBufInt != null) {
|
||||
encodeYUV(srcBufInt, srcX, srcY, srcWidth, srcStride, srcHeight,
|
||||
srcPixelFormat, dstImage.getBuf(), dstImage.getPad(),
|
||||
dstImage.getSubsamp(), flags);
|
||||
} else {
|
||||
encodeYUV(srcBuf, srcX, srcY, srcWidth, srcPitch, srcHeight,
|
||||
srcPixelFormat, dstImage.getBuf(), dstImage.getPad(),
|
||||
dstImage.getSubsamp(), flags);
|
||||
}
|
||||
compressedSize = dstImage.getSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #encodeYUV(YUVImage, int)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void encodeYUV(byte[] dstBuf, int flags) throws Exception {
|
||||
if (dstBuf == null || flags < 0)
|
||||
throw new Exception("Invalid argument in compress()");
|
||||
if (srcBuf == null)
|
||||
if(dstBuf == null)
|
||||
throw new Exception("Invalid argument in encodeYUV()");
|
||||
if (srcWidth < 1 || srcHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (subsamp < 0)
|
||||
throw new Exception("Subsampling level not set");
|
||||
encodeYUV(srcBuf, srcWidth, srcPitch, srcHeight, srcPixelFormat, dstBuf,
|
||||
yuvPad, subsamp, flags);
|
||||
compressedSize = TJ.bufSizeYUV(srcWidth, yuvPad, srcHeight, subsamp);
|
||||
YUVImage yuvImage = new YUVImage(dstBuf, srcWidth, 4, srcHeight, subsamp);
|
||||
encodeYUV(yuvImage, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode the uncompressed source image associated with this compressor
|
||||
* instance and return a buffer containing a YUV planar image. See
|
||||
* {@link #encodeYUV(byte[], int)} for more detail.
|
||||
* instance into a YUV planar image and return a <code>YUVImage</code>
|
||||
* instance containing the encoded image. This method uses the accelerated
|
||||
* color conversion routines in TurboJPEG's underlying codec but does not
|
||||
* execute any of the other steps in the JPEG compression process. Encoding
|
||||
* CMYK source images to YUV is not supported.
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
* @param pad the width of each line in each plane of the YUV image will be
|
||||
* padded to the nearest multiple of this number of bytes (must be a power of
|
||||
* 2.)
|
||||
*
|
||||
* @return a buffer containing a YUV planar image
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return a YUV planar image
|
||||
*/
|
||||
public YUVImage encodeYUV(int pad, int flags) throws Exception {
|
||||
if (srcWidth < 1 || srcHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (subsamp < 0)
|
||||
throw new Exception("Subsampling level not set");
|
||||
if(pad < 1 || ((pad & (pad - 1)) != 0))
|
||||
throw new Exception("Invalid argument in encodeYUV()");
|
||||
YUVImage yuvImage = new YUVImage(srcWidth, pad, srcHeight, subsamp);
|
||||
encodeYUV(yuvImage, flags);
|
||||
return yuvImage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #encodeYUV(int, int)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public byte[] encodeYUV(int flags) throws Exception {
|
||||
if (srcWidth < 1 || srcHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (subsamp < 0)
|
||||
throw new Exception("Subsampling level not set");
|
||||
byte[] buf = new byte[TJ.bufSizeYUV(srcWidth, yuvPad, srcHeight, subsamp)];
|
||||
encodeYUV(buf, flags);
|
||||
return buf;
|
||||
YUVImage yuvImage = new YUVImage(srcWidth, 4, srcHeight, subsamp);
|
||||
encodeYUV(yuvImage, flags);
|
||||
return yuvImage.getBuf();
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode the uncompressed source image stored in <code>srcImage</code>
|
||||
* and output a YUV planar image to the given destination buffer. See
|
||||
* {@link #encodeYUV(byte[], int)} for more detail.
|
||||
*
|
||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
||||
* grayscale pixels to be encoded
|
||||
*
|
||||
* @param dstBuf buffer that will receive the YUV planar image. Use
|
||||
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
|
||||
* based on the image width, height, and level of chrominance subsampling.
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
* @deprecated Use
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
||||
* {@link #encodeYUV(byte[], int)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void encodeYUV(BufferedImage srcImage, byte[] dstBuf, int flags)
|
||||
throws Exception {
|
||||
if (srcImage == null || dstBuf == null || flags < 0)
|
||||
throw new Exception("Invalid argument in encodeYUV()");
|
||||
int width = srcImage.getWidth();
|
||||
int height = srcImage.getHeight();
|
||||
int pixelFormat; boolean intPixels = false;
|
||||
if (byteOrder == null)
|
||||
byteOrder = ByteOrder.nativeOrder();
|
||||
switch(srcImage.getType()) {
|
||||
case BufferedImage.TYPE_3BYTE_BGR:
|
||||
pixelFormat = TJ.PF_BGR; break;
|
||||
case BufferedImage.TYPE_4BYTE_ABGR:
|
||||
case BufferedImage.TYPE_4BYTE_ABGR_PRE:
|
||||
pixelFormat = TJ.PF_XBGR; break;
|
||||
case BufferedImage.TYPE_BYTE_GRAY:
|
||||
pixelFormat = TJ.PF_GRAY; break;
|
||||
case BufferedImage.TYPE_INT_BGR:
|
||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
||||
pixelFormat = TJ.PF_XBGR;
|
||||
else
|
||||
pixelFormat = TJ.PF_RGBX;
|
||||
intPixels = true; break;
|
||||
case BufferedImage.TYPE_INT_RGB:
|
||||
case BufferedImage.TYPE_INT_ARGB:
|
||||
case BufferedImage.TYPE_INT_ARGB_PRE:
|
||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
||||
pixelFormat = TJ.PF_XRGB;
|
||||
else
|
||||
pixelFormat = TJ.PF_BGRX;
|
||||
intPixels = true; break;
|
||||
default:
|
||||
throw new Exception("Unsupported BufferedImage format");
|
||||
}
|
||||
WritableRaster wr = srcImage.getRaster();
|
||||
if (subsamp < 0) throw new Exception("Subsampling level not set");
|
||||
if (intPixels) {
|
||||
SinglePixelPackedSampleModel sm =
|
||||
(SinglePixelPackedSampleModel)srcImage.getSampleModel();
|
||||
int stride = sm.getScanlineStride();
|
||||
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
||||
int[] buf = db.getData();
|
||||
encodeYUV(buf, width, stride, height, pixelFormat, dstBuf, yuvPad,
|
||||
subsamp, flags);
|
||||
} else {
|
||||
ComponentSampleModel sm =
|
||||
(ComponentSampleModel)srcImage.getSampleModel();
|
||||
int pixelSize = sm.getPixelStride();
|
||||
if (pixelSize != TJ.getPixelSize(pixelFormat))
|
||||
throw new Exception("Inconsistency between pixel format and pixel size in BufferedImage");
|
||||
int pitch = sm.getScanlineStride();
|
||||
DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
|
||||
byte[] buf = db.getData();
|
||||
encodeYUV(buf, width, pitch, height, pixelFormat, dstBuf, yuvPad,
|
||||
subsamp, flags);
|
||||
}
|
||||
compressedSize = TJ.bufSizeYUV(width, yuvPad, height, subsamp);
|
||||
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||
encodeYUV(dstBuf, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode the uncompressed source image stored in <code>srcImage</code>
|
||||
* and return a buffer containing a YUV planar image. See
|
||||
* {@link #encodeYUV(byte[], int)} for more detail.
|
||||
*
|
||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
||||
* grayscale pixels to be encoded
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
*
|
||||
* @return a buffer containing a YUV planar image
|
||||
* @deprecated Use
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
||||
* {@link #encodeYUV(int)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public byte[] encodeYUV(BufferedImage srcImage, int flags) throws Exception {
|
||||
if (subsamp < 0)
|
||||
throw new Exception("Subsampling level not set");
|
||||
int width = srcImage.getWidth();
|
||||
int height = srcImage.getHeight();
|
||||
byte[] buf = new byte[TJ.bufSizeYUV(width, yuvPad, height, subsamp)];
|
||||
encodeYUV(srcImage, buf, flags);
|
||||
return buf;
|
||||
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||
return encodeYUV(flags);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -603,17 +576,17 @@ public class TJCompressor {
|
||||
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
||||
throws Exception; // deprecated
|
||||
|
||||
private native void encodeYUV(byte[] srcBuf, int width, int pitch,
|
||||
int height, int pixelFormat, byte[] dstBuf, int pad, int subsamp,
|
||||
int flags) throws Exception;
|
||||
private native void encodeYUV(byte[] srcBuf, int x, int y, int width,
|
||||
int pitch, int height, int pixelFormat, byte[] dstBuf, int pad,
|
||||
int subsamp, int flags) throws Exception;
|
||||
|
||||
private native void encodeYUV(int[] srcBuf, int width, int stride,
|
||||
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
||||
throws Exception; // deprecated
|
||||
|
||||
private native void encodeYUV(int[] srcBuf, int width, int pitch,
|
||||
int height, int pixelFormat, byte[] dstBuf, int pad, int subsamp,
|
||||
int flags) throws Exception;
|
||||
private native void encodeYUV(int[] srcBuf, int x, int y, int width,
|
||||
int pitch, int height, int pixelFormat, byte[] dstBuf, int pad,
|
||||
int subsamp, int flags) throws Exception;
|
||||
|
||||
static {
|
||||
TJLoader.load();
|
||||
@@ -621,14 +594,15 @@ public class TJCompressor {
|
||||
|
||||
private long handle = 0;
|
||||
private byte[] srcBuf = null;
|
||||
private int[] srcBufInt = null;
|
||||
private int srcWidth = 0;
|
||||
private int srcHeight = 0;
|
||||
private int srcX = -1;
|
||||
private int srcY = -1;
|
||||
private int srcPitch = 0;
|
||||
private int srcStride = 0;
|
||||
private int srcPixelFormat = -1;
|
||||
private int srcYUVPad = -1;
|
||||
private boolean srcIsYUV;
|
||||
private YUVImage srcYUVImage = null;
|
||||
private int subsamp = -1;
|
||||
private int jpegQuality = -1;
|
||||
private int compressedSize = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -37,7 +37,7 @@ import java.nio.*;
|
||||
public class TJDecompressor {
|
||||
|
||||
private static final String NO_ASSOC_ERROR =
|
||||
"No JPEG image is associated with this instance";
|
||||
"No source image is associated with this instance";
|
||||
|
||||
/**
|
||||
* Create a TurboJPEG decompresssor instance.
|
||||
@@ -47,21 +47,21 @@ public class TJDecompressor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a TurboJPEG decompressor instance and associate the JPEG image
|
||||
* stored in <code>jpegImage</code> with the newly-created instance.
|
||||
* Create a TurboJPEG decompressor instance and associate the JPEG source
|
||||
* image stored in <code>jpegImage</code> with the newly created instance.
|
||||
*
|
||||
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
||||
* be the length of the array)
|
||||
*/
|
||||
public TJDecompressor(byte[] jpegImage) throws Exception {
|
||||
init();
|
||||
setJPEGImage(jpegImage, jpegImage.length);
|
||||
setSourceImage(jpegImage, jpegImage.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a TurboJPEG decompressor instance and associate the JPEG image
|
||||
* of length <code>imageSize</code> bytes stored in <code>jpegImage</code>
|
||||
* with the newly-created instance.
|
||||
* 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.
|
||||
*
|
||||
* @param jpegImage JPEG image buffer
|
||||
*
|
||||
@@ -69,87 +69,150 @@ public class TJDecompressor {
|
||||
*/
|
||||
public TJDecompressor(byte[] jpegImage, int imageSize) throws Exception {
|
||||
init();
|
||||
setJPEGImage(jpegImage, imageSize);
|
||||
setSourceImage(jpegImage, imageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a TurboJPEG decompressor instance and associate the YUV planar
|
||||
* source image stored in <code>yuvImage</code> with the newly created
|
||||
* instance.
|
||||
*
|
||||
* @param yuvImage {@link YUVImage} instance containing a YUV planar
|
||||
* image to be decoded
|
||||
*/
|
||||
public TJDecompressor(YUVImage yuvImage) throws Exception {
|
||||
init();
|
||||
setSourceImage(yuvImage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate the JPEG image of length <code>imageSize</code> bytes stored in
|
||||
* <code>jpegImage</code> with this decompressor instance. This image will
|
||||
* <code>srcImage</code> with this decompressor instance. This image will
|
||||
* be used as the source image for subsequent decompress operations.
|
||||
*
|
||||
* @param jpegImage JPEG image buffer
|
||||
* @param srcImage JPEG image buffer
|
||||
*
|
||||
* @param imageSize size of the JPEG image (in bytes)
|
||||
*/
|
||||
public void setJPEGImage(byte[] jpegImage, int imageSize) throws Exception {
|
||||
if (jpegImage == null || imageSize < 1)
|
||||
throw new Exception("Invalid argument in setJPEGImage()");
|
||||
jpegBuf = jpegImage;
|
||||
public void setSourceImage(byte[] srcImage, int imageSize)
|
||||
throws Exception {
|
||||
if (srcImage == null || imageSize < 1)
|
||||
throw new Exception("Invalid argument in setSourceImage()");
|
||||
jpegBuf = srcImage;
|
||||
jpegBufSize = imageSize;
|
||||
decompressHeader(jpegBuf, jpegBufSize);
|
||||
yuvImage = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the JPEG image associated with this decompressor
|
||||
* instance.
|
||||
*
|
||||
* @return the width of the JPEG image associated with this decompressor
|
||||
* instance
|
||||
* @deprecated Use {@link #setSourceImage(byte[], int)} instead.
|
||||
*/
|
||||
public int getWidth() throws Exception {
|
||||
if (jpegWidth < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
return jpegWidth;
|
||||
@Deprecated
|
||||
public void setJPEGImage(byte[] jpegImage, int imageSize) throws Exception {
|
||||
setSourceImage(jpegImage, imageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the JPEG image associated with this decompressor
|
||||
* instance.
|
||||
* 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.
|
||||
*
|
||||
* @return the height of the JPEG image associated with this decompressor
|
||||
* instance
|
||||
* @param srcImage {@link YUVImage} instance containing a YUV planar image to
|
||||
* be decoded
|
||||
*/
|
||||
public int getHeight() throws Exception {
|
||||
if (jpegHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
return jpegHeight;
|
||||
public void setSourceImage(YUVImage srcImage) throws Exception {
|
||||
if (srcImage == null)
|
||||
throw new Exception("Invalid argument in setSourceImage()");
|
||||
yuvImage = srcImage;
|
||||
jpegBuf = null;
|
||||
jpegBufSize = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the level of chrominance subsampling used in the JPEG image
|
||||
* associated with this decompressor instance. See {@link TJ TJ.SAMP_*}.
|
||||
*
|
||||
* @return the level of chrominance subsampling used in the JPEG image
|
||||
* associated with this decompressor instance
|
||||
*/
|
||||
public int getSubsamp() throws Exception {
|
||||
if (jpegSubsamp < 0)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (jpegSubsamp >= TJ.NUMSAMP)
|
||||
throw new Exception("JPEG header information is invalid");
|
||||
return jpegSubsamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the colorspace used in the JPEG image associated with this
|
||||
* decompressor instance. See {@link TJ TJ.CS_*}.
|
||||
* Returns the width of the source image (JPEG or YUV) associated with this
|
||||
* decompressor instance.
|
||||
*
|
||||
* @return the colorspace used in the JPEG image associated with this
|
||||
* @return the width of the source image (JPEG or YUV) associated with this
|
||||
* decompressor instance
|
||||
*/
|
||||
public int getColorspace() throws Exception {
|
||||
if (jpegColorspace < 0)
|
||||
public int getWidth() throws Exception {
|
||||
if (yuvImage != null)
|
||||
return yuvImage.getWidth();
|
||||
if (srcWidth < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (jpegColorspace >= TJ.NUMCS)
|
||||
throw new Exception("JPEG header information is invalid");
|
||||
return jpegColorspace;
|
||||
return srcWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the JPEG image buffer associated with this decompressor instance.
|
||||
* Returns the height of the source image (JPEG or YUV) associated with this
|
||||
* decompressor instance.
|
||||
*
|
||||
* @return the JPEG image buffer associated with this decompressor instance
|
||||
* @return the height of the source image (JPEG or YUV) associated with this
|
||||
* decompressor instance
|
||||
*/
|
||||
public int getHeight() throws Exception {
|
||||
if (yuvImage != null)
|
||||
return yuvImage.getHeight();
|
||||
if (srcHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
return srcHeight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the level of chrominance subsampling used in the source image
|
||||
* (JPEG or YUV) associated with this decompressor instance. See
|
||||
* {@link TJ#SAMP_444 TJ.SAMP_*}.
|
||||
*
|
||||
* @return the level of chrominance subsampling used in the source image
|
||||
* (JPEG or YUV) associated with this decompressor instance
|
||||
*/
|
||||
public int getSubsamp() throws Exception {
|
||||
if (yuvImage != null)
|
||||
return yuvImage.getSubsamp();
|
||||
if (srcSubsamp < 0)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (srcSubsamp >= TJ.NUMSAMP)
|
||||
throw new Exception("JPEG header information is invalid");
|
||||
return srcSubsamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the colorspace used in the source image (JPEG or YUV) associated
|
||||
* with this decompressor instance. See {@link TJ#CS_RGB TJ.CS_*}. If the
|
||||
* source image is YUV, then this always returns {@link TJ#CS_YCbCr}.
|
||||
*
|
||||
* @return the colorspace used in the source image (JPEG or YUV) associated
|
||||
* with this decompressor instance
|
||||
*/
|
||||
public int getColorspace() throws Exception {
|
||||
if (yuvImage != null)
|
||||
return TJ.CS_YCbCr;
|
||||
if (srcColorspace < 0)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (srcColorspace >= TJ.NUMCS)
|
||||
throw new Exception("JPEG header information is invalid");
|
||||
return srcColorspace;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the source image buffer associated with this decompressor
|
||||
* instance.
|
||||
*
|
||||
* @return the source image buffer associated with this decompressor instance
|
||||
*/
|
||||
public byte[] getSourceBuf() throws Exception {
|
||||
if (yuvImage != null)
|
||||
return yuvImage.getBuf();
|
||||
if (jpegBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
return jpegBuf;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #getSourceBuf} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public byte[] getJPEGBuf() throws Exception {
|
||||
if (jpegBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
@@ -157,18 +220,29 @@ public class TJDecompressor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the size of the JPEG image (in bytes) associated with this
|
||||
* Returns the size of the source image (in bytes) associated with this
|
||||
* decompressor instance.
|
||||
*
|
||||
* @return the size of the JPEG image (in bytes) associated with this
|
||||
* @return the size of the source image (in bytes) associated with this
|
||||
* decompressor instance
|
||||
*/
|
||||
public int getJPEGSize() throws Exception {
|
||||
public int getSourceSize() throws Exception {
|
||||
if (yuvImage != null)
|
||||
return yuvImage.getSize();
|
||||
if (jpegBufSize < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
return jpegBufSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #getSourceSize} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public int getJPEGSize() throws Exception {
|
||||
if (jpegBufSize < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
return jpegBufSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the largest scaled-down image that the TurboJPEG
|
||||
@@ -191,19 +265,19 @@ public class TJDecompressor {
|
||||
*/
|
||||
public int getScaledWidth(int desiredWidth, int desiredHeight)
|
||||
throws Exception {
|
||||
if (jpegWidth < 1 || jpegHeight < 1)
|
||||
if (srcWidth < 1 || srcHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (desiredWidth < 0 || desiredHeight < 0)
|
||||
throw new Exception("Invalid argument in getScaledWidth()");
|
||||
TJScalingFactor[] sf = TJ.getScalingFactors();
|
||||
if (desiredWidth == 0)
|
||||
desiredWidth = jpegWidth;
|
||||
desiredWidth = srcWidth;
|
||||
if (desiredHeight == 0)
|
||||
desiredHeight = jpegHeight;
|
||||
int scaledWidth = jpegWidth, scaledHeight = jpegHeight;
|
||||
desiredHeight = srcHeight;
|
||||
int scaledWidth = srcWidth, scaledHeight = srcHeight;
|
||||
for (int i = 0; i < sf.length; i++) {
|
||||
scaledWidth = sf[i].getScaled(jpegWidth);
|
||||
scaledHeight = sf[i].getScaled(jpegHeight);
|
||||
scaledWidth = sf[i].getScaled(srcWidth);
|
||||
scaledHeight = sf[i].getScaled(srcHeight);
|
||||
if (scaledWidth <= desiredWidth && scaledHeight <= desiredHeight)
|
||||
break;
|
||||
}
|
||||
@@ -233,19 +307,19 @@ public class TJDecompressor {
|
||||
*/
|
||||
public int getScaledHeight(int desiredWidth, int desiredHeight)
|
||||
throws Exception {
|
||||
if (jpegWidth < 1 || jpegHeight < 1)
|
||||
if (srcWidth < 1 || srcHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (desiredWidth < 0 || desiredHeight < 0)
|
||||
throw new Exception("Invalid argument in getScaledHeight()");
|
||||
TJScalingFactor[] sf = TJ.getScalingFactors();
|
||||
if (desiredWidth == 0)
|
||||
desiredWidth = jpegWidth;
|
||||
desiredWidth = srcWidth;
|
||||
if (desiredHeight == 0)
|
||||
desiredHeight = jpegHeight;
|
||||
int scaledWidth = jpegWidth, scaledHeight = jpegHeight;
|
||||
desiredHeight = srcHeight;
|
||||
int scaledWidth = srcWidth, scaledHeight = srcHeight;
|
||||
for (int i = 0; i < sf.length; i++) {
|
||||
scaledWidth = sf[i].getScaled(jpegWidth);
|
||||
scaledHeight = sf[i].getScaled(jpegHeight);
|
||||
scaledWidth = sf[i].getScaled(srcWidth);
|
||||
scaledHeight = sf[i].getScaled(srcHeight);
|
||||
if (scaledWidth <= desiredWidth && scaledHeight <= desiredHeight)
|
||||
break;
|
||||
}
|
||||
@@ -255,73 +329,90 @@ public class TJDecompressor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image associated with this decompressor
|
||||
* instance and output a decompressed image to the given destination buffer.
|
||||
* Decompress the JPEG source image or decode the YUV source image associated
|
||||
* with this decompressor instance and output a grayscale, RGB, or CMYK image
|
||||
* to the given destination buffer.
|
||||
*
|
||||
* @param dstBuf buffer that will receive the decompressed image. This
|
||||
* buffer should normally be <code>pitch * scaledHeight</code> bytes in size,
|
||||
* where <code>scaledHeight</code> can be determined by calling <code>
|
||||
* @param dstBuf buffer that will receive the decompressed/decoded image.
|
||||
* If the source image is a JPEG image, then this buffer should normally be
|
||||
* <code>pitch * scaledHeight</code> bytes in size, where
|
||||
* <code>scaledHeight</code> can be determined by calling <code>
|
||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegHeight)
|
||||
* </code> with one of the scaling factors returned from {@link
|
||||
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. However,
|
||||
* the buffer may also be larger than the dimensions of the JPEG image, in
|
||||
* which case the <code>x</code>, <code>y</code>, and <code>pitch</code>
|
||||
* parameters can be used to specify the region into which the JPEG image
|
||||
* should be decompressed.
|
||||
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. If the
|
||||
* source image is a YUV image, then this buffer should normally be
|
||||
* <code>pitch * height</code> bytes in size, where <code>height</code> is
|
||||
* the height of the YUV image. However, the buffer may also be larger than
|
||||
* the dimensions of the source image, in which case the <code>x</code>,
|
||||
* <code>y</code>, and <code>pitch</code> parameters can be used to specify
|
||||
* the region into which the source image should be decompressed/decoded.
|
||||
*
|
||||
* @param x x offset (in pixels) of the region into which the JPEG image
|
||||
* should be decompressed, relative to the start of <code>dstBuf</code>.
|
||||
* @param x x offset (in pixels) of the region in the destination image into
|
||||
* which the source image should be decompressed/decoded
|
||||
*
|
||||
* @param y y offset (in pixels) of the region into which the JPEG image
|
||||
* should be decompressed, relative to the start of <code>dstBuf</code>.
|
||||
* @param y y offset (in pixels) of the region in the destination image into
|
||||
* which the source image should be decompressed/decoded
|
||||
*
|
||||
* @param desiredWidth desired width (in pixels) of the decompressed image
|
||||
* (or image region.) If the desired image dimensions are different than the
|
||||
* dimensions of the JPEG image being decompressed, then TurboJPEG will use
|
||||
* scaling in the JPEG decompressor to generate the largest possible image
|
||||
* that will fit within the desired dimensions. Setting this to 0 is the
|
||||
* same as setting it to the width of the JPEG image (in other words, the
|
||||
* width will not be considered when determining the scaled image size.)
|
||||
* @param desiredWidth If the source image is a JPEG image, then this
|
||||
* specifies the desired width (in pixels) of the decompressed image (or
|
||||
* image region.) If the desired destination image dimensions are different
|
||||
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||
* JPEG decompressor to generate the largest possible image that will fit
|
||||
* within the desired dimensions. Setting this to 0 is the same as setting
|
||||
* it to the width of the JPEG image (in other words, the width will not be
|
||||
* considered when determining the scaled image size.) This parameter is
|
||||
* ignored if the source image is a YUV image.
|
||||
*
|
||||
* @param pitch bytes per line of the destination image. Normally, this
|
||||
* should be set to <code>scaledWidth * TJ.pixelSize(pixelFormat)</code> if
|
||||
* the decompressed image is unpadded, but you can use this to, for instance,
|
||||
* pad each line of the decompressed image to a 4-byte boundary or to
|
||||
* decompress the JPEG image into a region of a larger image. NOTE:
|
||||
* <code>scaledWidth</code> can be determined by calling <code>
|
||||
* the destination image is unpadded, but you can use this to, for instance,
|
||||
* pad each line of the destination image to a 4-byte boundary or to
|
||||
* decompress/decode the source image into a region of a larger image. NOTE:
|
||||
* if the source image is a JPEG image, then <code>scaledWidth</code> can be
|
||||
* determined by calling <code>
|
||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegWidth)
|
||||
* </code> or by calling {@link #getScaledWidth}. Setting this parameter to
|
||||
* 0 is the equivalent of setting it to <code>scaledWidth *
|
||||
* TJ.pixelSize(pixelFormat)</code>.
|
||||
* </code> or by calling {@link #getScaledWidth}. If the source image is a
|
||||
* YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
||||
* Setting this parameter to 0 is the equivalent of setting it to
|
||||
* <code>scaledWidth * TJ.pixelSize(pixelFormat)</code>.
|
||||
*
|
||||
* @param desiredHeight desired height (in pixels) of the decompressed image
|
||||
* (or image region.) If the desired image dimensions are different than the
|
||||
* dimensions of the JPEG image being decompressed, then TurboJPEG will use
|
||||
* scaling in the JPEG decompressor to generate the largest possible image
|
||||
* that will fit within the desired dimensions. Setting this to 0 is the
|
||||
* same as setting it to the height of the JPEG image (in other words, the
|
||||
* height will not be considered when determining the scaled image size.)
|
||||
* @param desiredHeight If the source image is a JPEG image, then this
|
||||
* specifies the desired height (in pixels) of the decompressed image (or
|
||||
* image region.) If the desired destination image dimensions are different
|
||||
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||
* JPEG decompressor to generate the largest possible image that will fit
|
||||
* within the desired dimensions. Setting this to 0 is the same as setting
|
||||
* it to the height of the JPEG image (in other words, the height will not be
|
||||
* considered when determining the scaled image size.) This parameter is
|
||||
* ignored if the source image is a YUV image.
|
||||
*
|
||||
* @param pixelFormat pixel format of the decompressed image (one of
|
||||
* {@link TJ TJ.PF_*})
|
||||
* @param pixelFormat pixel format of the decompressed/decoded image (one of
|
||||
* {@link TJ#PF_RGB TJ.PF_*})
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*/
|
||||
public void decompress(byte[] dstBuf, int x, int y, int desiredWidth,
|
||||
int pitch, int desiredHeight, int pixelFormat,
|
||||
int flags) throws Exception {
|
||||
if (jpegBuf == null)
|
||||
if (jpegBuf == null && yuvImage == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (dstBuf == null || x < 0 || y < 0 || desiredWidth < 0 || pitch < 0 ||
|
||||
desiredHeight < 0 || pixelFormat < 0 || pixelFormat >= TJ.NUMPF ||
|
||||
flags < 0)
|
||||
if (dstBuf == null || x < 0 || y < 0 || pitch < 0 ||
|
||||
(yuvImage != null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||
throw new Exception("Invalid argument in decompress()");
|
||||
if (x > 0 || y > 0)
|
||||
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, pitch,
|
||||
desiredHeight, pixelFormat, flags);
|
||||
else
|
||||
decompress(jpegBuf, jpegBufSize, dstBuf, desiredWidth, pitch,
|
||||
desiredHeight, pixelFormat, flags);
|
||||
if (yuvImage != null)
|
||||
decodeYUV(yuvImage.getBuf(), yuvImage.getPad(), yuvImage.getSubsamp(),
|
||||
dstBuf, x, y, yuvImage.getWidth(), pitch, yuvImage.getHeight(),
|
||||
pixelFormat, flags);
|
||||
else {
|
||||
if (x > 0 || y > 0)
|
||||
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, pitch,
|
||||
desiredHeight, pixelFormat, flags);
|
||||
else
|
||||
decompress(jpegBuf, jpegBufSize, dstBuf, desiredWidth, pitch,
|
||||
desiredHeight, pixelFormat, flags);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -353,15 +444,17 @@ public class TJDecompressor {
|
||||
* for description
|
||||
*
|
||||
* @param pixelFormat pixel format of the decompressed image (one of
|
||||
* {@link TJ TJ.PF_*})
|
||||
* {@link TJ#PF_RGB TJ.PF_*})
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return a buffer containing the decompressed image
|
||||
*/
|
||||
public byte[] decompress(int desiredWidth, int pitch, int desiredHeight,
|
||||
int pixelFormat, int flags) throws Exception {
|
||||
if (desiredWidth < 0 || pitch < 0 || desiredHeight < 0 ||
|
||||
if (pitch < 0 ||
|
||||
(yuvImage == null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||
throw new Exception("Invalid argument in decompress()");
|
||||
int pixelSize = TJ.getPixelSize(pixelFormat);
|
||||
@@ -376,22 +469,60 @@ public class TJDecompressor {
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image associated with this decompressor
|
||||
* instance and output a YUV planar image to the given destination buffer.
|
||||
* This method performs JPEG decompression but leaves out the color
|
||||
* conversion step, so a planar YUV image is generated instead of an RGB
|
||||
* image. The padding of the planes in this image is the same as in the
|
||||
* images generated by {@link TJCompressor#encodeYUV(byte[], int)}. Note
|
||||
* that, if the width or height of the image is not an even multiple of the
|
||||
* MCU block size (see {@link TJ#getMCUWidth} and {@link TJ#getMCUHeight}),
|
||||
* then an intermediate buffer copy will be performed within TurboJPEG.
|
||||
* <p>
|
||||
* NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the
|
||||
* convention of the digital video community, the TurboJPEG API uses "YUV" to
|
||||
* refer to an image format consisting of Y, Cb, and Cr image planes.
|
||||
* instance into a YUV planar image and store it in the given
|
||||
* <code>YUVImage</code> instance. This method performs JPEG decompression
|
||||
* but leaves out the color conversion step, so a planar YUV image is
|
||||
* generated instead of an RGB or grayscale image. This method cannot be
|
||||
* used to decompress JPEG source images with the CMYK or YCCK colorspace.
|
||||
*
|
||||
* @param dstBuf buffer that will receive the YUV planar image. Use
|
||||
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
|
||||
* based on the image width, height, and level of chrominance subsampling.
|
||||
* @param dstImage {@link YUVImage} instance that will receive the YUV planar
|
||||
* image. The level of subsampling specified in this <code>YUVImage</code>
|
||||
* instance must match that of the JPEG image, and the width and height
|
||||
* specified in the <code>YUVImage</code> instance must match one of the
|
||||
* scaled image sizes that TurboJPEG is capable of generating from the JPEG
|
||||
* source image.
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*/
|
||||
public void decompressToYUV(YUVImage dstImage, int flags) throws Exception {
|
||||
if (jpegBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (dstImage == null || flags < 0)
|
||||
throw new Exception("Invalid argument in decompressToYUV()");
|
||||
int scaledWidth = getScaledWidth(dstImage.getWidth(),
|
||||
dstImage.getHeight());
|
||||
int scaledHeight = getScaledHeight(dstImage.getWidth(),
|
||||
dstImage.getHeight());
|
||||
if (scaledWidth != dstImage.getWidth() ||
|
||||
scaledHeight != dstImage.getHeight())
|
||||
throw new Exception("YUVImage dimensions do not match one of the scaled image sizes that TurboJPEG is capable of generating.");
|
||||
if (srcSubsamp != dstImage.getSubsamp())
|
||||
throw new Exception("YUVImage subsampling level does not match that of the JPEG image");
|
||||
|
||||
decompressToYUV(jpegBuf, jpegBufSize, dstImage.getBuf(),
|
||||
dstImage.getWidth(), dstImage.getPad(),
|
||||
dstImage.getHeight(), flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #decompressToYUV(YUVImage, int)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void decompressToYUV(byte[] dstBuf, int flags) throws Exception {
|
||||
YUVImage dstImage = new YUVImage(dstBuf, srcWidth, 4, srcHeight,
|
||||
srcSubsamp);
|
||||
decompressToYUV(dstImage, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image associated with this decompressor
|
||||
* instance into a YUV planar image and return a <code>YUVImage</code>
|
||||
* instance containing the decompressed image. This method performs JPEG
|
||||
* decompression but leaves out the color conversion step, so a planar YUV
|
||||
* image is generated instead of an RGB or grayscale image. This method
|
||||
* cannot be used to decompress JPEG source images with the CMYK or YCCK
|
||||
* colorspace.
|
||||
*
|
||||
* @param desiredWidth desired width (in pixels) of the YUV image. If the
|
||||
* desired image dimensions are different than the dimensions of the JPEG
|
||||
@@ -413,60 +544,28 @@ public class TJDecompressor {
|
||||
* the height of the JPEG image (in other words, the height will not be
|
||||
* considered when determining the scaled image size.)
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return a YUV planar image
|
||||
*/
|
||||
public void decompressToYUV(byte[] dstBuf, int desiredWidth, int pad,
|
||||
int desiredHeight, int flags) throws Exception {
|
||||
if (jpegBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (dstBuf == null || desiredWidth < 0 || pad < 1 ||
|
||||
((pad & (pad - 1)) != 0) || desiredHeight < 0 || flags < 0)
|
||||
throw new Exception("Invalid argument in decompressToYUV()");
|
||||
decompressToYUV(jpegBuf, jpegBufSize, dstBuf, desiredWidth, pad,
|
||||
desiredHeight, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #decompressToYUV(byte[], int, int, int, int)}
|
||||
* instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void decompressToYUV(byte[] dstBuf, int flags) throws Exception {
|
||||
decompressToYUV(dstBuf, 0, 4, 0, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image associated with this decompressor
|
||||
* instance and return a buffer containing a YUV planar image. See {@link
|
||||
* #decompressToYUV(byte[], int, int, int, int)} for more detail.
|
||||
*
|
||||
* @param desiredWidth see
|
||||
* {@link #decompressToYUV(byte[], int, int, int, int)} for description
|
||||
*
|
||||
* @param pad see {@link #decompressToYUV(byte[], int, int, int, int)} for
|
||||
* description
|
||||
*
|
||||
* @param desiredHeight see {@link
|
||||
* #decompressToYUV(byte[], int, int, int, int)} for description
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
*
|
||||
* @return a buffer containing a YUV planar image
|
||||
*/
|
||||
public byte[] decompressToYUV(int desiredWidth, int pad, int desiredHeight,
|
||||
int flags) throws Exception {
|
||||
public YUVImage decompressToYUV(int desiredWidth, int pad, int desiredHeight,
|
||||
int flags) throws Exception {
|
||||
if (flags < 0)
|
||||
throw new Exception("Invalid argument in decompressToYUV()");
|
||||
if (jpegWidth < 1 || jpegHeight < 1 || jpegSubsamp < 0)
|
||||
if (srcWidth < 1 || srcHeight < 1 || srcSubsamp < 0)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (jpegSubsamp >= TJ.NUMSAMP)
|
||||
if (srcSubsamp >= TJ.NUMSAMP)
|
||||
throw new Exception("JPEG header information is invalid");
|
||||
if (yuvImage != null)
|
||||
throw new Exception("Source image is the wrong type");
|
||||
|
||||
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||
byte[] buf = new byte[TJ.bufSizeYUV(scaledWidth, pad, scaledHeight,
|
||||
jpegSubsamp)];
|
||||
decompressToYUV(buf, desiredWidth, pad, desiredHeight, flags);
|
||||
return buf;
|
||||
YUVImage yuvImage = new YUVImage(scaledWidth, pad, scaledHeight,
|
||||
srcSubsamp);
|
||||
decompressToYUV(yuvImage, flags);
|
||||
return yuvImage;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -474,91 +573,126 @@ public class TJDecompressor {
|
||||
*/
|
||||
@Deprecated
|
||||
public byte[] decompressToYUV(int flags) throws Exception {
|
||||
return decompressToYUV(0, 4, 0, flags);
|
||||
YUVImage dstImage = new YUVImage(srcWidth, 4, srcHeight, srcSubsamp);
|
||||
decompressToYUV(dstImage, flags);
|
||||
return dstImage.getBuf();
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image associated with this decompressor
|
||||
* instance and output a decompressed image to the given destination buffer.
|
||||
* Decompress the JPEG source image or decode the YUV source image associated
|
||||
* with this decompressor instance and output a grayscale, RGB, or CMYK image
|
||||
* to the given destination buffer.
|
||||
*
|
||||
* @param dstBuf buffer that will receive the decompressed image. This
|
||||
* buffer should normally be <code>stride * scaledHeight</code> pixels in
|
||||
* size, where <code>scaledHeight</code> can be determined by calling <code>
|
||||
* @param dstBuf buffer that will receive the decompressed/decoded image.
|
||||
* If the source image is a JPEG image, then this buffer should normally be
|
||||
* <code>stride * scaledHeight</code> pixels in size, where
|
||||
* <code>scaledHeight</code> can be determined by calling <code>
|
||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegHeight)
|
||||
* </code> with one of the scaling factors returned from {@link
|
||||
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. However,
|
||||
* the buffer may also be larger than the dimensions of the JPEG image, in
|
||||
* which case the <code>x</code>, <code>y</code>, and <code>stride</code>
|
||||
* parameters can be used to specify the region into which the JPEG image
|
||||
* should be decompressed.
|
||||
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. If the
|
||||
* source image is a YUV image, then this buffer should normally be
|
||||
* <code>stride * height</code> pixels in size, where <code>height</code> is
|
||||
* the height of the YUV image. However, the buffer may also be larger than
|
||||
* the dimensions of the JPEG image, in which case the <code>x</code>,
|
||||
* <code>y</code>, and <code>stride</code> parameters can be used to specify
|
||||
* the region into which the source image should be decompressed.
|
||||
*
|
||||
* @param x x offset (in pixels) of the region into which the JPEG image
|
||||
* should be decompressed, relative to the start of <code>dstBuf</code>.
|
||||
* @param x x offset (in pixels) of the region in the destination image into
|
||||
* which the source image should be decompressed/decoded
|
||||
*
|
||||
* @param y y offset (in pixels) of the region into which the JPEG image
|
||||
* should be decompressed, relative to the start of <code>dstBuf</code>.
|
||||
* @param y y offset (in pixels) of the region in the destination image into
|
||||
* which the source image should be decompressed/decoded
|
||||
*
|
||||
* @param desiredWidth desired width (in pixels) of the decompressed image
|
||||
* (or image region.) If the desired image dimensions are different than the
|
||||
* dimensions of the JPEG image being decompressed, then TurboJPEG will use
|
||||
* scaling in the JPEG decompressor to generate the largest possible image
|
||||
* that will fit within the desired dimensions. Setting this to 0 is the
|
||||
* same as setting it to the width of the JPEG image (in other words, the
|
||||
* width will not be considered when determining the scaled image size.)
|
||||
* @param desiredWidth If the source image is a JPEG image, then this
|
||||
* specifies the desired width (in pixels) of the decompressed image (or
|
||||
* image region.) If the desired destination image dimensions are different
|
||||
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||
* JPEG decompressor to generate the largest possible image that will fit
|
||||
* within the desired dimensions. Setting this to 0 is the same as setting
|
||||
* it to the width of the JPEG image (in other words, the width will not be
|
||||
* considered when determining the scaled image size.) This parameter is
|
||||
* ignored if the source image is a YUV image.
|
||||
*
|
||||
* @param stride pixels per line of the destination image. Normally, this
|
||||
* should be set to <code>scaledWidth</code>, but you can use this to, for
|
||||
* instance, decompress the JPEG image into a region of a larger image.
|
||||
* NOTE: <code>scaledWidth</code> can be determined by calling <code>
|
||||
* NOTE: if the source image is a JPEG image, then <code>scaledWidth</code>
|
||||
* can be determined by calling <code>
|
||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegWidth)
|
||||
* </code> or by calling {@link #getScaledWidth}. Setting this parameter to
|
||||
* 0 is the equivalent of setting it to <code>scaledWidth</code>.
|
||||
* </code> or by calling {@link #getScaledWidth}. If the source image is a
|
||||
* YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
||||
* Setting this parameter to 0 is the equivalent of setting it to
|
||||
* <code>scaledWidth</code>.
|
||||
*
|
||||
* @param desiredHeight desired height (in pixels) of the decompressed image
|
||||
* (or image region.) If the desired image dimensions are different than the
|
||||
* dimensions of the JPEG image being decompressed, then TurboJPEG will use
|
||||
* scaling in the JPEG decompressor to generate the largest possible image
|
||||
* that will fit within the desired dimensions. Setting this to 0 is the
|
||||
* same as setting it to the height of the JPEG image (in other words, the
|
||||
* height will not be considered when determining the scaled image size.)
|
||||
* @param desiredHeight If the source image is a JPEG image, then this
|
||||
* specifies the desired height (in pixels) of the decompressed image (or
|
||||
* image region.) If the desired destination image dimensions are different
|
||||
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||
* JPEG decompressor to generate the largest possible image that will fit
|
||||
* within the desired dimensions. Setting this to 0 is the same as setting
|
||||
* it to the height of the JPEG image (in other words, the height will not be
|
||||
* considered when determining the scaled image size.) This parameter is
|
||||
* ignored if the source image is a YUV image.
|
||||
*
|
||||
* @param pixelFormat pixel format of the decompressed image (one of
|
||||
* {@link TJ TJ.PF_*})
|
||||
* {@link TJ#PF_RGB TJ.PF_*})
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*/
|
||||
public void decompress(int[] dstBuf, int x, int y, int desiredWidth,
|
||||
int stride, int desiredHeight, int pixelFormat,
|
||||
int flags) throws Exception {
|
||||
if (jpegBuf == null)
|
||||
if (jpegBuf == null && yuvImage == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (dstBuf == null || x < 0 || y < 0 || desiredWidth < 0 || stride < 0 ||
|
||||
desiredHeight < 0 || pixelFormat < 0 || pixelFormat >= TJ.NUMPF ||
|
||||
flags < 0)
|
||||
if (dstBuf == null || x < 0 || y < 0 || stride < 0 ||
|
||||
(yuvImage != null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||
throw new Exception("Invalid argument in decompress()");
|
||||
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, stride,
|
||||
desiredHeight, pixelFormat, flags);
|
||||
if (yuvImage != null)
|
||||
decodeYUV(yuvImage.getBuf(), yuvImage.getPad(), yuvImage.getSubsamp(),
|
||||
dstBuf, x, y, yuvImage.getWidth(), stride,
|
||||
yuvImage.getHeight(), pixelFormat, flags);
|
||||
else
|
||||
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, stride,
|
||||
desiredHeight, pixelFormat, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image associated with this decompressor
|
||||
* instance and output a decompressed image to the given
|
||||
* <code>BufferedImage</code> instance.
|
||||
* Decompress the JPEG source image or decode the YUV source image associated
|
||||
* with this decompressor instance and output a decompressed/decoded image to
|
||||
* the given <code>BufferedImage</code> instance.
|
||||
*
|
||||
* @param dstImage a <code>BufferedImage</code> instance that will receive
|
||||
* the decompressed image
|
||||
* the decompressed/decoded image. If the source image is a JPEG image, then
|
||||
* the width and height of the <code>BufferedImage</code> instance must match
|
||||
* one of the scaled image sizes that TurboJPEG is capable of generating from
|
||||
* the JPEG image. If the source image is a YUV image, then the width and
|
||||
* height of the <code>BufferedImage</code> instance must match the width and
|
||||
* height of the YUV image.
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*/
|
||||
public void decompress(BufferedImage dstImage, int flags) throws Exception {
|
||||
if (dstImage == null || flags < 0)
|
||||
throw new Exception("Invalid argument in decompress()");
|
||||
int desiredWidth = dstImage.getWidth();
|
||||
int desiredHeight = dstImage.getHeight();
|
||||
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||
if (scaledWidth != desiredWidth || scaledHeight != desiredHeight)
|
||||
throw new Exception("BufferedImage dimensions do not match a scaled image size that TurboJPEG is capable of generating.");
|
||||
int scaledWidth, scaledHeight;
|
||||
|
||||
if (yuvImage != null) {
|
||||
if (desiredWidth != yuvImage.getWidth() ||
|
||||
desiredHeight != yuvImage.getHeight())
|
||||
throw new Exception("BufferedImage dimensions do not match the dimensions of the source image.");
|
||||
scaledWidth = yuvImage.getWidth();
|
||||
scaledHeight = yuvImage.getHeight();
|
||||
} else {
|
||||
scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||
scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||
if (scaledWidth != desiredWidth || scaledHeight != desiredHeight)
|
||||
throw new Exception("BufferedImage dimensions do not match one of the scaled image sizes that TurboJPEG is capable of generating.");
|
||||
}
|
||||
int pixelFormat; boolean intPixels = false;
|
||||
if (byteOrder == null)
|
||||
byteOrder = ByteOrder.nativeOrder();
|
||||
@@ -599,10 +733,16 @@ public class TJDecompressor {
|
||||
int stride = sm.getScanlineStride();
|
||||
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
||||
int[] buf = db.getData();
|
||||
if (jpegBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
decompress(jpegBuf, jpegBufSize, buf, scaledWidth, stride, scaledHeight,
|
||||
pixelFormat, flags);
|
||||
if (yuvImage != null)
|
||||
decodeYUV(yuvImage.getBuf(), yuvImage.getPad(), yuvImage.getSubsamp(),
|
||||
buf, 0, 0, yuvImage.getWidth(), stride, yuvImage.getHeight(),
|
||||
pixelFormat, flags);
|
||||
else {
|
||||
if (jpegBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
decompress(jpegBuf, jpegBufSize, buf, 0, 0, scaledWidth, stride,
|
||||
scaledHeight, pixelFormat, flags);
|
||||
}
|
||||
} else {
|
||||
ComponentSampleModel sm =
|
||||
(ComponentSampleModel)dstImage.getSampleModel();
|
||||
@@ -612,14 +752,15 @@ public class TJDecompressor {
|
||||
int pitch = sm.getScanlineStride();
|
||||
DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
|
||||
byte[] buf = db.getData();
|
||||
decompress(buf, scaledWidth, pitch, scaledHeight, pixelFormat, flags);
|
||||
decompress(buf, 0, 0, scaledWidth, pitch, scaledHeight, pixelFormat,
|
||||
flags);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image associated with this decompressor
|
||||
* instance and return a <code>BufferedImage</code> instance containing the
|
||||
* decompressed image.
|
||||
* Decompress the JPEG source image or decode the YUV source image associated
|
||||
* with this decompressor instance and return a <code>BufferedImage</code>
|
||||
* instance containing the decompressed/decoded image.
|
||||
*
|
||||
* @param desiredWidth see
|
||||
* {@link #decompress(byte[], int, int, int, int, int, int, int)} for
|
||||
@@ -629,19 +770,21 @@ public class TJDecompressor {
|
||||
* {@link #decompress(byte[], int, int, int, int, int, int, int)} for
|
||||
* description
|
||||
*
|
||||
* @param bufferedImageType the image type of the newly-created
|
||||
* <code>BufferedImage</code> instance (for instance,
|
||||
* @param bufferedImageType the image type of the <code>BufferedImage</code>
|
||||
* instance that will be created (for instance,
|
||||
* <code>BufferedImage.TYPE_INT_RGB</code>)
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return a <code>BufferedImage</code> instance containing the
|
||||
* decompressed image
|
||||
* decompressed/decoded image
|
||||
*/
|
||||
public BufferedImage decompress(int desiredWidth, int desiredHeight,
|
||||
int bufferedImageType, int flags)
|
||||
throws Exception {
|
||||
if (desiredWidth < 0 || desiredHeight < 0 || flags < 0)
|
||||
if ((yuvImage == null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||
flags < 0)
|
||||
throw new Exception("Invalid argument in decompress()");
|
||||
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||
@@ -696,6 +839,14 @@ public class TJDecompressor {
|
||||
private native void decompressToYUV(byte[] srcBuf, int size, byte[] dstBuf,
|
||||
int desiredWidth, int pad, int desiredheight, int flags) throws Exception;
|
||||
|
||||
private native void decodeYUV(byte[] srcBuf, int pad, int subsamp,
|
||||
byte[] dstBuf, int x, int y, int width, int pitch, int height,
|
||||
int pixelFormat, int flags) throws Exception;
|
||||
|
||||
private native void decodeYUV(byte[] srcBuf, int pad, int subsamp,
|
||||
int[] dstBuf, int x, int y, int width, int stride, int height,
|
||||
int pixelFormat, int flags) throws Exception;
|
||||
|
||||
static {
|
||||
TJLoader.load();
|
||||
}
|
||||
@@ -703,9 +854,10 @@ public class TJDecompressor {
|
||||
protected long handle = 0;
|
||||
protected byte[] jpegBuf = null;
|
||||
protected int jpegBufSize = 0;
|
||||
protected int jpegWidth = 0;
|
||||
protected int jpegHeight = 0;
|
||||
protected int jpegSubsamp = -1;
|
||||
protected int jpegColorspace = -1;
|
||||
protected YUVImage yuvImage = null;
|
||||
protected int srcWidth = 0;
|
||||
protected int srcHeight = 0;
|
||||
protected int srcSubsamp = -1;
|
||||
protected int srcColorspace = -1;
|
||||
private ByteOrder byteOrder = null;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2011, 2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011, 2013-2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -42,20 +42,20 @@ public class TJTransformer extends TJDecompressor {
|
||||
|
||||
/**
|
||||
* Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
* image stored in <code>jpegImage</code> with the newly-created instance.
|
||||
* image stored in <code>jpegImage</code> with the newly created instance.
|
||||
*
|
||||
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
||||
* be the length of the array)
|
||||
*/
|
||||
public TJTransformer(byte[] jpegImage) throws Exception {
|
||||
init();
|
||||
setJPEGImage(jpegImage, jpegImage.length);
|
||||
setSourceImage(jpegImage, jpegImage.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* <code>jpegImage</code> with the newly created instance.
|
||||
*
|
||||
* @param jpegImage JPEG image buffer
|
||||
*
|
||||
@@ -63,7 +63,7 @@ public class TJTransformer extends TJDecompressor {
|
||||
*/
|
||||
public TJTransformer(byte[] jpegImage, int imageSize) throws Exception {
|
||||
init();
|
||||
setJPEGImage(jpegImage, imageSize);
|
||||
setSourceImage(jpegImage, imageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,13 +84,14 @@ public class TJTransformer extends TJDecompressor {
|
||||
* receive a JPEG image that has been transformed using the parameters in
|
||||
* <code>transforms[i]</code>. Use {@link TJ#bufSize} to determine the
|
||||
* maximum size for each buffer based on the transformed or cropped width and
|
||||
* height.
|
||||
* height and the level of subsampling used in the source image.
|
||||
*
|
||||
* @param transforms an array of {@link TJTransform} instances, each of
|
||||
* which specifies the transform parameters and/or cropping region for the
|
||||
* corresponding transformed output image
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*/
|
||||
public void transform(byte[][] dstBufs, TJTransform[] transforms,
|
||||
int flags) throws Exception {
|
||||
@@ -112,20 +113,21 @@ public class TJTransformer extends TJDecompressor {
|
||||
* @return an array of {@link TJDecompressor} instances, each of
|
||||
* which has a transformed JPEG image associated with it
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of {@link TJ TJ.FLAG_*}
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*/
|
||||
public TJDecompressor[] transform(TJTransform[] transforms, int flags)
|
||||
throws Exception {
|
||||
byte[][] dstBufs = new byte[transforms.length][];
|
||||
if (jpegWidth < 1 || jpegHeight < 1)
|
||||
if (srcWidth < 1 || srcHeight < 1)
|
||||
throw new Exception("JPEG buffer not initialized");
|
||||
for (int i = 0; i < transforms.length; i++) {
|
||||
int w = jpegWidth, h = jpegHeight;
|
||||
int w = srcWidth, h = srcHeight;
|
||||
if ((transforms[i].options & TJTransform.OPT_CROP) != 0) {
|
||||
if (transforms[i].width != 0) w = transforms[i].width;
|
||||
if (transforms[i].height != 0) h = transforms[i].height;
|
||||
}
|
||||
dstBufs[i] = new byte[TJ.bufSize(w, h, jpegSubsamp)];
|
||||
dstBufs[i] = new byte[TJ.bufSize(w, h, srcSubsamp)];
|
||||
}
|
||||
TJDecompressor[] tjd = new TJDecompressor[transforms.length];
|
||||
transform(dstBufs, transforms, flags);
|
||||
@@ -135,11 +137,11 @@ public class TJTransformer extends TJDecompressor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array containing the sizes of the transformed JPEG images from
|
||||
* the most recent call to {@link #transform transform()}.
|
||||
* Returns an array containing the sizes of the transformed JPEG images
|
||||
* generated by the most recent transform operation.
|
||||
*
|
||||
* @return an array containing the sizes of the transformed JPEG images from
|
||||
* the most recent call to {@link #transform transform()}
|
||||
* @return an array containing the sizes of the transformed JPEG images
|
||||
* generated by the most recent transform operation
|
||||
*/
|
||||
public int[] getTransformedSizes() throws Exception {
|
||||
if (transformedSizes == null)
|
||||
|
||||
213
java/org/libjpegturbo/turbojpeg/YUVImage.java
Normal file
213
java/org/libjpegturbo/turbojpeg/YUVImage.java
Normal file
@@ -0,0 +1,213 @@
|
||||
/*
|
||||
* Copyright (C)2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* - Neither the name of the libjpeg-turbo Project nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.libjpegturbo.turbojpeg;
|
||||
|
||||
/**
|
||||
* This class encapsulates a YUV planar image buffer and the metadata
|
||||
* associated with it. The TurboJPEG API allows both the JPEG compression and
|
||||
* decompression pipelines to be split into stages: YUV encode, compress from
|
||||
* YUV, decompress to YUV, and YUV decode. A <code>YUVImage</code> instance
|
||||
* serves as the destination image for YUV encode and decompress-to-YUV
|
||||
* operations and as the source image for compress-from-YUV and YUV decode
|
||||
* operations.
|
||||
* <p>
|
||||
* Technically, the JPEG format uses the YCbCr colorspace (which technically is
|
||||
* not a "colorspace" but rather a "color transform"), but per the convention
|
||||
* of the digital video community, the TurboJPEG API uses "YUV" to refer to an
|
||||
* image format consisting of Y, Cb, and Cr image planes. In this image
|
||||
* format, the Y, Cb (U), and Cr (V) planes are stored sequentially in the same
|
||||
* image buffer, and the size of each plane is determined by the image width,
|
||||
* height, line padding, and level of chrominance subsampling. If the
|
||||
* chrominance components are subsampled along the horizontal dimension, then
|
||||
* the width of the luminance plane would be padded to the nearest multiple of
|
||||
* 2 (same goes for the height of the luminance plane, if the chrominance
|
||||
* components are subsampled along the vertical dimension.) For instance, if
|
||||
* the source image is 35 x 35 pixels and 4:2:2 subsampling is used, then the
|
||||
* luminance plane would be 36 x 35 bytes, and each of the chrominance planes
|
||||
* would be 18 x 35 bytes. If you specify, for instance, a line padding of 4
|
||||
* bytes on top of this, then the luminance plane would be 36 x 35 bytes, and
|
||||
* each of the chrominance planes would be 20 x 35 bytes.
|
||||
*/
|
||||
public class YUVImage {
|
||||
|
||||
private static final String NO_ASSOC_ERROR =
|
||||
"No YUV buffer is associated with this instance";
|
||||
|
||||
/**
|
||||
* Create a <code>YUVImage</code> instance with a new image buffer.
|
||||
*
|
||||
* @param width width (in pixels) of the YUV image
|
||||
*
|
||||
* @param pad Each line of each plane in the YUV image buffer will be padded
|
||||
* to this number of bytes (must be a power of 2.)
|
||||
*
|
||||
* @param height height (in pixels) of the YUV image
|
||||
*
|
||||
* @param subsamp the level of chrominance subsampling to be used in the YUV
|
||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||
*/
|
||||
public YUVImage(int width, int pad, int height, int subsamp)
|
||||
throws Exception {
|
||||
setBuf(new byte[TJ.bufSizeYUV(width, pad, height, subsamp)], width, pad,
|
||||
height, subsamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>YUVImage</code> instance from an existing YUV planar image
|
||||
* buffer.
|
||||
*
|
||||
* @param yuvImage image buffer that contains or will contain YUV planar
|
||||
* image data. See {@link YUVImage above} for a description of the image
|
||||
* format. Use {@link TJ#bufSizeYUV} to determine the minimum size for this
|
||||
* buffer.
|
||||
*
|
||||
* @param width width (in pixels) of the YUV image
|
||||
*
|
||||
* @param pad 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.
|
||||
*
|
||||
* @param height height (in pixels) of the YUV image
|
||||
*
|
||||
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||
*/
|
||||
public YUVImage(byte[] yuvImage, int width, int pad, int height,
|
||||
int subsamp) throws Exception {
|
||||
setBuf(yuvImage, width, pad, height, subsamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign an existing YUV planar image buffer to this <code>YUVImage</code>
|
||||
* instance.
|
||||
*
|
||||
* @param yuvImage image buffer that contains or will contain YUV planar
|
||||
* image data. See {@link YUVImage above} for a description of the image
|
||||
* format. Use {@link TJ#bufSizeYUV} to determine the minimum size for this
|
||||
* buffer.
|
||||
*
|
||||
* @param width width (in pixels) of the YUV image
|
||||
*
|
||||
* @param pad 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.
|
||||
*
|
||||
* @param height height (in pixels) of the YUV image
|
||||
*
|
||||
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||
*/
|
||||
public void setBuf(byte[] yuvImage, int width, int pad, int height,
|
||||
int subsamp) throws Exception {
|
||||
if (yuvImage == null || width < 1 || pad < 1 || ((pad & (pad - 1)) != 0) ||
|
||||
height < 1 || subsamp < 0 || subsamp >= TJ.NUMSAMP)
|
||||
throw new Exception("Invalid argument in YUVImage()");
|
||||
if (yuvImage.length < TJ.bufSizeYUV(width, pad, height, subsamp))
|
||||
throw new Exception("YUV image buffer is not large enough");
|
||||
yuvBuf = yuvImage;
|
||||
yuvWidth = width;
|
||||
yuvPad = pad;
|
||||
yuvHeight = height;
|
||||
yuvSubsamp = subsamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the YUV image.
|
||||
*
|
||||
* @return the width of the YUV image
|
||||
*/
|
||||
public int getWidth() throws Exception {
|
||||
if (yuvWidth < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
return yuvWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the YUV image.
|
||||
*
|
||||
* @return the height of the YUV image
|
||||
*/
|
||||
public int getHeight() throws Exception {
|
||||
if (yuvHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
return yuvHeight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the line padding used in the YUV image buffer.
|
||||
*
|
||||
* @return the line padding used in the YUV image buffer
|
||||
*/
|
||||
public int getPad() throws Exception {
|
||||
if (yuvPad < 1 || ((yuvPad & (yuvPad - 1)) != 0))
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
return yuvPad;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the level of chrominance subsampling used in the YUV image. See
|
||||
* {@link TJ#SAMP_444 TJ.SAMP_*}.
|
||||
*
|
||||
* @return the level of chrominance subsampling used in the YUV image
|
||||
*/
|
||||
public int getSubsamp() throws Exception {
|
||||
if (yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
return yuvSubsamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the YUV image buffer
|
||||
*
|
||||
* @return the YUV image buffer
|
||||
*/
|
||||
public byte[] getBuf() throws Exception {
|
||||
if (yuvBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
return yuvBuf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the size (in bytes) of the YUV image buffer
|
||||
*
|
||||
* @return the size (in bytes) of the YUV image buffer
|
||||
*/
|
||||
public int getSize() throws Exception {
|
||||
if (yuvBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
return TJ.bufSizeYUV(yuvWidth, yuvPad, yuvHeight, yuvSubsamp);
|
||||
}
|
||||
|
||||
protected long handle = 0;
|
||||
protected byte[] yuvBuf = null;
|
||||
protected int yuvPad = 0;
|
||||
protected int yuvWidth = 0;
|
||||
protected int yuvHeight = 0;
|
||||
protected int yuvSubsamp = -1;
|
||||
};
|
||||
@@ -74,10 +74,10 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___
|
||||
/*
|
||||
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
||||
* Method: encodeYUV
|
||||
* Signature: ([BIIII[BIII)V
|
||||
* Signature: ([BIIIIII[BIII)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIII_3BIII
|
||||
(JNIEnv *, jobject, jbyteArray, jint, jint, jint, jint, jbyteArray, jint, jint, jint);
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIIIII_3BIII
|
||||
(JNIEnv *, jobject, jbyteArray, jint, jint, jint, jint, jint, jint, jbyteArray, jint, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
||||
@@ -90,10 +90,10 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___
|
||||
/*
|
||||
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
||||
* Method: encodeYUV
|
||||
* Signature: ([IIIII[BIII)V
|
||||
* Signature: ([IIIIIII[BIII)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIII_3BIII
|
||||
(JNIEnv *, jobject, jintArray, jint, jint, jint, jint, jbyteArray, jint, jint, jint);
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIIIII_3BIII
|
||||
(JNIEnv *, jobject, jintArray, jint, jint, jint, jint, jint, jint, jbyteArray, jint, jint, jint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -79,6 +79,22 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV___3BI_3BIIII
|
||||
(JNIEnv *, jobject, jbyteArray, jint, jbyteArray, jint, jint, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: org_libjpegturbo_turbojpeg_TJDecompressor
|
||||
* Method: decodeYUV
|
||||
* Signature: ([BII[BIIIIIII)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3BII_3BIIIIIII
|
||||
(JNIEnv *, jobject, jbyteArray, jint, jint, jbyteArray, jint, jint, jint, jint, jint, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: org_libjpegturbo_turbojpeg_TJDecompressor
|
||||
* Method: decodeYUV
|
||||
* Signature: ([BII[IIIIIIII)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3BII_3IIIIIIII
|
||||
(JNIEnv *, jobject, jbyteArray, jint, jint, jintArray, jint, jint, jint, jint, jint, jint, jint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
34
jchuff.c
34
jchuff.c
@@ -22,8 +22,36 @@
|
||||
#include "jchuff.h" /* Declarations shared with jcphuff.c */
|
||||
#include <limits.h>
|
||||
|
||||
/*
|
||||
* NOTE: If USE_CLZ_INTRINSIC is defined, then clz/bsr instructions will be
|
||||
* used for bit counting rather than the lookup table. This will reduce the
|
||||
* memory footprint by 64k, which is important for some mobile applications
|
||||
* that create many isolated instances of libjpeg-turbo (web browsers, for
|
||||
* instance.) This may improve performance on some mobile platforms as well.
|
||||
* This feature is enabled by default only on ARM processors, because some x86
|
||||
* chips have a slow implementation of bsr, and the use of clz/bsr cannot be
|
||||
* shown to have a significant performance impact even on the x86 chips that
|
||||
* have a fast implementation of it. When building for ARMv6, you can
|
||||
* explicitly disable the use of clz/bsr by adding -mthumb to the compiler
|
||||
* flags (this defines __thumb__).
|
||||
*/
|
||||
|
||||
/* NOTE: Both GCC and Clang define __GNUC__ */
|
||||
#if defined __GNUC__ && defined __arm__
|
||||
#if !defined __thumb__ || defined __thumb2__
|
||||
#define USE_CLZ_INTRINSIC
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_CLZ_INTRINSIC
|
||||
#define JPEG_NBITS_NONZERO(x) (32 - __builtin_clz(x))
|
||||
#define JPEG_NBITS(x) (x ? JPEG_NBITS_NONZERO(x) : 0)
|
||||
#else
|
||||
static unsigned char jpeg_nbits_table[65536];
|
||||
static int jpeg_nbits_table_init = 0;
|
||||
#define JPEG_NBITS(x) (jpeg_nbits_table[x])
|
||||
#define JPEG_NBITS_NONZERO(x) JPEG_NBITS(x)
|
||||
#endif
|
||||
|
||||
#ifndef min
|
||||
#define min(a,b) ((a)<(b)?(a):(b))
|
||||
@@ -272,6 +300,7 @@ jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
|
||||
dtbl->ehufsi[i] = huffsize[p];
|
||||
}
|
||||
|
||||
#ifndef USE_CLZ_INTRINSIC
|
||||
if(!jpeg_nbits_table_init) {
|
||||
for(i = 0; i < 65536; i++) {
|
||||
int nbits = 0, temp = i;
|
||||
@@ -280,6 +309,7 @@ jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
|
||||
}
|
||||
jpeg_nbits_table_init = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -482,7 +512,7 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
|
||||
temp2 += temp3;
|
||||
|
||||
/* Find the number of bits needed for the magnitude of the coefficient */
|
||||
nbits = jpeg_nbits_table[temp];
|
||||
nbits = JPEG_NBITS(temp);
|
||||
|
||||
/* Emit the Huffman-coded symbol for the number of bits */
|
||||
code = dctbl->ehufco[nbits];
|
||||
@@ -516,7 +546,7 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
|
||||
temp ^= temp3; \
|
||||
temp -= temp3; \
|
||||
temp2 += temp3; \
|
||||
nbits = jpeg_nbits_table[temp]; \
|
||||
nbits = JPEG_NBITS_NONZERO(temp); \
|
||||
/* if run length > 15, must emit special run-length-16 codes (0xF0) */ \
|
||||
while (r > 15) { \
|
||||
EMIT_BITS(code_0xf0, size_0xf0) \
|
||||
|
||||
113
jcparam.c
113
jcparam.c
@@ -18,6 +18,7 @@
|
||||
#define JPEG_INTERNALS
|
||||
#include "jinclude.h"
|
||||
#include "jpeglib.h"
|
||||
#include "jstdhuff.c"
|
||||
|
||||
|
||||
/*
|
||||
@@ -191,116 +192,6 @@ jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Huffman table setup routines
|
||||
*/
|
||||
|
||||
LOCAL(void)
|
||||
add_huff_table (j_compress_ptr cinfo,
|
||||
JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val)
|
||||
/* Define a Huffman table */
|
||||
{
|
||||
int nsymbols, len;
|
||||
|
||||
if (*htblptr == NULL)
|
||||
*htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
|
||||
|
||||
/* Copy the number-of-symbols-of-each-code-length counts */
|
||||
MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits));
|
||||
|
||||
/* Validate the counts. We do this here mainly so we can copy the right
|
||||
* number of symbols from the val[] array, without risking marching off
|
||||
* the end of memory. jchuff.c will do a more thorough test later.
|
||||
*/
|
||||
nsymbols = 0;
|
||||
for (len = 1; len <= 16; len++)
|
||||
nsymbols += bits[len];
|
||||
if (nsymbols < 1 || nsymbols > 256)
|
||||
ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
|
||||
|
||||
MEMCOPY((*htblptr)->huffval, val, nsymbols * SIZEOF(UINT8));
|
||||
|
||||
/* Initialize sent_table FALSE so table will be written to JPEG file. */
|
||||
(*htblptr)->sent_table = FALSE;
|
||||
}
|
||||
|
||||
|
||||
LOCAL(void)
|
||||
std_huff_tables (j_compress_ptr cinfo)
|
||||
/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */
|
||||
/* IMPORTANT: these are only valid for 8-bit data precision! */
|
||||
{
|
||||
static const UINT8 bits_dc_luminance[17] =
|
||||
{ /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 };
|
||||
static const UINT8 val_dc_luminance[] =
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
|
||||
|
||||
static const UINT8 bits_dc_chrominance[17] =
|
||||
{ /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
|
||||
static const UINT8 val_dc_chrominance[] =
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
|
||||
|
||||
static const UINT8 bits_ac_luminance[17] =
|
||||
{ /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d };
|
||||
static const UINT8 val_ac_luminance[] =
|
||||
{ 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,
|
||||
0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
|
||||
0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,
|
||||
0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0,
|
||||
0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16,
|
||||
0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28,
|
||||
0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
|
||||
0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
|
||||
0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
|
||||
0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
|
||||
0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
|
||||
0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
|
||||
0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
|
||||
0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
|
||||
0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
|
||||
0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5,
|
||||
0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4,
|
||||
0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,
|
||||
0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea,
|
||||
0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
|
||||
0xf9, 0xfa };
|
||||
|
||||
static const UINT8 bits_ac_chrominance[17] =
|
||||
{ /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 };
|
||||
static const UINT8 val_ac_chrominance[] =
|
||||
{ 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,
|
||||
0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
|
||||
0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
|
||||
0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0,
|
||||
0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34,
|
||||
0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38,
|
||||
0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
|
||||
0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
|
||||
0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
|
||||
0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
|
||||
0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
|
||||
0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96,
|
||||
0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5,
|
||||
0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4,
|
||||
0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3,
|
||||
0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2,
|
||||
0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,
|
||||
0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
|
||||
0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
|
||||
0xf9, 0xfa };
|
||||
|
||||
add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[0],
|
||||
bits_dc_luminance, val_dc_luminance);
|
||||
add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[0],
|
||||
bits_ac_luminance, val_ac_luminance);
|
||||
add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[1],
|
||||
bits_dc_chrominance, val_dc_chrominance);
|
||||
add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[1],
|
||||
bits_ac_chrominance, val_ac_chrominance);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Default parameter setup for compression.
|
||||
*
|
||||
@@ -339,7 +230,7 @@ jpeg_set_defaults (j_compress_ptr cinfo)
|
||||
/* Set up two quantization tables using default quality of 75 */
|
||||
jpeg_set_quality(cinfo, 75, TRUE);
|
||||
/* Set up two Huffman tables */
|
||||
std_huff_tables(cinfo);
|
||||
std_huff_tables((j_common_ptr) cinfo);
|
||||
|
||||
/* Initialize default arithmetic coding conditioning */
|
||||
for (i = 0; i < NUM_ARITH_TBLS; i++) {
|
||||
|
||||
@@ -80,7 +80,7 @@ int main(void)
|
||||
jerr.pub.output_message = my_output_message;
|
||||
|
||||
if(setjmp(jerr.jb)) {
|
||||
// this will execute if libjpeg has an error
|
||||
/* this will execute if libjpeg has an error */
|
||||
jcs_valid = 0;
|
||||
goto done;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ int main(void)
|
||||
#endif
|
||||
|
||||
if(setjmp(jerr.jb)) {
|
||||
// this will execute if libjpeg has an error
|
||||
/* this will execute if libjpeg has an error */
|
||||
jcs_alpha_valid = 0;
|
||||
goto done2;
|
||||
}
|
||||
|
||||
7
jdhuff.c
7
jdhuff.c
@@ -21,6 +21,7 @@
|
||||
#include "jpeglib.h"
|
||||
#include "jdhuff.h" /* Declarations shared with jdphuff.c */
|
||||
#include "jpegcomp.h"
|
||||
#include "jstdhuff.c"
|
||||
|
||||
|
||||
/*
|
||||
@@ -795,6 +796,12 @@ jinit_huff_decoder (j_decompress_ptr cinfo)
|
||||
huff_entropy_ptr entropy;
|
||||
int i;
|
||||
|
||||
/* Motion JPEG frames typically do not include the Huffman tables if they
|
||||
are the default tables. Thus, if the tables are not set by the time
|
||||
the Huffman decoder is initialized (usually within the body of
|
||||
jpeg_start_decompress()), we set them to default values. */
|
||||
std_huff_tables((j_common_ptr) cinfo);
|
||||
|
||||
entropy = (huff_entropy_ptr)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(huff_entropy_decoder));
|
||||
|
||||
@@ -478,14 +478,15 @@ get_dht (j_decompress_ptr cinfo)
|
||||
|
||||
if (index & 0x10) { /* AC table definition */
|
||||
index -= 0x10;
|
||||
if (index < 0 || index >= NUM_HUFF_TBLS)
|
||||
ERREXIT1(cinfo, JERR_DHT_INDEX, index);
|
||||
htblptr = &cinfo->ac_huff_tbl_ptrs[index];
|
||||
} else { /* DC table definition */
|
||||
if (index < 0 || index >= NUM_HUFF_TBLS)
|
||||
ERREXIT1(cinfo, JERR_DHT_INDEX, index);
|
||||
htblptr = &cinfo->dc_huff_tbl_ptrs[index];
|
||||
}
|
||||
|
||||
if (index < 0 || index >= NUM_HUFF_TBLS)
|
||||
ERREXIT1(cinfo, JERR_DHT_INDEX, index);
|
||||
|
||||
if (*htblptr == NULL)
|
||||
*htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
|
||||
|
||||
|
||||
@@ -198,6 +198,7 @@ start_pass_phuff_decoder (j_decompress_ptr cinfo)
|
||||
* On some machines, a shift and add will be faster than a table lookup.
|
||||
*/
|
||||
|
||||
#define AVOID_TABLES
|
||||
#ifdef AVOID_TABLES
|
||||
|
||||
#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))
|
||||
|
||||
133
jstdhuff.c
Normal file
133
jstdhuff.c
Normal file
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
* jstdhuff.c
|
||||
*
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2013, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains routines to set the default Huffman tables, if they are
|
||||
* not already set.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Huffman table setup routines
|
||||
*/
|
||||
|
||||
LOCAL(void)
|
||||
add_huff_table (j_common_ptr cinfo,
|
||||
JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val)
|
||||
/* Define a Huffman table */
|
||||
{
|
||||
int nsymbols, len;
|
||||
|
||||
if (*htblptr == NULL)
|
||||
*htblptr = jpeg_alloc_huff_table(cinfo);
|
||||
else
|
||||
return;
|
||||
|
||||
/* Copy the number-of-symbols-of-each-code-length counts */
|
||||
MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits));
|
||||
|
||||
/* Validate the counts. We do this here mainly so we can copy the right
|
||||
* number of symbols from the val[] array, without risking marching off
|
||||
* the end of memory. jchuff.c will do a more thorough test later.
|
||||
*/
|
||||
nsymbols = 0;
|
||||
for (len = 1; len <= 16; len++)
|
||||
nsymbols += bits[len];
|
||||
if (nsymbols < 1 || nsymbols > 256)
|
||||
ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
|
||||
|
||||
MEMCOPY((*htblptr)->huffval, val, nsymbols * SIZEOF(UINT8));
|
||||
|
||||
/* Initialize sent_table FALSE so table will be written to JPEG file. */
|
||||
(*htblptr)->sent_table = FALSE;
|
||||
}
|
||||
|
||||
|
||||
LOCAL(void)
|
||||
std_huff_tables (j_common_ptr cinfo)
|
||||
/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */
|
||||
/* IMPORTANT: these are only valid for 8-bit data precision! */
|
||||
{
|
||||
JHUFF_TBL **dc_huff_tbl_ptrs, **ac_huff_tbl_ptrs;
|
||||
|
||||
static const UINT8 bits_dc_luminance[17] =
|
||||
{ /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 };
|
||||
static const UINT8 val_dc_luminance[] =
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
|
||||
|
||||
static const UINT8 bits_dc_chrominance[17] =
|
||||
{ /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
|
||||
static const UINT8 val_dc_chrominance[] =
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
|
||||
|
||||
static const UINT8 bits_ac_luminance[17] =
|
||||
{ /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d };
|
||||
static const UINT8 val_ac_luminance[] =
|
||||
{ 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,
|
||||
0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
|
||||
0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,
|
||||
0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0,
|
||||
0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16,
|
||||
0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28,
|
||||
0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
|
||||
0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
|
||||
0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
|
||||
0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
|
||||
0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
|
||||
0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
|
||||
0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
|
||||
0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
|
||||
0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
|
||||
0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5,
|
||||
0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4,
|
||||
0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,
|
||||
0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea,
|
||||
0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
|
||||
0xf9, 0xfa };
|
||||
|
||||
static const UINT8 bits_ac_chrominance[17] =
|
||||
{ /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 };
|
||||
static const UINT8 val_ac_chrominance[] =
|
||||
{ 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,
|
||||
0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
|
||||
0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
|
||||
0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0,
|
||||
0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34,
|
||||
0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26,
|
||||
0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38,
|
||||
0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
|
||||
0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
|
||||
0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
|
||||
0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
|
||||
0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
|
||||
0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96,
|
||||
0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5,
|
||||
0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4,
|
||||
0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3,
|
||||
0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2,
|
||||
0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,
|
||||
0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
|
||||
0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
|
||||
0xf9, 0xfa };
|
||||
|
||||
if (cinfo->is_decompressor) {
|
||||
dc_huff_tbl_ptrs = ((j_decompress_ptr)cinfo)->dc_huff_tbl_ptrs;
|
||||
ac_huff_tbl_ptrs = ((j_decompress_ptr)cinfo)->ac_huff_tbl_ptrs;
|
||||
} else {
|
||||
dc_huff_tbl_ptrs = ((j_compress_ptr)cinfo)->dc_huff_tbl_ptrs;
|
||||
ac_huff_tbl_ptrs = ((j_compress_ptr)cinfo)->ac_huff_tbl_ptrs;
|
||||
}
|
||||
|
||||
add_huff_table(cinfo, &dc_huff_tbl_ptrs[0], bits_dc_luminance,
|
||||
val_dc_luminance);
|
||||
add_huff_table(cinfo, &ac_huff_tbl_ptrs[0], bits_ac_luminance,
|
||||
val_ac_luminance);
|
||||
add_huff_table(cinfo, &dc_huff_tbl_ptrs[1], bits_dc_chrominance,
|
||||
val_dc_chrominance);
|
||||
add_huff_table(cinfo, &ac_huff_tbl_ptrs[1], bits_ac_chrominance,
|
||||
val_ac_chrominance);
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding.
|
||||
* Modifications:
|
||||
* Copyright (C) 2010, 2012-2013, D. R. Commander.
|
||||
* Copyright (C) 2010, 2012-2014, D. R. Commander.
|
||||
* mozjpeg Modifications:
|
||||
* Copyright (C) 2014, Mozilla Corporation.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
@@ -30,7 +30,8 @@
|
||||
#define JCOPYRIGHT "Copyright (C) 1991-2012 Thomas G. Lane, Guido Vollbeding\n" \
|
||||
"Copyright (C) 1999-2006 MIYASAKA Masaru\n" \
|
||||
"Copyright (C) 2009 Pierre Ossman for Cendio AB\n" \
|
||||
"Copyright (C) 2009-2013 D. R. Commander\n" \
|
||||
"Copyright (C) 2009-2014 D. R. Commander\n" \
|
||||
"Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies)\n" \
|
||||
"Copyright (C) 2014 Mozilla Corporation\n"
|
||||
|
||||
"Copyright (C) 2014 Mozilla Corporation\n" \
|
||||
"Copyright (C) 2013 MIPS Technologies, Inc.\n" \
|
||||
"Copyright (C) 2013 Linaro Limited"
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IFPkgDescriptionDescription</key>
|
||||
<string>A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs</string>
|
||||
<key>IFPkgDescriptionTitle</key>
|
||||
<string>@PACKAGE_NAME@</string>
|
||||
<key>IFPkgDescriptionVersion</key>
|
||||
<string>@VERSION@</string>
|
||||
</dict>
|
||||
</plist>
|
||||
24
release/Distribution.xml
Normal file
24
release/Distribution.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<installer-gui-script minSpecVersion="1">
|
||||
<title>libjpeg-turbo</title>
|
||||
<welcome file="Welcome.rtf" />
|
||||
<readme file="ReadMe.txt" />
|
||||
<license file="License.rtf" />
|
||||
<domains
|
||||
enable_anywhere="false"
|
||||
enable_currentUserHome="false"
|
||||
enable_localSystem="true"
|
||||
/>
|
||||
<options customize="never" />
|
||||
<choices-outline>
|
||||
<line choice="default">
|
||||
<line choice="com.libjpeg-turbo.libjpeg-turbo"/>
|
||||
</line>
|
||||
</choices-outline>
|
||||
<choice id="default"/>
|
||||
<choice id="com.libjpeg-turbo.libjpeg-turbo" visible="false">
|
||||
<pkg-ref id="com.libjpeg-turbo.libjpeg-turbo"/>
|
||||
</choice>
|
||||
<pkg-ref auth="root"
|
||||
id="com.libjpeg-turbo.libjpeg-turbo">libjpeg-turbo.pkg</pkg-ref>
|
||||
</installer-gui-script>
|
||||
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@VERSION@, The libmozjpeg Project</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.libmozjpeg.libmozjpeg</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@VERSION@</string>
|
||||
<key>IFMajorVersion</key>
|
||||
<integer>1</integer>
|
||||
<key>IFMinorVersion</key>
|
||||
<integer>@BUILD@</integer>
|
||||
<key>IFPkgFlagAllowBackRev</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagAuthorizationAction</key>
|
||||
<string>AdminAuthorization</string>
|
||||
<key>IFPkgFlagBackgroundAlignment</key>
|
||||
<string>topleft</string>
|
||||
<key>IFPkgFlagBackgroundScaling</key>
|
||||
<string>none</string>
|
||||
<key>IFPkgFlagDefaultLocation</key>
|
||||
<string>/</string>
|
||||
<key>IFPkgFlagFollowLinks</key>
|
||||
<true/>
|
||||
<key>IFPkgFlagInstallFat</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagIsRequired</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagOverwritePermissions</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagRelocatable</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagRestartAction</key>
|
||||
<string>NoRestart</string>
|
||||
<key>IFPkgFlagRootVolumeOnly</key>
|
||||
<true/>
|
||||
<key>IFPkgFlagUpdateInstalledLanguages</key>
|
||||
<false/>
|
||||
<key>IFPkgFormatVersion</key>
|
||||
<real>0.10000000149011612</real>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,13 +0,0 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
|
||||
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
\margl1440\margr1440\vieww13560\viewh16600\viewkind0
|
||||
\deftab720
|
||||
\pard\pardeftab720
|
||||
|
||||
\f0\fs24 \cf0 libmozjpeg is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems. On such systems, libmozjpeg is generally 2-4x as fast as libjpeg, all else being equal. On other types of systems, libmozjpeg can still outperform libjpeg by a significant amount, by virtue of its highly-optimized Huffman coding routines. In many cases, the performance of libmozjpeg rivals that of proprietary high-speed JPEG codecs.\
|
||||
\
|
||||
libmozjpeg implements both the traditional libjpeg API as well as the less powerful but more straightforward TurboJPEG API. libmozjpeg also features colorspace extensions that allow it to compress from/decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java interface.\
|
||||
\
|
||||
libmozjpeg was forked from libjpeg-turbo. libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, and in early 2010, libjpeg-turbo spun off into an independent project, with the goal of making high-speed JPEG compression/decompression technology available to a broader range of users and developers.\
|
||||
}
|
||||
5
release/ReadMe.txt
Normal file
5
release/ReadMe.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as fast as libjpeg, all else being equal. On other types of systems, libjpeg-turbo can still outperform libjpeg by a significant amount, by virtue of its highly-optimized Huffman coding routines. In many cases, the performance of libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.
|
||||
|
||||
libjpeg-turbo implements both the traditional libjpeg API as well as the less powerful but more straightforward TurboJPEG API. libjpeg-turbo also features colorspace extensions that allow it to compress from/decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java interface.
|
||||
|
||||
libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, and in early 2010, libjpeg-turbo spun off into an independent project, with the goal of making high-speed JPEG compression/decompression technology available to a broader range of users and developers.
|
||||
@@ -8,7 +8,7 @@
|
||||
%define _datadir %{__datadir}
|
||||
|
||||
# Path under which docs should be installed
|
||||
%define _docdir %{_defaultdocdir}/%{name}-%{version}
|
||||
%define _docdir /usr/share/doc/%{name}-%{version}
|
||||
|
||||
# Path under which headers should be installed
|
||||
%define _includedir %{__includedir}
|
||||
|
||||
@@ -17,19 +17,15 @@ onexit()
|
||||
|
||||
PACKAGE_NAME=@PKGNAME@
|
||||
VERSION=@VERSION@
|
||||
BUILD=@BUILD@
|
||||
SRCDIR=@abs_top_srcdir@
|
||||
RPMARCH=@RPMARCH@
|
||||
PLATFORM=cygwin
|
||||
|
||||
PREFIX=%{__prefix}
|
||||
DOCDIR=%{__docdir}
|
||||
LIBDIR=%{__libdir}
|
||||
|
||||
umask 022
|
||||
if [ "$RPMARCH" = "x86_64" ]; then
|
||||
PLATFORM=cygwin64
|
||||
fi
|
||||
rm -f $PACKAGE_NAME-$VERSION-$PLATFORM.tar.bz2
|
||||
rm -f $PACKAGE_NAME-$VERSION-$BUILD.tar.bz2
|
||||
TMPDIR=`mktemp -d /tmp/ljtbuild.XXXXXX`
|
||||
__PWD=`pwd`
|
||||
make install DESTDIR=$TMPDIR/pkg docdir=/usr/share/doc/$PACKAGE_NAME-$VERSION \
|
||||
@@ -39,7 +35,7 @@ if [ "$PREFIX" = "/opt/libmozjpeg" -a "$DOCDIR" = "/opt/libmozjpeg/doc" ]; then
|
||||
ln -fs /usr/share/doc/$PACKAGE_NAME-$VERSION $TMPDIR/pkg$DOCDIR
|
||||
fi
|
||||
cd $TMPDIR/pkg
|
||||
tar cfj ../$PACKAGE_NAME-$VERSION-$PLATFORM.tar.bz2 *
|
||||
tar cfj ../$PACKAGE_NAME-$VERSION-$BUILD.tar.bz2 *
|
||||
cd $__PWD
|
||||
mv $TMPDIR/*.tar.bz2 .
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ TMPDIR=
|
||||
onexit()
|
||||
{
|
||||
if [ ! "$TMPDIR" = "" ]; then
|
||||
sudo rm -rf $TMPDIR
|
||||
rm -rf $TMPDIR
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -78,7 +78,6 @@ while [ $# -gt 0 ]; do
|
||||
esac
|
||||
shift
|
||||
done
|
||||
PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
|
||||
|
||||
if [ -f $PACKAGE_NAME-$VERSION.dmg ]; then
|
||||
rm -f $PACKAGE_NAME-$VERSION.dmg
|
||||
@@ -245,21 +244,20 @@ if [ "$PREFIX" = "/opt/libmozjpeg" -a "$LIBDIR" = "/opt/libmozjpeg/lib" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
chmod 1775 $PKGROOT/Library
|
||||
chmod 775 $PKGROOT/Library/Documentation
|
||||
mkdir -p $TMPDIR/pkg/Resources
|
||||
mkdir -p $TMPDIR/pkg
|
||||
|
||||
cp pkgscripts/Description.plist $TMPDIR/pkg/
|
||||
cp pkgscripts/Info.plist $TMPDIR/pkg/
|
||||
install -m 755 pkgscripts/uninstall $PKGROOT/$BINDIR/
|
||||
|
||||
sudo chown -R root:admin $PKGROOT
|
||||
cp $SRCDIR/release/License.rtf $SRCDIR/release/Welcome.rtf $SRCDIR/release/ReadMe.rtf $TMPDIR/pkg/Resources/
|
||||
find $PKGROOT -type f | while read file; do xattr -c $file; done
|
||||
|
||||
cp $SRCDIR/release/License.rtf $SRCDIR/release/Welcome.rtf $SRCDIR/release/ReadMe.txt $TMPDIR/pkg/
|
||||
|
||||
mkdir $TMPDIR/dmg
|
||||
$PACKAGEMAKER -build -v -p $TMPDIR/dmg/$PACKAGE_NAME.pkg \
|
||||
-f $PKGROOT -r $TMPDIR/pkg/Resources \
|
||||
-i $TMPDIR/pkg/Info.plist -d $TMPDIR/pkg/Description.plist
|
||||
pkgbuild --root $PKGROOT --version $VERSION.$BUILD \
|
||||
--identifier com.libjpeg-turbo.libjpeg-turbo $TMPDIR/pkg/$PACKAGE_NAME.pkg
|
||||
productbuild --distribution $SRCDIR/release/Distribution.xml \
|
||||
--package-path $TMPDIR/pkg/ --resources $TMPDIR/pkg/ \
|
||||
$TMPDIR/dmg/$PACKAGE_NAME.pkg
|
||||
hdiutil create -fs HFS+ -volname $PACKAGE_NAME-$VERSION \
|
||||
-srcfolder "$TMPDIR/dmg" $TMPDIR/$PACKAGE_NAME-$VERSION.dmg
|
||||
cp $TMPDIR/$PACKAGE_NAME-$VERSION.dmg .
|
||||
|
||||
@@ -58,6 +58,12 @@ libsimd_la_SOURCES = jsimd_arm.c jsimd_arm_neon.S
|
||||
|
||||
endif
|
||||
|
||||
if SIMD_ARM_64
|
||||
|
||||
libsimd_la_SOURCES = jsimd_arm64.c jsimd_arm_neon_64.S
|
||||
|
||||
endif
|
||||
|
||||
if SIMD_MIPSEL
|
||||
|
||||
libsimd_la_SOURCES = jsimd_mips.c jsimd_mips_dspr2_asm.h jsimd_mips_dspr2.S
|
||||
|
||||
586
simd/jsimd_arm64.c
Normal file
586
simd/jsimd_arm64.c
Normal file
@@ -0,0 +1,586 @@
|
||||
/*
|
||||
* jsimd_arm64.c
|
||||
*
|
||||
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
||||
* Copyright 2009-2011, 2013-2014 D. R. Commander
|
||||
*
|
||||
* Based on the x86 SIMD extension for IJG JPEG library,
|
||||
* Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||
* For conditions of distribution and use, see copyright notice in jsimdext.inc
|
||||
*
|
||||
* This file contains the interface between the "normal" portions
|
||||
* of the library and the SIMD implementations when running on
|
||||
* ARM architecture.
|
||||
*
|
||||
* Based on the stubs from 'jsimd_none.c'
|
||||
*/
|
||||
|
||||
#define JPEG_INTERNALS
|
||||
#include "../jinclude.h"
|
||||
#include "../jpeglib.h"
|
||||
#include "../jsimd.h"
|
||||
#include "../jdct.h"
|
||||
#include "../jsimddct.h"
|
||||
#include "jsimd.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
static unsigned int simd_support = ~0;
|
||||
|
||||
#if defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)
|
||||
|
||||
#define SOMEWHAT_SANE_PROC_CPUINFO_SIZE_LIMIT (1024 * 1024)
|
||||
|
||||
LOCAL(int)
|
||||
check_feature (char *buffer, char *feature)
|
||||
{
|
||||
char *p;
|
||||
if (*feature == 0)
|
||||
return 0;
|
||||
if (strncmp(buffer, "Features", 8) != 0)
|
||||
return 0;
|
||||
buffer += 8;
|
||||
while (isspace(*buffer))
|
||||
buffer++;
|
||||
|
||||
/* Check if 'feature' is present in the buffer as a separate word */
|
||||
while ((p = strstr(buffer, feature))) {
|
||||
if (p > buffer && !isspace(*(p - 1))) {
|
||||
buffer++;
|
||||
continue;
|
||||
}
|
||||
p += strlen(feature);
|
||||
if (*p != 0 && !isspace(*p)) {
|
||||
buffer++;
|
||||
continue;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LOCAL(int)
|
||||
parse_proc_cpuinfo (int bufsize)
|
||||
{
|
||||
char *buffer = (char *)malloc(bufsize);
|
||||
FILE *fd;
|
||||
simd_support = 0;
|
||||
|
||||
if (!buffer)
|
||||
return 0;
|
||||
|
||||
fd = fopen("/proc/cpuinfo", "r");
|
||||
if (fd) {
|
||||
while (fgets(buffer, bufsize, fd)) {
|
||||
if (!strchr(buffer, '\n') && !feof(fd)) {
|
||||
/* "impossible" happened - insufficient size of the buffer! */
|
||||
fclose(fd);
|
||||
free(buffer);
|
||||
return 0;
|
||||
}
|
||||
if (check_feature(buffer, "neon"))
|
||||
simd_support |= JSIMD_ARM_NEON;
|
||||
}
|
||||
fclose(fd);
|
||||
}
|
||||
free(buffer);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check what SIMD accelerations are supported.
|
||||
*
|
||||
* FIXME: This code is racy under a multi-threaded environment.
|
||||
*/
|
||||
LOCAL(void)
|
||||
init_simd (void)
|
||||
{
|
||||
char *env = NULL;
|
||||
#if !defined(__ARM_NEON__) && defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)
|
||||
int bufsize = 1024; /* an initial guess for the line buffer size limit */
|
||||
#endif
|
||||
|
||||
if (simd_support != ~0U)
|
||||
return;
|
||||
|
||||
simd_support = 0;
|
||||
|
||||
#if defined(__ARM_NEON__)
|
||||
simd_support |= JSIMD_ARM_NEON;
|
||||
#elif defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)
|
||||
/* We still have a chance to use NEON regardless of globally used
|
||||
* -mcpu/-mfpu options passed to gcc by performing runtime detection via
|
||||
* /proc/cpuinfo parsing on linux/android */
|
||||
while (!parse_proc_cpuinfo(bufsize)) {
|
||||
bufsize *= 2;
|
||||
if (bufsize > SOMEWHAT_SANE_PROC_CPUINFO_SIZE_LIMIT)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Force different settings through environment variables */
|
||||
env = getenv("JSIMD_FORCENEON");
|
||||
if ((env != NULL) && (strcmp(env, "1") == 0))
|
||||
simd_support &= JSIMD_ARM_NEON;
|
||||
env = getenv("JSIMD_FORCENONE");
|
||||
if ((env != NULL) && (strcmp(env, "1") == 0))
|
||||
simd_support = 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_rgb_ycc (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_rgb_gray (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_ycc_rgb (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
/* The code is optimised for these values only */
|
||||
if (BITS_IN_JSAMPLE != 8)
|
||||
return 0;
|
||||
if (sizeof(JDIMENSION) != 4)
|
||||
return 0;
|
||||
if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4))
|
||||
return 0;
|
||||
if (simd_support & JSIMD_ARM_NEON)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_rgb_ycc_convert (j_compress_ptr cinfo,
|
||||
JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
|
||||
JDIMENSION output_row, int num_rows)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_rgb_gray_convert (j_compress_ptr cinfo,
|
||||
JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
|
||||
JDIMENSION output_row, int num_rows)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_ycc_rgb_convert (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf, JDIMENSION input_row,
|
||||
JSAMPARRAY output_buf, int num_rows)
|
||||
{
|
||||
void (*neonfct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int);
|
||||
|
||||
switch(cinfo->out_color_space)
|
||||
{
|
||||
case JCS_EXT_RGB:
|
||||
neonfct=jsimd_ycc_extrgb_convert_neon;
|
||||
break;
|
||||
case JCS_EXT_RGBX:
|
||||
case JCS_EXT_RGBA:
|
||||
neonfct=jsimd_ycc_extrgbx_convert_neon;
|
||||
break;
|
||||
case JCS_EXT_BGR:
|
||||
neonfct=jsimd_ycc_extbgr_convert_neon;
|
||||
break;
|
||||
case JCS_EXT_BGRX:
|
||||
case JCS_EXT_BGRA:
|
||||
neonfct=jsimd_ycc_extbgrx_convert_neon;
|
||||
break;
|
||||
case JCS_EXT_XBGR:
|
||||
case JCS_EXT_ABGR:
|
||||
neonfct=jsimd_ycc_extxbgr_convert_neon;
|
||||
break;
|
||||
case JCS_EXT_XRGB:
|
||||
case JCS_EXT_ARGB:
|
||||
neonfct=jsimd_ycc_extxrgb_convert_neon;
|
||||
break;
|
||||
default:
|
||||
neonfct=jsimd_ycc_extrgb_convert_neon;
|
||||
break;
|
||||
}
|
||||
|
||||
if (simd_support & JSIMD_ARM_NEON)
|
||||
neonfct(cinfo->output_width, input_buf,
|
||||
input_row, output_buf, num_rows);
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_h2v2_downsample (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_h2v1_downsample (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY output_data)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY output_data)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_h2v2_upsample (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_h2v1_upsample (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_h2v2_upsample (j_decompress_ptr cinfo,
|
||||
jpeg_component_info * compptr,
|
||||
JSAMPARRAY input_data,
|
||||
JSAMPARRAY * output_data_ptr)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_h2v1_upsample (j_decompress_ptr cinfo,
|
||||
jpeg_component_info * compptr,
|
||||
JSAMPARRAY input_data,
|
||||
JSAMPARRAY * output_data_ptr)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_h2v2_fancy_upsample (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_h2v1_fancy_upsample (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_h2v2_fancy_upsample (j_decompress_ptr cinfo,
|
||||
jpeg_component_info * compptr,
|
||||
JSAMPARRAY input_data,
|
||||
JSAMPARRAY * output_data_ptr)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_h2v1_fancy_upsample (j_decompress_ptr cinfo,
|
||||
jpeg_component_info * compptr,
|
||||
JSAMPARRAY input_data,
|
||||
JSAMPARRAY * output_data_ptr)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_h2v2_merged_upsample (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_h2v1_merged_upsample (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_h2v2_merged_upsample (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf,
|
||||
JDIMENSION in_row_group_ctr,
|
||||
JSAMPARRAY output_buf)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_h2v1_merged_upsample (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf,
|
||||
JDIMENSION in_row_group_ctr,
|
||||
JSAMPARRAY output_buf)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_convsamp (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_convsamp_float (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_convsamp (JSAMPARRAY sample_data, JDIMENSION start_col,
|
||||
DCTELEM * workspace)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_convsamp_float (JSAMPARRAY sample_data, JDIMENSION start_col,
|
||||
FAST_FLOAT * workspace)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_fdct_islow (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_fdct_ifast (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_fdct_float (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_fdct_islow (DCTELEM * data)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_fdct_ifast (DCTELEM * data)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_fdct_float (FAST_FLOAT * data)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_quantize (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_quantize_float (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_quantize (JCOEFPTR coef_block, DCTELEM * divisors,
|
||||
DCTELEM * workspace)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_quantize_float (JCOEFPTR coef_block, FAST_FLOAT * divisors,
|
||||
FAST_FLOAT * workspace)
|
||||
{
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_idct_2x2 (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
/* The code is optimised for these values only */
|
||||
if (DCTSIZE != 8)
|
||||
return 0;
|
||||
if (sizeof(JCOEF) != 2)
|
||||
return 0;
|
||||
if (BITS_IN_JSAMPLE != 8)
|
||||
return 0;
|
||||
if (sizeof(JDIMENSION) != 4)
|
||||
return 0;
|
||||
if (sizeof(ISLOW_MULT_TYPE) != 2)
|
||||
return 0;
|
||||
|
||||
if ((simd_support & JSIMD_ARM_NEON))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_idct_4x4 (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
/* The code is optimised for these values only */
|
||||
if (DCTSIZE != 8)
|
||||
return 0;
|
||||
if (sizeof(JCOEF) != 2)
|
||||
return 0;
|
||||
if (BITS_IN_JSAMPLE != 8)
|
||||
return 0;
|
||||
if (sizeof(JDIMENSION) != 4)
|
||||
return 0;
|
||||
if (sizeof(ISLOW_MULT_TYPE) != 2)
|
||||
return 0;
|
||||
|
||||
if ((simd_support & JSIMD_ARM_NEON))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf,
|
||||
JDIMENSION output_col)
|
||||
{
|
||||
if ((simd_support & JSIMD_ARM_NEON))
|
||||
jsimd_idct_2x2_neon(compptr->dct_table, coef_block, output_buf, output_col);
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf,
|
||||
JDIMENSION output_col)
|
||||
{
|
||||
if ((simd_support & JSIMD_ARM_NEON))
|
||||
jsimd_idct_4x4_neon(compptr->dct_table, coef_block, output_buf, output_col);
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_idct_islow (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
/* The code is optimised for these values only */
|
||||
if (DCTSIZE != 8)
|
||||
return 0;
|
||||
if (sizeof(JCOEF) != 2)
|
||||
return 0;
|
||||
if (BITS_IN_JSAMPLE != 8)
|
||||
return 0;
|
||||
if (sizeof(JDIMENSION) != 4)
|
||||
return 0;
|
||||
if (sizeof(ISLOW_MULT_TYPE) != 2)
|
||||
return 0;
|
||||
|
||||
if (simd_support & JSIMD_ARM_NEON)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_idct_ifast (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
/* The code is optimised for these values only */
|
||||
if (DCTSIZE != 8)
|
||||
return 0;
|
||||
if (sizeof(JCOEF) != 2)
|
||||
return 0;
|
||||
if (BITS_IN_JSAMPLE != 8)
|
||||
return 0;
|
||||
if (sizeof(JDIMENSION) != 4)
|
||||
return 0;
|
||||
if (sizeof(IFAST_MULT_TYPE) != 2)
|
||||
return 0;
|
||||
if (IFAST_SCALE_BITS != 2)
|
||||
return 0;
|
||||
|
||||
if ((simd_support & JSIMD_ARM_NEON))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
jsimd_can_idct_float (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf,
|
||||
JDIMENSION output_col)
|
||||
{
|
||||
if ((simd_support & JSIMD_ARM_NEON))
|
||||
jsimd_idct_islow_neon(compptr->dct_table, coef_block, output_buf, output_col);
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf,
|
||||
JDIMENSION output_col)
|
||||
{
|
||||
if ((simd_support & JSIMD_ARM_NEON))
|
||||
jsimd_idct_ifast_neon(compptr->dct_table, coef_block, output_buf, output_col);
|
||||
}
|
||||
|
||||
GLOBAL(void)
|
||||
jsimd_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JCOEFPTR coef_block, JSAMPARRAY output_buf,
|
||||
JDIMENSION output_col)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* ARM NEON optimizations for libjpeg-turbo
|
||||
* ARMv7 NEON optimizations for libjpeg-turbo
|
||||
*
|
||||
* Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
* All rights reserved.
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
#define RESPECT_STRICT_ALIGNMENT 1
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* Supplementary macro for setting function attributes */
|
||||
@@ -62,6 +63,7 @@ _\fname:
|
||||
vtrn.32 \x1, \x3
|
||||
.endm
|
||||
|
||||
|
||||
#define CENTERJSAMPLE 128
|
||||
|
||||
/*****************************************************************************/
|
||||
@@ -670,6 +672,7 @@ asm_function jsimd_idct_islow_neon
|
||||
.unreq ROW7R
|
||||
.endfunc
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
@@ -894,6 +897,7 @@ asm_function jsimd_idct_ifast_neon
|
||||
.unreq TMP4
|
||||
.endfunc
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
@@ -1108,6 +1112,7 @@ asm_function jsimd_idct_4x4_neon
|
||||
|
||||
.purgem idct_helper
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
@@ -1262,6 +1267,7 @@ asm_function jsimd_idct_2x2_neon
|
||||
|
||||
.purgem idct_helper
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
@@ -1561,6 +1567,7 @@ generate_jsimd_ycc_rgb_convert_neon extxrgb, 32, 1, 2, 3
|
||||
.purgem do_load
|
||||
.purgem do_store
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
@@ -1871,6 +1878,7 @@ generate_jsimd_rgb_ycc_convert_neon extxrgb, 32, 1, 2, 3
|
||||
.purgem do_load
|
||||
.purgem do_store
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
@@ -1934,6 +1942,7 @@ asm_function jsimd_convsamp_neon
|
||||
.unreq TMP4
|
||||
.endfunc
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
@@ -2057,6 +2066,7 @@ asm_function jsimd_fdct_ifast_neon
|
||||
.unreq TMP
|
||||
.endfunc
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
@@ -2158,6 +2168,7 @@ asm_function jsimd_quantize_neon
|
||||
.unreq LOOP_COUNT
|
||||
.endfunc
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
1832
simd/jsimd_arm_neon_64.S
Normal file
1832
simd/jsimd_arm_neon_64.S
Normal file
File diff suppressed because it is too large
Load Diff
507
tjbench.c
507
tjbench.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2009-2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2009-2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -45,9 +45,8 @@
|
||||
#define _throwtj(m) _throw(m, tjGetErrorStr())
|
||||
#define _throwbmp(m) _throw(m, bmpgeterr())
|
||||
|
||||
enum {YUVENCODE=1, YUVDECODE, YUVCOMPRESS};
|
||||
int flags=TJFLAG_NOREALLOC, componly=0, decomponly=0, yuv=0, quiet=0, dotile=0,
|
||||
pf=TJPF_BGR, yuvpad=1;
|
||||
int flags=TJFLAG_NOREALLOC, componly=0, decomponly=0, doyuv=0, quiet=0,
|
||||
dotile=0, pf=TJPF_BGR, yuvpad=1, warmup=1;
|
||||
char *ext="ppm";
|
||||
const char *pixFormatStr[TJ_NUMPF]=
|
||||
{
|
||||
@@ -102,21 +101,20 @@ int dummyDCTFilter(short *coeffs, tjregion arrayRegion, tjregion planeRegion,
|
||||
|
||||
|
||||
/* Decompression test */
|
||||
int decomptest(unsigned char *srcbuf, unsigned char **jpegbuf,
|
||||
int decomp(unsigned char *srcbuf, unsigned char **jpegbuf,
|
||||
unsigned long *jpegsize, unsigned char *dstbuf, int w, int h,
|
||||
int subsamp, int jpegqual, char *filename, int tilew, int tileh)
|
||||
{
|
||||
char tempstr[1024], sizestr[20]="\0", qualstr[6]="\0", *ptr;
|
||||
FILE *file=NULL; tjhandle handle=NULL;
|
||||
int row, col, i, dstbufalloc=0, retval=0;
|
||||
double start, elapsed;
|
||||
int row, col, iter=0, dstbufalloc=0, retval=0;
|
||||
double elapsed, elapsedDecode;
|
||||
int ps=tjPixelSize[pf];
|
||||
int scaledw=TJSCALED(w, sf);
|
||||
int scaledh=TJSCALED(h, sf);
|
||||
int yuvsize=tjBufSizeYUV2(scaledw, yuvpad, scaledh, subsamp), bufsize;
|
||||
int pitch=scaledw*ps;
|
||||
int ntilesw=(w+tilew-1)/tilew, ntilesh=(h+tileh-1)/tileh;
|
||||
unsigned char *dstptr, *dstptr2;
|
||||
unsigned char *dstptr, *dstptr2, *yuvbuf=NULL;
|
||||
|
||||
if(jpegqual>0)
|
||||
{
|
||||
@@ -127,64 +125,93 @@ int decomptest(unsigned char *srcbuf, unsigned char **jpegbuf,
|
||||
if((handle=tjInitDecompress())==NULL)
|
||||
_throwtj("executing tjInitDecompress()");
|
||||
|
||||
bufsize=(yuv==YUVDECODE? yuvsize:pitch*scaledh);
|
||||
if(dstbuf==NULL)
|
||||
{
|
||||
if((dstbuf=(unsigned char *)malloc(bufsize)) == NULL)
|
||||
_throwunix("allocating image buffer");
|
||||
if((dstbuf=(unsigned char *)malloc(pitch*scaledh))==NULL)
|
||||
_throwunix("allocating destination buffer");
|
||||
dstbufalloc=1;
|
||||
}
|
||||
/* Set the destination buffer to gray so we know whether the decompressor
|
||||
attempted to write to it */
|
||||
memset(dstbuf, 127, bufsize);
|
||||
memset(dstbuf, 127, pitch*scaledh);
|
||||
|
||||
/* Execute once to preload cache */
|
||||
if(yuv==YUVDECODE)
|
||||
if(doyuv)
|
||||
{
|
||||
if(tjDecompressToYUV2(handle, jpegbuf[0], jpegsize[0], dstbuf, scaledw,
|
||||
yuvpad, scaledh, flags)==-1)
|
||||
_throwtj("executing tjDecompressToYUV2()");
|
||||
int width=dotile? tilew:scaledw;
|
||||
int height=dotile? tileh:scaledh;
|
||||
int yuvsize=tjBufSizeYUV2(width, yuvpad, height, subsamp);
|
||||
if((yuvbuf=(unsigned char *)malloc(yuvsize))==NULL)
|
||||
_throwunix("allocating YUV buffer");
|
||||
memset(yuvbuf, 127, yuvsize);
|
||||
}
|
||||
else if(tjDecompress2(handle, jpegbuf[0], jpegsize[0], dstbuf, scaledw,
|
||||
pitch, scaledh, pf, flags)==-1)
|
||||
_throwtj("executing tjDecompress2()");
|
||||
|
||||
/* Benchmark */
|
||||
for(i=0, start=gettime(); (elapsed=gettime()-start)<benchtime; i++)
|
||||
iter=-warmup;
|
||||
elapsed=elapsedDecode=0.;
|
||||
while(1)
|
||||
{
|
||||
int tile=0;
|
||||
if(yuv==YUVDECODE)
|
||||
{
|
||||
if(tjDecompressToYUV2(handle, jpegbuf[0], jpegsize[0], dstbuf, scaledw,
|
||||
yuvpad, scaledh, flags)==-1)
|
||||
_throwtj("executing tjDecompressToYUV2()");
|
||||
}
|
||||
else for(row=0, dstptr=dstbuf; row<ntilesh; row++, dstptr+=pitch*tileh)
|
||||
double start=gettime();
|
||||
for(row=0, dstptr=dstbuf; row<ntilesh; row++, dstptr+=pitch*tileh)
|
||||
{
|
||||
for(col=0, dstptr2=dstptr; col<ntilesw; col++, tile++, dstptr2+=ps*tilew)
|
||||
{
|
||||
int width=dotile? min(tilew, w-col*tilew):scaledw;
|
||||
int height=dotile? min(tileh, h-row*tileh):scaledh;
|
||||
if(tjDecompress2(handle, jpegbuf[tile], jpegsize[tile], dstptr2, width,
|
||||
pitch, height, pf, flags)==-1)
|
||||
_throwtj("executing tjDecompress2()");
|
||||
if(doyuv)
|
||||
{
|
||||
double startDecode;
|
||||
if(tjDecompressToYUV2(handle, jpegbuf[tile], jpegsize[tile], yuvbuf,
|
||||
width, yuvpad, height, flags)==-1)
|
||||
_throwtj("executing tjDecompressToYUV2()");
|
||||
startDecode=gettime();
|
||||
if(tjDecodeYUV(handle, yuvbuf, yuvpad, subsamp, dstptr2, width,
|
||||
pitch, height, pf, flags)==-1)
|
||||
_throwtj("executing tjDecodeYUV()");
|
||||
if(iter>=0) elapsedDecode+=gettime()-startDecode;
|
||||
}
|
||||
else
|
||||
if(tjDecompress2(handle, jpegbuf[tile], jpegsize[tile], dstptr2,
|
||||
width, pitch, height, pf, flags)==-1)
|
||||
_throwtj("executing tjDecompress2()");
|
||||
}
|
||||
}
|
||||
iter++;
|
||||
if(iter>=1)
|
||||
{
|
||||
elapsed+=gettime()-start;
|
||||
if(elapsed>=benchtime) break;
|
||||
}
|
||||
}
|
||||
if(doyuv) elapsed-=elapsedDecode;
|
||||
|
||||
if(tjDestroy(handle)==-1) _throwtj("executing tjDestroy()");
|
||||
handle=NULL;
|
||||
|
||||
if(quiet)
|
||||
{
|
||||
printf("%s\n",
|
||||
sigfig((double)(w*h)/1000000.*(double)i/elapsed, 4, tempstr, 1024));
|
||||
printf("%-6s%s",
|
||||
sigfig((double)(w*h)/1000000.*(double)iter/elapsed, 4, tempstr, 1024),
|
||||
quiet==2? "\n":" ");
|
||||
if(doyuv)
|
||||
printf("%s\n",
|
||||
sigfig((double)(w*h)/1000000.*(double)iter/elapsedDecode, 4, tempstr,
|
||||
1024));
|
||||
else if(quiet!=2) printf("\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("D--> Frame rate: %f fps\n", (double)i/elapsed);
|
||||
printf(" Dest. throughput: %f Megapixels/sec\n",
|
||||
(double)(w*h)/1000000.*(double)i/elapsed);
|
||||
printf("%s --> Frame rate: %f fps\n",
|
||||
doyuv? "Decomp to YUV":"Decompress ", (double)iter/elapsed);
|
||||
printf(" Throughput: %f Megapixels/sec\n",
|
||||
(double)(w*h)/1000000.*(double)iter/elapsed);
|
||||
if(doyuv)
|
||||
{
|
||||
printf("YUV Decode --> Frame rate: %f fps\n",
|
||||
(double)iter/elapsedDecode);
|
||||
printf(" Throughput: %f Megapixels/sec\n",
|
||||
(double)(w*h)/1000000.*(double)iter/elapsedDecode);
|
||||
}
|
||||
}
|
||||
if(sf.num!=1 || sf.denom!=1)
|
||||
snprintf(sizestr, 20, "%d_%d", sf.num, sf.denom);
|
||||
@@ -197,61 +224,51 @@ int decomptest(unsigned char *srcbuf, unsigned char **jpegbuf,
|
||||
snprintf(tempstr, 1024, "%s_%s%s_%s.%s", filename, subName[subsamp],
|
||||
qualstr, sizestr, ext);
|
||||
|
||||
if(yuv==YUVDECODE)
|
||||
if(savebmp(tempstr, dstbuf, scaledw, scaledh, pf,
|
||||
(flags&TJFLAG_BOTTOMUP)!=0)==-1)
|
||||
_throwbmp("saving bitmap");
|
||||
ptr=strrchr(tempstr, '.');
|
||||
snprintf(ptr, 1024-(ptr-tempstr), "-err.%s", ext);
|
||||
if(srcbuf && sf.num==1 && sf.denom==1)
|
||||
{
|
||||
if((file=fopen(tempstr, "wb"))==NULL)
|
||||
_throwunix("opening YUV image for output");
|
||||
if(fwrite(dstbuf, yuvsize, 1, file)!=1)
|
||||
_throwunix("writing YUV image");
|
||||
fclose(file); file=NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(savebmp(tempstr, dstbuf, scaledw, scaledh, pf,
|
||||
(flags&TJFLAG_BOTTOMUP)!=0)==-1)
|
||||
_throwbmp("saving bitmap");
|
||||
ptr=strrchr(tempstr, '.');
|
||||
snprintf(ptr, 1024-(ptr-tempstr), "-err.%s", ext);
|
||||
if(srcbuf && sf.num==1 && sf.denom==1)
|
||||
if(!quiet) printf("Compression error written to %s.\n", tempstr);
|
||||
if(subsamp==TJ_GRAYSCALE)
|
||||
{
|
||||
if(!quiet) printf("Compression error written to %s.\n", tempstr);
|
||||
if(subsamp==TJ_GRAYSCALE)
|
||||
int index, index2;
|
||||
for(row=0, index=0; row<h; row++, index+=pitch)
|
||||
{
|
||||
int index, index2;
|
||||
for(row=0, index=0; row<h; row++, index+=pitch)
|
||||
for(col=0, index2=index; col<w; col++, index2+=ps)
|
||||
{
|
||||
for(col=0, index2=index; col<w; col++, index2+=ps)
|
||||
{
|
||||
int rindex=index2+tjRedOffset[pf];
|
||||
int gindex=index2+tjGreenOffset[pf];
|
||||
int bindex=index2+tjBlueOffset[pf];
|
||||
int y=(int)((double)srcbuf[rindex]*0.299
|
||||
+ (double)srcbuf[gindex]*0.587
|
||||
+ (double)srcbuf[bindex]*0.114 + 0.5);
|
||||
if(y>255) y=255; if(y<0) y=0;
|
||||
dstbuf[rindex]=abs(dstbuf[rindex]-y);
|
||||
dstbuf[gindex]=abs(dstbuf[gindex]-y);
|
||||
dstbuf[bindex]=abs(dstbuf[bindex]-y);
|
||||
}
|
||||
int rindex=index2+tjRedOffset[pf];
|
||||
int gindex=index2+tjGreenOffset[pf];
|
||||
int bindex=index2+tjBlueOffset[pf];
|
||||
int y=(int)((double)srcbuf[rindex]*0.299
|
||||
+ (double)srcbuf[gindex]*0.587
|
||||
+ (double)srcbuf[bindex]*0.114 + 0.5);
|
||||
if(y>255) y=255; if(y<0) y=0;
|
||||
dstbuf[rindex]=abs(dstbuf[rindex]-y);
|
||||
dstbuf[gindex]=abs(dstbuf[gindex]-y);
|
||||
dstbuf[bindex]=abs(dstbuf[bindex]-y);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(row=0; row<h; row++)
|
||||
for(col=0; col<w*ps; col++)
|
||||
dstbuf[pitch*row+col]
|
||||
=abs(dstbuf[pitch*row+col]-srcbuf[pitch*row+col]);
|
||||
}
|
||||
if(savebmp(tempstr, dstbuf, w, h, pf,
|
||||
(flags&TJFLAG_BOTTOMUP)!=0)==-1)
|
||||
_throwbmp("saving bitmap");
|
||||
}
|
||||
else
|
||||
{
|
||||
for(row=0; row<h; row++)
|
||||
for(col=0; col<w*ps; col++)
|
||||
dstbuf[pitch*row+col]
|
||||
=abs(dstbuf[pitch*row+col]-srcbuf[pitch*row+col]);
|
||||
}
|
||||
if(savebmp(tempstr, dstbuf, w, h, pf,
|
||||
(flags&TJFLAG_BOTTOMUP)!=0)==-1)
|
||||
_throwbmp("saving bitmap");
|
||||
}
|
||||
|
||||
bailout:
|
||||
if(file) {fclose(file); file=NULL;}
|
||||
if(handle) {tjDestroy(handle); handle=NULL;}
|
||||
if(dstbuf && dstbufalloc) {free(dstbuf); dstbuf=NULL;}
|
||||
if(file) fclose(file);
|
||||
if(handle) tjDestroy(handle);
|
||||
if(dstbuf && dstbufalloc) free(dstbuf);
|
||||
if(yuvbuf) free(yuvbuf);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -332,20 +349,19 @@ int dotestyuv(unsigned char *srcbuf, int w, int h, int subsamp,
|
||||
}
|
||||
|
||||
|
||||
int dotest(unsigned char *srcbuf, int w, int h, int subsamp, int jpegqual,
|
||||
void fullTest(unsigned char *srcbuf, int w, int h, int subsamp, int jpegqual,
|
||||
char *filename)
|
||||
{
|
||||
char tempstr[1024], tempstr2[80];
|
||||
FILE *file=NULL; tjhandle handle=NULL;
|
||||
unsigned char **jpegbuf=NULL, *tmpbuf=NULL, *srcptr, *srcptr2;
|
||||
double start, elapsed;
|
||||
unsigned char **jpegbuf=NULL, *yuvbuf=NULL, *tmpbuf=NULL, *srcptr, *srcptr2;
|
||||
double start, elapsed, elapsedEncode;
|
||||
int totaljpegsize=0, row, col, i, tilew=w, tileh=h, retval=0;
|
||||
int iter, yuvsize=0;
|
||||
unsigned long *jpegsize=NULL;
|
||||
int ps=(yuv==YUVCOMPRESS)? 3:tjPixelSize[pf];
|
||||
int ps=tjPixelSize[pf];
|
||||
int ntilesw=1, ntilesh=1, pitch=w*ps;
|
||||
const char *pfStr=(yuv==YUVCOMPRESS)? "YUV":pixFormatStr[pf];
|
||||
|
||||
if(yuv==YUVENCODE) {dotestyuv(srcbuf, w, h, subsamp, filename); return retval;}
|
||||
const char *pfStr=pixFormatStr[pf];
|
||||
|
||||
if((tmpbuf=(unsigned char *)malloc(pitch*h)) == NULL)
|
||||
_throwunix("allocating temporary image buffer");
|
||||
@@ -379,33 +395,29 @@ int dotest(unsigned char *srcbuf, int w, int h, int subsamp, int jpegqual,
|
||||
|
||||
/* Compression test */
|
||||
if(quiet==1)
|
||||
printf("%s\t%s\t%s\t%d\t", pfStr, (flags&TJFLAG_BOTTOMUP)? "BU":"TD",
|
||||
subNameLong[subsamp], jpegqual);
|
||||
if(yuv!=YUVCOMPRESS)
|
||||
for(i=0; i<h; i++)
|
||||
memcpy(&tmpbuf[pitch*i], &srcbuf[w*ps*i], w*ps);
|
||||
printf("%-4s (%s) %-5s %-3d ", pfStr,
|
||||
(flags&TJFLAG_BOTTOMUP)? "BU":"TD", subNameLong[subsamp], jpegqual);
|
||||
for(i=0; i<h; i++)
|
||||
memcpy(&tmpbuf[pitch*i], &srcbuf[w*ps*i], w*ps);
|
||||
if((handle=tjInitCompress())==NULL)
|
||||
_throwtj("executing tjInitCompress()");
|
||||
|
||||
/* Execute once to preload cache */
|
||||
if(yuv==YUVCOMPRESS)
|
||||
if(doyuv)
|
||||
{
|
||||
if(tjCompressFromYUV(handle, srcbuf, tilew, yuvpad, tileh, subsamp,
|
||||
&jpegbuf[0], &jpegsize[0], jpegqual, flags)==-1)
|
||||
_throwtj("executing tjCompressFromYUV()");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(tjCompress2(handle, srcbuf, tilew, pitch, tileh, pf, &jpegbuf[0],
|
||||
&jpegsize[0], subsamp, jpegqual, flags)==-1)
|
||||
_throwtj("executing tjCompress2()");
|
||||
yuvsize=tjBufSizeYUV2(tilew, yuvpad, tileh, subsamp);
|
||||
if((yuvbuf=(unsigned char *)malloc(yuvsize))==NULL)
|
||||
_throwunix("allocating YUV buffer");
|
||||
memset(yuvbuf, 127, yuvsize);
|
||||
}
|
||||
|
||||
/* Benchmark */
|
||||
for(i=0, start=gettime(); (elapsed=gettime()-start)<benchtime; i++)
|
||||
iter=-warmup;
|
||||
elapsed=elapsedEncode=0.;
|
||||
while(1)
|
||||
{
|
||||
int tile=0;
|
||||
totaljpegsize=0;
|
||||
start=gettime();
|
||||
for(row=0, srcptr=srcbuf; row<ntilesh; row++, srcptr+=pitch*tileh)
|
||||
{
|
||||
for(col=0, srcptr2=srcptr; col<ntilesw; col++, tile++,
|
||||
@@ -413,9 +425,14 @@ int dotest(unsigned char *srcbuf, int w, int h, int subsamp, int jpegqual,
|
||||
{
|
||||
int width=min(tilew, w-col*tilew);
|
||||
int height=min(tileh, h-row*tileh);
|
||||
if(yuv==YUVCOMPRESS)
|
||||
if(doyuv)
|
||||
{
|
||||
if(tjCompressFromYUV(handle, srcptr2, width, yuvpad, height,
|
||||
double startEncode=gettime();
|
||||
if(tjEncodeYUV3(handle, srcptr2, width, pitch, height, pf, yuvbuf,
|
||||
yuvpad, subsamp, flags)==-1)
|
||||
_throwtj("executing tjEncodeYUV3()");
|
||||
if(iter>=0) elapsedEncode+=gettime()-startEncode;
|
||||
if(tjCompressFromYUV(handle, yuvbuf, width, yuvpad, height,
|
||||
subsamp, &jpegbuf[tile], &jpegsize[tile], jpegqual, flags)==-1)
|
||||
_throwtj("executing tjCompressFromYUV()");
|
||||
}
|
||||
@@ -428,32 +445,58 @@ int dotest(unsigned char *srcbuf, int w, int h, int subsamp, int jpegqual,
|
||||
totaljpegsize+=jpegsize[tile];
|
||||
}
|
||||
}
|
||||
iter++;
|
||||
if(iter>=1)
|
||||
{
|
||||
elapsed+=gettime()-start;
|
||||
if(elapsed>=benchtime) break;
|
||||
}
|
||||
}
|
||||
if(doyuv) elapsed-=elapsedEncode;
|
||||
|
||||
if(tjDestroy(handle)==-1) _throwtj("executing tjDestroy()");
|
||||
handle=NULL;
|
||||
|
||||
if(quiet==1) printf("%-4d %-4d\t", tilew, tileh);
|
||||
if(quiet==1) printf("%-5d %-5d ", tilew, tileh);
|
||||
if(quiet)
|
||||
{
|
||||
printf("%s%c%s%c",
|
||||
sigfig((double)(w*h)/1000000.*(double)i/elapsed, 4, tempstr, 1024),
|
||||
quiet==2? '\n':'\t',
|
||||
if(doyuv)
|
||||
printf("%-6s%s",
|
||||
sigfig((double)(w*h)/1000000.*(double)iter/elapsedEncode, 4, tempstr,
|
||||
1024), quiet==2? "\n":" ");
|
||||
printf("%-6s%s",
|
||||
sigfig((double)(w*h)/1000000.*(double)iter/elapsed, 4, tempstr, 1024),
|
||||
quiet==2? "\n":" ");
|
||||
printf("%-6s%s",
|
||||
sigfig((double)(w*h*ps)/(double)totaljpegsize, 4, tempstr2, 80),
|
||||
quiet==2? '\n':'\t');
|
||||
quiet==2? "\n":" ");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n%s size: %d x %d\n", dotile? "Tile":"Image", tilew,
|
||||
tileh);
|
||||
printf("C--> Frame rate: %f fps\n", (double)i/elapsed);
|
||||
printf(" Output image size: %d bytes\n", totaljpegsize);
|
||||
printf(" Compression ratio: %f:1\n",
|
||||
if(doyuv)
|
||||
{
|
||||
printf("Encode YUV --> Frame rate: %f fps\n",
|
||||
(double)iter/elapsedEncode);
|
||||
printf(" Output image size: %d bytes\n", yuvsize);
|
||||
printf(" Compression ratio: %f:1\n",
|
||||
(double)(w*h*ps)/(double)yuvsize);
|
||||
printf(" Throughput: %f Megapixels/sec\n",
|
||||
(double)(w*h)/1000000.*(double)iter/elapsedEncode);
|
||||
printf(" Output bit stream: %f Megabits/sec\n",
|
||||
(double)yuvsize*8./1000000.*(double)iter/elapsedEncode);
|
||||
}
|
||||
printf("%s --> Frame rate: %f fps\n",
|
||||
doyuv? "Comp from YUV":"Compress ", (double)iter/elapsed);
|
||||
printf(" Output image size: %d bytes\n",
|
||||
totaljpegsize);
|
||||
printf(" Compression ratio: %f:1\n",
|
||||
(double)(w*h*ps)/(double)totaljpegsize);
|
||||
printf(" Source throughput: %f Megapixels/sec\n",
|
||||
(double)(w*h)/1000000.*(double)i/elapsed);
|
||||
printf(" Output bit stream: %f Megabits/sec\n",
|
||||
(double)totaljpegsize*8./1000000.*(double)i/elapsed);
|
||||
printf(" Throughput: %f Megapixels/sec\n",
|
||||
(double)(w*h)/1000000.*(double)iter/elapsed);
|
||||
printf(" Output bit stream: %f Megabits/sec\n",
|
||||
(double)totaljpegsize*8./1000000.*(double)iter/elapsed);
|
||||
}
|
||||
if(tilew==w && tileh==h)
|
||||
{
|
||||
@@ -470,7 +513,7 @@ int dotest(unsigned char *srcbuf, int w, int h, int subsamp, int jpegqual,
|
||||
/* Decompression test */
|
||||
if(!componly)
|
||||
{
|
||||
if(decomptest(srcbuf, jpegbuf, jpegsize, tmpbuf, w, h, subsamp, jpegqual,
|
||||
if(decomp(srcbuf, jpegbuf, jpegsize, tmpbuf, w, h, subsamp, jpegqual,
|
||||
filename, tilew, tileh)==-1)
|
||||
goto bailout;
|
||||
}
|
||||
@@ -481,6 +524,10 @@ int dotest(unsigned char *srcbuf, int w, int h, int subsamp, int jpegqual,
|
||||
}
|
||||
free(jpegbuf); jpegbuf=NULL;
|
||||
free(jpegsize); jpegsize=NULL;
|
||||
if(doyuv)
|
||||
{
|
||||
free(yuvbuf); yuvbuf=NULL;
|
||||
}
|
||||
|
||||
if(tilew==w && tileh==h) break;
|
||||
}
|
||||
@@ -495,14 +542,15 @@ int dotest(unsigned char *srcbuf, int w, int h, int subsamp, int jpegqual,
|
||||
}
|
||||
free(jpegbuf); jpegbuf=NULL;
|
||||
}
|
||||
if(yuvbuf) {free(yuvbuf); yuvbuf=NULL;}
|
||||
if(jpegsize) {free(jpegsize); jpegsize=NULL;}
|
||||
if(tmpbuf) {free(tmpbuf); tmpbuf=NULL;}
|
||||
if(handle) {tjDestroy(handle); handle=NULL;}
|
||||
return retval;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int dodecomptest(char *filename)
|
||||
void decompTest(char *filename)
|
||||
{
|
||||
FILE *file=NULL; tjhandle handle=NULL;
|
||||
unsigned char **jpegbuf=NULL, *srcbuf=NULL;
|
||||
@@ -511,7 +559,7 @@ int dodecomptest(char *filename)
|
||||
int w=0, h=0, subsamp=-1, cs=-1, _w, _h, _tilew, _tileh,
|
||||
_ntilesw, _ntilesh, _subsamp;
|
||||
char *temp=NULL, tempstr[80], tempstr2[80];
|
||||
int row, col, i, tilew, tileh, ntilesw=1, ntilesh=1, retval=0;
|
||||
int row, col, i, iter, tilew, tileh, ntilesw=1, ntilesh=1, retval=0;
|
||||
double start, elapsed;
|
||||
int ps=tjPixelSize[pf], tile;
|
||||
|
||||
@@ -538,20 +586,18 @@ int dodecomptest(char *filename)
|
||||
if(quiet==1)
|
||||
{
|
||||
printf("All performance values in Mpixels/sec\n\n");
|
||||
printf("Bitmap\tBitmap\tJPEG\tJPEG\t%s %s \tXform\tComp\tDecomp\n",
|
||||
printf("Bitmap JPEG JPEG %s %s Xform Comp Decomp ",
|
||||
dotile? "Tile ":"Image", dotile? "Tile ":"Image");
|
||||
printf("Format\tOrder\tCS\tSubsamp\tWidth Height\tPerf \tRatio\tPerf\n\n");
|
||||
if(doyuv) printf("Decode");
|
||||
printf("\n");
|
||||
printf("Format CS Subsamp Width Height Perf Ratio Perf ");
|
||||
if(doyuv) printf("Perf");
|
||||
printf("\n\n");
|
||||
}
|
||||
else if(!quiet)
|
||||
{
|
||||
if(yuv==YUVDECODE)
|
||||
printf(">>>>> JPEG %s --> YUV <<<<<\n",
|
||||
formatName(subsamp, cs, tempstr));
|
||||
else
|
||||
printf(">>>>> JPEG %s --> %s (%s) <<<<<\n",
|
||||
formatName(subsamp, cs, tempstr), pixFormatStr[pf],
|
||||
(flags&TJFLAG_BOTTOMUP)? "Bottom-up":"Top-down");
|
||||
}
|
||||
printf(">>>>> JPEG %s --> %s (%s) <<<<<\n",
|
||||
formatName(subsamp, cs, tempstr), pixFormatStr[pf],
|
||||
(flags&TJFLAG_BOTTOMUP)? "Bottom-up":"Top-down");
|
||||
|
||||
for(tilew=dotile? 16:w, tileh=dotile? 16:h; ; tilew*=2, tileh*=2)
|
||||
{
|
||||
@@ -567,7 +613,7 @@ int dodecomptest(char *filename)
|
||||
_throwunix("allocating JPEG size array");
|
||||
memset(jpegsize, 0, sizeof(unsigned long)*ntilesw*ntilesh);
|
||||
|
||||
if((flags&TJFLAG_NOREALLOC)!=0)
|
||||
if((flags&TJFLAG_NOREALLOC)!=0 || !dotile)
|
||||
for(i=0; i<ntilesw*ntilesh; i++)
|
||||
{
|
||||
if((jpegbuf[i]=(unsigned char *)malloc(tjBufSize(tilew, tileh,
|
||||
@@ -586,9 +632,9 @@ int dodecomptest(char *filename)
|
||||
}
|
||||
else if(quiet==1)
|
||||
{
|
||||
printf("%s\t%s\t%s\t%s\t", pixFormatStr[pf],
|
||||
printf("%-4s (%s) %-5s %-5s ", pixFormatStr[pf],
|
||||
(flags&TJFLAG_BOTTOMUP)? "BU":"TD", csName[cs], subNameLong[subsamp]);
|
||||
printf("%-4d %-4d\t", tilew, tileh);
|
||||
printf("%-5d %-5d ", tilew, tileh);
|
||||
}
|
||||
|
||||
_subsamp=subsamp;
|
||||
@@ -616,6 +662,13 @@ int dodecomptest(char *filename)
|
||||
_ntilesw=(_w+_tilew-1)/_tilew;
|
||||
_ntilesh=(_h+_tileh-1)/_tileh;
|
||||
|
||||
if(xformop==TJXOP_TRANSPOSE || xformop==TJXOP_TRANSVERSE
|
||||
|| xformop==TJXOP_ROT90 || xformop==TJXOP_ROT270)
|
||||
{
|
||||
if(_subsamp==TJSAMP_422) _subsamp=TJSAMP_440;
|
||||
else if(_subsamp==TJSAMP_440) _subsamp=TJSAMP_422;
|
||||
}
|
||||
|
||||
for(row=0, tile=0; row<_ntilesh; row++)
|
||||
{
|
||||
for(col=0; col<_ntilesw; col++, tile++)
|
||||
@@ -634,11 +687,21 @@ int dodecomptest(char *filename)
|
||||
}
|
||||
}
|
||||
|
||||
start=gettime();
|
||||
if(tjTransform(handle, srcbuf, srcsize, _ntilesw*_ntilesh, jpegbuf,
|
||||
jpegsize, t, flags)==-1)
|
||||
_throwtj("executing tjTransform()");
|
||||
elapsed=gettime()-start;
|
||||
iter=-warmup;
|
||||
elapsed=0.;
|
||||
while(1)
|
||||
{
|
||||
start=gettime();
|
||||
if(tjTransform(handle, srcbuf, srcsize, _ntilesw*_ntilesh, jpegbuf,
|
||||
jpegsize, t, flags)==-1)
|
||||
_throwtj("executing tjTransform()");
|
||||
iter++;
|
||||
if(iter>=1)
|
||||
{
|
||||
elapsed+=gettime()-start;
|
||||
if(elapsed>=benchtime) break;
|
||||
}
|
||||
}
|
||||
|
||||
free(t); t=NULL;
|
||||
|
||||
@@ -647,27 +710,27 @@ int dodecomptest(char *filename)
|
||||
|
||||
if(quiet)
|
||||
{
|
||||
printf("%s%c%s%c",
|
||||
printf("%-6s%s%-6s%s",
|
||||
sigfig((double)(w*h)/1000000./elapsed, 4, tempstr, 80),
|
||||
quiet==2? '\n':'\t',
|
||||
quiet==2? "\n":" ",
|
||||
sigfig((double)(w*h*ps)/(double)totaljpegsize, 4, tempstr2, 80),
|
||||
quiet==2? '\n':'\t');
|
||||
quiet==2? "\n":" ");
|
||||
}
|
||||
else if(!quiet)
|
||||
{
|
||||
printf("X--> Frame rate: %f fps\n", 1.0/elapsed);
|
||||
printf(" Output image size: %lu bytes\n", totaljpegsize);
|
||||
printf(" Compression ratio: %f:1\n",
|
||||
printf("Transform --> Frame rate: %f fps\n", 1.0/elapsed);
|
||||
printf(" Output image size: %lu bytes\n", totaljpegsize);
|
||||
printf(" Compression ratio: %f:1\n",
|
||||
(double)(w*h*ps)/(double)totaljpegsize);
|
||||
printf(" Source throughput: %f Megapixels/sec\n",
|
||||
printf(" Throughput: %f Megapixels/sec\n",
|
||||
(double)(w*h)/1000000./elapsed);
|
||||
printf(" Output bit stream: %f Megabits/sec\n",
|
||||
printf(" Output bit stream: %f Megabits/sec\n",
|
||||
(double)totaljpegsize*8./1000000./elapsed);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(quiet==1) printf("N/A\tN/A\t");
|
||||
if(quiet==1) printf("N/A N/A ");
|
||||
jpegsize[0]=srcsize;
|
||||
memcpy(jpegbuf[0], srcbuf, srcsize);
|
||||
}
|
||||
@@ -676,7 +739,7 @@ int dodecomptest(char *filename)
|
||||
if(h==tileh) _tileh=_h;
|
||||
if(!(xformopt&TJXOPT_NOOUTPUT))
|
||||
{
|
||||
if(decomptest(NULL, jpegbuf, jpegsize, NULL, _w, _h, _subsamp, 0,
|
||||
if(decomp(NULL, jpegbuf, jpegsize, NULL, _w, _h, _subsamp, 0,
|
||||
filename, _tilew, _tileh)==-1)
|
||||
goto bailout;
|
||||
}
|
||||
@@ -706,7 +769,7 @@ int dodecomptest(char *filename)
|
||||
if(srcbuf) {free(srcbuf); srcbuf=NULL;}
|
||||
if(t) {free(t); t=NULL;}
|
||||
if(handle) {tjDestroy(handle); handle=NULL;}
|
||||
return retval;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -714,39 +777,33 @@ void usage(char *progname)
|
||||
{
|
||||
int i;
|
||||
printf("USAGE: %s\n", progname);
|
||||
printf(" <Inputfile (BMP|PPM|YUV)> <Quality> [options]\n\n");
|
||||
printf(" <Inputfile (BMP|PPM)> <Quality> [options]\n\n");
|
||||
printf(" %s\n", progname);
|
||||
printf(" <Inputfile (JPG)> [options]\n\n");
|
||||
printf("Options:\n\n");
|
||||
printf("-alloc = Dynamically allocate JPEG image buffers\n");
|
||||
printf("-bmp = Generate output images in Windows Bitmap format (default=PPM)\n");
|
||||
printf("-bmp = Generate output images in Windows Bitmap format (default = PPM)\n");
|
||||
printf("-bottomup = Test bottom-up compression/decompression\n");
|
||||
printf("-tile = Test performance of the codec when the image is encoded as separate\n");
|
||||
printf(" tiles of varying sizes.\n");
|
||||
printf("-rgb, -bgr, -rgbx, -bgrx, -xbgr, -xrgb =\n");
|
||||
printf(" Test the specified color conversion path in the codec (default: BGR)\n");
|
||||
printf(" Test the specified color conversion path in the codec (default = BGR)\n");
|
||||
printf("-fastupsample = Use the fastest chrominance upsampling algorithm available in\n");
|
||||
printf(" the underlying codec\n");
|
||||
printf("-fastdct = Use the fastest DCT/IDCT algorithms available in the underlying\n");
|
||||
printf(" codec\n");
|
||||
printf("-accuratedct = Use the most accurate DCT/IDCT algorithms available in the\n");
|
||||
printf(" underlying codec\n");
|
||||
printf("-subsamp <s> = if compressing a JPEG image from a YUV planar source image,\n");
|
||||
printf(" this specifies the level of chrominance subsampling used in the source\n");
|
||||
printf(" image. Otherwise, this specifies the level of chrominance subsampling\n");
|
||||
printf(" to use in the JPEG destination image. <s> = 444, 422, 440, 420, 411,\n");
|
||||
printf(" or GRAY\n");
|
||||
printf("-subsamp <s> = When testing JPEG compression, this option specifies the level\n");
|
||||
printf(" of chrominance subsampling to use (<s> = 444, 422, 440, 420, 411, or\n");
|
||||
printf(" GRAY). The default is to test Grayscale, 4:2:0, 4:2:2, and 4:4:4 in\n");
|
||||
printf(" sequence.\n");
|
||||
printf("-quiet = Output results in tabular rather than verbose format\n");
|
||||
printf("-yuvencode = Encode RGB input as planar YUV rather than compressing as JPEG\n");
|
||||
printf("-yuvdecode = Decode JPEG image to planar YUV rather than RGB\n");
|
||||
printf("-yuvsize WxH = if compressing a JPEG image from a YUV planar source image, this\n");
|
||||
printf(" specifies the width and height of the source image.\n");
|
||||
printf("-yuvpad <p> = if compressing a JPEG image from a YUV planar source image, this\n");
|
||||
printf(" specifies the number of bytes to which each row of each plane in the\n");
|
||||
printf(" source image is padded. If decompressing a JPEG image to a YUV planar\n");
|
||||
printf(" destination image, this specifies the row padding for each plane of the\n");
|
||||
printf(" destination image. (default=1)\n");
|
||||
printf("-scale M/N = scale down the width/height of the decompressed JPEG image by a\n");
|
||||
printf("-yuv = Test YUV encoding/decoding functions\n");
|
||||
printf("-yuvpad <p> = If testing YUV encoding/decoding, this specifies the number of\n");
|
||||
printf(" bytes to which each row of each plane in the intermediate YUV image is\n");
|
||||
printf(" padded (default = 1)\n");
|
||||
printf("-scale M/N = Scale down the width/height of the decompressed JPEG image by a\n");
|
||||
printf(" factor of M/N (M/N = ");
|
||||
for(i=0; i<nsf; i++)
|
||||
{
|
||||
@@ -766,6 +823,8 @@ void usage(char *progname)
|
||||
printf("-grayscale = Perform lossless grayscale conversion prior to decompression\n");
|
||||
printf(" test (can be combined with the other transforms above)\n");
|
||||
printf("-benchtime <t> = Run each benchmark for at least <t> seconds (default = 5.0)\n");
|
||||
printf("-warmup <w> = Execute each benchmark <w> times to prime the cache before\n");
|
||||
printf(" taking performance measurements (default = 1)\n");
|
||||
printf("-componly = Stop after running compression tests. Do not test decompression.\n\n");
|
||||
printf("NOTE: If the quality is specified as a range (e.g. 90-100), a separate\n");
|
||||
printf("test will be performed for all quality values in the range.\n\n");
|
||||
@@ -789,29 +848,11 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
if(!strcasecmp(temp, ".bmp")) ext="bmp";
|
||||
if(!strcasecmp(temp, ".jpg") || !strcasecmp(temp, ".jpeg")) decomponly=1;
|
||||
if(!strcasecmp(temp, ".yuv")) yuv=YUVCOMPRESS;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
if(argc>minarg)
|
||||
{
|
||||
for(i=minarg; i<argc; i++)
|
||||
{
|
||||
if(!strcasecmp(argv[i], "-yuvencode"))
|
||||
{
|
||||
printf("Testing YUV planar encoding\n\n");
|
||||
yuv=YUVENCODE; maxqual=minqual=100;
|
||||
}
|
||||
if(!strcasecmp(argv[i], "-yuvdecode"))
|
||||
{
|
||||
printf("Testing YUV planar decoding\n\n");
|
||||
yuv=YUVDECODE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!decomponly && yuv!=YUVENCODE)
|
||||
if(!decomponly)
|
||||
{
|
||||
minarg=3;
|
||||
if(argc<minarg) usage(argv[0]);
|
||||
@@ -892,18 +933,23 @@ int main(int argc, char *argv[])
|
||||
if(temp>0.0) benchtime=temp;
|
||||
else usage(argv[0]);
|
||||
}
|
||||
if(!strcasecmp(argv[i], "-warmup") && i<argc-1)
|
||||
{
|
||||
int temp=atoi(argv[++i]);
|
||||
if(temp>=0)
|
||||
{
|
||||
warmup=temp;
|
||||
printf("Warmup runs = %d\n\n", warmup);
|
||||
}
|
||||
else usage(argv[0]);
|
||||
}
|
||||
if(!strcmp(argv[i], "-?")) usage(argv[0]);
|
||||
if(!strcasecmp(argv[i], "-alloc")) flags&=(~TJFLAG_NOREALLOC);
|
||||
if(!strcasecmp(argv[i], "-bmp")) ext="bmp";
|
||||
if(!strcasecmp(argv[i], "-yuvsize") && i<argc-1)
|
||||
if(!strcasecmp(argv[i], "-yuv"))
|
||||
{
|
||||
int temp1=0, temp2=0;
|
||||
if(sscanf(argv[++i], "%dx%d", &temp1, &temp2)==2 && temp1>=1
|
||||
&& temp2>=1)
|
||||
{
|
||||
w=temp1; h=temp2;
|
||||
}
|
||||
else usage(argv[0]);
|
||||
printf("Testing YUV planar encoding/decoding\n\n");
|
||||
doyuv=1;
|
||||
}
|
||||
if(!strcasecmp(argv[i], "-yuvpad") && i<argc-1)
|
||||
{
|
||||
@@ -931,8 +977,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if(yuv) ext="yuv";
|
||||
|
||||
if((sf.num!=1 || sf.denom!=1) && dotile)
|
||||
{
|
||||
printf("Disabling tiled compression/decompression tests, because those tests do not\n");
|
||||
@@ -940,41 +984,10 @@ int main(int argc, char *argv[])
|
||||
dotile=0;
|
||||
}
|
||||
|
||||
if(yuv && dotile)
|
||||
{
|
||||
printf("Disabling tiled compression/decompression tests, because those tests do not\n");
|
||||
printf("work when YUV encoding, compression, or decoding is enabled.\n\n");
|
||||
dotile=0;
|
||||
}
|
||||
|
||||
if(!decomponly)
|
||||
{
|
||||
if(yuv==YUVCOMPRESS)
|
||||
{
|
||||
FILE *file=NULL; unsigned long srcsize;
|
||||
if(w<1 || h<1 || subsamp<0 || subsamp>=TJ_NUMSAMP)
|
||||
_throw("opening YUV image file",
|
||||
"YUV image size and/or subsampling not specified");
|
||||
if((file=fopen(argv[1], "rb"))==NULL)
|
||||
_throwunix("opening YUV image file");
|
||||
if(fseek(file, 0, SEEK_END)<0 ||
|
||||
(srcsize=ftell(file))==(unsigned long)-1)
|
||||
_throwunix("determining YUV image file size");
|
||||
if(srcsize!=tjBufSizeYUV2(w, yuvpad, h, subsamp))
|
||||
_throw("opening YUV image file", "YUV image file is the wrong size");
|
||||
if((srcbuf=(unsigned char *)malloc(srcsize))==NULL)
|
||||
_throwunix("allocating memory for YUV image");
|
||||
if(fseek(file, 0, SEEK_SET)<0)
|
||||
_throwunix("setting YUV image file position");
|
||||
if(fread(srcbuf, srcsize, 1, file)<1)
|
||||
_throwunix("reading YUV data");
|
||||
fclose(file); file=NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(loadbmp(argv[1], &srcbuf, &w, &h, pf, (flags&TJFLAG_BOTTOMUP)!=0)==-1)
|
||||
_throwbmp("loading bitmap");
|
||||
}
|
||||
if(loadbmp(argv[1], &srcbuf, &w, &h, pf, (flags&TJFLAG_BOTTOMUP)!=0)==-1)
|
||||
_throwbmp("loading bitmap");
|
||||
temp=strrchr(argv[1], '.');
|
||||
if(temp!=NULL) *temp='\0';
|
||||
}
|
||||
@@ -982,36 +995,44 @@ int main(int argc, char *argv[])
|
||||
if(quiet==1 && !decomponly)
|
||||
{
|
||||
printf("All performance values in Mpixels/sec\n\n");
|
||||
printf("Bitmap\tBitmap\tJPEG\tJPEG\t%s %s \tComp\tComp\tDecomp\n",
|
||||
printf("Bitmap JPEG JPEG %s %s ",
|
||||
dotile? "Tile ":"Image", dotile? "Tile ":"Image");
|
||||
printf("Format\tOrder\tSubsamp\tQual\tWidth Height\tPerf \tRatio\tPerf\n\n");
|
||||
if(doyuv) printf("Encode ");
|
||||
printf("Comp Comp Decomp ");
|
||||
if(doyuv) printf("Decode");
|
||||
printf("\n");
|
||||
printf("Format Subsamp Qual Width Height ");
|
||||
if(doyuv) printf("Perf ");
|
||||
printf("Perf Ratio Perf ");
|
||||
if(doyuv) printf("Perf");
|
||||
printf("\n\n");
|
||||
}
|
||||
|
||||
if(decomponly)
|
||||
{
|
||||
dodecomptest(argv[1]);
|
||||
decompTest(argv[1]);
|
||||
printf("\n");
|
||||
goto bailout;
|
||||
}
|
||||
if(yuv==YUVCOMPRESS || (subsamp>=0 && subsamp<TJ_NUMSAMP))
|
||||
if(subsamp>=0 && subsamp<TJ_NUMSAMP)
|
||||
{
|
||||
for(i=maxqual; i>=minqual; i--)
|
||||
dotest(srcbuf, w, h, subsamp, i, argv[1]);
|
||||
fullTest(srcbuf, w, h, subsamp, i, argv[1]);
|
||||
printf("\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i=maxqual; i>=minqual; i--)
|
||||
dotest(srcbuf, w, h, TJSAMP_GRAY, i, argv[1]);
|
||||
fullTest(srcbuf, w, h, TJSAMP_GRAY, i, argv[1]);
|
||||
printf("\n");
|
||||
for(i=maxqual; i>=minqual; i--)
|
||||
dotest(srcbuf, w, h, TJSAMP_420, i, argv[1]);
|
||||
fullTest(srcbuf, w, h, TJSAMP_420, i, argv[1]);
|
||||
printf("\n");
|
||||
for(i=maxqual; i>=minqual; i--)
|
||||
dotest(srcbuf, w, h, TJSAMP_422, i, argv[1]);
|
||||
fullTest(srcbuf, w, h, TJSAMP_422, i, argv[1]);
|
||||
printf("\n");
|
||||
for(i=maxqual; i>=minqual; i--)
|
||||
dotest(srcbuf, w, h, TJSAMP_444, i, argv[1]);
|
||||
fullTest(srcbuf, w, h, TJSAMP_444, i, argv[1]);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ IMGDIR=@srcdir@/testimages
|
||||
OUTDIR=__tjbenchtest_output
|
||||
EXEDIR=.
|
||||
BMPARG=
|
||||
NSARG=
|
||||
YUVARG=
|
||||
if [ "$EXT" = "bmp" ]; then BMPARG=-bmp; fi
|
||||
|
||||
if [ -d $OUTDIR ]; then
|
||||
@@ -34,33 +36,58 @@ mkdir -p $OUTDIR
|
||||
|
||||
exec >$EXEDIR/tjbenchtest.log
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
if [ "$1" = "-yuv" ]; then
|
||||
NSARG=-nosmooth
|
||||
YUVARG=-yuv
|
||||
|
||||
# NOTE: The combination of tjEncodeYUV*() and tjCompressFromYUV*() does not
|
||||
# always produce bitwise-identical results to tjCompress*() if subsampling is
|
||||
# enabled. In both cases, if the image width or height are not evenly
|
||||
# divisible by the MCU width/height, then the bottom and/or right edge are
|
||||
# expanded. However, the libjpeg code performs this expansion prior to
|
||||
# downsampling, and TurboJPEG performs it in tjCompressFromYUV*(), which is
|
||||
# after downsampling. Thus, the two will agree only if the width/height along
|
||||
# each downsampled dimension is an odd number or is evenly divisible by the MCU
|
||||
# width/height. This disagreement basically amounts to a round-off error, but
|
||||
# there is no easy way around it, so for now, we just test the only image that
|
||||
# works. (NOTE: nightshot_iso_100 does not suffer from the above issue, but
|
||||
# it suffers from an unrelated problem whereby the combination of
|
||||
# tjDecompressToYUV*() and tjDecodeYUV*() do not produce bitwise-identical
|
||||
# results to tjDecompress*() if decompression scaling is enabled. This latter
|
||||
# phenomenon is not yet fully understood but is also believed to be some sort
|
||||
# of round-off error.)
|
||||
IMAGES="vgl_6548_0026a.${EXT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Standard tests
|
||||
for image in $IMAGES; do
|
||||
|
||||
cp $IMGDIR/$image $OUTDIR
|
||||
basename=`basename $image .${EXT}`
|
||||
$EXEDIR/cjpeg -quality 95 -dct fast -grayscale $IMGDIR/${basename}.${EXT} >$OUTDIR/${basename}_GRAY_fast_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct fast -sample 2x2 $IMGDIR/${basename}.${EXT} >$OUTDIR/${basename}_420_fast_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct fast -sample 2x1 $IMGDIR/${basename}.${EXT} >$OUTDIR/${basename}_422_fast_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct fast -sample 1x1 $IMGDIR/${basename}.${EXT} >$OUTDIR/${basename}_444_fast_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct int -grayscale $IMGDIR/${basename}.${EXT} >$OUTDIR/${basename}_GRAY_accurate_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct int -sample 2x2 $IMGDIR/${basename}.${EXT} >$OUTDIR/${basename}_420_accurate_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct int -sample 2x1 $IMGDIR/${basename}.${EXT} >$OUTDIR/${basename}_422_accurate_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct int -sample 1x1 $IMGDIR/${basename}.${EXT} >$OUTDIR/${basename}_444_accurate_cjpeg.jpg
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct fast -grayscale -outfile $OUTDIR/${basename}_GRAY_fast_cjpeg.jpg $IMGDIR/${basename}.${EXT}
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct fast -sample 2x2 -outfile $OUTDIR/${basename}_420_fast_cjpeg.jpg $IMGDIR/${basename}.${EXT}
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct fast -sample 2x1 -outfile $OUTDIR/${basename}_422_fast_cjpeg.jpg $IMGDIR/${basename}.${EXT}
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct fast -sample 1x1 -outfile $OUTDIR/${basename}_444_fast_cjpeg.jpg $IMGDIR/${basename}.${EXT}
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct int -grayscale -outfile $OUTDIR/${basename}_GRAY_accurate_cjpeg.jpg $IMGDIR/${basename}.${EXT}
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct int -sample 2x2 -outfile $OUTDIR/${basename}_420_accurate_cjpeg.jpg $IMGDIR/${basename}.${EXT}
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct int -sample 2x1 -outfile $OUTDIR/${basename}_422_accurate_cjpeg.jpg $IMGDIR/${basename}.${EXT}
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct int -sample 1x1 -outfile $OUTDIR/${basename}_444_accurate_cjpeg.jpg $IMGDIR/${basename}.${EXT}
|
||||
for samp in GRAY 420 422 444; do
|
||||
$EXEDIR/djpeg -rgb $BMPARG $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg >$OUTDIR/${basename}_${samp}_default_djpeg.${EXT}
|
||||
$EXEDIR/djpeg -dct fast -rgb $BMPARG $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg >$OUTDIR/${basename}_${samp}_fast_djpeg.${EXT}
|
||||
$EXEDIR/djpeg -dct int -rgb $BMPARG $OUTDIR/${basename}_${samp}_accurate_cjpeg.jpg >$OUTDIR/${basename}_${samp}_accurate_djpeg.${EXT}
|
||||
runme $EXEDIR/djpeg -rgb $NSARG $BMPARG -outfile $OUTDIR/${basename}_${samp}_default_djpeg.${EXT} $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg
|
||||
runme $EXEDIR/djpeg -dct fast -rgb $NSARG $BMPARG -outfile $OUTDIR/${basename}_${samp}_fast_djpeg.${EXT} $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg
|
||||
runme $EXEDIR/djpeg -dct int -rgb $NSARG $BMPARG -outfile $OUTDIR/${basename}_${samp}_accurate_djpeg.${EXT} $OUTDIR/${basename}_${samp}_accurate_cjpeg.jpg
|
||||
done
|
||||
for samp in 420 422; do
|
||||
$EXEDIR/djpeg -nosmooth $BMPARG $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg >$OUTDIR/${basename}_${samp}_default_nosmooth_djpeg.${EXT}
|
||||
$EXEDIR/djpeg -dct fast -nosmooth $BMPARG $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg >$OUTDIR/${basename}_${samp}_fast_nosmooth_djpeg.${EXT}
|
||||
$EXEDIR/djpeg -dct int -nosmooth $BMPARG $OUTDIR/${basename}_${samp}_accurate_cjpeg.jpg >$OUTDIR/${basename}_${samp}_accurate_nosmooth_djpeg.${EXT}
|
||||
runme $EXEDIR/djpeg -nosmooth $BMPARG -outfile $OUTDIR/${basename}_${samp}_default_nosmooth_djpeg.${EXT} $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg
|
||||
runme $EXEDIR/djpeg -dct fast -nosmooth $BMPARG -outfile $OUTDIR/${basename}_${samp}_fast_nosmooth_djpeg.${EXT} $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg
|
||||
runme $EXEDIR/djpeg -dct int -nosmooth $BMPARG -outfile $OUTDIR/${basename}_${samp}_accurate_nosmooth_djpeg.${EXT} $OUTDIR/${basename}_${samp}_accurate_cjpeg.jpg
|
||||
done
|
||||
|
||||
# Compression
|
||||
for dct in accurate fast; do
|
||||
runme $EXEDIR/tjbench $OUTDIR/$image 95 -rgb -quiet -benchtime 0.01 -${dct}dct
|
||||
runme $EXEDIR/tjbench $OUTDIR/$image 95 -rgb -quiet -benchtime 0.01 -warmup 0 -${dct}dct $YUVARG
|
||||
for samp in GRAY 420 422 444; do
|
||||
runme cmp $OUTDIR/${basename}_${samp}_Q95.jpg $OUTDIR/${basename}_${samp}_${dct}_cjpeg.jpg
|
||||
done
|
||||
@@ -73,7 +100,7 @@ for image in $IMAGES; do
|
||||
fi
|
||||
|
||||
# Tiled compression & decompression
|
||||
runme $EXEDIR/tjbench $OUTDIR/$image 95 -rgb -tile -quiet -benchtime 0.01 ${dctarg}
|
||||
runme $EXEDIR/tjbench $OUTDIR/$image 95 -rgb -tile -quiet -benchtime 0.01 -warmup 0 ${dctarg} $YUVARG
|
||||
for samp in GRAY 444; do
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do
|
||||
@@ -81,7 +108,7 @@ for image in $IMAGES; do
|
||||
rm $i
|
||||
done
|
||||
done
|
||||
runme $EXEDIR/tjbench $OUTDIR/$image 95 -rgb -tile -quiet -benchtime 0.01 -fastupsample ${dctarg}
|
||||
runme $EXEDIR/tjbench $OUTDIR/$image 95 -rgb -tile -quiet -benchtime 0.01 -warmup 0 -fastupsample ${dctarg} $YUVARG
|
||||
for samp in 420 422; do
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do
|
||||
@@ -92,7 +119,7 @@ for image in $IMAGES; do
|
||||
|
||||
# Tiled decompression
|
||||
for samp in GRAY 444; do
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -tile -quiet -benchtime 0.01 ${dctarg}
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -tile -quiet -benchtime 0.01 -warmup 0 ${dctarg} $YUVARG
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do
|
||||
runme cmp $i $OUTDIR/${basename}_${samp}_${dct}_djpeg.${EXT}
|
||||
@@ -100,7 +127,7 @@ for image in $IMAGES; do
|
||||
done
|
||||
done
|
||||
for samp in 420 422; do
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -tile -quiet -benchtime 0.01 -fastupsample ${dctarg}
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -tile -quiet -benchtime 0.01 -warmup 0 -fastupsample ${dctarg} $YUVARG
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do
|
||||
runme cmp $i $OUTDIR/${basename}_${samp}_${dct}_nosmooth_djpeg.${EXT}
|
||||
@@ -113,8 +140,8 @@ for image in $IMAGES; do
|
||||
for scale in 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8; do
|
||||
scalearg=`echo $scale | sed s@_@/@g`
|
||||
for samp in GRAY 420 422 444; do
|
||||
$EXEDIR/djpeg -rgb -scale ${scalearg} $BMPARG $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg >$OUTDIR/${basename}_${samp}_${scale}_djpeg.${EXT}
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -scale ${scalearg} -quiet -benchtime 0.01
|
||||
runme $EXEDIR/djpeg -rgb -scale ${scalearg} $NSARG $BMPARG -outfile $OUTDIR/${basename}_${samp}_${scale}_djpeg.${EXT} $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -scale ${scalearg} -quiet -benchtime 0.01 -warmup 0 $YUVARG
|
||||
runme cmp $OUTDIR/${basename}_${samp}_Q95_${scale}.${EXT} $OUTDIR/${basename}_${samp}_${scale}_djpeg.${EXT}
|
||||
rm $OUTDIR/${basename}_${samp}_Q95_${scale}.${EXT}
|
||||
done
|
||||
@@ -122,18 +149,18 @@ for image in $IMAGES; do
|
||||
|
||||
# Transforms
|
||||
for samp in GRAY 420 422 444; do
|
||||
$EXEDIR/jpegtran -flip horizontal -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_hflip_jpegtran.jpg
|
||||
$EXEDIR/jpegtran -flip vertical -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_vflip_jpegtran.jpg
|
||||
$EXEDIR/jpegtran -transpose -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_transpose_jpegtran.jpg
|
||||
$EXEDIR/jpegtran -transverse -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_transverse_jpegtran.jpg
|
||||
$EXEDIR/jpegtran -rotate 90 -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_rot90_jpegtran.jpg
|
||||
$EXEDIR/jpegtran -rotate 180 -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_rot180_jpegtran.jpg
|
||||
$EXEDIR/jpegtran -rotate 270 -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_rot270_jpegtran.jpg
|
||||
runme $EXEDIR/jpegtran -flip horizontal -trim -outfile $OUTDIR/${basename}_${samp}_hflip_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
runme $EXEDIR/jpegtran -flip vertical -trim -outfile $OUTDIR/${basename}_${samp}_vflip_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
runme $EXEDIR/jpegtran -transpose -trim -outfile $OUTDIR/${basename}_${samp}_transpose_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
runme $EXEDIR/jpegtran -transverse -trim -outfile $OUTDIR/${basename}_${samp}_transverse_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
runme $EXEDIR/jpegtran -rotate 90 -trim -outfile $OUTDIR/${basename}_${samp}_rot90_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
runme $EXEDIR/jpegtran -rotate 180 -trim -outfile $OUTDIR/${basename}_${samp}_rot180_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
runme $EXEDIR/jpegtran -rotate 270 -trim -outfile $OUTDIR/${basename}_${samp}_rot270_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
done
|
||||
for xform in hflip vflip transpose transverse rot90 rot180 rot270; do
|
||||
for samp in GRAY 444; do
|
||||
$EXEDIR/djpeg -rgb $BMPARG $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg >$OUTDIR/${basename}_${samp}_${xform}_jpegtran.${EXT}
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -$xform -tile -quiet -benchtime 0.01
|
||||
runme $EXEDIR/djpeg -rgb $BMPARG -outfile $OUTDIR/${basename}_${samp}_${xform}_jpegtran.${EXT} $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -$xform -tile -quiet -benchtime 0.01 -warmup 0 $YUVARG
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do
|
||||
runme cmp $i $OUTDIR/${basename}_${samp}_${xform}_jpegtran.${EXT}
|
||||
@@ -141,8 +168,8 @@ for image in $IMAGES; do
|
||||
done
|
||||
done
|
||||
for samp in 420 422; do
|
||||
$EXEDIR/djpeg -nosmooth -rgb $BMPARG $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg >$OUTDIR/${basename}_${samp}_${xform}_jpegtran.${EXT}
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -$xform -tile -quiet -benchtime 0.01 -fastupsample
|
||||
runme $EXEDIR/djpeg -nosmooth -rgb $BMPARG -outfile $OUTDIR/${basename}_${samp}_${xform}_jpegtran.${EXT} $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -$xform -tile -quiet -benchtime 0.01 -warmup 0 -fastupsample $YUVARG
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do
|
||||
runme cmp $i $OUTDIR/${basename}_${samp}_${xform}_jpegtran.${EXT}
|
||||
@@ -154,7 +181,7 @@ for image in $IMAGES; do
|
||||
# Grayscale transform
|
||||
for xform in hflip vflip transpose transverse rot90 rot180 rot270; do
|
||||
for samp in GRAY 444 422 420; do
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -$xform -tile -quiet -benchtime 0.01 -grayscale
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -$xform -tile -quiet -benchtime 0.01 -warmup 0 -grayscale $YUVARG
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do
|
||||
runme cmp $i $OUTDIR/${basename}_GRAY_${xform}_jpegtran.${EXT}
|
||||
@@ -168,8 +195,8 @@ for image in $IMAGES; do
|
||||
for samp in GRAY 444 422 420; do
|
||||
for scale in 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8; do
|
||||
scalearg=`echo $scale | sed s@_@/@g`
|
||||
$EXEDIR/djpeg -rgb -scale ${scalearg} $BMPARG $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg >$OUTDIR/${basename}_${samp}_${xform}_${scale}_jpegtran.${EXT}
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -$xform -scale ${scalearg} -quiet -benchtime 0.01
|
||||
runme $EXEDIR/djpeg -rgb -scale ${scalearg} $NSARG $BMPARG -outfile $OUTDIR/${basename}_${samp}_${xform}_${scale}_jpegtran.${EXT} $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg
|
||||
runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -$xform -scale ${scalearg} -quiet -benchtime 0.01 -warmup 0 $YUVARG
|
||||
runme cmp $OUTDIR/${basename}_${samp}_Q95_${scale}.${EXT} $OUTDIR/${basename}_${samp}_${xform}_${scale}_jpegtran.${EXT}
|
||||
rm $OUTDIR/${basename}_${samp}_Q95_${scale}.${EXT}
|
||||
done
|
||||
|
||||
@@ -24,6 +24,9 @@ IMGDIR=@srcdir@/testimages
|
||||
OUTDIR=__tjbenchtest_java_output
|
||||
EXEDIR=.
|
||||
JAVA="@JAVA@ -cp java/turbojpeg.jar -Djava.library.path=.libs"
|
||||
BMPARG=
|
||||
NSARG=
|
||||
YUVARG=
|
||||
|
||||
if [ -d $OUTDIR ]; then
|
||||
rm -rf $OUTDIR
|
||||
@@ -32,33 +35,58 @@ mkdir -p $OUTDIR
|
||||
|
||||
exec >$EXEDIR/tjbenchtest-java.log
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
if [ "$1" = "-yuv" ]; then
|
||||
NSARG=-nosmooth
|
||||
YUVARG=-yuv
|
||||
|
||||
# NOTE: The combination of tjEncodeYUV*() and tjCompressFromYUV*() does not
|
||||
# always produce bitwise-identical results to tjCompress*() if subsampling is
|
||||
# enabled. In both cases, if the image width or height are not evenly
|
||||
# divisible by the MCU width/height, then the bottom and/or right edge are
|
||||
# expanded. However, the libjpeg code performs this expansion prior to
|
||||
# downsampling, and TurboJPEG performs it in tjCompressFromYUV*(), which is
|
||||
# after downsampling. Thus, the two will agree only if the width/height along
|
||||
# each downsampled dimension is an odd number or is evenly divisible by the MCU
|
||||
# width/height. This disagreement basically amounts to a round-off error, but
|
||||
# there is no easy way around it, so for now, we just test the only image that
|
||||
# works. (NOTE: nightshot_iso_100 does not suffer from the above issue, but
|
||||
# it suffers from an unrelated problem whereby the combination of
|
||||
# tjDecompressToYUV*() and tjDecodeYUV*() do not produce bitwise-identical
|
||||
# results to tjDecompress*() if decompression scaling is enabled. This latter
|
||||
# phenomenon is not yet fully understood but is also believed to be some sort
|
||||
# of round-off error.)
|
||||
IMAGES="vgl_6548_0026a.bmp"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Standard tests
|
||||
for image in $IMAGES; do
|
||||
|
||||
cp $IMGDIR/$image $OUTDIR
|
||||
basename=`basename $image .bmp`
|
||||
$EXEDIR/cjpeg -quality 95 -dct fast -grayscale $IMGDIR/${basename}.bmp >$OUTDIR/${basename}_GRAY_fast_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct fast -sample 2x2 $IMGDIR/${basename}.bmp >$OUTDIR/${basename}_420_fast_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct fast -sample 2x1 $IMGDIR/${basename}.bmp >$OUTDIR/${basename}_422_fast_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct fast -sample 1x1 $IMGDIR/${basename}.bmp >$OUTDIR/${basename}_444_fast_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct int -grayscale $IMGDIR/${basename}.bmp >$OUTDIR/${basename}_GRAY_accurate_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct int -sample 2x2 $IMGDIR/${basename}.bmp >$OUTDIR/${basename}_420_accurate_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct int -sample 2x1 $IMGDIR/${basename}.bmp >$OUTDIR/${basename}_422_accurate_cjpeg.jpg
|
||||
$EXEDIR/cjpeg -quality 95 -dct int -sample 1x1 $IMGDIR/${basename}.bmp >$OUTDIR/${basename}_444_accurate_cjpeg.jpg
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct fast -grayscale -outfile $OUTDIR/${basename}_GRAY_fast_cjpeg.jpg $IMGDIR/${basename}.bmp
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct fast -sample 2x2 -outfile $OUTDIR/${basename}_420_fast_cjpeg.jpg $IMGDIR/${basename}.bmp
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct fast -sample 2x1 -outfile $OUTDIR/${basename}_422_fast_cjpeg.jpg $IMGDIR/${basename}.bmp
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct fast -sample 1x1 -outfile $OUTDIR/${basename}_444_fast_cjpeg.jpg $IMGDIR/${basename}.bmp
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct int -grayscale -outfile $OUTDIR/${basename}_GRAY_accurate_cjpeg.jpg $IMGDIR/${basename}.bmp
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct int -sample 2x2 -outfile $OUTDIR/${basename}_420_accurate_cjpeg.jpg $IMGDIR/${basename}.bmp
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct int -sample 2x1 -outfile $OUTDIR/${basename}_422_accurate_cjpeg.jpg $IMGDIR/${basename}.bmp
|
||||
runme $EXEDIR/cjpeg -quality 95 -dct int -sample 1x1 -outfile $OUTDIR/${basename}_444_accurate_cjpeg.jpg $IMGDIR/${basename}.bmp
|
||||
for samp in GRAY 420 422 444; do
|
||||
$EXEDIR/djpeg -rgb -bmp $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg >$OUTDIR/${basename}_${samp}_default_djpeg.bmp
|
||||
$EXEDIR/djpeg -dct fast -rgb -bmp $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg >$OUTDIR/${basename}_${samp}_fast_djpeg.bmp
|
||||
$EXEDIR/djpeg -dct int -rgb -bmp $OUTDIR/${basename}_${samp}_accurate_cjpeg.jpg >$OUTDIR/${basename}_${samp}_accurate_djpeg.bmp
|
||||
runme $EXEDIR/djpeg -rgb -bmp -outfile $OUTDIR/${basename}_${samp}_default_djpeg.bmp $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg
|
||||
runme $EXEDIR/djpeg -dct fast -rgb -bmp -outfile $OUTDIR/${basename}_${samp}_fast_djpeg.bmp $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg
|
||||
runme $EXEDIR/djpeg -dct int -rgb -bmp -outfile $OUTDIR/${basename}_${samp}_accurate_djpeg.bmp $OUTDIR/${basename}_${samp}_accurate_cjpeg.jpg
|
||||
done
|
||||
for samp in 420 422; do
|
||||
$EXEDIR/djpeg -nosmooth -bmp $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg >$OUTDIR/${basename}_${samp}_default_nosmooth_djpeg.bmp
|
||||
$EXEDIR/djpeg -dct fast -nosmooth -bmp $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg >$OUTDIR/${basename}_${samp}_fast_nosmooth_djpeg.bmp
|
||||
$EXEDIR/djpeg -dct int -nosmooth -bmp $OUTDIR/${basename}_${samp}_accurate_cjpeg.jpg >$OUTDIR/${basename}_${samp}_accurate_nosmooth_djpeg.bmp
|
||||
runme $EXEDIR/djpeg -nosmooth -bmp -outfile $OUTDIR/${basename}_${samp}_default_nosmooth_djpeg.bmp $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg
|
||||
runme $EXEDIR/djpeg -dct fast -nosmooth -bmp -outfile $OUTDIR/${basename}_${samp}_fast_nosmooth_djpeg.bmp $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg
|
||||
runme $EXEDIR/djpeg -dct int -nosmooth -bmp -outfile $OUTDIR/${basename}_${samp}_accurate_nosmooth_djpeg.bmp $OUTDIR/${basename}_${samp}_accurate_cjpeg.jpg
|
||||
done
|
||||
|
||||
# Compression
|
||||
for dct in accurate fast; do
|
||||
runme $JAVA TJBench $OUTDIR/$image 95 -rgb -quiet -benchtime 0.01 -${dct}dct
|
||||
runme $JAVA TJBench $OUTDIR/$image 95 -rgb -quiet -benchtime 0.01 -warmup 0 -${dct}dct $YUVARG
|
||||
for samp in GRAY 420 422 444; do
|
||||
runme cmp $OUTDIR/${basename}_${samp}_Q95.jpg $OUTDIR/${basename}_${samp}_${dct}_cjpeg.jpg
|
||||
done
|
||||
@@ -71,7 +99,7 @@ for image in $IMAGES; do
|
||||
fi
|
||||
|
||||
# Tiled compression & decompression
|
||||
runme $JAVA TJBench $OUTDIR/$image 95 -rgb -tile -quiet -benchtime 0.01 ${dctarg}
|
||||
runme $JAVA TJBench $OUTDIR/$image 95 -rgb -tile -quiet -benchtime 0.01 -warmup 0 ${dctarg} $YUVARG
|
||||
for samp in GRAY 444; do
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].bmp \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.bmp; do
|
||||
@@ -79,7 +107,7 @@ for image in $IMAGES; do
|
||||
rm $i
|
||||
done
|
||||
done
|
||||
runme $JAVA TJBench $OUTDIR/$image 95 -rgb -tile -quiet -benchtime 0.01 -fastupsample ${dctarg}
|
||||
runme $JAVA TJBench $OUTDIR/$image 95 -rgb -tile -quiet -benchtime 0.01 -warmup 0 -fastupsample ${dctarg} $YUVARG
|
||||
for samp in 420 422; do
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].bmp \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.bmp; do
|
||||
@@ -90,7 +118,7 @@ for image in $IMAGES; do
|
||||
|
||||
# Tiled decompression
|
||||
for samp in GRAY 444; do
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -tile -quiet -benchtime 0.01 ${dctarg}
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -tile -quiet -benchtime 0.01 -warmup 0 ${dctarg} $YUVARG
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].bmp \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.bmp; do
|
||||
runme cmp -i 54:54 $i $OUTDIR/${basename}_${samp}_${dct}_djpeg.bmp
|
||||
@@ -98,7 +126,7 @@ for image in $IMAGES; do
|
||||
done
|
||||
done
|
||||
for samp in 420 422; do
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -tile -quiet -benchtime 0.01 -fastupsample ${dctarg}
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -tile -quiet -benchtime 0.01 -warmup 0 -fastupsample ${dctarg} $YUVARG
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].bmp \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.bmp; do
|
||||
runme cmp $i -i 54:54 $OUTDIR/${basename}_${samp}_${dct}_nosmooth_djpeg.bmp
|
||||
@@ -111,8 +139,8 @@ for image in $IMAGES; do
|
||||
for scale in 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8; do
|
||||
scalearg=`echo $scale | sed s@_@/@g`
|
||||
for samp in GRAY 420 422 444; do
|
||||
$EXEDIR/djpeg -rgb -scale ${scalearg} -bmp $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg >$OUTDIR/${basename}_${samp}_${scale}_djpeg.bmp
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -scale ${scalearg} -quiet -benchtime 0.01
|
||||
runme $EXEDIR/djpeg -rgb -scale ${scalearg} $NSARG -bmp -outfile $OUTDIR/${basename}_${samp}_${scale}_djpeg.bmp $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -scale ${scalearg} -quiet -benchtime 0.01 -warmup 0 $YUVARG
|
||||
runme cmp -i 54:54 $OUTDIR/${basename}_${samp}_Q95_${scale}.bmp $OUTDIR/${basename}_${samp}_${scale}_djpeg.bmp
|
||||
rm $OUTDIR/${basename}_${samp}_Q95_${scale}.bmp
|
||||
done
|
||||
@@ -120,18 +148,18 @@ for image in $IMAGES; do
|
||||
|
||||
# Transforms
|
||||
for samp in GRAY 420 422 444; do
|
||||
$EXEDIR/jpegtran -flip horizontal -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_hflip_jpegtran.jpg
|
||||
$EXEDIR/jpegtran -flip vertical -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_vflip_jpegtran.jpg
|
||||
$EXEDIR/jpegtran -transpose -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_transpose_jpegtran.jpg
|
||||
$EXEDIR/jpegtran -transverse -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_transverse_jpegtran.jpg
|
||||
$EXEDIR/jpegtran -rotate 90 -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_rot90_jpegtran.jpg
|
||||
$EXEDIR/jpegtran -rotate 180 -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_rot180_jpegtran.jpg
|
||||
$EXEDIR/jpegtran -rotate 270 -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_rot270_jpegtran.jpg
|
||||
runme $EXEDIR/jpegtran -flip horizontal -trim -outfile $OUTDIR/${basename}_${samp}_hflip_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
runme $EXEDIR/jpegtran -flip vertical -trim -outfile $OUTDIR/${basename}_${samp}_vflip_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
runme $EXEDIR/jpegtran -transpose -trim -outfile $OUTDIR/${basename}_${samp}_transpose_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
runme $EXEDIR/jpegtran -transverse -trim -outfile $OUTDIR/${basename}_${samp}_transverse_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
runme $EXEDIR/jpegtran -rotate 90 -trim -outfile $OUTDIR/${basename}_${samp}_rot90_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
runme $EXEDIR/jpegtran -rotate 180 -trim -outfile $OUTDIR/${basename}_${samp}_rot180_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
runme $EXEDIR/jpegtran -rotate 270 -trim -outfile $OUTDIR/${basename}_${samp}_rot270_jpegtran.jpg $OUTDIR/${basename}_${samp}_Q95.jpg
|
||||
done
|
||||
for xform in hflip vflip transpose transverse rot90 rot180 rot270; do
|
||||
for samp in GRAY 444; do
|
||||
$EXEDIR/djpeg -rgb -bmp $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg >$OUTDIR/${basename}_${samp}_${xform}_jpegtran.bmp
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -$xform -tile -quiet -benchtime 0.01
|
||||
runme $EXEDIR/djpeg -rgb -bmp -outfile $OUTDIR/${basename}_${samp}_${xform}_jpegtran.bmp $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -$xform -tile -quiet -benchtime 0.01 -warmup 0 $YUVARG
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].bmp \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.bmp; do
|
||||
runme cmp -i 54:54 $i $OUTDIR/${basename}_${samp}_${xform}_jpegtran.bmp
|
||||
@@ -139,8 +167,8 @@ for image in $IMAGES; do
|
||||
done
|
||||
done
|
||||
for samp in 420 422; do
|
||||
$EXEDIR/djpeg -nosmooth -rgb -bmp $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg >$OUTDIR/${basename}_${samp}_${xform}_jpegtran.bmp
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -$xform -tile -quiet -benchtime 0.01 -fastupsample
|
||||
runme $EXEDIR/djpeg -nosmooth -rgb -bmp -outfile $OUTDIR/${basename}_${samp}_${xform}_jpegtran.bmp $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -$xform -tile -quiet -benchtime 0.01 -warmup 0 -fastupsample $YUVARG
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].bmp \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.bmp; do
|
||||
runme cmp -i 54:54 $i $OUTDIR/${basename}_${samp}_${xform}_jpegtran.bmp
|
||||
@@ -152,7 +180,7 @@ for image in $IMAGES; do
|
||||
# Grayscale transform
|
||||
for xform in hflip vflip transpose transverse rot90 rot180 rot270; do
|
||||
for samp in GRAY 444 422 420; do
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -$xform -tile -quiet -benchtime 0.01 -grayscale
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -$xform -tile -quiet -benchtime 0.01 -warmup 0 -grayscale $YUVARG
|
||||
for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].bmp \
|
||||
$OUTDIR/${basename}_${samp}_Q95_full.bmp; do
|
||||
runme cmp -i 54:54 $i $OUTDIR/${basename}_GRAY_${xform}_jpegtran.bmp
|
||||
@@ -166,8 +194,8 @@ for image in $IMAGES; do
|
||||
for samp in GRAY 444 422 420; do
|
||||
for scale in 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8; do
|
||||
scalearg=`echo $scale | sed s@_@/@g`
|
||||
$EXEDIR/djpeg -rgb -scale ${scalearg} -bmp $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg >$OUTDIR/${basename}_${samp}_${xform}_${scale}_jpegtran.bmp
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -$xform -scale ${scalearg} -quiet -benchtime 0.01
|
||||
runme $EXEDIR/djpeg -rgb -scale ${scalearg} $NSARG -bmp -outfile $OUTDIR/${basename}_${samp}_${xform}_${scale}_jpegtran.bmp $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg
|
||||
runme $JAVA TJBench $OUTDIR/${basename}_${samp}_Q95.jpg -$xform -scale ${scalearg} -quiet -benchtime 0.01 -warmup 0 $YUVARG
|
||||
runme cmp -i 54:54 $OUTDIR/${basename}_${samp}_Q95_${scale}.bmp $OUTDIR/${basename}_${samp}_${xform}_${scale}_jpegtran.bmp
|
||||
rm $OUTDIR/${basename}_${samp}_Q95_${scale}.bmp
|
||||
done
|
||||
|
||||
302
tjunittest.c
302
tjunittest.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2009-2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2009-2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -79,8 +79,7 @@ const int _4byteFormats[]={TJPF_RGBX, TJPF_BGRX, TJPF_XBGR, TJPF_XRGB,
|
||||
const int _onlyGray[]={TJPF_GRAY};
|
||||
const int _onlyRGB[]={TJPF_RGB};
|
||||
|
||||
enum {YUVENCODE=1, YUVDECODE};
|
||||
int yuv=0, alloc=0, pad=4;
|
||||
int doyuv=0, alloc=0, pad=4;
|
||||
|
||||
int exitStatus=0;
|
||||
#define bailout() {exitStatus=-1; goto bailout;}
|
||||
@@ -295,60 +294,6 @@ int checkBuf(unsigned char *buf, int w, int h, int pf, int subsamp,
|
||||
|
||||
#define PAD(v, p) ((v+(p)-1)&(~((p)-1)))
|
||||
|
||||
void initBufYUV(unsigned char *buf, int w, int pad, int h, int subsamp)
|
||||
{
|
||||
int row, col;
|
||||
int hsf=tjMCUWidth[subsamp]/8, vsf=tjMCUHeight[subsamp]/8;
|
||||
int pw=PAD(w, hsf), ph=PAD(h, vsf);
|
||||
int cw=pw/hsf, ch=ph/vsf;
|
||||
int ypitch=PAD(pw, pad), uvpitch=PAD(cw, pad);
|
||||
int halfway=16, blocksize=8;
|
||||
|
||||
memset(buf, 0, tjBufSizeYUV2(w, pad, h, subsamp));
|
||||
|
||||
for(row=0; row<ph; row++)
|
||||
{
|
||||
for(col=0; col<pw; col++)
|
||||
{
|
||||
unsigned char *y=&buf[ypitch*row+col];
|
||||
if(((row/blocksize)+(col/blocksize))%2==0)
|
||||
{
|
||||
if(row<halfway) *y=255; else *y=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(row<halfway) *y=76; else *y=226;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(subsamp!=TJSAMP_GRAY)
|
||||
{
|
||||
halfway=16/vsf;
|
||||
for(row=0; row<ch; row++)
|
||||
{
|
||||
for(col=0; col<cw; col++)
|
||||
{
|
||||
unsigned char *u=&buf[ypitch*ph + (uvpitch*row+col)],
|
||||
*v=&buf[ypitch*ph + uvpitch*ch + (uvpitch*row+col)];
|
||||
if(((row*vsf/blocksize)+(col*hsf/blocksize))%2==0)
|
||||
*u=*v=128;
|
||||
else
|
||||
{
|
||||
if(row<halfway)
|
||||
{
|
||||
*u=85; *v=255;
|
||||
}
|
||||
else
|
||||
{
|
||||
*u=0; *v=149;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int checkBufYUV(unsigned char *buf, int w, int h, int subsamp,
|
||||
tjscalingfactor sf)
|
||||
{
|
||||
@@ -451,74 +396,57 @@ void compTest(tjhandle handle, unsigned char **dstBuf,
|
||||
unsigned long *dstSize, int w, int h, int pf, char *basename,
|
||||
int subsamp, int jpegQual, int flags)
|
||||
{
|
||||
char tempStr[1024]; unsigned char *srcBuf=NULL;
|
||||
const char *pfStr=(yuv==YUVDECODE)? "YUV":pixFormatStr[pf];
|
||||
char tempStr[1024]; unsigned char *srcBuf=NULL, *yuvBuf=NULL;
|
||||
const char *pfStr=pixFormatStr[pf];
|
||||
const char *buStrLong=(flags&TJFLAG_BOTTOMUP)? "Bottom-Up":"Top-Down ";
|
||||
const char *buStr=(flags&TJFLAG_BOTTOMUP)? "BU":"TD";
|
||||
double t;
|
||||
|
||||
if(yuv==YUVDECODE)
|
||||
{
|
||||
printf("YUV %s %s -> JPEG Q%d ... ", subNameLong[subsamp], buStrLong,
|
||||
jpegQual);
|
||||
if((srcBuf=(unsigned char *)malloc(tjBufSizeYUV2(w, pad, h, subsamp)))
|
||||
==NULL)
|
||||
_throw("Memory allocation failure");
|
||||
initBufYUV(srcBuf, w, pad, h, subsamp);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(yuv==YUVENCODE)
|
||||
printf("%s %s -> %s YUV ... ", pfStr, buStrLong, subNameLong[subsamp]);
|
||||
else
|
||||
printf("%s %s -> %s Q%d ... ", pfStr, buStrLong, subNameLong[subsamp],
|
||||
jpegQual);
|
||||
if((srcBuf=(unsigned char *)malloc(w*h*tjPixelSize[pf]))==NULL)
|
||||
_throw("Memory allocation failure");
|
||||
initBuf(srcBuf, w, h, pf, flags);
|
||||
}
|
||||
if((srcBuf=(unsigned char *)malloc(w*h*tjPixelSize[pf]))==NULL)
|
||||
_throw("Memory allocation failure");
|
||||
initBuf(srcBuf, w, h, pf, flags);
|
||||
|
||||
if(*dstBuf && *dstSize>0) memset(*dstBuf, 0, *dstSize);
|
||||
|
||||
t=gettime();
|
||||
if(yuv==YUVENCODE)
|
||||
{
|
||||
_tj(tjEncodeYUV3(handle, srcBuf, w, 0, h, pf, *dstBuf, pad, subsamp,
|
||||
flags));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!alloc) flags|=TJFLAG_NOREALLOC;
|
||||
if(yuv==YUVDECODE)
|
||||
{
|
||||
_tj(tjCompressFromYUV(handle, srcBuf, w, pad, h, subsamp, dstBuf,
|
||||
dstSize, jpegQual, flags));
|
||||
}
|
||||
else
|
||||
{
|
||||
_tj(tjCompress2(handle, srcBuf, w, 0, h, pf, dstBuf, dstSize, subsamp,
|
||||
jpegQual, flags));
|
||||
}
|
||||
}
|
||||
t=gettime()-t;
|
||||
|
||||
if(yuv==YUVENCODE)
|
||||
snprintf(tempStr, 1024, "%s_enc_%s_%s_%s.yuv", basename, pfStr, buStr,
|
||||
subName[subsamp]);
|
||||
else
|
||||
snprintf(tempStr, 1024, "%s_enc_%s_%s_%s_Q%d.jpg", basename, pfStr, buStr,
|
||||
subName[subsamp], jpegQual);
|
||||
writeJPEG(*dstBuf, *dstSize, tempStr);
|
||||
if(yuv==YUVENCODE)
|
||||
if(!alloc) flags|=TJFLAG_NOREALLOC;
|
||||
if(doyuv)
|
||||
{
|
||||
unsigned long yuvSize=tjBufSizeYUV2(w, pad, h, subsamp);
|
||||
tjscalingfactor sf={1, 1};
|
||||
if(checkBufYUV(*dstBuf, w, h, subsamp, sf)) printf("Passed.");
|
||||
else printf("FAILED!");
|
||||
tjhandle handle2=tjInitCompress();
|
||||
if(!handle2) _throwtj();
|
||||
|
||||
if((yuvBuf=(unsigned char *)malloc(yuvSize))==NULL)
|
||||
_throw("Memory allocation failure");
|
||||
memset(yuvBuf, 0, yuvSize);
|
||||
|
||||
printf("%s %s -> YUV %s ... ", pfStr, buStrLong, subNameLong[subsamp]);
|
||||
_tj(tjEncodeYUV3(handle2, srcBuf, w, 0, h, pf, yuvBuf, pad, subsamp,
|
||||
flags));
|
||||
tjDestroy(handle2);
|
||||
if(checkBufYUV(yuvBuf, w, h, subsamp, sf)) printf("Passed.\n");
|
||||
else printf("FAILED!\n");
|
||||
|
||||
printf("YUV %s %s -> JPEG Q%d ... ", subNameLong[subsamp], buStrLong,
|
||||
jpegQual);
|
||||
_tj(tjCompressFromYUV(handle, yuvBuf, w, pad, h, subsamp, dstBuf,
|
||||
dstSize, jpegQual, flags));
|
||||
}
|
||||
else printf("Done.");
|
||||
printf(" %f ms\n Result in %s\n", t*1000., tempStr);
|
||||
else
|
||||
{
|
||||
printf("%s %s -> %s Q%d ... ", pfStr, buStrLong, subNameLong[subsamp],
|
||||
jpegQual);
|
||||
_tj(tjCompress2(handle, srcBuf, w, 0, h, pf, dstBuf, dstSize, subsamp,
|
||||
jpegQual, flags));
|
||||
}
|
||||
|
||||
snprintf(tempStr, 1024, "%s_enc_%s_%s_%s_Q%d.jpg", basename, pfStr, buStr,
|
||||
subName[subsamp], jpegQual);
|
||||
writeJPEG(*dstBuf, *dstSize, tempStr);
|
||||
printf("Done.\n Result in %s\n", tempStr);
|
||||
|
||||
bailout:
|
||||
if(yuvBuf) free(yuvBuf);
|
||||
if(srcBuf) free(srcBuf);
|
||||
}
|
||||
|
||||
@@ -527,63 +455,67 @@ void _decompTest(tjhandle handle, unsigned char *jpegBuf,
|
||||
unsigned long jpegSize, int w, int h, int pf, char *basename, int subsamp,
|
||||
int flags, tjscalingfactor sf)
|
||||
{
|
||||
unsigned char *dstBuf=NULL;
|
||||
int _hdrw=0, _hdrh=0, _hdrsubsamp=-1; double t;
|
||||
unsigned char *dstBuf=NULL, *yuvBuf=NULL;
|
||||
int _hdrw=0, _hdrh=0, _hdrsubsamp=-1;
|
||||
int scaledWidth=TJSCALED(w, sf);
|
||||
int scaledHeight=TJSCALED(h, sf);
|
||||
unsigned long dstSize=0;
|
||||
|
||||
if(yuv==YUVENCODE) return;
|
||||
|
||||
if(yuv==YUVDECODE)
|
||||
printf("JPEG -> YUV %s ", subNameLong[subsamp]);
|
||||
else
|
||||
printf("JPEG -> %s %s ", pixFormatStr[pf],
|
||||
(flags&TJFLAG_BOTTOMUP)? "Bottom-Up":"Top-Down ");
|
||||
if(sf.num!=1 || sf.denom!=1)
|
||||
printf("%d/%d ... ", sf.num, sf.denom);
|
||||
else printf("... ");
|
||||
|
||||
_tj(tjDecompressHeader2(handle, jpegBuf, jpegSize, &_hdrw, &_hdrh,
|
||||
&_hdrsubsamp));
|
||||
if(_hdrw!=w || _hdrh!=h || _hdrsubsamp!=subsamp)
|
||||
_throw("Incorrect JPEG header");
|
||||
|
||||
if(yuv==YUVDECODE)
|
||||
dstSize=tjBufSizeYUV2(scaledWidth, pad, scaledHeight, subsamp);
|
||||
else dstSize=scaledWidth*scaledHeight*tjPixelSize[pf];
|
||||
dstSize=scaledWidth*scaledHeight*tjPixelSize[pf];
|
||||
if((dstBuf=(unsigned char *)malloc(dstSize))==NULL)
|
||||
_throw("Memory allocation failure");
|
||||
memset(dstBuf, 0, dstSize);
|
||||
|
||||
t=gettime();
|
||||
if(yuv==YUVDECODE)
|
||||
if(doyuv)
|
||||
{
|
||||
_tj(tjDecompressToYUV2(handle, jpegBuf, jpegSize, dstBuf, scaledWidth,
|
||||
unsigned long yuvSize=tjBufSizeYUV2(scaledWidth, pad, scaledHeight,
|
||||
subsamp);
|
||||
tjhandle handle2=tjInitDecompress();
|
||||
if(!handle2) _throwtj();
|
||||
|
||||
if((yuvBuf=(unsigned char *)malloc(yuvSize))==NULL)
|
||||
_throw("Memory allocation failure");
|
||||
memset(yuvBuf, 0, yuvSize);
|
||||
|
||||
printf("JPEG -> YUV %s ", subNameLong[subsamp]);
|
||||
if(sf.num!=1 || sf.denom!=1)
|
||||
printf("%d/%d ... ", sf.num, sf.denom);
|
||||
else printf("... ");
|
||||
_tj(tjDecompressToYUV2(handle, jpegBuf, jpegSize, yuvBuf, scaledWidth,
|
||||
pad, scaledHeight, flags));
|
||||
if(checkBufYUV(yuvBuf, scaledWidth, scaledHeight, subsamp, sf))
|
||||
printf("Passed.\n");
|
||||
else printf("FAILED!\n");
|
||||
|
||||
printf("YUV %s -> %s %s ... ", subNameLong[subsamp], pixFormatStr[pf],
|
||||
(flags&TJFLAG_BOTTOMUP)? "Bottom-Up":"Top-Down ");
|
||||
_tj(tjDecodeYUV(handle2, yuvBuf, pad, subsamp, dstBuf, scaledWidth, 0,
|
||||
scaledHeight, pf, flags));
|
||||
tjDestroy(handle2);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("JPEG -> %s %s ", pixFormatStr[pf],
|
||||
(flags&TJFLAG_BOTTOMUP)? "Bottom-Up":"Top-Down ");
|
||||
if(sf.num!=1 || sf.denom!=1)
|
||||
printf("%d/%d ... ", sf.num, sf.denom);
|
||||
else printf("... ");
|
||||
_tj(tjDecompress2(handle, jpegBuf, jpegSize, dstBuf, scaledWidth, 0,
|
||||
scaledHeight, pf, flags));
|
||||
}
|
||||
t=gettime()-t;
|
||||
|
||||
if(yuv==YUVDECODE)
|
||||
{
|
||||
if(checkBufYUV(dstBuf, scaledWidth, scaledHeight, subsamp, sf))
|
||||
printf("Passed.");
|
||||
else printf("FAILED!");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(checkBuf(dstBuf, scaledWidth, scaledHeight, pf, subsamp, sf, flags))
|
||||
printf("Passed.");
|
||||
else printf("FAILED!");
|
||||
}
|
||||
printf(" %f ms\n", t*1000.);
|
||||
if(checkBuf(dstBuf, scaledWidth, scaledHeight, pf, subsamp, sf, flags))
|
||||
printf("Passed.");
|
||||
else printf("FAILED!");
|
||||
printf("\n");
|
||||
|
||||
bailout:
|
||||
if(yuvBuf) free(yuvBuf);
|
||||
if(dstBuf) free(dstBuf);
|
||||
}
|
||||
|
||||
@@ -619,9 +551,7 @@ void doTest(int w, int h, const int *formats, int nformats, int subsamp,
|
||||
unsigned char *dstBuf=NULL;
|
||||
unsigned long size=0; int pfi, pf, i;
|
||||
|
||||
if(yuv==YUVENCODE)
|
||||
size=tjBufSizeYUV2(w, pad, h, subsamp);
|
||||
else if(!alloc)
|
||||
if(!alloc)
|
||||
size=tjBufSize(w, h, subsamp);
|
||||
if(size!=0)
|
||||
if((dstBuf=(unsigned char *)tjAlloc(size))==NULL)
|
||||
@@ -638,19 +568,18 @@ void doTest(int w, int h, const int *formats, int nformats, int subsamp,
|
||||
if(subsamp==TJSAMP_422 || subsamp==TJSAMP_420 || subsamp==TJSAMP_440 ||
|
||||
subsamp==TJSAMP_411)
|
||||
flags|=TJFLAG_FASTUPSAMPLE;
|
||||
if(i==1)
|
||||
{
|
||||
if(yuv==YUVDECODE) goto bailout;
|
||||
else flags|=TJFLAG_BOTTOMUP;
|
||||
}
|
||||
if(i==1) flags|=TJFLAG_BOTTOMUP;
|
||||
pf=formats[pfi];
|
||||
compTest(chandle, &dstBuf, &size, w, h, pf, basename, subsamp, 100,
|
||||
flags);
|
||||
decompTest(dhandle, dstBuf, size, w, h, pf, basename, subsamp,
|
||||
flags);
|
||||
if(pf>=TJPF_RGBX && pf<=TJPF_XRGB)
|
||||
{
|
||||
printf("\n");
|
||||
decompTest(dhandle, dstBuf, size, w, h, pf+(TJPF_RGBA-TJPF_RGBX),
|
||||
basename, subsamp, flags);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
@@ -667,9 +596,9 @@ void doTest(int w, int h, const int *formats, int nformats, int subsamp,
|
||||
void bufSizeTest(void)
|
||||
{
|
||||
int w, h, i, subsamp;
|
||||
unsigned char *srcBuf=NULL, *jpegBuf=NULL;
|
||||
unsigned char *srcBuf=NULL, *dstBuf=NULL;
|
||||
tjhandle handle=NULL;
|
||||
unsigned long jpegSize=0;
|
||||
unsigned long dstSize=0;
|
||||
|
||||
if((handle=tjInitCompress())==NULL) _throwtj();
|
||||
|
||||
@@ -684,12 +613,12 @@ void bufSizeTest(void)
|
||||
if(h%100==0) printf("%.4d x %.4d\b\b\b\b\b\b\b\b\b\b\b", w, h);
|
||||
if((srcBuf=(unsigned char *)malloc(w*h*4))==NULL)
|
||||
_throw("Memory allocation failure");
|
||||
if(!alloc)
|
||||
if(!alloc || doyuv)
|
||||
{
|
||||
if((jpegBuf=(unsigned char *)tjAlloc(tjBufSize(w, h, subsamp)))
|
||||
==NULL)
|
||||
if(doyuv) dstSize=tjBufSizeYUV2(w, pad, h, subsamp);
|
||||
else dstSize=tjBufSize(w, h, subsamp);
|
||||
if((dstBuf=(unsigned char *)tjAlloc(dstSize))==NULL)
|
||||
_throw("Memory allocation failure");
|
||||
jpegSize=tjBufSize(w, h, subsamp);
|
||||
}
|
||||
|
||||
for(i=0; i<w*h*4; i++)
|
||||
@@ -698,19 +627,27 @@ void bufSizeTest(void)
|
||||
else srcBuf[i]=255;
|
||||
}
|
||||
|
||||
_tj(tjCompress2(handle, srcBuf, w, 0, h, TJPF_BGRX, &jpegBuf,
|
||||
&jpegSize, subsamp, 100, alloc? 0:TJFLAG_NOREALLOC));
|
||||
if(doyuv)
|
||||
{
|
||||
_tj(tjEncodeYUV3(handle, srcBuf, w, 0, h, TJPF_BGRX, dstBuf, pad,
|
||||
subsamp, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
_tj(tjCompress2(handle, srcBuf, w, 0, h, TJPF_BGRX, &dstBuf,
|
||||
&dstSize, subsamp, 100, alloc? 0:TJFLAG_NOREALLOC));
|
||||
}
|
||||
free(srcBuf); srcBuf=NULL;
|
||||
tjFree(jpegBuf); jpegBuf=NULL;
|
||||
tjFree(dstBuf); dstBuf=NULL;
|
||||
|
||||
if((srcBuf=(unsigned char *)malloc(h*w*4))==NULL)
|
||||
_throw("Memory allocation failure");
|
||||
if(!alloc)
|
||||
if(!alloc || doyuv)
|
||||
{
|
||||
if((jpegBuf=(unsigned char *)tjAlloc(tjBufSize(h, w, subsamp)))
|
||||
==NULL)
|
||||
if(doyuv) dstSize=tjBufSizeYUV2(h, pad, w, subsamp);
|
||||
else dstSize=tjBufSize(h, w, subsamp);
|
||||
if((dstBuf=(unsigned char *)tjAlloc(dstSize))==NULL)
|
||||
_throw("Memory allocation failure");
|
||||
jpegSize=tjBufSize(h, w, subsamp);
|
||||
}
|
||||
|
||||
for(i=0; i<h*w*4; i++)
|
||||
@@ -719,10 +656,18 @@ void bufSizeTest(void)
|
||||
else srcBuf[i]=255;
|
||||
}
|
||||
|
||||
_tj(tjCompress2(handle, srcBuf, h, 0, w, TJPF_BGRX, &jpegBuf,
|
||||
&jpegSize, subsamp, 100, alloc? 0:TJFLAG_NOREALLOC));
|
||||
if(doyuv)
|
||||
{
|
||||
_tj(tjEncodeYUV3(handle, srcBuf, h, 0, w, TJPF_BGRX, dstBuf, pad,
|
||||
subsamp, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
_tj(tjCompress2(handle, srcBuf, h, 0, w, TJPF_BGRX, &dstBuf,
|
||||
&dstSize, subsamp, 100, alloc? 0:TJFLAG_NOREALLOC));
|
||||
}
|
||||
free(srcBuf); srcBuf=NULL;
|
||||
tjFree(jpegBuf); jpegBuf=NULL;
|
||||
tjFree(dstBuf); dstBuf=NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -730,14 +675,14 @@ void bufSizeTest(void)
|
||||
|
||||
bailout:
|
||||
if(srcBuf) free(srcBuf);
|
||||
if(jpegBuf) free(jpegBuf);
|
||||
if(dstBuf) free(dstBuf);
|
||||
if(handle) tjDestroy(handle);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int doyuv=0, i, num4bf=5;
|
||||
int i, num4bf=5;
|
||||
#ifdef _WIN32
|
||||
srand((unsigned int)time(NULL));
|
||||
#endif
|
||||
@@ -753,7 +698,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
if(alloc) printf("Testing automatic buffer allocation\n");
|
||||
if(doyuv) {yuv=YUVENCODE; num4bf=4;}
|
||||
if(doyuv) num4bf=4;
|
||||
doTest(35, 39, _3byteFormats, 2, TJSAMP_444, "test");
|
||||
doTest(39, 41, _4byteFormats, num4bf, TJSAMP_444, "test");
|
||||
doTest(41, 35, _3byteFormats, 2, TJSAMP_422, "test");
|
||||
@@ -767,24 +712,17 @@ int main(int argc, char *argv[])
|
||||
doTest(39, 41, _onlyGray, 1, TJSAMP_GRAY, "test");
|
||||
doTest(41, 35, _3byteFormats, 2, TJSAMP_GRAY, "test");
|
||||
doTest(35, 39, _4byteFormats, 4, TJSAMP_GRAY, "test");
|
||||
if(!doyuv) bufSizeTest();
|
||||
bufSizeTest();
|
||||
if(doyuv)
|
||||
{
|
||||
yuv=YUVDECODE;
|
||||
printf("\n--------------------\n\n");
|
||||
doTest(48, 48, _onlyRGB, 1, TJSAMP_444, "test_yuv0");
|
||||
doTest(35, 39, _onlyRGB, 1, TJSAMP_444, "test_yuv1");
|
||||
doTest(48, 48, _onlyRGB, 1, TJSAMP_422, "test_yuv0");
|
||||
doTest(39, 41, _onlyRGB, 1, TJSAMP_422, "test_yuv1");
|
||||
doTest(48, 48, _onlyRGB, 1, TJSAMP_420, "test_yuv0");
|
||||
doTest(41, 35, _onlyRGB, 1, TJSAMP_420, "test_yuv1");
|
||||
doTest(48, 48, _onlyRGB, 1, TJSAMP_440, "test_yuv0");
|
||||
doTest(35, 39, _onlyRGB, 1, TJSAMP_440, "test_yuv1");
|
||||
doTest(48, 48, _onlyRGB, 1, TJSAMP_411, "test_yuv0");
|
||||
doTest(39, 41, _onlyRGB, 1, TJSAMP_411, "test_yuv1");
|
||||
doTest(48, 48, _onlyRGB, 1, TJSAMP_GRAY, "test_yuv0");
|
||||
doTest(41, 35, _onlyRGB, 1, TJSAMP_GRAY, "test_yuv1");
|
||||
doTest(48, 48, _onlyGray, 1, TJSAMP_GRAY, "test_yuv0");
|
||||
doTest(35, 39, _onlyGray, 1, TJSAMP_GRAY, "test_yuv1");
|
||||
}
|
||||
|
||||
return exitStatus;
|
||||
|
||||
150
turbojpeg-jni.c
150
turbojpeg-jni.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -250,12 +250,13 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compressFrom
|
||||
return (jint)jpegSize;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIII_3BIII
|
||||
(JNIEnv *env, jobject obj, jbyteArray src, jint width, jint pitch,
|
||||
jint height, jint pf, jbyteArray dst, jint pad, jint subsamp, jint flags)
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIIIII_3BIII
|
||||
(JNIEnv *env, jobject obj, jbyteArray src, jint x, jint y, jint width,
|
||||
jint pitch, jint height, jint pf, jbyteArray dst, jint pad, jint subsamp,
|
||||
jint flags)
|
||||
{
|
||||
tjhandle handle=0;
|
||||
jsize arraySize=0, yuvSize;
|
||||
jsize arraySize=0, actualPitch, yuvSize;
|
||||
unsigned char *srcBuf=NULL, *dstBuf=NULL;
|
||||
|
||||
gethandle();
|
||||
@@ -266,7 +267,8 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___
|
||||
if(org_libjpegturbo_turbojpeg_TJ_NUMPF!=TJ_NUMPF)
|
||||
_throw("Mismatch between Java and C API");
|
||||
|
||||
arraySize=(pitch==0)? width*tjPixelSize[pf]*height:pitch*height;
|
||||
actualPitch=(pitch==0)? width*tjPixelSize[pf]:pitch;
|
||||
arraySize=(y+height-1)*actualPitch + x+width;
|
||||
if((*env)->GetArrayLength(env, src)<arraySize)
|
||||
_throw("Source buffer is not large enough");
|
||||
yuvSize=(jsize)tjBufSizeYUV2(width, pad, height, subsamp);
|
||||
@@ -278,8 +280,8 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___
|
||||
bailif0(srcBuf=(*env)->GetPrimitiveArrayCritical(env, src, 0));
|
||||
bailif0(dstBuf=(*env)->GetPrimitiveArrayCritical(env, dst, 0));
|
||||
|
||||
if(tjEncodeYUV3(handle, srcBuf, width, pitch, height, pf, dstBuf, pad,
|
||||
subsamp, flags)==-1)
|
||||
if(tjEncodeYUV3(handle, &srcBuf[y*actualPitch + x*tjPixelSize[pf]], width,
|
||||
pitch, height, pf, dstBuf, pad, subsamp, flags)==-1)
|
||||
{
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, dst, dstBuf, 0);
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, src, srcBuf, 0);
|
||||
@@ -297,16 +299,17 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___
|
||||
(JNIEnv *env, jobject obj, jbyteArray src, jint width, jint pitch,
|
||||
jint height, jint pf, jbyteArray dst, jint subsamp, jint flags)
|
||||
{
|
||||
Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIII_3BIII(
|
||||
env, obj, src, width, pitch, height, pf, dst, 4, subsamp, flags);
|
||||
Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIIIII_3BIII(
|
||||
env, obj, src, 0, 0, width, pitch, height, pf, dst, 4, subsamp, flags);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIII_3BIII
|
||||
(JNIEnv *env, jobject obj, jintArray src, jint width, jint stride,
|
||||
jint height, jint pf, jbyteArray dst, jint pad, jint subsamp, jint flags)
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIIIII_3BIII
|
||||
(JNIEnv *env, jobject obj, jintArray src, jint x, jint y, jint width,
|
||||
jint stride, jint height, jint pf, jbyteArray dst, jint pad, jint subsamp,
|
||||
jint flags)
|
||||
{
|
||||
tjhandle handle=0;
|
||||
jsize arraySize=0, yuvSize;
|
||||
jsize arraySize=0, actualStride, yuvSize;
|
||||
unsigned char *srcBuf=NULL, *dstBuf=NULL;
|
||||
|
||||
gethandle();
|
||||
@@ -319,7 +322,8 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___
|
||||
if(tjPixelSize[pf]!=sizeof(jint))
|
||||
_throw("Pixel format must be 32-bit when encoding from an integer buffer.");
|
||||
|
||||
arraySize=(stride==0)? width*height:stride*height;
|
||||
actualStride=(stride==0)? width:stride;
|
||||
arraySize=(y+height-1)*actualStride + x+width;
|
||||
if((*env)->GetArrayLength(env, src)<arraySize)
|
||||
_throw("Source buffer is not large enough");
|
||||
yuvSize=(jsize)tjBufSizeYUV2(width, pad, height, subsamp);
|
||||
@@ -331,8 +335,8 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___
|
||||
bailif0(srcBuf=(*env)->GetPrimitiveArrayCritical(env, src, 0));
|
||||
bailif0(dstBuf=(*env)->GetPrimitiveArrayCritical(env, dst, 0));
|
||||
|
||||
if(tjEncodeYUV3(handle, srcBuf, width, stride*sizeof(jint), height, pf,
|
||||
dstBuf, pad, subsamp, flags)==-1)
|
||||
if(tjEncodeYUV3(handle, &srcBuf[(y*actualStride + x)*sizeof(int)], width,
|
||||
stride*sizeof(jint), height, pf, dstBuf, pad, subsamp, flags)==-1)
|
||||
{
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, dst, dstBuf, 0);
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, src, srcBuf, 0);
|
||||
@@ -350,8 +354,8 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___
|
||||
(JNIEnv *env, jobject obj, jintArray src, jint width, jint pitch,
|
||||
jint height, jint pf, jbyteArray dst, jint subsamp, jint flags)
|
||||
{
|
||||
Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIII_3BIII(
|
||||
env, obj, src, width, pitch, height, pf, dst, 4, subsamp, flags);
|
||||
Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIIIII_3BIII(
|
||||
env, obj, src, 0, 0, width, pitch, height, pf, dst, 4, subsamp, flags);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_destroy
|
||||
@@ -435,13 +439,13 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress
|
||||
}
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, src, jpegBuf, 0); jpegBuf=NULL;
|
||||
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegSubsamp", "I"));
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "srcSubsamp", "I"));
|
||||
(*env)->SetIntField(env, obj, _fid, jpegSubsamp);
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegColorspace", "I"));
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "srcColorspace", "I"));
|
||||
(*env)->SetIntField(env, obj, _fid, jpegColorspace);
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegWidth", "I"));
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "srcWidth", "I"));
|
||||
(*env)->SetIntField(env, obj, _fid, width);
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegHeight", "I"));
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "srcHeight", "I"));
|
||||
(*env)->SetIntField(env, obj, _fid, height);
|
||||
|
||||
bailout:
|
||||
@@ -562,11 +566,11 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress
|
||||
|
||||
if((*env)->GetArrayLength(env, src)<jpegSize)
|
||||
_throw("Source buffer is not large enough");
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegSubsamp", "I"));
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "srcSubsamp", "I"));
|
||||
jpegSubsamp=(int)(*env)->GetIntField(env, obj, _fid);
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegWidth", "I"));
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "srcWidth", "I"));
|
||||
jpegWidth=(int)(*env)->GetIntField(env, obj, _fid);
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegHeight", "I"));
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "srcHeight", "I"));
|
||||
jpegHeight=(int)(*env)->GetIntField(env, obj, _fid);
|
||||
|
||||
yuvSize=(jsize)tjBufSizeYUV2(desiredWidth==0? jpegWidth:desiredWidth,
|
||||
@@ -601,6 +605,94 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress
|
||||
env, obj, src, jpegSize, dst, 0, 4, 0, flags);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3BII_3BIIIIIII
|
||||
(JNIEnv *env, jobject obj, jbyteArray src, jint pad, jint subsamp,
|
||||
jbyteArray dst, jint x, jint y, jint width, jint pitch, jint height,
|
||||
jint pf, jint flags)
|
||||
{
|
||||
tjhandle handle=0;
|
||||
jsize arraySize=0, actualPitch;
|
||||
unsigned char *srcBuf=NULL, *dstBuf=NULL;
|
||||
|
||||
gethandle();
|
||||
|
||||
if(pf<0 || pf>=org_libjpegturbo_turbojpeg_TJ_NUMPF)
|
||||
_throw("Invalid argument in decodeYUV()");
|
||||
if(org_libjpegturbo_turbojpeg_TJ_NUMPF!=TJ_NUMPF)
|
||||
_throw("Mismatch between Java and C API");
|
||||
|
||||
arraySize=tjBufSizeYUV2(width, pad, height, subsamp);
|
||||
if((*env)->GetArrayLength(env, src)<arraySize)
|
||||
_throw("Source buffer is not large enough");
|
||||
actualPitch=(pitch==0)? width*tjPixelSize[pf]:pitch;
|
||||
arraySize=(y+height-1)*actualPitch + (x+width)*tjPixelSize[pf];
|
||||
if((*env)->GetArrayLength(env, dst)<arraySize)
|
||||
_throw("Destination buffer is not large enough");
|
||||
|
||||
bailif0(srcBuf=(*env)->GetPrimitiveArrayCritical(env, src, 0));
|
||||
bailif0(dstBuf=(*env)->GetPrimitiveArrayCritical(env, dst, 0));
|
||||
|
||||
if(tjDecodeYUV(handle, srcBuf, pad, subsamp,
|
||||
&dstBuf[y*actualPitch + x*tjPixelSize[pf]], width, pitch, height, pf,
|
||||
flags)==-1)
|
||||
{
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, dst, dstBuf, 0);
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, src, srcBuf, 0);
|
||||
dstBuf=srcBuf=NULL;
|
||||
_throw(tjGetErrorStr());
|
||||
}
|
||||
|
||||
bailout:
|
||||
if(dstBuf) (*env)->ReleasePrimitiveArrayCritical(env, dst, dstBuf, 0);
|
||||
if(srcBuf) (*env)->ReleasePrimitiveArrayCritical(env, src, srcBuf, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3BII_3IIIIIIII
|
||||
(JNIEnv *env, jobject obj, jbyteArray src, jint pad, jint subsamp,
|
||||
jintArray dst, jint x, jint y, jint width, jint stride, jint height,
|
||||
jint pf, jint flags)
|
||||
{
|
||||
tjhandle handle=0;
|
||||
jsize arraySize=0, actualStride;
|
||||
unsigned char *srcBuf=NULL, *dstBuf=NULL;
|
||||
|
||||
gethandle();
|
||||
|
||||
if(pf<0 || pf>=org_libjpegturbo_turbojpeg_TJ_NUMPF)
|
||||
_throw("Invalid argument in decodeYUV()");
|
||||
if(org_libjpegturbo_turbojpeg_TJ_NUMPF!=TJ_NUMPF)
|
||||
_throw("Mismatch between Java and C API");
|
||||
if(tjPixelSize[pf]!=sizeof(jint))
|
||||
_throw("Pixel format must be 32-bit when decoding to an integer buffer.");
|
||||
|
||||
arraySize=tjBufSizeYUV2(width, pad, height, subsamp);
|
||||
if((*env)->GetArrayLength(env, src)<arraySize)
|
||||
_throw("Source buffer is not large enough");
|
||||
actualStride=(stride==0)? width:stride;
|
||||
arraySize=(y+height-1)*actualStride + x+width;
|
||||
if((*env)->GetArrayLength(env, dst)<arraySize)
|
||||
_throw("Destination buffer is not large enough");
|
||||
|
||||
bailif0(srcBuf=(*env)->GetPrimitiveArrayCritical(env, src, 0));
|
||||
bailif0(dstBuf=(*env)->GetPrimitiveArrayCritical(env, dst, 0));
|
||||
|
||||
if(tjDecodeYUV(handle, srcBuf, pad, subsamp,
|
||||
&dstBuf[(y*actualStride + x)*sizeof(int)], width, stride*sizeof(jint),
|
||||
height, pf, flags)==-1)
|
||||
{
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, dst, dstBuf, 0);
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, src, srcBuf, 0);
|
||||
dstBuf=srcBuf=NULL;
|
||||
_throw(tjGetErrorStr());
|
||||
}
|
||||
|
||||
bailout:
|
||||
if(dstBuf) (*env)->ReleasePrimitiveArrayCritical(env, dst, dstBuf, 0);
|
||||
if(srcBuf) (*env)->ReleasePrimitiveArrayCritical(env, src, srcBuf, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJTransformer_init
|
||||
(JNIEnv *env, jobject obj)
|
||||
{
|
||||
@@ -698,11 +790,11 @@ JNIEXPORT jintArray JNICALL Java_org_libjpegturbo_turbojpeg_TJTransformer_transf
|
||||
|
||||
if((*env)->GetArrayLength(env, jsrcBuf)<jpegSize)
|
||||
_throw("Source buffer is not large enough");
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegWidth", "I"));
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "srcWidth", "I"));
|
||||
jpegWidth=(int)(*env)->GetIntField(env, obj, _fid);
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegHeight", "I"));
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "srcHeight", "I"));
|
||||
jpegHeight=(int)(*env)->GetIntField(env, obj, _fid);
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "jpegSubsamp", "I"));
|
||||
bailif0(_fid=(*env)->GetFieldID(env, _cls, "srcSubsamp", "I"));
|
||||
jpegSubsamp=(int)(*env)->GetIntField(env, obj, _fid);
|
||||
|
||||
n=(*env)->GetArrayLength(env, dstobjs);
|
||||
|
||||
@@ -42,6 +42,7 @@ TURBOJPEG_1.4
|
||||
global:
|
||||
tjBufSizeYUV2;
|
||||
tjCompressFromYUV;
|
||||
tjDecodeYUV;
|
||||
tjDecompressHeader3;
|
||||
tjDecompressToYUV2;
|
||||
tjEncodeYUV3;
|
||||
|
||||
@@ -68,12 +68,15 @@ TURBOJPEG_1.4
|
||||
global:
|
||||
tjBufSizeYUV2;
|
||||
tjCompressFromYUV;
|
||||
tjDecodeYUV;
|
||||
tjDecompressHeader3;
|
||||
tjDecompressToYUV2;
|
||||
tjEncodeYUV3;
|
||||
Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV__IIII;
|
||||
Java_org_libjpegturbo_turbojpeg_TJCompressor_compressFromYUV___3BIIII_3BII;
|
||||
Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIII_3BIII;
|
||||
Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIII_3BIII;
|
||||
Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIIIII_3BIII;
|
||||
Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIIIII_3BIII;
|
||||
Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV___3BI_3BIIII;
|
||||
Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3BII_3BIIIIIII;
|
||||
Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3BII_3IIIIIIII;
|
||||
} TURBOJPEG_1.3;
|
||||
|
||||
240
turbojpeg.c
240
turbojpeg.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2009-2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2009-2014 D. R. Commander. All Rights Reserved.
|
||||
* mozjpeg Modifications:
|
||||
* Copyright (C) 2014, Mozilla Corporation.
|
||||
*
|
||||
@@ -548,9 +548,9 @@ DLLEXPORT unsigned long DLLCALL tjBufSize(int width, int height,
|
||||
if(width<1 || height<1 || jpegSubsamp<0 || jpegSubsamp>=NUMSUBOPT)
|
||||
_throw("tjBufSize(): Invalid argument");
|
||||
|
||||
// This allows for rare corner cases in which a JPEG image can actually be
|
||||
// larger than the uncompressed input (we wouldn't mention it if it hadn't
|
||||
// happened before.)
|
||||
/* This allows for rare corner cases in which a JPEG image can actually be
|
||||
larger than the uncompressed input (we wouldn't mention it if it hadn't
|
||||
happened before.) */
|
||||
mcuw=tjMCUWidth[jpegSubsamp];
|
||||
mcuh=tjMCUHeight[jpegSubsamp];
|
||||
chromasf=jpegSubsamp==TJSAMP_GRAY? 0: 4*64/(mcuw*mcuh);
|
||||
@@ -566,9 +566,9 @@ DLLEXPORT unsigned long DLLCALL TJBUFSIZE(int width, int height)
|
||||
if(width<1 || height<1)
|
||||
_throw("TJBUFSIZE(): Invalid argument");
|
||||
|
||||
// This allows for rare corner cases in which a JPEG image can actually be
|
||||
// larger than the uncompressed input (we wouldn't mention it if it hadn't
|
||||
// happened before.)
|
||||
/* This allows for rare corner cases in which a JPEG image can actually be
|
||||
larger than the uncompressed input (we wouldn't mention it if it hadn't
|
||||
happened before.) */
|
||||
retval=PAD(width, 16) * PAD(height, 16) * 6 + 2048;
|
||||
|
||||
bailout:
|
||||
@@ -766,10 +766,20 @@ DLLEXPORT int DLLCALL tjEncodeYUV3(tjhandle handle, unsigned char *srcBuf,
|
||||
else if(flags&TJFLAG_FORCESSE2) putenv("JSIMD_FORCESSE2=1");
|
||||
|
||||
yuvsize=tjBufSizeYUV2(width, pad, height, subsamp);
|
||||
jpeg_mem_dest_tj(cinfo, &dstBuf, &yuvsize, 0);
|
||||
if(setCompDefaults(cinfo, pixelFormat, subsamp, -1, flags)==-1) return -1;
|
||||
|
||||
jpeg_start_compress(cinfo, TRUE);
|
||||
/* Execute only the parts of jpeg_start_compress() that we need. If we
|
||||
were to call the whole jpeg_start_compress() function, then it would try
|
||||
to write the file headers, which could overflow the output buffer if the
|
||||
YUV image were very small. */
|
||||
if(cinfo->global_state!=CSTATE_START)
|
||||
_throw("tjEncodeYUV3(): libjpeg API is in the wrong state");
|
||||
(*cinfo->err->reset_error_mgr)((j_common_ptr)cinfo);
|
||||
jinit_c_master_control(cinfo, FALSE);
|
||||
jinit_color_converter(cinfo);
|
||||
jinit_downsampler(cinfo);
|
||||
(*cinfo->cconvert->start_pass)(cinfo);
|
||||
|
||||
pw=PAD(width, cinfo->max_h_samp_factor);
|
||||
ph=PAD(height, cinfo->max_v_samp_factor);
|
||||
|
||||
@@ -973,10 +983,10 @@ DLLEXPORT int DLLCALL tjCompressFromYUV(tjhandle handle, unsigned char *srcBuf,
|
||||
for(j=0; j<min(th[i], ch[i]-crow[i]); j++)
|
||||
{
|
||||
memcpy(tmpbuf[i][j], inbuf[i][crow[i]+j], cw[i]);
|
||||
// Duplicate last sample in row to fill out MCU
|
||||
/* Duplicate last sample in row to fill out MCU */
|
||||
for(k=cw[i]; k<iw[i]; k++) tmpbuf[i][j][k]=tmpbuf[i][j][cw[i]-1];
|
||||
}
|
||||
// Duplicate last row to fill out MCU
|
||||
/* Duplicate last row to fill out MCU */
|
||||
for(j=ch[i]-crow[i]; j<th[i]; j++)
|
||||
memcpy(tmpbuf[i][j], tmpbuf[i][ch[i]-crow[i]-1], iw[i]);
|
||||
yuvptr[i]=tmpbuf[i];
|
||||
@@ -1233,6 +1243,214 @@ DLLEXPORT int DLLCALL tjDecompress(tjhandle handle, unsigned char *jpegBuf,
|
||||
}
|
||||
|
||||
|
||||
static int setDecodeDefaults(struct jpeg_decompress_struct *dinfo,
|
||||
int pixelFormat, int subsamp, int flags)
|
||||
{
|
||||
int i;
|
||||
|
||||
dinfo->scale_num=dinfo->scale_denom=1;
|
||||
|
||||
if(subsamp==TJSAMP_GRAY)
|
||||
{
|
||||
dinfo->num_components=dinfo->comps_in_scan=1;
|
||||
dinfo->jpeg_color_space=JCS_GRAYSCALE;
|
||||
}
|
||||
else
|
||||
{
|
||||
dinfo->num_components=dinfo->comps_in_scan=3;
|
||||
dinfo->jpeg_color_space=JCS_YCbCr;
|
||||
}
|
||||
|
||||
dinfo->comp_info=(jpeg_component_info *)
|
||||
(*dinfo->mem->alloc_small)((j_common_ptr)dinfo, JPOOL_IMAGE,
|
||||
dinfo->num_components*SIZEOF(jpeg_component_info));
|
||||
|
||||
for(i=0; i<dinfo->num_components; i++)
|
||||
{
|
||||
jpeg_component_info *compptr=&dinfo->comp_info[i];
|
||||
compptr->h_samp_factor=(i==0)? tjMCUWidth[subsamp]/8:1;
|
||||
compptr->v_samp_factor=(i==0)? tjMCUHeight[subsamp]/8:1;
|
||||
compptr->component_index=i;
|
||||
compptr->component_id=i+1;
|
||||
compptr->quant_tbl_no=compptr->dc_tbl_no=compptr->ac_tbl_no=
|
||||
(i==0)? 0:1;
|
||||
dinfo->cur_comp_info[i]=compptr;
|
||||
}
|
||||
dinfo->data_precision=8;
|
||||
for(i=0; i<2; i++)
|
||||
{
|
||||
if(dinfo->quant_tbl_ptrs[i]==NULL)
|
||||
dinfo->quant_tbl_ptrs[i]=jpeg_alloc_quant_table((j_common_ptr)dinfo);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int my_read_markers(j_decompress_ptr dinfo)
|
||||
{
|
||||
return JPEG_REACHED_SOS;
|
||||
}
|
||||
|
||||
void my_reset_marker_reader(j_decompress_ptr dinfo)
|
||||
{
|
||||
}
|
||||
|
||||
DLLEXPORT int DLLCALL tjDecodeYUV(tjhandle handle, unsigned char *srcBuf,
|
||||
int pad, int subsamp, unsigned char *dstBuf, int width, int pitch,
|
||||
int height, int pixelFormat, int flags)
|
||||
{
|
||||
int i, retval=0; JSAMPROW *row_pointer=NULL;
|
||||
JSAMPLE *_tmpbuf[MAX_COMPONENTS];
|
||||
JSAMPROW *tmpbuf[MAX_COMPONENTS], *inbuf[MAX_COMPONENTS];
|
||||
int row, pw, ph, cw[MAX_COMPONENTS], ch[MAX_COMPONENTS];
|
||||
JSAMPLE *ptr=srcBuf;
|
||||
unsigned long yuvsize=0;
|
||||
jpeg_component_info *compptr;
|
||||
#ifndef JCS_EXTENSIONS
|
||||
unsigned char *rgbBuf=NULL;
|
||||
#endif
|
||||
JMETHOD(int, old_read_markers, (j_decompress_ptr));
|
||||
JMETHOD(void, old_reset_marker_reader, (j_decompress_ptr));
|
||||
|
||||
getinstance(handle);
|
||||
|
||||
for(i=0; i<MAX_COMPONENTS; i++)
|
||||
{
|
||||
tmpbuf[i]=NULL; _tmpbuf[i]=NULL; inbuf[i]=NULL;
|
||||
}
|
||||
|
||||
if((this->init&DECOMPRESS)==0)
|
||||
_throw("tjDecodeYUV(): Instance has not been initialized for compression");
|
||||
|
||||
if(srcBuf==NULL || pad<0 || !isPow2(pad) || subsamp<0 || subsamp>=NUMSUBOPT
|
||||
|| dstBuf==NULL || width<=0 || pitch<0 || height<=0 || pixelFormat<0
|
||||
|| pixelFormat>=TJ_NUMPF)
|
||||
_throw("tjDecodeYUV(): Invalid argument");
|
||||
|
||||
if(setjmp(this->jerr.setjmp_buffer))
|
||||
{
|
||||
/* If we get here, the JPEG code has signaled an error. */
|
||||
retval=-1;
|
||||
goto bailout;
|
||||
}
|
||||
|
||||
if(pixelFormat==TJPF_CMYK)
|
||||
_throw("tjDecodeYUV(): Cannot decode YUV images into CMYK pixels.");
|
||||
|
||||
if(pitch==0) pitch=width*tjPixelSize[pixelFormat];
|
||||
|
||||
#ifndef JCS_EXTENSIONS
|
||||
if(pixelFormat!=TJPF_GRAY)
|
||||
{
|
||||
rgbBuf=(unsigned char *)malloc(width*height*RGB_PIXELSIZE);
|
||||
if(!rgbBuf) _throw("tjDecodeYUV(): Memory allocation failure");
|
||||
srcBuf=toRGB(srcBuf, width, pitch, height, pixelFormat, rgbBuf);
|
||||
pitch=width*RGB_PIXELSIZE;
|
||||
}
|
||||
#endif
|
||||
|
||||
dinfo->image_width=width;
|
||||
dinfo->image_height=height;
|
||||
|
||||
if(flags&TJFLAG_FORCEMMX) putenv("JSIMD_FORCEMMX=1");
|
||||
else if(flags&TJFLAG_FORCESSE) putenv("JSIMD_FORCESSE=1");
|
||||
else if(flags&TJFLAG_FORCESSE2) putenv("JSIMD_FORCESSE2=1");
|
||||
|
||||
yuvsize=tjBufSizeYUV2(width, pad, height, subsamp);
|
||||
if(setDecodeDefaults(dinfo, pixelFormat, subsamp, flags)==-1)
|
||||
{
|
||||
retval=-1; goto bailout;
|
||||
}
|
||||
old_read_markers=dinfo->marker->read_markers;
|
||||
dinfo->marker->read_markers=my_read_markers;
|
||||
old_reset_marker_reader=dinfo->marker->reset_marker_reader;
|
||||
dinfo->marker->reset_marker_reader=my_reset_marker_reader;
|
||||
jpeg_read_header(dinfo, TRUE);
|
||||
dinfo->marker->read_markers=old_read_markers;
|
||||
dinfo->marker->reset_marker_reader=old_reset_marker_reader;
|
||||
|
||||
if(setDecompDefaults(dinfo, pixelFormat, flags)==-1)
|
||||
{
|
||||
retval=-1; goto bailout;
|
||||
}
|
||||
dinfo->do_fancy_upsampling=FALSE;
|
||||
jinit_master_decompress(dinfo);
|
||||
(*dinfo->upsample->start_pass)(dinfo);
|
||||
|
||||
pw=PAD(width, dinfo->max_h_samp_factor);
|
||||
ph=PAD(height, dinfo->max_v_samp_factor);
|
||||
|
||||
if(pitch==0) pitch=dinfo->output_width*tjPixelSize[pixelFormat];
|
||||
|
||||
if((row_pointer=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ph))==NULL)
|
||||
_throw("tjDecodeYUV(): Memory allocation failure");
|
||||
for(i=0; i<height; i++)
|
||||
{
|
||||
if(flags&TJFLAG_BOTTOMUP) row_pointer[i]=&dstBuf[(height-i-1)*pitch];
|
||||
else row_pointer[i]=&dstBuf[i*pitch];
|
||||
}
|
||||
if(height<ph)
|
||||
for(i=height; i<ph; i++) row_pointer[i]=row_pointer[height-1];
|
||||
|
||||
for(i=0; i<dinfo->num_components; i++)
|
||||
{
|
||||
compptr=&dinfo->comp_info[i];
|
||||
_tmpbuf[i]=(JSAMPLE *)malloc(PAD(compptr->width_in_blocks*DCTSIZE, 16)
|
||||
* compptr->v_samp_factor + 16);
|
||||
if(!_tmpbuf[i]) _throw("tjDecodeYUV(): Memory allocation failure");
|
||||
tmpbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*compptr->v_samp_factor);
|
||||
if(!tmpbuf[i]) _throw("tjDecodeYUV(): Memory allocation failure");
|
||||
for(row=0; row<compptr->v_samp_factor; row++)
|
||||
{
|
||||
unsigned char *_tmpbuf_aligned=
|
||||
(unsigned char *)PAD((size_t)_tmpbuf[i], 16);
|
||||
tmpbuf[i][row]=&_tmpbuf_aligned[
|
||||
PAD(compptr->width_in_blocks*DCTSIZE, 16) * row];
|
||||
}
|
||||
cw[i]=pw*compptr->h_samp_factor/dinfo->max_h_samp_factor;
|
||||
ch[i]=ph*compptr->v_samp_factor/dinfo->max_v_samp_factor;
|
||||
inbuf[i]=(JSAMPROW *)malloc(sizeof(JSAMPROW)*ch[i]);
|
||||
if(!inbuf[i]) _throw("tjDecodeYUV(): Memory allocation failure");
|
||||
for(row=0; row<ch[i]; row++)
|
||||
{
|
||||
inbuf[i][row]=ptr;
|
||||
ptr+=PAD(cw[i], pad);
|
||||
}
|
||||
}
|
||||
|
||||
if(yuvsize!=(unsigned long)(ptr-srcBuf))
|
||||
_throw("tjDecodeYUV(): YUV image is not the correct size");
|
||||
|
||||
for(row=0; row<ph; row+=dinfo->max_v_samp_factor)
|
||||
{
|
||||
JDIMENSION inrow=0, outrow=0;
|
||||
for(i=0, compptr=dinfo->comp_info; i<dinfo->num_components; i++, compptr++)
|
||||
jcopy_sample_rows(inbuf[i],
|
||||
row*compptr->v_samp_factor/dinfo->max_v_samp_factor, tmpbuf[i], 0,
|
||||
compptr->v_samp_factor, cw[i]);
|
||||
(dinfo->upsample->upsample)(dinfo, tmpbuf, &inrow,
|
||||
dinfo->max_v_samp_factor, &row_pointer[row], &outrow,
|
||||
dinfo->max_v_samp_factor);
|
||||
}
|
||||
jpeg_abort_decompress(dinfo);
|
||||
|
||||
bailout:
|
||||
if(dinfo->global_state>DSTATE_START) jpeg_abort_decompress(dinfo);
|
||||
#ifndef JCS_EXTENSIONS
|
||||
if(rgbBuf) free(rgbBuf);
|
||||
#endif
|
||||
if(row_pointer) free(row_pointer);
|
||||
for(i=0; i<MAX_COMPONENTS; i++)
|
||||
{
|
||||
if(tmpbuf[i]!=NULL) free(tmpbuf[i]);
|
||||
if(_tmpbuf[i]!=NULL) free(_tmpbuf[i]);
|
||||
if(inbuf[i]!=NULL) free(inbuf[i]);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
DLLEXPORT int DLLCALL tjDecompressToYUV2(tjhandle handle,
|
||||
unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf,
|
||||
int width, int pad, int height, int flags)
|
||||
|
||||
63
turbojpeg.h
63
turbojpeg.h
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2009-2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2009-2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -636,7 +636,10 @@ DLLEXPORT int DLLCALL tjCompress2(tjhandle handle, unsigned char *srcBuf,
|
||||
|
||||
|
||||
/**
|
||||
* Compress a YUV planar image into a JPEG image.
|
||||
* Compress a YUV planar image into a JPEG image. Note that, if the width or
|
||||
* height of the YUV image is not an even multiple of the MCU block size
|
||||
* (see #tjMCUWidth and #tjMCUHeight), then an intermediate buffer copy will be
|
||||
* performed within TurboJPEG.
|
||||
*
|
||||
* @param handle a handle to a TurboJPEG compressor or transformer instance
|
||||
* @param srcBuf pointer to an image buffer containing a YUV planar image
|
||||
@@ -733,7 +736,7 @@ DLLEXPORT unsigned long DLLCALL tjBufSizeYUV2(int width, int pad, int height,
|
||||
|
||||
/**
|
||||
* Encode an RGB or grayscale image into a YUV planar image. This function
|
||||
* uses the accelerated color conversion routines in TurboJPEG's underlying
|
||||
* uses the accelerated color conversion routines in the underlying
|
||||
* codec but does not execute any of the other steps in the JPEG compression
|
||||
* process. The Y, U (Cb), and V (Cr) image planes are stored sequentially
|
||||
* into the destination buffer, and the size of each plane is determined by the
|
||||
@@ -925,6 +928,60 @@ DLLEXPORT int DLLCALL tjDecompressToYUV2(tjhandle handle,
|
||||
int width, int pad, int height, int flags);
|
||||
|
||||
|
||||
/**
|
||||
* Decode a YUV planar image into an RGB or grayscale image. This function
|
||||
* uses the accelerated color conversion routines in the underlying
|
||||
* codec but does not execute any of the other steps in the JPEG decompression
|
||||
* process. The Y, U (Cb), and V (Cr) image planes should be stored
|
||||
* sequentially in the source buffer, and the size of each plane is determined
|
||||
* by the width and height of the source image, as well as the specified
|
||||
* padding and level of chrominance subsampling. If the chrominance components
|
||||
* are subsampled along the horizontal dimension, then the width of the
|
||||
* luminance plane should be padded to the nearest multiple of 2 in the input
|
||||
* image (same goes for the height of the luminance plane, if the chrominance
|
||||
* components are subsampled along the vertical dimension.)
|
||||
* <p>
|
||||
* NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the
|
||||
* convention of the digital video community, the TurboJPEG API uses "YUV" to
|
||||
* refer to an image format consisting of Y, Cb, and Cr image planes.
|
||||
*
|
||||
* @param handle a handle to a TurboJPEG decompressor or transformer instance
|
||||
* @param srcBuf pointer to an image buffer containing a YUV planar image to be
|
||||
* decoded. The size of this buffer should match the value returned
|
||||
* by #tjBufSizeYUV2() for the given image width, height, padding, and
|
||||
* level of chrominance subsampling.
|
||||
* @param pad Use this parameter to specify that the width of each line in each
|
||||
* plane of the YUV source image is padded to the nearest multiple of
|
||||
* this number of bytes (must be a power of 2.)
|
||||
* @param subsamp the level of chrominance subsampling used in the YUV source
|
||||
* image (see @ref TJSAMP "Chrominance subsampling options".)
|
||||
* @param dstBuf pointer to an image buffer that will receive the decoded
|
||||
* image. This buffer should normally be <tt>pitch * height</tt>
|
||||
* bytes in size, but the <tt>dstBuf</tt> pointer can also be used to
|
||||
* decode into a specific region of a larger buffer.
|
||||
* @param width width (in pixels) of the source and destination images
|
||||
* @param pitch bytes per line of the destination image. Normally, this should
|
||||
* be <tt>width * #tjPixelSize[pixelFormat]</tt> if the destination
|
||||
* image is unpadded, or <tt>#TJPAD(width *
|
||||
* #tjPixelSize[pixelFormat])</tt> if each line of the destination
|
||||
* image should be padded to the nearest 32-bit boundary, as is the case
|
||||
* for Windows bitmaps. You can also be clever and use the pitch
|
||||
* parameter to skip lines, etc. Setting this parameter to 0 is the
|
||||
* equivalent of setting it to <tt>width *
|
||||
* #tjPixelSize[pixelFormat]</tt>.
|
||||
* @param height height (in pixels) of the source and destination images
|
||||
* @param pixelFormat pixel format of the destination image (see @ref TJPF
|
||||
* "Pixel formats".)
|
||||
* @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
|
||||
* "flags".
|
||||
*
|
||||
* @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
|
||||
*/
|
||||
DLLEXPORT int DLLCALL tjDecodeYUV(tjhandle handle, unsigned char *srcBuf,
|
||||
int pad, int subsamp, unsigned char *dstBuf, int width, int pitch,
|
||||
int height, int pixelFormat, int flags);
|
||||
|
||||
|
||||
/**
|
||||
* Create a new TurboJPEG transformer instance.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user