• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/tcl-105/tcl_ext/tkimg/tkimg/compat/libtiff/libtiff/

Lines Matching refs:sp

477 PixarLogMakeTables(PixarLogState *sp)
524 sp->FromLT2 = NULL;
525 sp->From14 = NULL;
526 sp->From8 = NULL;
527 sp->ToLinearF = NULL;
528 sp->ToLinear16 = NULL;
529 sp->ToLinear8 = NULL;
580 sp->ToLinearF = ToLinearF;
581 sp->ToLinear16 = ToLinear16;
582 sp->ToLinear8 = ToLinear8;
583 sp->FromLT2 = FromLT2;
584 sp->From14 = From14;
585 sp->From8 = From8;
648 PixarLogState* sp = DecoderState(tif);
652 assert(sp != NULL);
660 sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ?
662 tbuf_size = multiply(multiply(multiply(sp->stride, td->td_imagewidth),
666 sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size);
667 if (sp->tbuf == NULL)
669 if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)
670 sp->user_datafmt = PixarLogGuessDataFmt(td);
671 if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) {
678 if (inflateInit(&sp->stream) != Z_OK) {
679 TIFFErrorExt(tif->tif_clientdata, module, "%s: %s", tif->tif_name, sp->stream.msg);
682 sp->state |= PLSTATE_INIT;
693 PixarLogState* sp = DecoderState(tif);
696 assert(sp != NULL);
697 sp->stream.next_in = tif->tif_rawdata;
698 sp->stream.avail_in = tif->tif_rawcc;
699 return (inflateReset(&sp->stream) == Z_OK);
706 PixarLogState* sp = DecoderState(tif);
711 switch (sp->user_datafmt) {
731 llen = sp->stride * td->td_imagewidth;
734 assert(sp != NULL);
735 sp->stream.next_out = (unsigned char *) sp->tbuf;
736 sp->stream.avail_out = nsamples * sizeof(uint16);
738 int state = inflate(&sp->stream, Z_PARTIAL_FLUSH);
745 tif->tif_name, tif->tif_row, sp->stream.msg);
746 if (inflateSync(&sp->stream) != Z_OK)
752 tif->tif_name, sp->stream.msg);
755 } while (sp->stream.avail_out > 0);
758 if (sp->stream.avail_out != 0) {
761 tif->tif_name, tif->tif_row, sp->stream.avail_out);
765 up = sp->tbuf;
783 switch (sp->user_datafmt) {
785 horizontalAccumulateF(up, llen, sp->stride,
786 (float *)op, sp->ToLinearF);
790 horizontalAccumulate16(up, llen, sp->stride,
791 (uint16 *)op, sp->ToLinear16);
795 horizontalAccumulate12(up, llen, sp->stride,
796 (int16 *)op, sp->ToLinearF);
800 horizontalAccumulate11(up, llen, sp->stride,
805 horizontalAccumulate8(up, llen, sp->stride,
806 (unsigned char *)op, sp->ToLinear8);
810 horizontalAccumulate8abgr(up, llen, sp->stride,
811 (unsigned char *)op, sp->ToLinear8);
829 PixarLogState* sp = EncoderState(tif);
833 assert(sp != NULL);
837 sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ?
839 tbuf_size = multiply(multiply(multiply(sp->stride, td->td_imagewidth),
843 sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size);
844 if (sp->tbuf == NULL)
846 if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)
847 sp->user_datafmt = PixarLogGuessDataFmt(td);
848 if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) {
853 if (deflateInit(&sp->stream, sp->quality) != Z_OK) {
854 TIFFErrorExt(tif->tif_clientdata, module, "%s: %s", tif->tif_name, sp->stream.msg);
857 sp->state |= PLSTATE_INIT;
868 PixarLogState *sp = EncoderState(tif);
871 assert(sp != NULL);
872 sp->stream.next_out = tif->tif_rawdata;
873 sp->stream.avail_out = tif->tif_rawdatasize;
874 return (deflateReset(&sp->stream) == Z_OK);
1048 PixarLogState *sp = EncoderState(tif);
1055 switch (sp->user_datafmt) {
1075 llen = sp->stride * td->td_imagewidth;
1077 for (i = 0, up = sp->tbuf; i < n; i += llen, up += llen) {
1078 switch (sp->user_datafmt) {
1081 sp->stride, up, sp->FromLT2);
1086 sp->stride, up, sp->From14);
1091 sp->stride, up, sp->From8);
1102 sp->stream.next_in = (unsigned char *) sp->tbuf;
1103 sp->stream.avail_in = n * sizeof(uint16);
1106 if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) {
1108 tif->tif_name, sp->stream.msg);
1111 if (sp->stream.avail_out == 0) {
1114 sp->stream.next_out = tif->tif_rawdata;
1115 sp->stream.avail_out = tif->tif_rawdatasize;
1117 } while (sp->stream.avail_in > 0);
1129 PixarLogState *sp = EncoderState(tif);
1133 sp->stream.avail_in = 0;
1136 state = deflate(&sp->stream, Z_FINISH);
1140 if (sp->stream.avail_out != (uint32)tif->tif_rawdatasize) {
1142 tif->tif_rawdatasize - sp->stream.avail_out;
1144 sp->stream.next_out = tif->tif_rawdata;
1145 sp->stream.avail_out = tif->tif_rawdatasize;
1150 tif->tif_name, sp->stream.msg);
1175 PixarLogState* sp = (PixarLogState*) tif->tif_data;
1177 assert(sp != 0);
1181 tif->tif_tagmethods.vgetfield = sp->vgetparent;
1182 tif->tif_tagmethods.vsetfield = sp->vsetparent;
1184 if (sp->FromLT2) _TIFFfree(sp->FromLT2);
1185 if (sp->From14) _TIFFfree(sp->From14);
1186 if (sp->From8) _TIFFfree(sp->From8);
1187 if (sp->ToLinearF) _TIFFfree(sp->ToLinearF);
1188 if (sp->ToLinear16) _TIFFfree(sp->ToLinear16);
1189 if (sp->ToLinear8) _TIFFfree(sp->ToLinear8);
1190 if (sp->state&PLSTATE_INIT) {
1192 inflateEnd(&sp->stream);
1194 deflateEnd(&sp->stream);
1196 if (sp->tbuf)
1197 _TIFFfree(sp->tbuf);
1198 _TIFFfree(sp);
1207 PixarLogState *sp = (PixarLogState *)tif->tif_data;
1213 sp->quality = va_arg(ap, int);
1214 if (tif->tif_mode != O_RDONLY && (sp->state&PLSTATE_INIT)) {
1215 if (deflateParams(&sp->stream,
1216 sp->quality, Z_DEFAULT_STRATEGY) != Z_OK) {
1218 tif->tif_name, sp->stream.msg);
1224 sp->user_datafmt = va_arg(ap, int);
1230 switch (sp->user_datafmt) {
1261 result = (*sp->vsetparent)(tif, tag, ap);
1269 PixarLogState *sp = (PixarLogState *)tif->tif_data;
1273 *va_arg(ap, int*) = sp->quality;
1276 *va_arg(ap, int*) = sp->user_datafmt;
1279 return (*sp->vgetparent)(tif, tag, ap);
1294 PixarLogState* sp;
1314 sp = (PixarLogState*) tif->tif_data;
1315 _TIFFmemset(sp, 0, sizeof (*sp));
1316 sp->stream.data_type = Z_BINARY;
1317 sp->user_datafmt = PIXARLOGDATAFMT_UNKNOWN;
1337 sp->vgetparent = tif->tif_tagmethods.vgetfield;
1339 sp->vsetparent = tif->tif_tagmethods.vsetfield;
1343 sp->quality = Z_DEFAULT_COMPRESSION; /* default comp. level */
1344 sp->state = 0;
1354 PixarLogMakeTables(sp);