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 = PPM or PGM]. ⚠️ 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 the CMYK pixel 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 not 8 or 12, then -lossless must also be specified] (and psst, -precision 12 implies -optimize unless -arithmetic is 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 -optimize unless -arithmetic is 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, or 1/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, or GRAY) [default = test Grayscale, 4:2:0, 4:2:2, and 4:4:4 in 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 of 2) [default = 1]. alignment bestie, we love her. πŸ“

πŸ“Œ NOTE πŸ“Œ

If the quality/PSV is specified as a range (e.g. 90-100 or 1-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 (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