Lines Matching refs:height
383 while(height--) \
398 int height, int pixelFormat, unsigned char *dst)
443 while(height--) \
459 int pitch, int height, int pixelFormat)
596 DLLEXPORT unsigned long DLLCALL tjBufSize(int width, int height,
600 if(width<1 || height<1 || jpegSubsamp<0 || jpegSubsamp>=NUMSUBOPT)
609 retval=PAD(width, mcuw) * PAD(height, mcuh) * (2 + chromasf) + 2048;
615 height)
618 if(width<1 || height<1)
624 retval=PAD(width, 16) * PAD(height, 16) * 6 + 2048;
631 DLLEXPORT unsigned long DLLCALL tjBufSizeYUV2(int width, int pad, int height,
644 int ph=tjPlaneHeight(i, height, subsamp);
653 DLLEXPORT unsigned long DLLCALL tjBufSizeYUV(int width, int height,
656 return tjBufSizeYUV2(width, 4, height, subsamp);
659 DLLEXPORT unsigned long DLLCALL TJBUFSIZEYUV(int width, int height,
662 return tjBufSizeYUV(width, height, subsamp);
687 DLLEXPORT int tjPlaneHeight(int componentID, int height, int subsamp)
691 if(height<1 || subsamp<0 || subsamp>=TJ_NUMSAMP)
697 ph=PAD(height, tjMCUHeight[subsamp]/8);
709 int stride, int height, int subsamp)
714 if(width<1 || height<1 || subsamp<0 || subsamp>=NUMSUBOPT)
718 ph=tjPlaneHeight(componentID, height, subsamp);
732 int width, int pitch, int height, int pixelFormat, unsigned char **jpegBuf,
744 if(srcBuf==NULL || width<=0 || pitch<0 || height<=0 || pixelFormat<0
761 rgbBuf=(unsigned char *)malloc(width*height*RGB_PIXELSIZE);
763 srcBuf=toRGB(srcBuf, width, pitch, height, pixelFormat, rgbBuf);
769 cinfo->image_height=height;
777 alloc=0; *jpegSize=tjBufSize(width, height, jpegSubsamp);
784 if((row_pointer=(JSAMPROW *)malloc(sizeof(JSAMPROW)*height))==NULL)
786 for(i=0; i<height; i++)
788 if(flags&TJFLAG_BOTTOMUP) row_pointer[i]=&srcBuf[(height-i-1)*pitch];
809 int width, int pitch, int height, int pixelSize, unsigned char *jpegBuf,
815 size=tjBufSizeYUV(width, height, jpegSubsamp);
816 retval=tjEncodeYUV2(handle, srcBuf, width, pitch, height,
821 retval=tjCompress2(handle, srcBuf, width, pitch, height,
831 int width, int pitch, int height, int pixelFormat, unsigned char **dstPlanes,
856 if(srcBuf==NULL || width<=0 || pitch<0 || height<=0 || pixelFormat<0
878 rgbBuf=(unsigned char *)malloc(width*height*RGB_PIXELSIZE);
880 srcBuf=toRGB(srcBuf, width, pitch, height, pixelFormat, rgbBuf);
886 cinfo->image_height=height;
907 ph0=PAD(height, cinfo->max_v_samp_factor);
911 for(i=0; i<height; i++)
913 if(flags&TJFLAG_BOTTOMUP) row_pointer[i]=&srcBuf[(height-i-1)*pitch];
916 if(height<ph0)
917 for(i=height; i<ph0; i++) row_pointer[i]=row_pointer[height-1];
970 cinfo->next_scanline+=height;
992 int width, int pitch, int height, int pixelFormat, unsigned char *dstBuf,
998 if(width<=0 || height<=0 || dstBuf==NULL || pad<0 || !isPow2(pad)
1003 ph0=tjPlaneHeight(0, height, subsamp);
1014 int ph1=tjPlaneHeight(1, height, subsamp);
1020 return tjEncodeYUVPlanes(handle, srcBuf, width, pitch, height, pixelFormat,
1028 int width, int pitch, int height, int pixelFormat, unsigned char *dstBuf,
1031 return tjEncodeYUV3(handle, srcBuf, width, pitch, height, pixelFormat,
1036 int width, int pitch, int height, int pixelSize, unsigned char *dstBuf,
1039 return tjEncodeYUV2(handle, srcBuf, width, pitch, height,
1045 unsigned char **srcPlanes, int width, int *strides, int height, int subsamp,
1063 if(!srcPlanes || !srcPlanes[0] || width<=0 || height<=0 || subsamp<0
1078 cinfo->image_height=height;
1086 alloc=0; *jpegSize=tjBufSize(width, height, subsamp);
1176 int width, int pad, int height, int subsamp, unsigned char **jpegBuf,
1182 if(srcBuf==NULL || width<=0 || pad<1 || height<=0 || subsamp<0
1187 ph0=tjPlaneHeight(0, height, subsamp);
1198 int ph1=tjPlaneHeight(1, height, subsamp);
1204 return tjCompressFromYUVPlanes(handle, srcPlanes, width, strides, height,
1254 unsigned char *jpegBuf, unsigned long jpegSize, int *width, int *height,
1263 if(jpegBuf==NULL || jpegSize<=0 || width==NULL || height==NULL
1277 *height=dinfo->image_height;
1295 if(*width<1 || *height<1)
1304 unsigned char *jpegBuf, unsigned long jpegSize, int *width, int *height,
1308 return tjDecompressHeader3(handle, jpegBuf, jpegSize, width, height,
1313 unsigned char *jpegBuf, unsigned long jpegSize, int *width, int *height)
1316 return tjDecompressHeader2(handle, jpegBuf, jpegSize, width, height,
1337 int height, int pixelFormat, int flags)
1351 || height<0 || pixelFormat<0 || pixelFormat>=TJ_NUMPF)
1376 if(height==0) height=jpegheight;
1381 if(scaledw<=width && scaledh<=height)
1386 width=scaledw; height=scaledh;
1400 rgbBuf=(unsigned char *)malloc(width*height*3);
1424 fromRGB(rgbBuf, _dstBuf, width, _pitch, height, pixelFormat);
1439 int height, int pixelSize, int flags)
1445 height, getPixelFormat(pixelSize, flags), flags);
1504 int width, int pitch, int height, int pixelFormat, int flags)
1530 || dstBuf==NULL || width<=0 || pitch<0 || height<=0 || pixelFormat<0
1548 dinfo->image_height=height;
1576 ph0=PAD(height, dinfo->max_v_samp_factor);
1587 rgbBuf=(unsigned char *)malloc(width*height*3);
1596 for(i=0; i<height; i++)
1598 if(flags&TJFLAG_BOTTOMUP) row_pointer[i]=&dstBuf[(height-i-1)*pitch];
1601 if(height<ph0)
1602 for(i=height; i<ph0; i++) row_pointer[i]=row_pointer[height-1];
1645 fromRGB(rgbBuf, _dstBuf, width, _pitch, height, pixelFormat);
1666 int height, int pixelFormat, int flags)
1672 || width<=0 || height<=0)
1676 ph0=tjPlaneHeight(0, height, subsamp);
1687 int ph1=tjPlaneHeight(1, height, subsamp);
1694 pitch, height, pixelFormat, flags);
1702 int width, int *strides, int height, int flags)
1722 || height<0)
1751 if(height==0) height=jpegheight;
1756 if(scaledw<=width && scaledh<=height)
1764 width=scaledw; height=scaledh;
1876 int width, int pad, int height, int flags)
1885 || !isPow2(pad) || height<0)
1896 if(height==0) height=jpegheight;
1902 if(scaledw<=width && scaledh<=height)
1909 ph0=tjPlaneHeight(0, height, jpegSubsamp);
1920 int ph1=tjPlaneHeight(1, height, jpegSubsamp);
1928 strides, height, flags);