Skip to content

Commit

Permalink
Merge libjpeg-turbo r1390
Browse files Browse the repository at this point in the history
* commit '73edb3d734a628fd88994bc974dc6737a58bd956': (45 commits)
  Rename the ARM64 assembly file to match the C file
  Fix several mathematical issues discovered in the ARM64 NEON code while running the extended regression tests introduced in r1267.  Specific comments can be found in the original patches: https://sourceforge.net/p/libjpeg-turbo/patches/64/
  Reformat code per Siarhei's original patch (to clearly indicate that the offset instructions are completely independent) and add Siarhei as an individual author (he no longer works for Nokia.)
  Clarify forward compatibility of iOS/ARM builds
  ARM64 NEON SIMD support for YCC-to-RGB565 conversion
  ARM NEON SIMD support for YCC-to-RGB565 conversion, and optimizations to the existing YCC-to-RGB conversion code:
  Ensure that tjFree() is used for any JPEG buffers that might have been dynamically allocated by the compress/transform functions.  To keep things simple, we use tjAlloc() for the statically-allocated buffer as well, so that tjFree() can always be used to free the buffer, regardless of whether it was allocated by tjbench or by the TurboJPEG library.  This fixes crashes that occurred on Windows when running tjunittest or tjbench with the -alloc flag.
  Revert r1335 and r1336.  It was a valiant effort, but on Windows, xmm8-xmm15 are non-volatile, and the overhead of pushing them onto the stack at the beginning of each function and popping them at the end was causing worse performance (in the neighborhood of 3-5%) than just using the work areas and limiting the register usage to xmm0-xmm7.  Best to leave the SSE2 code alone.  We can optimize the register usage for AVX2, once that port takes place.
  Windows doesn't have setenv().  Go, go Gadget Macros.
  1.4 beta1
  Fix 'make dist'
  Don't use sudo when building a Debian package unless the user is non-root
  Add a set of undocumented environment variables and Java system properties that allow compression features of libjpeg that are not normally exposed in the TurboJPEG API to be enabled.  These features are not normally exposed because, for the most part, they aren't "turbo" features, but it is still useful to be able to benchmark them without modifying the code.
  .func/.endfunc are only necessary when generating STABS debug info, which basically went out of style with parachute pants and Rick Astley.  At any rate, none of the platforms for which we're building the ARM code use it (DWARF is the common format these days), and the .func/.endfunc directives cause the clang integrated assembler to fail (http://llvm.org/bugs/show_bug.cgi?id=20424).
  Extend tjbenchtest so that it tests the dynamic JPEG buffer allocation feature in TurboJPEG.  Disable the tiling feature in TJBench whenever dynamic buffer allocation is enabled (because the tiling feature requires a separate buffer for each tile, using it successfully with dynamic buffer allocation would require a separate TurboJPEG compressor instance for each tile, and it's not worth going to that trouble right now.)
  Run the TurboJPEG conformance tests out of a directory in /tmp (for improved performance, if the source directory is on a remote file share.)  Fix an issue in TJBench.java that prevented it from working properly if the source image resided in a directory with a dot in the name.
  Oops
  Subtle point, but dest->outbuffer is a pointer to the address of the JPEG buffer, which is stored in the calling program.  Thus, *(dest->outbuffer) will always equal *outbuffer.  We need to compare *outbuffer with dest->buffer instead to determine if the pointer is being reused.
  If the output buffer in the TurboJPEG destination manager was allocated by the destination manager and is being reused from a previous compression operation, then we need to get the buffer size from the previous operation, since the calling program doesn't know the actual buffer size.
  Actually, we need to increase the size of BUFSIZE, not just the size of _buffer.  The previous patch might have cause problems if, for instance, state->free_in_buffer was 127 but 129 bytes were compressed.  In that case, only 127 of the 129 bytes would have been written to the file.  Also document the fix.
  ...

Conflicts:
	CMakeLists.txt
	Makefile.am
	configure.ac
	jcdctmgr.c
	release/deb-control.tmpl
	sharedlib/CMakeLists.txt
	simd/CMakeLists.txt
	turbojpeg.c
  • Loading branch information
kornelski committed Sep 7, 2014
2 parents a7eb278 + 2ef1bec commit 662bf6b
Show file tree
Hide file tree
Showing 78 changed files with 4,878 additions and 2,136 deletions.
6 changes: 3 additions & 3 deletions BUILDING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -338,17 +338,17 @@ Set the following shell variables for simplicity:
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):
ARM v6 (code will run on all iOS devices, not SIMD-accelerated):
[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):
ARM v7 (code will run on iPhone 3GS-4S/iPad 1st-3rd Generation and newer):
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):
ARM v7s (code will run on iPhone 5/iPad 4th Generation and newer):
[NOTE: Requires Xcode 4.5 or later]
Xcode 4.6.x and earlier:
IOS_CFLAGS="-march=armv7s -mcpu=swift -mtune=swift -mfpu=neon"
Expand Down
451 changes: 261 additions & 190 deletions CMakeLists.txt

Large diffs are not rendered by default.

56 changes: 46 additions & 10 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ 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.
destination images. Conversion between CMYK/YCCK and RGB or YUV images is not
supported. Such conversion requires a color management system and is thus 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.
-- All of the YUV functions now have a corresponding function that operates on
separate image planes instead of a unified image buffer. This allows for
compressing/decoding from or decompressing/encoding to a subregion of a larger
YUV image. It also allows for handling YUV formats that swap the order of the
U and V planes.

[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
Expand All @@ -46,7 +51,7 @@ Android devices that were tested, two demonstrated a small overall performance
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 overall performance gain with both ARMv6 and ARMv7
code (~10-20%.) Actual mileage may vary.
code (~10-20%) when enabling the feature. Actual mileage may vary.

[6] Worked around an issue with Visual C++ 2010 and later that caused incorrect
pixels to be generated when decompressing a JPEG image to a 256-color bitmap,
Expand All @@ -63,12 +68,12 @@ accuracy than the slow integer DCT/IDCT algorithms, and they are quite a bit
slower.

[8] Added a new output colorspace (JCS_RGB565) to the libjpeg API that allows
for decompressing JPEG images into RGB565 (16-bit) pixels.
for decompressing JPEG images into RGB565 (16-bit) pixels. If dithering is not
used, then this code path is SIMD-accelerated on ARM platforms.

[9] Numerous obsolete features, such as support for compilers that can't
handle prototypes and support for the MS-DOS memory model, were removed from
the libjpeg code, greatly improving its readability and making it easier to
maintain and extend.
[9] Numerous obsolete features, such as support for non-ANSI compilers and
support for the MS-DOS memory model, were removed from the libjpeg code,
greatly improving its readability and making it easier to maintain and extend.

[10] Fixed a segfault that occurred when calling output_message() with msg_code
set to JMSG_COPYRIGHT.
Expand All @@ -78,7 +83,38 @@ characters to be passed on the command line, which was causing it to generate
incorrect JPEG files.

[12] Fixed a bug in the build system that was causing the Windows version of
wrjpgcom to be built using the rdjpgcom code.
wrjpgcom to be built using the rdjpgcom source code.

[13] Restored 12-bit-per-component JPEG support. A 12-bit version of
libjpeg-turbo can now be built by passing an argument of --with-12bit to
configure (Unix) or -DWITH_12BIT=1 to cmake (Windows.) 12-bit JPEG support is
included only for convenience. Enabling this feature disables all of the
performance features in libjpeg-turbo, as well as arithmetic coding and the
TurboJPEG API. The resulting library still contains the other libjpeg-turbo
features (such as the colorspace extensions), but in general, it performs no
faster than libjpeg v6b.

[14] Added ARM 64-bit SIMD acceleration for the YCC-to-RGB color conversion
and IDCT algorithms (both are used during JPEG decompression.) For unknown
reasons (probably related to clang), this code cannot currently be compiled for
iOS.

[15] Fixed an extremely rare bug that could cause the Huffman encoder's local
buffer to overrun when a very high-frequency MCU is compressed using quality
100 and no subsampling, and when the JPEG output buffer is being dynamically
resized by the destination manager. This issue was so rare that, even with a
test program specifically designed to make the bug occur (by injecting random
high-frequency YUV data into the compressor), it was reproducible only once in
about every 25 million iterations.

[16] Fixed an oversight in the TurboJPEG C wrapper: if any of the JPEG
compression functions was called repeatedly with the same
automatically-allocated destination buffer, then TurboJPEG would erroneously
assume that the jpegSize parameter was equal to the size of the buffer, when in
fact that parameter was probably equal to the size of the most recently
compressed JPEG image. If the size of the previous JPEG image was not as large
as the current JPEG image, then TurboJPEG would unnecessarily reallocate the
destination buffer.

[7] Improved the accuracy and performance of the non-SIMD implementation of the
floating point inverse DCT (using code borrowed from libjpeg v8a and later.)
Expand Down
118 changes: 92 additions & 26 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,19 @@ tjunittest_LDADD = libturbojpeg.la
endif


cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdbmp.c rdgif.c \
rdppm.c rdswitch.c rdtarga.c rdjpeg.c
cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdgif.c rdppm.c rdswitch.c rdjpeg.c
if WITH_12BIT
else
cjpeg_SOURCES += rdbmp.c rdtarga.c
endif

cjpeg_LDADD = libjpeg.la

cjpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \
-DTARGA_SUPPORTED
cjpeg_CFLAGS = -DGIF_SUPPORTED -DPPM_SUPPORTED
if WITH_12BIT
else
cjpeg_CFLAGS += -DBMP_SUPPORTED -DTARGA_SUPPORTED
endif

if HAVE_LIBPNG
cjpeg_CFLAGS += -DPNG_SUPPORTED $(libpng_CFLAGS)
Expand All @@ -123,12 +129,19 @@ cjpeg_SOURCES += rdpng.c
endif

djpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c djpeg.c rdcolmap.c rdswitch.c \
wrbmp.c wrgif.c wrppm.c wrtarga.c
wrgif.c wrppm.c
if WITH_12BIT
else
djpeg_SOURCES += wrbmp.c wrtarga.c
endif

djpeg_LDADD = libjpeg.la

djpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \
-DTARGA_SUPPORTED
djpeg_CFLAGS = -DGIF_SUPPORTED -DPPM_SUPPORTED
if WITH_12BIT
else
djpeg_CFLAGS += -DBMP_SUPPORTED -DTARGA_SUPPORTED
endif

jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c transupp.h

Expand Down Expand Up @@ -169,14 +182,48 @@ 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 jdcol565.c jdmrgext.c jstdhuff.c
doxygen-extra.css jccolext.c jdcolext.c jdcol565.c jdmrgext.c jstdhuff.c

dist-hook:
rm -rf `find $(distdir) -name .svn`


SUBDIRS += md5

if WITH_12BIT

TESTORIG = testorig12.jpg
MD5_JPEG_RGB_ISLOW = 9620f424569594bb9242b48498ad801f
MD5_PPM_RGB_ISLOW = f3301d2219783b8b3d942b7239fa50c0
MD5_JPEG_422_IFAST_OPT = 7322e3bd2f127f7de4b40d4480ce60e4
MD5_PPM_422_IFAST = 79807fa552899e66a04708f533e16950
MD5_PPM_422M_IFAST = 07737bfe8a7c1c87aaa393a0098d16b0
MD5_JPEG_420_IFAST_Q100_PROG = a1da220b5604081863a504297ed59e55
MD5_PPM_420_Q100_IFAST = 1b3730122709f53d007255e8dfd3305e
MD5_PPM_420M_Q100_IFAST = 980a1a3c5bf9510022869d30b7d26566
MD5_JPEG_GRAY_ISLOW = 235c90707b16e2e069f37c888b2636d9
MD5_PPM_GRAY_ISLOW = 7213c10af507ad467da5578ca5ee1fca
MD5_PPM_GRAY_ISLOW_RGB = e96ee81c30a6ed422d466338bd3de65d
MD5_JPEG_420S_IFAST_OPT = 7af8e60be4d9c227ec63ac9b6630855e
MD5_JPEG_3x2_FLOAT_PROG = a8c17daf77b457725ec929e215b603f8
MD5_PPM_3x2_FLOAT = 42876ab9e5c2f76a87d08db5fbd57956
MD5_PPM_420M_ISLOW_2_1 = 4ca6be2a6f326ff9eaab63e70a8259c0
MD5_PPM_420M_ISLOW_15_8 = 12aa9f9534c1b3d7ba047322226365eb
MD5_PPM_420M_ISLOW_13_8 = f7e22817c7b25e1393e4ec101e9d4e96
MD5_PPM_420M_ISLOW_11_8 = 800a16f9f4dc9b293197bfe11be10a82
MD5_PPM_420M_ISLOW_9_8 = 06b7a92a9bc69f4dc36ec40f1937d55c
MD5_PPM_420M_ISLOW_7_8 = 3ec444a14a4ab4eab88ffc49c48eca43
MD5_PPM_420M_ISLOW_3_4 = 3e726b7ea872445b19437d1c1d4f0d93
MD5_PPM_420M_ISLOW_5_8 = a8a771abdc94301d20ffac119b2caccd
MD5_PPM_420M_ISLOW_1_2 = b419124dd5568b085787234866102866
MD5_PPM_420M_ISLOW_3_8 = 343d19015531b7bbe746124127244fa8
MD5_PPM_420M_ISLOW_1_4 = 35fd59d866e44659edfa3c18db2a3edb
MD5_PPM_420M_ISLOW_1_8 = ccaed48ac0aedefda5d4abe4013f4ad7
MD5_JPEG_CROP = cdb35ff4b4519392690ea040c56ea99c

else

TESTORIG = testorig.jpg
MD5_JPEG_RGB_ISLOW = 768e970dd57b340ff1b83c9d3d47c77b
MD5_PPM_RGB_ISLOW = 00a257f5393fef8821f2b88ac7421291
MD5_BMP_RGB_ISLOW_565 = f07d2e75073e4bb10f6c6f4d36e2e3be
Expand Down Expand Up @@ -226,6 +273,8 @@ MD5_BMP_420M_ISLOW_565 = 8dc0185245353cfa32ad97027342216f
MD5_BMP_420M_ISLOW_565D =d1be3a3339166255e76fa50a0d70d73e
MD5_JPEG_CROP = b4197f377e621c4e9b1d20471432610d

endif

test: testclean all

if WITH_TURBOJPEG
Expand Down Expand Up @@ -255,6 +304,9 @@ endif
./djpeg -dct int -ppm -outfile testout_rgb_islow.ppm testout_rgb_islow.jpg
md5/md5cmp $(MD5_PPM_RGB_ISLOW) testout_rgb_islow.ppm
rm testout_rgb_islow.ppm
if WITH_12BIT
rm testout_rgb_islow.jpg
else
# CC: RGB->RGB565 SAMP: fullsize IDCT: islow ENT: huff
./djpeg -dct int -rgb565 -dither none -bmp -outfile testout_rgb_islow_565.bmp testout_rgb_islow.jpg
md5/md5cmp $(MD5_BMP_RGB_ISLOW_565) testout_rgb_islow_565.bmp
Expand All @@ -263,6 +315,7 @@ endif
./djpeg -dct int -rgb565 -bmp -outfile testout_rgb_islow_565D.bmp testout_rgb_islow.jpg
md5/md5cmp $(MD5_BMP_RGB_ISLOW_565D) testout_rgb_islow_565D.bmp
rm testout_rgb_islow_565D.bmp testout_rgb_islow.jpg
endif

# CC: RGB->YCC SAMP: fullsize/h2v1 FDCT: ifast ENT: 2-pass huff
./cjpeg -sample 2x1 -dct fast -opt -outfile testout_422_ifast_opt.jpg $(srcdir)/testimages/testorig.ppm
Expand All @@ -275,6 +328,9 @@ endif
./djpeg -dct fast -nosmooth -outfile testout_422m_ifast.ppm testout_422_ifast_opt.jpg
md5/md5cmp $(MD5_PPM_422M_IFAST) testout_422m_ifast.ppm
rm testout_422m_ifast.ppm
if WITH_12BIT
rm testout_422_ifast_opt.jpg
else
# CC: YCC->RGB565 SAMP: h2v1 merged IDCT: ifast ENT: huff
./djpeg -dct int -nosmooth -rgb565 -dither none -bmp -outfile testout_422m_ifast_565.bmp testout_422_ifast_opt.jpg
md5/md5cmp $(MD5_BMP_422M_IFAST_565) testout_422m_ifast_565.bmp
Expand All @@ -283,6 +339,7 @@ endif
./djpeg -dct int -nosmooth -rgb565 -bmp -outfile testout_422m_ifast_565D.bmp testout_422_ifast_opt.jpg
md5/md5cmp $(MD5_BMP_422M_IFAST_565D) testout_422m_ifast_565D.bmp
rm testout_422m_ifast_565D.bmp testout_422_ifast_opt.jpg
endif

# CC: RGB->YCC SAMP: fullsize/h2v2 FDCT: ifast ENT: prog huff
./cjpeg -sample 2x2 -quality 100 -dct fast -prog -outfile testout_420_q100_ifast_prog.jpg $(srcdir)/testimages/testorig.ppm
Expand All @@ -307,6 +364,9 @@ endif
./djpeg -dct int -rgb -outfile testout_gray_islow_rgb.ppm testout_gray_islow.jpg
md5/md5cmp $(MD5_PPM_GRAY_ISLOW_RGB) testout_gray_islow_rgb.ppm
rm testout_gray_islow_rgb.ppm
if WITH_12BIT
rm testout_gray_islow.jpg
else
# CC: Gray->RGB565 SAMP: fullsize IDCT: islow ENT: huff
./djpeg -dct int -rgb565 -dither none -bmp -outfile testout_gray_islow_565.bmp testout_gray_islow.jpg
md5/md5cmp $(MD5_BMP_GRAY_ISLOW_565) testout_gray_islow_565.bmp
Expand All @@ -315,6 +375,7 @@ endif
./djpeg -dct int -rgb565 -bmp -outfile testout_gray_islow_565D.bmp testout_gray_islow.jpg
md5/md5cmp $(MD5_BMP_GRAY_ISLOW_565D) testout_gray_islow_565D.bmp
rm testout_gray_islow_565D.bmp testout_gray_islow.jpg
endif

# CC: RGB->YCC SAMP: fullsize smooth/h2v2 smooth FDCT: islow
# ENT: 2-pass huff
Expand Down Expand Up @@ -354,75 +415,78 @@ if WITH_ARITH_DEC
endif

# CC: YCC->RGB SAMP: h2v2 merged IDCT: 16x16 islow ENT: huff
./djpeg -dct int -scale 2/1 -nosmooth -ppm -outfile testout_420m_islow_2_1.ppm $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -scale 2/1 -nosmooth -ppm -outfile testout_420m_islow_2_1.ppm $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_PPM_420M_ISLOW_2_1) testout_420m_islow_2_1.ppm
rm testout_420m_islow_2_1.ppm
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 15x15 islow ENT: huff
./djpeg -dct int -scale 15/8 -nosmooth -ppm -outfile testout_420m_islow_15_8.ppm $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -scale 15/8 -nosmooth -ppm -outfile testout_420m_islow_15_8.ppm $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_PPM_420M_ISLOW_15_8) testout_420m_islow_15_8.ppm
rm testout_420m_islow_15_8.ppm
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 13x13 islow ENT: huff
./djpeg -dct int -scale 13/8 -nosmooth -ppm -outfile testout_420m_islow_13_8.ppm $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -scale 13/8 -nosmooth -ppm -outfile testout_420m_islow_13_8.ppm $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_PPM_420M_ISLOW_13_8) testout_420m_islow_13_8.ppm
rm testout_420m_islow_13_8.ppm
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 11x11 islow ENT: huff
./djpeg -dct int -scale 11/8 -nosmooth -ppm -outfile testout_420m_islow_11_8.ppm $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -scale 11/8 -nosmooth -ppm -outfile testout_420m_islow_11_8.ppm $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_PPM_420M_ISLOW_11_8) testout_420m_islow_11_8.ppm
rm testout_420m_islow_11_8.ppm
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 9x9 islow ENT: huff
./djpeg -dct int -scale 9/8 -nosmooth -ppm -outfile testout_420m_islow_9_8.ppm $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -scale 9/8 -nosmooth -ppm -outfile testout_420m_islow_9_8.ppm $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_PPM_420M_ISLOW_9_8) testout_420m_islow_9_8.ppm
rm testout_420m_islow_9_8.ppm
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 7x7 islow/14x14 islow ENT: huff
./djpeg -dct int -scale 7/8 -nosmooth -ppm -outfile testout_420m_islow_7_8.ppm $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -scale 7/8 -nosmooth -ppm -outfile testout_420m_islow_7_8.ppm $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_PPM_420M_ISLOW_7_8) testout_420m_islow_7_8.ppm
rm testout_420m_islow_7_8.ppm
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 6x6 islow/12x12 islow ENT: huff
./djpeg -dct int -scale 3/4 -nosmooth -ppm -outfile testout_420m_islow_3_4.ppm $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -scale 3/4 -nosmooth -ppm -outfile testout_420m_islow_3_4.ppm $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_PPM_420M_ISLOW_3_4) testout_420m_islow_3_4.ppm
rm testout_420m_islow_3_4.ppm
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 5x5 islow/10x10 islow ENT: huff
./djpeg -dct int -scale 5/8 -nosmooth -ppm -outfile testout_420m_islow_5_8.ppm $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -scale 5/8 -nosmooth -ppm -outfile testout_420m_islow_5_8.ppm $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_PPM_420M_ISLOW_5_8) testout_420m_islow_5_8.ppm
rm testout_420m_islow_5_8.ppm
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 4x4 islow/8x8 islow ENT: huff
./djpeg -dct int -scale 1/2 -nosmooth -ppm -outfile testout_420m_islow_1_2.ppm $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -scale 1/2 -nosmooth -ppm -outfile testout_420m_islow_1_2.ppm $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_PPM_420M_ISLOW_1_2) testout_420m_islow_1_2.ppm
rm testout_420m_islow_1_2.ppm
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 3x3 islow/6x6 islow ENT: huff
./djpeg -dct int -scale 3/8 -nosmooth -ppm -outfile testout_420m_islow_3_8.ppm $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -scale 3/8 -nosmooth -ppm -outfile testout_420m_islow_3_8.ppm $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_PPM_420M_ISLOW_3_8) testout_420m_islow_3_8.ppm
rm testout_420m_islow_3_8.ppm
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 2x2 islow/4x4 islow ENT: huff
./djpeg -dct int -scale 1/4 -nosmooth -ppm -outfile testout_420m_islow_1_4.ppm $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -scale 1/4 -nosmooth -ppm -outfile testout_420m_islow_1_4.ppm $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_PPM_420M_ISLOW_1_4) testout_420m_islow_1_4.ppm
rm testout_420m_islow_1_4.ppm
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 1x1 islow/2x2 islow ENT: huff
./djpeg -dct int -scale 1/8 -nosmooth -ppm -outfile testout_420m_islow_1_8.ppm $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -scale 1/8 -nosmooth -ppm -outfile testout_420m_islow_1_8.ppm $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_PPM_420M_ISLOW_1_8) testout_420m_islow_1_8.ppm
rm testout_420m_islow_1_8.ppm
if WITH_12BIT
else
# CC: YCC->RGB (dithered) SAMP: h2v2 fancy IDCT: islow ENT: huff
./djpeg -dct int -colors 256 -bmp -outfile testout_420_islow_256.bmp $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -colors 256 -bmp -outfile testout_420_islow_256.bmp $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_BMP_420_ISLOW_256) testout_420_islow_256.bmp
rm testout_420_islow_256.bmp
# CC: YCC->RGB565 SAMP: h2v2 fancy IDCT: islow ENT: huff
./djpeg -dct int -rgb565 -dither none -bmp -outfile testout_420_islow_565.bmp $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -rgb565 -dither none -bmp -outfile testout_420_islow_565.bmp $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_BMP_420_ISLOW_565) testout_420_islow_565.bmp
rm testout_420_islow_565.bmp
# CC: YCC->RGB565 (dithered) SAMP: h2v2 fancy IDCT: islow ENT: huff
./djpeg -dct int -rgb565 -bmp -outfile testout_420_islow_565D.bmp $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -rgb565 -bmp -outfile testout_420_islow_565D.bmp $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_BMP_420_ISLOW_565D) testout_420_islow_565D.bmp
rm testout_420_islow_565D.bmp
# CC: YCC->RGB565 SAMP: h2v2 merged IDCT: islow ENT: huff
./djpeg -dct int -nosmooth -rgb565 -dither none -bmp -outfile testout_420m_islow_565.bmp $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -nosmooth -rgb565 -dither none -bmp -outfile testout_420m_islow_565.bmp $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_BMP_420M_ISLOW_565) testout_420m_islow_565.bmp
rm testout_420m_islow_565.bmp
# CC: YCC->RGB565 (dithered) SAMP: h2v2 merged IDCT: islow ENT: huff
./djpeg -dct int -nosmooth -rgb565 -bmp -outfile testout_420m_islow_565D.bmp $(srcdir)/testimages/testorig.jpg
./djpeg -dct int -nosmooth -rgb565 -bmp -outfile testout_420m_islow_565D.bmp $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_BMP_420M_ISLOW_565D) testout_420m_islow_565D.bmp
rm testout_420m_islow_565D.bmp
endif

./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testout_crop.jpg $(srcdir)/testimages/testorig.jpg
./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testout_crop.jpg $(srcdir)/testimages/$(TESTORIG)
md5/md5cmp $(MD5_JPEG_CROP) testout_crop.jpg
rm testout_crop.jpg

Expand Down Expand Up @@ -463,7 +527,9 @@ testclean:

tjtest:
sh ./tjbenchtest
sh ./tjbenchtest -alloc
sh ./tjbenchtest -yuv
sh ./tjbenchtest -yuv -alloc
if WITH_JAVA
sh ./tjbenchtest.java
sh ./tjbenchtest.java -yuv
Expand Down
2 changes: 2 additions & 0 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,15 @@ AC_DEFUN([AC_CHECK_COMPATIBLE_ARM64_ASSEMBLER_IFELSE],[
CC="$CCAS"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
.text
.arch armv8-a+fp+simd
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
.arch armv8-a+fp+simd
movi v0.16b, #100]])], ac_use_gas_preprocessor=yes)
fi
CFLAGS="$ac_save_CFLAGS"
Expand Down
Loading

0 comments on commit 662bf6b

Please sign in to comment.