TJBench: Test end-to-end grayscale comp./decomp.

Because the TurboJPEG API originated in VirtualGL and TurboVNC as a
means of compressing from/decompressing to extended RGB framebuffers,
its earliest incarnations did not handle grayscale packed-pixel images.
Thus, TJBench has always converted the input image (even if it is
grayscale) to an extended RGB source buffer prior to compression, and it
has always decompressed JPEG images (even if they are grayscale) into an
extended RGB destination buffer.  That allows TJBench to benchmark the
RGB-to-grayscale and grayscale-to-RGB color conversion paths used by
VirtualGL and TurboVNC when grayscale subsampling (AKA the grayscale
JPEG colorspace) is selected.  However, more recent versions of the
TurboJPEG API handle grayscale packed-pixel images, so it is beneficial
to allow TJBench to benchmark the end-to-end grayscale compression and
decompression paths.  This commit accomplishes that by adding a new
command-line option (-gray) that causes TJBench to use a grayscale
source buffer (which only works if the input image is PGM or grayscale
BMP), to decompress JPEG images (even if they are full-color) into a
grayscale destination buffer, and to save output images in PGM or
grayscale BMP format.
This commit is contained in:
DRC
2024-06-18 13:06:30 -04:00
parent 55bcad88e1
commit ed79114acb
3 changed files with 37 additions and 14 deletions

View File

@@ -9,6 +9,10 @@ documentation for the libjpeg API library and associated programs has been
moved into the **doc/** subdirectory, and all C source code and headers have
been moved into a new **src/** subdirectory.
2. Added a new TJBench option (`-gray`) that can be used to test the
performance of compressing/decompressing a grayscale JPEG image from/to a
packed-pixel grayscale image.
3.0.4
=====