static void usage()

in tjbench.c [899:995]


static void usage(char *progName)
{
  int i;

  printf("USAGE: %s\n", progName);
  printf("       <Inputimage (BMP|PPM)> <Quality or PSV> [options]\n\n");
  printf("       %s\n", progName);
  printf("       <Inputimage (JPG)> [options]\n");

  printf("\nGENERAL OPTIONS\n");
  printf("---------------\n");
  printf("-alloc = Dynamically allocate JPEG buffers\n");
  printf("-benchtime T = Run each benchmark for at least T seconds [default = 5.0]\n");
  printf("-bmp = Use Windows Bitmap format for output images [default = PPM]\n");
  printf("     ** 8-bit data precision only **\n");
  printf("-bottomup = Use bottom-up row order for packed-pixel source/destination buffers\n");
  printf("-componly = Stop after running compression tests.  Do not test decompression.\n");
  printf("-lossless = Generate lossless JPEG images when compressing (implies\n");
  printf("     -subsamp 444).  PSV is the predictor selection value (1-7).\n");
  printf("-maxmemory N = Memory limit (in megabytes) for intermediate buffers used with\n");
  printf("     progressive JPEG compression and decompression, Huffman table\n");
  printf("     optimization, lossless JPEG compression, and lossless transformation\n");
  printf("     [default = no limit]\n");
  printf("-maxpixels N = Input image size limit (in pixels) [default = no limit]\n");
  printf("-nowrite = Do not write reference or output images (improves consistency of\n");
  printf("     benchmark results)\n");
  printf("-rgb, -bgr, -rgbx, -bgrx, -xbgr, -xrgb =\n");
  printf("     Use the specified pixel format for packed-pixel source/destination buffers\n");
  printf("     [default = BGR]\n");
  printf("-cmyk = Indirectly test YCCK JPEG compression/decompression\n");
  printf("     (use the CMYK pixel format for packed-pixel source/destination buffers)\n");
  printf("-precision N = Use N-bit data precision when compressing [N is 8, 12, or 16;\n");
  printf("     default = 8; if N is 16, then -lossless must also be specified]\n");
  printf("     (-precision 12 implies -optimize unless -arithmetic is also specified)\n");
  printf("-quiet = Output results in tabular rather than verbose format\n");
  printf("-restart N = When compressing, add a restart marker every N MCU rows\n");
  printf("     [default = 0 (no restart markers)].  Append 'B' to specify the restart\n");
  printf("     marker interval in MCUs (lossy only.)\n");
  printf("-stoponwarning = Immediately discontinue the current\n");
  printf("     compression/decompression/transform operation if a warning (non-fatal\n");
  printf("     error) occurs\n");
  printf("-tile = Compress/transform the input image into separate JPEG tiles of varying\n");
  printf("     sizes (useful for measuring JPEG overhead)\n");
  printf("-warmup T = Run each benchmark for T seconds [default = 1.0] prior to starting\n");
  printf("     the timer, in order to prime the caches and thus improve the consistency\n");
  printf("     of the benchmark results\n");

  printf("\nLOSSY JPEG OPTIONS\n");
  printf("------------------\n");
  printf("-arithmetic = Use arithmetic entropy coding in JPEG images generated by\n");
  printf("     compression and transform operations (can be combined with -progressive)\n");
  printf("-crop WxH+X+Y = Decompress only the specified region of the JPEG image, where W\n");
  printf("     and H are the width and height of the region (0 = maximum possible width\n");
  printf("     or height) and X and Y are the left and upper boundary of the region, all\n");
  printf("     specified relative to the scaled image dimensions.  X must be divible by\n");
  printf("     the scaled iMCU width.\n");
  printf("-fastdct = Use the fastest DCT/IDCT algorithm available\n");
  printf("-fastupsample = Use the fastest chrominance upsampling algorithm available\n");
  printf("-optimize = Compute optimal Huffman tables for JPEG images generated by\n");
  printf("     compession and transform operations\n");
  printf("-progressive = Generate progressive JPEG images when compressing or\n");
  printf("     transforming (can be combined with -arithmetic; implies -optimize unless\n");
  printf("     -arithmetic is also specified)\n");
  printf("-limitscans = Refuse to decompress or transform progressive JPEG images that\n");
  printf("     have an unreasonably large number of scans\n");
  printf("-scale M/N = When decompressing, scale the width/height of the JPEG image by a\n");
  printf("     factor of M/N (M/N = ");
  for (i = 0; i < nsf; i++) {
    printf("%d/%d", scalingFactors[i].num, scalingFactors[i].denom);
    if (nsf == 2 && i != nsf - 1) printf(" or ");
    else if (nsf > 2) {
      if (i != nsf - 1) printf(", ");
      if (i == nsf - 2) printf("or ");
    }
    if (i % 8 == 0 && i != 0) printf("\n     ");
  }
  printf(")\n");
  printf("-subsamp S = When compressing, use the specified level of chrominance\n");
  printf("     subsampling (S = 444, 422, 440, 420, 411, 441, or GRAY) [default = test\n");
  printf("     Grayscale, 4:2:0, 4:2:2, and 4:4:4 in sequence]\n");
  printf("-hflip, -vflip, -transpose, -transverse, -rot90, -rot180, -rot270 =\n");
  printf("     Perform the specified lossless transform operation on the input image\n");
  printf("     prior to decompression (these operations are mutually exclusive)\n");
  printf("-grayscale = Transform the input image into a grayscale JPEG image prior to\n");
  printf("     decompression (can be combined with the other transform operations above)\n");
  printf("-copynone = Do not copy any extra markers (including Exif and ICC profile data)\n");
  printf("     when transforming the input image\n");
  printf("-yuv = Compress from/decompress to intermediate planar YUV images\n");
  printf("     ** 8-bit data precision only **\n");
  printf("-yuvpad N = The number of bytes by which each row in each plane of an\n");
  printf("     intermediate YUV image is evenly divisible (N must be a power of 2)\n");
  printf("     [default = 1]\n");

  printf("\nNOTE:  If the quality/PSV is specified as a range (e.g. 90-100 or 1-4), a\n");
  printf("separate test will be performed for all values in the range.\n\n");
  exit(1);
}