Lines Matching refs:thisImage

125 static void TCCheckMipMapConvParams	( TCImage* thisImage );
126 static u32 TCCheckPower2 ( TCImage* thisImage );
127 static u32 TCCheckMipMapReduction ( TCImage* thisImage );
128 static u32 TCCheckMipMapFormats ( TCImage* thisImage );
133 u32 TCWriteTplImageMipMaps ( FILE* fp, TCImage* thisImage ) in TCWriteTplImageMipMaps() argument
145 TCAssertMsg( (thisImage != NULL), "TCWriteTplImageMipMaps: NULL image pointer\n" ); in TCWriteTplImageMipMaps()
149 TCCheckMipMapConvParams( thisImage ); in TCWriteTplImageMipMaps()
153 TCCopyImage( thisImage, &imTmp ); in TCWriteTplImageMipMaps()
160 colorLayer->type = thisImage->lyColor.type; in TCWriteTplImageMipMaps()
161 colorLayer->width = ( thisImage->lyColor.width >> thisImage->minLOD ); in TCWriteTplImageMipMaps()
162 colorLayer->height = ( thisImage->lyColor.height >> thisImage->minLOD ); in TCWriteTplImageMipMaps()
168 if( thisImage->alphaSrcImage != TC_UNUSED ) in TCWriteTplImageMipMaps()
171 …if( (thisImage->lyColor.width != thisImage->lyAlpha.width) || (thisImage->lyColor.height != thisIm… in TCWriteTplImageMipMaps()
173 … layer %d and alpha layer %d have different dimensions\n", thisImage->colorSrcImage, thisImage->al… in TCWriteTplImageMipMaps()
178 alphaLayer->type = thisImage->lyAlpha.type; in TCWriteTplImageMipMaps()
179 alphaLayer->width = ( thisImage->lyAlpha.width >> thisImage->minLOD ); in TCWriteTplImageMipMaps()
180 alphaLayer->height = ( thisImage->lyAlpha.height >> thisImage->minLOD ); in TCWriteTplImageMipMaps()
187 tplBuffer = (u8*)TCCalloc( 1, thisImage->tplBufferSize ); in TCWriteTplImageMipMaps()
205 colorLayer->width = ( thisImage->lyColor.width >> level ); in TCWriteTplImageMipMaps()
206 colorLayer->height = ( thisImage->lyColor.height >> level ); in TCWriteTplImageMipMaps()
210 alphaLayer->width = ( thisImage->lyAlpha.width >> level ); in TCWriteTplImageMipMaps()
211 alphaLayer->height = ( thisImage->lyAlpha.height >> level ); in TCWriteTplImageMipMaps()
215 TCCreateNextMipMapLayer( thisImage, colorLayer, alphaLayer ); in TCWriteTplImageMipMaps()
218 switch( thisImage->texelFormat ) in TCWriteTplImageMipMaps()
240 TCErrorMsg( "TCCreateMipMaps: unknown texel format for image %d\n", thisImage->index ); in TCWriteTplImageMipMaps()
261 bytesWritten = fwrite( tplBuffer, 1, thisImage->tplBufferSize, fp ); in TCWriteTplImageMipMaps()
380 u32 TCComputeTplMipMapImageBufferSize ( TCImage* thisImage ) in TCComputeTplMipMapImageBufferSize() argument
387 saveWidth = (thisImage->lyColor).width; in TCComputeTplMipMapImageBufferSize()
388 saveHeight = (thisImage->lyColor).height; in TCComputeTplMipMapImageBufferSize()
391 for( level = thisImage->minLOD; level< ( thisImage->maxLOD + 1 ) ; level++ ) in TCComputeTplMipMapImageBufferSize()
393 (thisImage->lyColor).width = ( saveWidth >> level ); in TCComputeTplMipMapImageBufferSize()
394 (thisImage->lyColor).height = ( saveHeight >> level ); in TCComputeTplMipMapImageBufferSize()
396 totalSize += TCComputeTplImageBufferSize( thisImage ); in TCComputeTplMipMapImageBufferSize()
399 (thisImage->lyColor).width = saveWidth; in TCComputeTplMipMapImageBufferSize()
400 (thisImage->lyColor).height = saveHeight; in TCComputeTplMipMapImageBufferSize()
409 static void TCCheckMipMapConvParams ( TCImage* thisImage ) in TCCheckMipMapConvParams() argument
415 check = CheckRangeLOD( thisImage->minLOD ); in TCCheckMipMapConvParams()
416 …TCAssertMsg( (check),"TCCheckMipMapConvParams: minLOD out of range for image %d\n", thisImage->ind… in TCCheckMipMapConvParams()
418 check = CheckRangeLOD( thisImage->maxLOD ); in TCCheckMipMapConvParams()
419 …TCAssertMsg( (check),"TCCheckMipMapConvParams: maxLOD out of range for image %d\n", thisImage->ind… in TCCheckMipMapConvParams()
421 check = CheckRangeLOD( thisImage->remapMinLOD ); in TCCheckMipMapConvParams()
422 …TCAssertMsg( (check),"TCCheckMipMapConvParams: remapLOD out of range for image %d\n", thisImage->i… in TCCheckMipMapConvParams()
425 if( thisImage->minLOD > thisImage->maxLOD ) in TCCheckMipMapConvParams()
427 TCErrorMsg( "TCCheckMipMapConvParams: image %d has (minLOD > maxLOD)\n", thisImage->index ); in TCCheckMipMapConvParams()
431 check = thisImage->remapMinLOD + (thisImage->maxLOD - thisImage->minLOD); in TCCheckMipMapConvParams()
434 …TCErrorMsg( "TCCheckMipMapConvParams: image %d remaps LODs beyond max pyramid size\n", thisImage->… in TCCheckMipMapConvParams()
438 check = TCCheckPower2( thisImage ); in TCCheckMipMapConvParams()
439 …TCAssertMsg( (check),"TCCheckMipMapConvParams: image %d is not power of 2 dimensions\n", thisImage in TCCheckMipMapConvParams()
442 check = TCCheckMipMapReduction( thisImage ); in TCCheckMipMapConvParams()
443 …"TCCheckMipMapConvParams: numLOD is greater than image %d minimum dimension\n", thisImage->index ); in TCCheckMipMapConvParams()
446 check = TCCheckMipMapFormats( thisImage ); in TCCheckMipMapConvParams()
447 …ck),"TCCheckMipMapConvParams: image %d invalid output format for mipmapping\n", thisImage->index ); in TCCheckMipMapConvParams()
455 static u32 TCCheckPower2( TCImage* thisImage ) in TCCheckPower2() argument
461 if( (thisImage->minLOD == 0) && (thisImage->maxLOD == 0) && (thisImage->remapMinLOD == 0) ) in TCCheckPower2()
463 if( ( thisImage->lyColor.width > 1024 ) || ( thisImage->lyColor.height > 1024 ) ) in TCCheckPower2()
476 size = (thisImage->lyColor).width; in TCCheckPower2()
478 size = (thisImage->lyColor).height; in TCCheckPower2()
512 static u32 TCCheckMipMapReduction ( TCImage* thisImage ) in TCCheckMipMapReduction() argument
520 scale = thisImage->maxLOD; in TCCheckMipMapReduction()
527 checkWidth = ( (thisImage->lyColor).width >> scale ); in TCCheckMipMapReduction()
528 checkHeight = ( (thisImage->lyColor).height >> scale ); in TCCheckMipMapReduction()
541 static u32 TCCheckMipMapFormats( TCImage* thisImage ) in TCCheckMipMapFormats() argument
545 if( thisImage->minLOD == thisImage->maxLOD ) in TCCheckMipMapFormats()
551 switch( thisImage->texelFormat ) in TCCheckMipMapFormats()