{
unsigned char *dstPlanes[3];
int pw0, ph0, strides[3], retval=-1;
+ tjinstance *this=(tjinstance *)handle;
- getcinstance(handle);
+ if(!this) _throwg("tjEncodeYUV3(): Invalid handle");
+ this->isInstanceError=FALSE;
if(width<=0 || height<=0 || dstBuf==NULL || pad<0 || !isPow2(pad)
|| subsamp<0 || subsamp>=NUMSUBOPT)
{
const unsigned char *srcPlanes[3];
int pw0, ph0, strides[3], retval=-1;
+ tjinstance *this=(tjinstance *)handle;
- getcinstance(handle);
+ if(!this) _throwg("tjCompressFromYUV(): Invalid handle");
+ this->isInstanceError=FALSE;
if(srcBuf==NULL || width<=0 || pad<1 || height<=0 || subsamp<0
|| subsamp>=NUMSUBOPT)
{
const unsigned char *srcPlanes[3];
int pw0, ph0, strides[3], retval=-1;
+ tjinstance *this=(tjinstance *)handle;
- getdinstance(handle);
+ if(!this) _throwg("tjDecodeYUV(): Invalid handle");
+ this->isInstanceError=FALSE;
if(srcBuf==NULL || pad<0 || !isPow2(pad) || subsamp<0 || subsamp>=NUMSUBOPT
|| width<=0 || height<=0)