#ifdef _MSC_VER
#define _CRT_SECURE_NO_DEPRECATE
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <errno.h>
#include <limits.h>
#include <cdjpeg.h>
#include "./tjutil.h"
#include "./turbojpeg.h"
#define THROW(op, err) …
#define THROW_UNIX(m) …
static char tjErrorStr[JMSG_LENGTH_MAX] = …,
tjErrorMsg[JMSG_LENGTH_MAX] = …;
static int tjErrorLine = …, tjErrorCode = …;
#define THROW_TJG(m) …
#define THROW_TJ(m) …
static int flags = …, compOnly = …, decompOnly = …, doYUV = …,
quiet = …, doTile = …, pf = …, yuvAlign = …, doWrite = …;
static char *ext = …;
static const char *pixFormatStr[TJ_NUMPF] = …;
static const char *subNameLong[TJ_NUMSAMP] = …;
static const char *csName[TJ_NUMCS] = …;
static const char *subName[TJ_NUMSAMP] = …;
static tjscalingfactor *scalingFactors = …, sf = …;
static int nsf = …, xformOp = …, xformOpt = …;
static int (*customFilter) (short *, tjregion, tjregion, int, int,
tjtransform *);
static double benchTime = …, warmup = …;
static char *formatName(int subsamp, int cs, char *buf)
{ … }
static char *sigfig(double val, int figs, char *buf, int len)
{ … }
static int dummyDCTFilter(short *coeffs, tjregion arrayRegion,
tjregion planeRegion, int componentIndex,
int transformIndex, tjtransform *transform)
{ … }
static int decomp(unsigned char *srcBuf, unsigned char **jpegBuf,
unsigned long *jpegSize, unsigned char *dstBuf, int w, int h,
int subsamp, int jpegQual, char *fileName, int tilew,
int tileh)
{ … }
static int fullTest(unsigned char *srcBuf, int w, int h, int subsamp,
int jpegQual, char *fileName)
{ … }
static int decompTest(char *fileName)
{ … }
static void usage(char *progName)
{ … }
#ifndef GTEST
int main(int argc, char *argv[])
#else
int tjbench(int argc, char *argv[])
#endif
{ … }