Fix typo in SIMD dispatch routines which was causing 4:2:0 upsampling to
be used instead of 4:2:2 when decompressing JPEG images using SSE2 code
@@ -5,6 +5,9 @@ Significant changes since 1.0.0
|
|||||||
from a corrupt JPEG image.) Previously, these would cause libjpeg-turbo to
|
from a corrupt JPEG image.) Previously, these would cause libjpeg-turbo to
|
||||||
crash under certain circumstances.
|
crash under certain circumstances.
|
||||||
|
|
||||||
|
[2] Fixed typo in SIMD dispatch routines which was causing 4:2:0 upsampling to
|
||||||
|
be used instead of 4:2:2 when decompressing JPEG images using SSE2 code.
|
||||||
|
|
||||||
|
|
||||||
Significant changes since 0.0.93
|
Significant changes since 0.0.93
|
||||||
================================
|
================================
|
||||||
|
|||||||
24
Makefile.am
@@ -113,7 +113,7 @@ test: testclean cjpeg djpeg jpegtran jpegut
|
|||||||
./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testorig.jpg
|
./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testorig.jpg
|
||||||
cmp $(srcdir)/testimgint.ppm testoutint.ppm
|
cmp $(srcdir)/testimgint.ppm testoutint.ppm
|
||||||
cmp $(srcdir)/testimgfst.ppm testoutfst.ppm
|
cmp $(srcdir)/testimgfst.ppm testoutfst.ppm
|
||||||
cmp $(srcdir)/testorig.ppm testoutflt.ppm
|
cmp $(srcdir)/testimgflt.ppm testoutflt.ppm
|
||||||
./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
|
./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
|
||||||
cmp $(srcdir)/testimg.bmp testout.bmp
|
cmp $(srcdir)/testimg.bmp testout.bmp
|
||||||
./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig.ppm
|
./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig.ppm
|
||||||
@@ -125,24 +125,24 @@ else
|
|||||||
|
|
||||||
test: testclean cjpeg djpeg jpegtran jpegut
|
test: testclean cjpeg djpeg jpegtran jpegut
|
||||||
./jpegut
|
./jpegut
|
||||||
./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testorig-nosimd.ppm
|
./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testorig.ppm
|
||||||
./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testorig-nosimd.ppm
|
./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testorig.ppm
|
||||||
./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testorig-nosimd.ppm
|
./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testorig.ppm
|
||||||
cmp $(srcdir)/testimgint-nosimd.jpg testoutint.jpg
|
cmp $(srcdir)/testimgint.jpg testoutint.jpg
|
||||||
cmp $(srcdir)/testimgfst-nosimd.jpg testoutfst.jpg
|
cmp $(srcdir)/testimgfst.jpg testoutfst.jpg
|
||||||
cmp $(srcdir)/testimgflt-nosimd.jpg testoutflt.jpg
|
cmp $(srcdir)/testimgflt-nosimd.jpg testoutflt.jpg
|
||||||
./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testorig.jpg
|
./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testorig.jpg
|
||||||
./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testorig.jpg
|
./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testorig.jpg
|
||||||
./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testorig.jpg
|
./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testorig.jpg
|
||||||
cmp $(srcdir)/testimgint.ppm testoutint.ppm
|
cmp $(srcdir)/testimgint.ppm testoutint.ppm
|
||||||
cmp $(srcdir)/testimgfst-nosimd.ppm testoutfst.ppm
|
cmp $(srcdir)/testimgfst.ppm testoutfst.ppm
|
||||||
cmp $(srcdir)/testorig-nosimd.ppm testoutflt.ppm
|
cmp $(srcdir)/testorig.ppm testoutflt.ppm
|
||||||
./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
|
./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
|
||||||
cmp $(srcdir)/testimg-nosimd.bmp testout.bmp
|
cmp $(srcdir)/testimg.bmp testout.bmp
|
||||||
./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig-nosimd.ppm
|
./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig.ppm
|
||||||
cmp $(srcdir)/testimgp-nosimd.jpg testoutp.jpg
|
cmp $(srcdir)/testimgp.jpg testoutp.jpg
|
||||||
./jpegtran -outfile testoutt.jpg testoutp.jpg
|
./jpegtran -outfile testoutt.jpg testoutp.jpg
|
||||||
cmp $(srcdir)/testimgint-nosimd.jpg testoutt.jpg
|
cmp $(srcdir)/testimgint.jpg testoutt.jpg
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ jsimd_h2v2_fancy_upsample (j_decompress_ptr cinfo,
|
|||||||
{
|
{
|
||||||
if ((simd_support & JSIMD_SSE2) &&
|
if ((simd_support & JSIMD_SSE2) &&
|
||||||
IS_ALIGNED_SSE(jconst_fancy_upsample_sse2))
|
IS_ALIGNED_SSE(jconst_fancy_upsample_sse2))
|
||||||
jsimd_h2v1_fancy_upsample_sse2(cinfo->max_v_samp_factor,
|
jsimd_h2v2_fancy_upsample_sse2(cinfo->max_v_samp_factor,
|
||||||
compptr->downsampled_width, input_data, output_data_ptr);
|
compptr->downsampled_width, input_data, output_data_ptr);
|
||||||
else if (simd_support & JSIMD_MMX)
|
else if (simd_support & JSIMD_MMX)
|
||||||
jsimd_h2v2_fancy_upsample_mmx(cinfo->max_v_samp_factor,
|
jsimd_h2v2_fancy_upsample_mmx(cinfo->max_v_samp_factor,
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ jsimd_h2v2_fancy_upsample (j_decompress_ptr cinfo,
|
|||||||
JSAMPARRAY input_data,
|
JSAMPARRAY input_data,
|
||||||
JSAMPARRAY * output_data_ptr)
|
JSAMPARRAY * output_data_ptr)
|
||||||
{
|
{
|
||||||
jsimd_h2v1_fancy_upsample_sse2(cinfo->max_v_samp_factor,
|
jsimd_h2v2_fancy_upsample_sse2(cinfo->max_v_samp_factor,
|
||||||
compptr->downsampled_width,
|
compptr->downsampled_width,
|
||||||
input_data, output_data_ptr);
|
input_data, output_data_ptr);
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
testimg.bmp
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
BIN
testimgflt.jpg
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
4
testimgflt.ppm
Normal file
|
Before Width: | Height: | Size: 5.3 KiB |
BIN
testimgfst.jpg
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
BIN
testimgint.jpg
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
BIN
testimgp.jpg
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |