33#if (defined(__x86_64__) || defined(_M_X64)) && !defined(__arm64ec__)
37#define PredictorState(tif) ((TIFFPredictorState *)(tif)->tif_data)
65 static const char module[] =
"PredictorSetup";
70 switch (
sp->predictor)
79 "Horizontal differencing \"Predictor\" not "
80 "supported with %" PRIu16 "-bit samples",
90 "Floating point \"Predictor\" not supported with %" PRIu16
100 "Floating point \"Predictor\" not supported with %" PRIu16
121 if (
sp->rowsize == 0)
138 if (
sp->predictor == 2)
196 else if (
sp->predictor == 3)
234 if (
sp->predictor == 2)
292 else if (
sp->predictor == 3)
322#define REPEAT4(n, op) \
328 for (i = n - 4; i > 0; i--) \
371 for (;
i <
cc - 3;
i += 4)
454 (
unsigned int)wp[0]) &
559 cp[1] = (uint8_t)((cp[1] + cp[0]) & 0xff); \
593#if (defined(__x86_64__) || defined(_M_X64)) && !defined(__arm64ec__)
634 for (
byte = 0;
byte < bps;
byte++)
659 if ((*
sp->decoderow)(tif, op0, occ0,
s))
661 return (*
sp->decodepfunc)(tif, op0, occ0);
682 if ((*
sp->decodetile)(tif, op0, occ0,
s))
686 if ((occ0 % rowsize) != 0)
689 "occ0%rowsize != 0");
695 if (!(*
sp->decodepfunc)(tif, op0, rowsize))
711 unsigned char *
cp = (
unsigned char *)cp0;
727 unsigned int r1, g1,
b1;
728 unsigned int r2 =
cp[0];
729 unsigned int g2 =
cp[1];
730 unsigned int b2 =
cp[2];
737 cp[4] = (
unsigned char)((g1 - g2) & 0xff);
743 }
while ((
cc -= 3) > 0);
747 unsigned int r1, g1,
b1,
a1;
748 unsigned int r2 =
cp[0];
749 unsigned int g2 =
cp[1];
750 unsigned int b2 =
cp[2];
751 unsigned int a2 =
cp[3];
758 cp[5] = (
unsigned char)((g1 - g2) & 0xff);
767 }
while ((
cc -= 4) > 0);
805 (
unsigned int)wp[0]) &
931 for (
byte = 0;
byte < bps;
byte++)
936 cp[(bps -
byte - 1) * wc +
count] = tmp[bps *
count +
byte];
953 static const char module[] =
"PredictorEncodeRow";
968 if (working_copy ==
NULL)
971 "Out of memory allocating %" PRId64 " byte temp buffer.",
977 if (!(*
sp->encodepfunc)(tif, working_copy,
cc))
982 result_code = (*
sp->encoderow)(tif, working_copy,
cc,
s);
990 static const char module[] =
"PredictorEncodeTile";
1006 if (working_copy ==
NULL)
1009 "Out of memory allocating %" PRId64 " byte temp buffer.",
1013 memcpy(working_copy, bp0, cc0);
1016 rowsize =
sp->rowsize;
1018 if ((cc0 % rowsize) != 0)
1020 TIFFErrorExtR(tif,
"PredictorEncodeTile",
"%s",
"(cc0%rowsize)!=0");
1026 (*
sp->encodepfunc)(tif, bp, rowsize);
1030 result_code = (*
sp->encodetile)(tif, working_copy, cc0,
s);
1037#define FIELD_PREDICTOR (FIELD_CODEC + 0)
1058 return (*
sp->vsetparent)(tif,
tag,
ap);
1090 switch (
sp->predictor)
1096 fprintf(
fd,
"horizontal differencing ");
1099 fprintf(
fd,
"floating point predictor ");
1120 "Merging Predictor codec-specific tags failed");
int WINAPIV fprintf(FILE *file, const char *format,...)
void _mm_storeu_si128(__m128i_u *p, __m128i b)
__m128i _mm_unpackhi_epi16(__m128i a, __m128i b)
__m128i _mm_unpackhi_epi8(__m128i a, __m128i b)
__m128i _mm_unpacklo_epi16(__m128i a, __m128i b)
__m128i _mm_unpacklo_epi8(__m128i a, __m128i b)
__m128i _mm_loadu_si128(__m128i_u const *p)
GLuint GLuint GLsizei count
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
static const struct update_accum a1
static const struct update_accum a2
static CRYPT_DATA_BLOB b2[]
static CRYPT_DATA_BLOB b1[]
uint16_t td_bitspersample
uint16_t td_samplesperpixel
TIFFCodeMethod tif_encodestrip
TIFFCodeMethod tif_encodetile
TIFFTagMethods tif_tagmethods
TIFFCodeMethod tif_decodestrip
TIFFPostMethod tif_postdecode
TIFFCodeMethod tif_decoderow
TIFFBoolMethod tif_setupencode
TIFFCodeMethod tif_encoderow
TIFFBoolMethod tif_setupdecode
TIFFCodeMethod tif_decodetile
#define TIFFFieldSet(tif, field)
#define TIFFSetFieldBit(tif, field)
int _TIFFMergeFields(TIFF *tif, const TIFFField info[], uint32_t n)
void TIFFErrorExtR(TIFF *tif, const char *module, const char *fmt,...)
void _TIFFfreeExt(TIFF *tif, void *p)
void * _TIFFmallocExt(TIFF *tif, tmsize_t s)
static int horAcc16(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static int swabHorDiff16(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static int horDiff16(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static int PredictorDecodeRow(TIFF *tif, uint8_t *op0, tmsize_t occ0, uint16_t s)
#define PredictorState(tif)
static int horDiff32(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static int fpDiff(TIFF *tif, uint8_t *cp0, tmsize_t cc)
int TIFFPredictorCleanup(TIFF *tif)
static int horDiff64(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static void PredictorPrintDir(TIFF *tif, FILE *fd, long flags)
static int PredictorSetupDecode(TIFF *tif)
static int swabHorAcc64(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static int horAcc64(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static int swabHorAcc16(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static int horDiff8(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static int swabHorDiff64(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static int PredictorEncodeRow(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s)
static int fpAcc(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static int horAcc8(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static int swabHorAcc32(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static int PredictorSetupEncode(TIFF *tif)
static int PredictorSetup(TIFF *tif)
int TIFFPredictorInit(TIFF *tif)
static int swabHorDiff32(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static const TIFFField predictFields[]
static int horAcc32(TIFF *tif, uint8_t *cp0, tmsize_t cc)
static int PredictorVGetField(TIFF *tif, uint32_t tag, va_list ap)
static int PredictorDecodeTile(TIFF *tif, uint8_t *op0, tmsize_t occ0, uint16_t s)
static int PredictorVSetField(TIFF *tif, uint32_t tag, va_list ap)
static int PredictorEncodeTile(TIFF *tif, uint8_t *bp0, tmsize_t cc0, uint16_t s)
void _TIFFNoPostDecode(TIFF *tif, uint8_t *buf, tmsize_t cc)
tmsize_t TIFFScanlineSize(TIFF *tif)
void TIFFSwabArrayOfLong(register uint32_t *lp, tmsize_t n)
void TIFFSwabArrayOfLong8(register uint64_t *lp, tmsize_t n)
void TIFFSwabArrayOfShort(register uint16_t *wp, tmsize_t n)
tmsize_t TIFFTileRowSize(TIFF *tif)
void _TIFFmemcpy(void *d, const void *s, tmsize_t c)
#define PREDICTOR_FLOATINGPOINT
#define SAMPLEFORMAT_IEEEFP
#define TIFFTAG_PREDICTOR
#define PREDICTOR_HORIZONTAL
#define PLANARCONFIG_CONTIG
#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW
#define TIFFArrayCount(a)
void int int ULONGLONG int va_list * ap