Lines Matching refs:pf
153 private static void initBuf(byte[] buf, int w, int pitch, int h, int pf,
155 int roffset = TJ.getRedOffset(pf);
156 int goffset = TJ.getGreenOffset(pf);
157 int boffset = TJ.getBlueOffset(pf);
158 int aoffset = alphaOffset[pf];
159 int ps = TJ.getPixelSize(pf);
162 if (pf == TJ.PF_GRAY) {
178 if (pf == TJ.PF_CMYK) {
222 private static void initIntBuf(int[] buf, int w, int pitch, int h, int pf,
224 int rshift = TJ.getRedOffset(pf) * 8;
225 int gshift = TJ.getGreenOffset(pf) * 8;
226 int bshift = TJ.getBlueOffset(pf) * 8;
227 int ashift = alphaOffset[pf] * 8;
254 private static void initImg(BufferedImage img, int pf, int flags)
267 initIntBuf(buf, img.getWidth(), pitch, img.getHeight(), pf, flags);
273 initBuf(buf, img.getWidth(), pitch, img.getHeight(), pf, flags);
304 private static int checkBuf(byte[] buf, int w, int pitch, int h, int pf,
307 int roffset = TJ.getRedOffset(pf);
308 int goffset = TJ.getGreenOffset(pf);
309 int boffset = TJ.getBlueOffset(pf);
310 int aoffset = alphaOffset[pf];
311 int ps = TJ.getPixelSize(pf);
318 if (pf == TJ.PF_CMYK) {
402 if (pf == TJ.PF_CMYK) {
428 private static int checkIntBuf(int[] buf, int w, int pitch, int h, int pf,
431 int rshift = TJ.getRedOffset(pf) * 8;
432 int gshift = TJ.getGreenOffset(pf) * 8;
433 int bshift = TJ.getBlueOffset(pf) * 8;
434 int ashift = alphaOffset[pf] * 8;
506 private static int checkImg(BufferedImage img, int pf, int subsamp,
519 return checkIntBuf(buf, img.getWidth(), pitch, img.getHeight(), pf,
526 return checkBuf(buf, img.getWidth(), pitch, img.getHeight(), pf, subsamp,
637 int h, int pf, String baseName, int subsamp,
646 int size = 0, ps, imgType = pf;
649 pf = biTypePF(imgType);
651 pfStrLong = pfStr + " (" + pixFormatStr[pf] + ")";
653 pfStr = pixFormatStr[pf];
656 ps = TJ.getPixelSize(pf);
660 initImg(img, pf, flags);
668 initBuf(srcBuf, w, w * ps, h, pf, flags);
669 tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, pf);
706 int jpegSize, int w, int h, int pf,
714 int temp1, temp2, imgType = pf;
719 pf = biTypePF(imgType);
721 pfStrLong = pfStr + " (" + pixFormatStr[pf] + ")";
723 pfStr = pixFormatStr[pf];
765 dstBuf = tjd.decompress(scaledWidth, 0, scaledHeight, pf, flags);
776 if ((bi && checkImg(img, pf, subsamp, sf, flags) == 1) ||
778 scaledWidth * TJ.getPixelSize(pf), scaledHeight, pf,
788 int jpegSize, int w, int h, int pf,
801 decompTest(tjd, jpegBuf, jpegSize, w, h, pf, baseName, subsamp,
819 for (int pf : formats) {
820 if (pf < 0) continue;
828 size = compTest(tjc, dstBuf, w, h, pf, baseName, subsamp, 100,
830 decompTest(tjd, dstBuf, size, w, h, pf, baseName, subsamp, flags);
831 if (pf >= TJ.PF_RGBX && pf <= TJ.PF_XRGB && !bi) {
833 decompTest(tjd, dstBuf, size, w, h, pf + (TJ.PF_RGBA - TJ.PF_RGBX),