OS Manuals

/usr/bin/benchmark_xl

JPEG XL command-line tools (cjxl, djxl, benchmark_xl)

From libjxl-tools 0.12.0-r3 (os), captured 2026-11-05 by running benchmark_xl --help (exit 0). permalink

benchmark_xl v0.12.0 a7a9c78 [_AVX2_,SSE4,SSE2] {GNU 16.2.0}
Usage: /usr/bin/benchmark_xl [OPTIONS...]
 --input=<string>
    File or file pattern matching input files.
 --codec=<string>
    Comma separated list of image codec descriptions to benchmark.
 --print_details
 --noprint_details
    Prints size and distortion for each image. Not safe for concurrent benchmark runs.
 --print_details_csv
 --noprint_details_csv
    When print_details is used, print as CSV.
 --extra_metrics=<string>
    Extra metrics to be computed. Only displayed with --print_details or --print_details_csv. Comma-separated list of NAME:COMMAND pairs; COMMAND is invoked with the original image as the first argument, the decompressed image as a second argument, and the name of the file where to write the metric value (as a single floating point number) as the third argument.
 --print_more_stats
 --noprint_more_stats
    Prints codec-specific stats. Not safe for concurrent benchmark runs.
 --print_distance_percentiles
 --noprint_distance_percentiles
    Prints distance percentiles for the corpus. Not safe for concurrent benchmark runs.
 --silent_errors
 --nosilent_errors
    If true, doesn't print error messages on compression or decompression errors. Errors counts are still visible in the 'Errors' column of the result table. Please note that depending depending on the JXL build settings, error messages and asserts from within the codec may be printed irrespective of this flag anyway, use release build to ensure no messages.
 --save_compressed
 --nosave_compressed
    Saves the compressed files for each input image and each codec.
 --save_decompressed
 --nosave_decompressed
    Saves the decompressed files as PNG for each input image and each codec.
 --output_extension=<string>
    Extension (starting with dot) to use for saving output images.
 --output_description=<string>
    Color encoding (see ParseDescription; e.g. RGB_D65_SRG_Rel_709) for saving output images,  defaults to sRGB.
 --intensity_target=<scalar>
    Intended viewing intensity target in nits. Defaults to 255 for SDR images, 4000 for HDR images (when the input image uses PQ or HLG transfer function)
 --dec-hints=<string>
    Color encoding hints for the input images to encoder. Comma separated key=value pairs. The key color_space indicates ColorEncoding (see ParseDescription; e.g. RGB_D65_SRG_Rel_709) for input images without color encoding (such as PNM)
 --override_bitdepth=<unsigned>
    If nonzero, store the given bit depth in the JPEG XL file metadata (1-32), instead of using the bit depth from the original input image.
 --mul_output=<scalar>
    If nonzero, multiplies linear sRGB by this and clamps to 255
 --save_heatmap
 --nosave_heatmap
    Saves the heatmap images.
 --heatmap_good=<scalar>
    If greater than zero, use this as the good threshold for creating heatmap images.
 --heatmap_bad=<scalar>
    If greater than zero, use this as the bad threshold for creating heatmap images.
 --write_html_report
 --nowrite_html_report
    Creates an html report with original and compressed images.
 --html_report_self_contained
 --nohtml_report_self_contained
    Base64-encode the images in the HTML report rather than use external file names. May cause very large HTML data size.
 --html_report_use_decompressed
 --nohtml_report_use_decompressed
    Show the compressed image as decompressed to --output_extension.
 --html_report_add_heatmap
 --nohtml_report_add_heatmap
    Add heatmaps to the image comparisons.
 --markdown
 --nomarkdown
    Adds formatting around ASCII table to render correctly in Markdown based interfaces
 --more_columns
 --nomore_columns
    Print extra columns in the table
 --originals_url=<string>
    Url prefix to serve original images from in the html report.
 --output_dir=<string>
    If not empty, save compressed and decompressed images here.
 --num_threads=<integer>
    The number of threads for concurrent benchmarking. Defaults to 1 thread per CPU core (if negative).
 --inner_threads=<integer>
    The number of extra threads per task. Defaults to occupy cores (if negative).
 --encode_reps=<unsigned>
    How many times to encode (>1 for more precise measurements). Defaults to 1.
 --decode_reps=<unsigned>
    How many times to decode (>1 for more precise measurements). Defaults to 1.
 --sample_tmp_dir=<string>
    Directory to put samples from input images.
 --num_samples=<integer>
    How many sample areas to take.
 --sample_dimensions=<integer>
    How big areas to sample from the input.
 --error_pnorm=<scalar>
    smallest p norm for pooling butteraugli values
 --show_progress
 --noshow_progress
    Show activity dots per completed file during benchmark.
 --skip_butteraugli
 --noskip_butteraugli
    If true, doesn't compute distance metrics, only compression and decompression speed and size. Distance numbers shown in the table are invalid.
 --decode_only
 --nodecode_only
    If true, only decodes, and the input files must be compressed with a compatible format for the given codec(s). Only measures decompression speed and sizes, and can only use a single set of compatible decoders. Distance numbers and compression speeds shown in the table are invalid.
 --generations=<unsigned>
    If nonzero, enables generation loss testing with this number of intermediate generations. That is, the decoded image gets re-encoded, iteratively, N times.
 --custom_codec_extension=<string>
    Converts input and output of codec to this file type (default: png).
 --custom_codec_colorspace=<string>
    If not empty, converts input and output of codec to this colorspace.
 --custom_codec_quiet
 --nocustom_codec_quiet
    Whether stdin and stdout of custom codec should be shown.
 --qprogressive
 --noqprogressive
    Enable quantized progressive mode for AC.
 --progressive
 --noprogressive
    Enable progressive mode for AC.
 --progressive_dc=<integer>
    Enable progressive mode for DC.
 --noise=0|1
    Enable(1)/disable(0) noise generation.
 --dots=0|1
    Enable(1)/disable(0) dots generation.
 --patches=0|1
    Enable(1)/disable(0) patch dictionary.
 --debug_image_dir=<string>
    If not empty, saves debug images for each input image and each codec that provides it to this directory.
 --qtables=<string>
    Custom base quantization tables.
 --search_q_start=<scalar>
    Starting quality for quality-to-target search
 --search_q_min=<scalar>
    Minimum quality for quality-to-target search
 --search_q_max=<scalar>
    Maximum quality for quality-to-target search
 --search_d_min=<scalar>
    Minimum distance for quality-to-target search
 --search_d_max=<scalar>
    Maximum distance for quality-to-target search
 --search_tolerance=<scalar>
    Percentage value, if quality-to-target search result relative error is within this, search stops.
 --search_q_precision=<scalar>
    If last quality change in quality-to-target search is within this value, search stops.
 --search_first_iter_slope=<scalar>
    Slope of first extrapolation step in quality-to-target search.
 --search_max_iters=<integer>
    Maximum search steps in quality-to-target search.

 -h, --help
    Prints this help message. All options are shown above.
Options (80)
OptionDescriptionSource
--input stringFile or file pattern matching input files.help
--codec stringComma separated list of image codec descriptions to benchmark.help
--print_detailshelp
--noprint_detailsPrints size and distortion for each image.help
--print_details_csvhelp
--noprint_details_csvWhen print_details is used, print as CSV.help
--extra_metrics stringExtra metrics to be computed.help
--print_more_statshelp
--noprint_more_statsPrints codec-specific stats.help
--print_distance_percentileshelp
--noprint_distance_percentilesPrints distance percentiles for the corpus.help
--silent_errorshelp
--nosilent_errorsIf true, doesn't print error messages on compression or decompression errors.help
--save_compressedhelp
--nosave_compressedSaves the compressed files for each input image and each codec.help
--save_decompressedhelp
--nosave_decompressedSaves the decompressed files as PNG for each input image and each codec.help
--output_extension stringExtension (starting with dot) to use for saving output images.help
--output_description stringColor encoding (see ParseDescription;help
--intensity_target scalarIntended viewing intensity target in nits.help
--dec-hints stringColor encoding hints for the input images to encoder.help
--override_bitdepth unsignedIf nonzero, store the given bit depth in the JPEG XL file metadata (1-32), instead of using the bit depth from the original input image.help
--mul_output scalarIf nonzero, multiplies linear sRGB by this and clamps to 255help
--save_heatmaphelp
--nosave_heatmapSaves the heatmap images.help
--heatmap_good scalarIf greater than zero, use this as the good threshold for creating heatmap images.help
--heatmap_bad scalarIf greater than zero, use this as the bad threshold for creating heatmap images.help
--write_html_reporthelp
--nowrite_html_reportCreates an html report with original and compressed images.help
--html_report_self_containedhelp
--nohtml_report_self_containedBase64-encode the images in the HTML report rather than use external file names.help
--html_report_use_decompressedhelp
--nohtml_report_use_decompressedShow the compressed image as decompressed to --output_extension.help
--html_report_add_heatmaphelp
--nohtml_report_add_heatmapAdd heatmaps to the image comparisons.help
--markdownhelp
--nomarkdownAdds formatting around ASCII table to render correctly in Markdown based interfaceshelp
--more_columnshelp
--nomore_columnsPrint extra columns in the tablehelp
--originals_url stringUrl prefix to serve original images from in the html report.help
--output_dir stringIf not empty, save compressed and decompressed images here.help
--num_threads integerThe number of threads for concurrent benchmarking.help
--inner_threads integerThe number of extra threads per task.help
--encode_reps unsignedHow many times to encode (>1 for more precise measurements).help
--decode_reps unsignedHow many times to decode (>1 for more precise measurements).help
--sample_tmp_dir stringDirectory to put samples from input images.help
--num_samples integerHow many sample areas to take.help
--sample_dimensions integerHow big areas to sample from the input.help
--error_pnorm scalarsmallest p norm for pooling butteraugli valueshelp
--show_progresshelp
--noshow_progressShow activity dots per completed file during benchmark.help
--skip_butterauglihelp
--noskip_butteraugliIf true, doesn't compute distance metrics, only compression and decompression speed and size.help
--decode_onlyhelp
--nodecode_onlyIf true, only decodes, and the input files must be compressed with a compatible format for the given codec(s).help
--generations unsignedIf nonzero, enables generation loss testing with this number of intermediate generations.help
--custom_codec_extension stringConverts input and output of codec to this file type (default: png).help
--custom_codec_colorspace stringIf not empty, converts input and output of codec to this colorspace.help
--custom_codec_quiethelp
--nocustom_codec_quietWhether stdin and stdout of custom codec should be shown.help
--qprogressivehelp
--noqprogressiveEnable quantized progressive mode for AC.help
--progressivehelp
--noprogressiveEnable progressive mode for AC.help
--progressive_dc integerEnable progressive mode for DC.help
--noise 0|1Enable(1)/disable(0) noise generation.help
--dots 0|1Enable(1)/disable(0) dots generation.help
--patches 0|1Enable(1)/disable(0) patch dictionary.help
--debug_image_dir stringIf not empty, saves debug images for each input image and each codec that provides it to this directory.help
--qtables stringCustom base quantization tables.help
--search_q_start scalarStarting quality for quality-to-target searchhelp
--search_q_min scalarMinimum quality for quality-to-target searchhelp
--search_q_max scalarMaximum quality for quality-to-target searchhelp
--search_d_min scalarMinimum distance for quality-to-target searchhelp
--search_d_max scalarMaximum distance for quality-to-target searchhelp
--search_tolerance scalarPercentage value, if quality-to-target search result relative error is within this, search stops.help
--search_q_precision scalarIf last quality change in quality-to-target search is within this value, search stops.help
--search_first_iter_slope scalarSlope of first extrapolation step in quality-to-target search.help
--search_max_iters integerMaximum search steps in quality-to-target search.help
-h, --helpPrints this help message.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.