Lines Matching refs:subsamp

269                             int pixelFormat, int subsamp, int jpegQual,  in setCompDefaults()  argument
309 if (subsamp == TJSAMP_GRAY) in setCompDefaults()
324 cinfo->comp_info[0].h_samp_factor = tjMCUWidth[subsamp] / 8; in setCompDefaults()
328 cinfo->comp_info[3].h_samp_factor = tjMCUWidth[subsamp] / 8; in setCompDefaults()
329 cinfo->comp_info[0].v_samp_factor = tjMCUHeight[subsamp] / 8; in setCompDefaults()
333 cinfo->comp_info[3].v_samp_factor = tjMCUHeight[subsamp] / 8; in setCompDefaults()
564 int subsamp) in tjBufSizeYUV2() argument
569 if (subsamp < 0 || subsamp >= NUMSUBOPT) in tjBufSizeYUV2()
572 nc = (subsamp == TJSAMP_GRAY ? 1 : 3); in tjBufSizeYUV2()
574 int pw = tjPlaneWidth(i, width, subsamp); in tjBufSizeYUV2()
576 int ph = tjPlaneHeight(i, height, subsamp); in tjBufSizeYUV2()
588 DLLEXPORT unsigned long tjBufSizeYUV(int width, int height, int subsamp) in tjBufSizeYUV() argument
590 return tjBufSizeYUV2(width, 4, height, subsamp); in tjBufSizeYUV()
593 DLLEXPORT unsigned long TJBUFSIZEYUV(int width, int height, int subsamp) in TJBUFSIZEYUV() argument
595 return tjBufSizeYUV(width, height, subsamp); in TJBUFSIZEYUV()
599 DLLEXPORT int tjPlaneWidth(int componentID, int width, int subsamp) in tjPlaneWidth() argument
603 if (width < 1 || subsamp < 0 || subsamp >= TJ_NUMSAMP) in tjPlaneWidth()
605 nc = (subsamp == TJSAMP_GRAY ? 1 : 3); in tjPlaneWidth()
609 pw = PAD(width, tjMCUWidth[subsamp] / 8); in tjPlaneWidth()
613 retval = pw * 8 / tjMCUWidth[subsamp]; in tjPlaneWidth()
620 DLLEXPORT int tjPlaneHeight(int componentID, int height, int subsamp) in tjPlaneHeight() argument
624 if (height < 1 || subsamp < 0 || subsamp >= TJ_NUMSAMP) in tjPlaneHeight()
626 nc = (subsamp == TJSAMP_GRAY ? 1 : 3); in tjPlaneHeight()
630 ph = PAD(height, tjMCUHeight[subsamp] / 8); in tjPlaneHeight()
634 retval = ph * 8 / tjMCUHeight[subsamp]; in tjPlaneHeight()
642 int height, int subsamp) in tjPlaneSizeYUV() argument
647 if (width < 1 || height < 1 || subsamp < 0 || subsamp >= NUMSUBOPT) in tjPlaneSizeYUV()
650 pw = tjPlaneWidth(componentID, width, subsamp); in tjPlaneSizeYUV()
651 ph = tjPlaneHeight(componentID, height, subsamp); in tjPlaneSizeYUV()
759 int *strides, int subsamp, int flags) in tjEncodeYUVPlanes() argument
782 !dstPlanes[0] || subsamp < 0 || subsamp >= NUMSUBOPT) in tjEncodeYUVPlanes()
784 if (subsamp != TJSAMP_GRAY && (!dstPlanes[1] || !dstPlanes[2])) in tjEncodeYUVPlanes()
806 setCompDefaults(cinfo, pixelFormat, subsamp, -1, flags); in tjEncodeYUVPlanes()
916 unsigned char *dstBuf, int pad, int subsamp, in tjEncodeYUV3() argument
927 !IS_POW2(pad) || subsamp < 0 || subsamp >= NUMSUBOPT) in tjEncodeYUV3()
930 pw0 = tjPlaneWidth(0, width, subsamp); in tjEncodeYUV3()
931 ph0 = tjPlaneHeight(0, height, subsamp); in tjEncodeYUV3()
934 if (subsamp == TJSAMP_GRAY) { in tjEncodeYUV3()
938 int pw1 = tjPlaneWidth(1, width, subsamp); in tjEncodeYUV3()
939 int ph1 = tjPlaneHeight(1, height, subsamp); in tjEncodeYUV3()
947 dstPlanes, strides, subsamp, flags); in tjEncodeYUV3()
955 unsigned char *dstBuf, int subsamp, int flags) in tjEncodeYUV2() argument
958 dstBuf, 4, subsamp, flags); in tjEncodeYUV2()
963 unsigned char *dstBuf, int subsamp, int flags) in tjEncodeYUV() argument
966 getPixelFormat(pixelSize, flags), dstBuf, subsamp, in tjEncodeYUV()
974 int height, int subsamp, in tjCompressFromYUVPlanes() argument
996 subsamp < 0 || subsamp >= NUMSUBOPT || jpegBuf == NULL || in tjCompressFromYUVPlanes()
999 if (subsamp != TJSAMP_GRAY && (!srcPlanes[1] || !srcPlanes[2])) in tjCompressFromYUVPlanes()
1017 alloc = 0; *jpegSize = tjBufSize(width, height, subsamp); in tjCompressFromYUVPlanes()
1020 setCompDefaults(cinfo, TJPF_RGB, subsamp, jpegQual, flags); in tjCompressFromYUVPlanes()
1109 int width, int pad, int height, int subsamp, in tjCompressFromYUV() argument
1121 if (srcBuf == NULL || width <= 0 || pad < 1 || height <= 0 || subsamp < 0 || in tjCompressFromYUV()
1122 subsamp >= NUMSUBOPT) in tjCompressFromYUV()
1125 pw0 = tjPlaneWidth(0, width, subsamp); in tjCompressFromYUV()
1126 ph0 = tjPlaneHeight(0, height, subsamp); in tjCompressFromYUV()
1129 if (subsamp == TJSAMP_GRAY) { in tjCompressFromYUV()
1133 int pw1 = tjPlaneWidth(1, width, subsamp); in tjCompressFromYUV()
1134 int ph1 = tjPlaneHeight(1, height, subsamp); in tjCompressFromYUV()
1142 subsamp, jpegBuf, jpegSize, jpegQual, flags); in tjCompressFromYUV()
1379 int pixelFormat, int subsamp, int flags) in setDecodeDefaults() argument
1385 if (subsamp == TJSAMP_GRAY) { in setDecodeDefaults()
1401 compptr->h_samp_factor = (i == 0) ? tjMCUWidth[subsamp] / 8 : 1; in setDecodeDefaults()
1402 compptr->v_samp_factor = (i == 0) ? tjMCUHeight[subsamp] / 8 : 1; in setDecodeDefaults()
1430 const int *strides, int subsamp, in tjDecodeYUVPlanes() argument
1453 if (!srcPlanes || !srcPlanes[0] || subsamp < 0 || subsamp >= NUMSUBOPT || in tjDecodeYUVPlanes()
1457 if (subsamp != TJSAMP_GRAY && (!srcPlanes[1] || !srcPlanes[2])) in tjDecodeYUVPlanes()
1481 if (setDecodeDefaults(dinfo, pixelFormat, subsamp, flags) == -1) { in tjDecodeYUVPlanes()
1577 int pad, int subsamp, unsigned char *dstBuf, in tjDecodeYUV() argument
1588 if (srcBuf == NULL || pad < 0 || !IS_POW2(pad) || subsamp < 0 || in tjDecodeYUV()
1589 subsamp >= NUMSUBOPT || width <= 0 || height <= 0) in tjDecodeYUV()
1592 pw0 = tjPlaneWidth(0, width, subsamp); in tjDecodeYUV()
1593 ph0 = tjPlaneHeight(0, height, subsamp); in tjDecodeYUV()
1596 if (subsamp == TJSAMP_GRAY) { in tjDecodeYUV()
1600 int pw1 = tjPlaneWidth(1, width, subsamp); in tjDecodeYUV()
1601 int ph1 = tjPlaneHeight(1, height, subsamp); in tjDecodeYUV()
1608 return tjDecodeYUVPlanes(handle, srcPlanes, strides, subsamp, dstBuf, width, in tjDecodeYUV()