Lines Matching refs:pf
88 void initBuf(unsigned char *buf, int w, int h, int pf, int flags) in initBuf() argument
90 int roffset=tjRedOffset[pf]; in initBuf()
91 int goffset=tjGreenOffset[pf]; in initBuf()
92 int boffset=tjBlueOffset[pf]; in initBuf()
93 int ps=tjPixelSize[pf]; in initBuf()
96 if(pf==TJPF_GRAY) in initBuf()
110 else if(pf==TJPF_CMYK) in initBuf()
180 int checkBuf(unsigned char *buf, int w, int h, int pf, int subsamp, in checkBuf() argument
183 int roffset=tjRedOffset[pf]; in checkBuf()
184 int goffset=tjGreenOffset[pf]; in checkBuf()
185 int boffset=tjBlueOffset[pf]; in checkBuf()
186 int aoffset=alphaOffset[pf]; in checkBuf()
187 int ps=tjPixelSize[pf]; in checkBuf()
192 if(pf==TJPF_CMYK) in checkBuf()
280 if(pf==TJPF_CMYK) in checkBuf()
396 unsigned long *dstSize, int w, int h, int pf, char *basename, in compTest() argument
400 const char *pfStr=pixFormatStr[pf]; in compTest()
404 if((srcBuf=(unsigned char *)malloc(w*h*tjPixelSize[pf]))==NULL) in compTest()
406 initBuf(srcBuf, w, h, pf, flags); in compTest()
424 _tj(tjEncodeYUV3(handle2, srcBuf, w, 0, h, pf, yuvBuf, pad, subsamp, in compTest()
439 _tj(tjCompress2(handle, srcBuf, w, 0, h, pf, dstBuf, dstSize, subsamp, in compTest()
455 unsigned long jpegSize, int w, int h, int pf, char *basename, int subsamp, in _decompTest() argument
469 dstSize=scaledWidth*scaledHeight*tjPixelSize[pf]; in _decompTest()
495 printf("YUV %s -> %s %s ... ", subNameLong[subsamp], pixFormatStr[pf], in _decompTest()
498 scaledHeight, pf, flags)); in _decompTest()
503 printf("JPEG -> %s %s ", pixFormatStr[pf], in _decompTest()
509 scaledHeight, pf, flags)); in _decompTest()
512 if(checkBuf(dstBuf, scaledWidth, scaledHeight, pf, subsamp, sf, flags)) in _decompTest()
524 unsigned long jpegSize, int w, int h, int pf, char *basename, int subsamp, in decompTest() argument
538 _decompTest(handle, jpegBuf, jpegSize, w, h, pf, basename, subsamp, in decompTest()
552 unsigned long size=0; int pfi, pf, i; in doTest() local
572 pf=formats[pfi]; in doTest()
573 compTest(chandle, &dstBuf, &size, w, h, pf, basename, subsamp, 100, in doTest()
575 decompTest(dhandle, dstBuf, size, w, h, pf, basename, subsamp, in doTest()
577 if(pf>=TJPF_RGBX && pf<=TJPF_XRGB) in doTest()
580 decompTest(dhandle, dstBuf, size, w, h, pf+(TJPF_RGBA-TJPF_RGBX), in doTest()