TJBENCH(1)
π TJBENCH π
okay bestie, welcome to tjbench β it's a User Command from the libjpeg-turbo fam, and it's literally the tool that tells you how fast your JPEGs go zoom. πΈ
β¨ NAME β¨
tjbench β benchmark the performance of libjpeg-turbo π
π¦ DESCRIPTION π¦
tjbench is a JPEG decompression/compression benchmark that ships as part of libjpeg-turbo. That's the whole vibe: you feed it an image, it squeezes and unsqueezes it a bunch, and you get numbers. No cap. π
π§ USAGE π§
tjbench <Inputimage (BMP|PPM|PGM)> <Quality or PSV> [options]
tjbench <Inputimage (JPG)> [options]
Like, pick your lane: hand it a BMP, PPM or PGM and you also tell it the quality or PSV, or hand it a JPG and just let it cook. π₯
π GENERAL OPTIONS (CAN BE ABBREVIATED) π
-allocβ dynamically allocate JPEG buffers. yes, on purpose. it's giving "buffers? never met her, we're doing this live." β¨-benchtime Tβ run each benchmark for at least T seconds [default =5.0]. so you can be extra thorough if you want. β±οΈ-bmpβ use Windows Bitmap format for output images [default =PPMorPGM]. β οΈ 8-bit data precision only, bestie. π«Ά-bottomupβ use bottom-up row order for packed-pixel source/destination buffers. upside-down girlies, this one's for you. π-componlyβ stop after running compression tests. do not test decompression. compression girl summer only. π-losslessβ generate lossless JPEG images when compressing (and yeah, it implies-subsamp 444). PSV is the predictor selection value (1-7). no information lost, no notes taken. π-maxmemory Nβ memory limit (in megabytes) for intermediate buffers used with progressive JPEG compression and decompression, Huffman table optimization, lossless JPEG compression, and lossless transformation [default =no limit]. keep your RAM girlies safe. π-maxpixels Nβ input image size limit (in pixels) [default =no limit]. huge images? not today. β-nowriteβ do not write reference or output images (this improves consistency of benchmark results). nothing gets saved, it's all just vibes. β¨-pixelformat {rgb|bgr|rgbx|bgrx|xbgr|xrgb|gray}β use the specified pixel format for packed-pixel source/destination buffers [default =BGR]. choose your fighter. π¦-pixelformat cmykβ indirectly test YCCK JPEG compression/decompression (by using theCMYKpixel format for packed-pixel source/destination buffers). sneaky link energy. π-precision Nβ use N-bit data precision when compressing [N =2..16; default =8; if N is not8or12, then-losslessmust also be specified] (and psst,-precision 12implies-optimizeunless-arithmeticis also specified). π-quietβ output results in tabular rather than verbose format. less talking, more numbers. iykyk. π€«-restart Nβ when compressing or transforming, add a restart marker every N MCU rows [default =0(no restart markers)]. append'B'to specify the restart marker interval in MCUs (lossy only). π-strictβ immediately discontinue the current compression/decompression/transform operation if a warning (non-fatal error) occurs. zero tolerance era. π-tileβ compress/transform the input image into separate JPEG tiles of varying sizes (super useful for measuring JPEG overhead). it's giving mosaic. π¨-warmup Tβ run each benchmark for T seconds [default =1.0] prior to starting the timer, in order to prime the caches and thus improve the consistency of the benchmark results. stretch before you sprint, bestie. πβοΈ
π LOSSY JPEG OPTIONS (CAN BE ABBREVIATED) π
-arithmeticβ use arithmetic entropy coding in JPEG images generated by compression and transform operations (can be combined with-progressive). it's the fancy one. β¨-copy allβ copy all extra markers (including comments, JFIF thumbnails, Exif data, and ICC profile data) when transforming the input image [default]. the whole scrapbook, no edits. π-copy noneβ do not copy any extra markers when transforming the input image. clean slate, no baggage. π-crop WxH+X+Yβ decompress only the specified region of the JPEG image, where W and H are the width and height of the region (0= maximum possible width or height) and X and Y are the left and upper boundary of the region, all specified relative to the scaled image dimensions. β οΈ X must be divisible by the scaled iMCU width. rules are rules. βοΈ-dct fastβ use the less accurate DCT/IDCT algorithm [legacy feature]. she's fast, she's old, she's doing her best. π΅-dct intβ use the more accurate DCT/IDCT algorithm [default]. precision queen. π-flip {horizontal|vertical},-rotate {90|180|270},-transpose,-transverseβ perform the specified lossless transform operation on the input image prior to decompression. π¨ these operations are mutually exclusive β pick one, you can't have all four. π-grayscaleβ transform the input image into a grayscale JPEG image prior to decompression (can be combined with the other transform operations above). sad beige images for sad beige girlies. π©Ά-maxscans Nβ refuse to decompress or transform progressive JPEG images that have more than N scans. absolutely not, draw the line. β-nosmoothβ use the fastest chrominance upsampling algorithm available. speed over smoothness, no remorse. β‘-optimizeβ compute optimal Huffman tables for JPEG images generated by compression and transform operations. glow-up for your entropy coding. β¨-progressiveβ generate progressive JPEG images when compressing or transforming (can be combined with-arithmetic; implies-optimizeunless-arithmeticis also specified). it loads in pieces and it's iconic for it. π-scale M/Nβ when decompressing, scale the width/height of the JPEG image by a factor of M/N (M/N =2/1,15/8,7/4,13/8,3/2,11/8,5/4,9/8,1/1,7/8,3/4,5/8,1/2,3/8,1/4, or1/8). literally a whole menu of sizes. π-subsamp Sβ when compressing, use the specified level of chrominance subsampling (S =444,422,440,420,411,441, orGRAY) [default = testGrayscale,4:2:0,4:2:2, and4:4:4in sequence]. she does the whole lineup, she's a performer. π-yuvβ compress from/decompress to intermediate planar YUV images. β οΈ 8-bit data precision only. π«Ά-yuvpad Nβ the number of bytes by which each row in each plane of an intermediate YUV image is evenly divisible (N must be a power of2) [default =1]. alignment bestie, we love her. π
π NOTE π
If the quality/PSV is specified as a range (e.g.90-100or1-4), a separate test will be performed for all values in the range. so yes, she really is going to run every single one. buckle up. π
π COMMENT π
This manual page was written by Mathieu Malaterre <malat@debian.org> for the Debian GNU/Linux system, but may be used by others. slay, thank you Mathieu. π«Ά
π COPYRIGHT π
Copyright (C)2009-2019, 2021 D. R. Commander. All Rights Reserved.
okay so that's the whole thing, and yes you read all of it, and yes you now understand tjbench better than half the internet. π
tjbench 3.1.3 π October 2025 π and this was TJBENCH(1), periodt. π
β¨
π¦ where this page comes from
- ubuntu stonking: libjpeg-turbo-progs 1:3.1.3-4ubuntu2 Β· BSD-BY-LC-NE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms