Lines Matching defs:ifd

907 								  const dng_ifd &ifd,
923 uint32 blockRows = ifd.fSubTileBlockRows;
924 uint32 blockCols = ifd.fSubTileBlockCols;
1014 const dng_ifd &ifd,
1040 const dng_ifd &ifd,
1049 , fIFD (ifd)
1066 uint32 stripLength = Pin_uint32 (ifd.fSubTileBlockRows,
1070 stripLength = stripLength / ifd.fSubTileBlockRows
1071 * ifd.fSubTileBlockRows;
1175 const dng_ifd &ifd,
1188 if (ifd.fPlanarConfiguration == pcRowInterleaved)
1212 uint32 bitDepth = ifd.fBitsPerSample [plane];
1225 else if (bitDepth == 16 && ifd.fSampleFormat [0] == sfFloatingPoint)
1241 else if (bitDepth == 24 && ifd.fSampleFormat [0] == sfFloatingPoint)
1435 ifd.fPlanarConfiguration, uncompressedBuffer->Buffer ());
1437 if (ifd.fSampleBitShift)
1440 buffer.ShiftRight (ifd.fSampleBitShift);
1444 if (ifd.fSubTileBlockRows > 1)
1448 ifd,
1747 const dng_ifd &ifd,
1769 ifd.fPatchFirstJPEGByte));
1776 ifd.fPhotometricInterpretation,
1785 if (ifd.fPatchFirstJPEGByte && tileByteCount)
1795 ifd.fPhotometricInterpretation,
1808 const dng_ifd &ifd,
1828 uint32 rowsPerStrip = Pin_uint32 (ifd.fSubTileBlockRows,
1832 rowsPerStrip = rowsPerStrip / ifd.fSubTileBlockRows
1833 * ifd.fSubTileBlockRows;
1853 ifd,
1865 bool bug16 = ifd.fLosslessJPEGBug16;
1886 bool dng_read_image::CanReadTile (const dng_ifd &ifd)
1889 if (ifd.fSampleFormat [0] != sfUnsignedInteger &&
1890 ifd.fSampleFormat [0] != sfFloatingPoint)
1895 switch (ifd.fCompression)
1901 if (ifd.fSampleFormat [0] == sfFloatingPoint)
1904 return (ifd.fBitsPerSample [0] == 16 ||
1905 ifd.fBitsPerSample [0] == 24 ||
1906 ifd.fBitsPerSample [0] == 32);
1910 return ifd.fBitsPerSample [0] >= 8 &&
1911 ifd.fBitsPerSample [0] <= 32;
1918 if (ifd.fSampleFormat [0] != sfUnsignedInteger)
1923 if (ifd.IsBaselineJPEG ())
1937 return ifd.fBitsPerSample [0] >= 8 &&
1938 ifd.fBitsPerSample [0] <= 16;
1952 if (ifd.fSampleFormat [0] == sfFloatingPoint)
1955 if (ifd.fCompression == ccPackBits)
1960 if (ifd.fPredictor != cpNullPredictor &&
1961 ifd.fPredictor != cpFloatingPoint &&
1962 ifd.fPredictor != cpFloatingPointX2 &&
1963 ifd.fPredictor != cpFloatingPointX4)
1968 if (ifd.fBitsPerSample [0] != 16 &&
1969 ifd.fBitsPerSample [0] != 24 &&
1970 ifd.fBitsPerSample [0] != 32)
1980 if (ifd.fPredictor != cpNullPredictor &&
1981 ifd.fPredictor != cpHorizontalDifference &&
1982 ifd.fPredictor != cpHorizontalDifferenceX2 &&
1983 ifd.fPredictor != cpHorizontalDifferenceX4)
1988 if (ifd.fBitsPerSample [0] != 8 &&
1989 ifd.fBitsPerSample [0] != 16 &&
1990 ifd.fBitsPerSample [0] != 32)
2014 bool dng_read_image::NeedsCompressedBuffer (const dng_ifd &ifd)
2017 if (ifd.fCompression == ccLZW ||
2018 ifd.fCompression == ccDeflate ||
2019 ifd.fCompression == ccOldDeflate ||
2020 ifd.fCompression == ccPackBits)
2070 const dng_ifd &ifd,
2074 switch (ifd.fPredictor)
2091 if (ifd.fPredictor == cpHorizontalDifferenceX2)
2096 else if (ifd.fPredictor == cpHorizontalDifferenceX4)
2161 const dng_ifd &ifd,
2173 switch (ifd.fCompression)
2184 uint32 bytesPerSample = (ifd.fBitsPerSample [0] >> 3);
2202 if (ifd.fSampleFormat [0] == sfFloatingPoint)
2207 else if (ifd.fBitsPerSample [0] == 8)
2212 else if (ifd.fBitsPerSample [0] == 16)
2217 else if (ifd.fBitsPerSample [0] == 32)
2238 if (ifd.fPredictor == cpFloatingPoint ||
2239 ifd.fPredictor == cpFloatingPointX2 ||
2240 ifd.fPredictor == cpFloatingPointX4)
2284 if (ifd.fPredictor == cpFloatingPoint ||
2285 ifd.fPredictor == cpFloatingPointX2 ||
2286 ifd.fPredictor == cpFloatingPointX4)
2296 if (ifd.fCompression == ccLZW)
2311 else if (ifd.fCompression == ccPackBits)
2368 if (ifd.fPredictor == cpFloatingPoint ||
2369 ifd.fPredictor == cpFloatingPointX2 ||
2370 ifd.fPredictor == cpFloatingPointX4)
2375 if (ifd.fPredictor == cpFloatingPointX2)
2380 else if (ifd.fPredictor == cpFloatingPointX4)
2427 ifd,
2457 if (stream.BigEndian () || ifd.fPredictor == cpFloatingPoint ||
2458 ifd.fPredictor == cpFloatingPointX2 ||
2459 ifd.fPredictor == cpFloatingPointX4)
2509 ifd,
2530 if (ifd.IsBaselineJPEG ())
2536 ifd,
2558 ifd,
2583 ifd,
2612 bool dng_read_image::CanRead (const dng_ifd &ifd)
2615 if (ifd.fImageWidth < 1 ||
2616 ifd.fImageLength < 1)
2621 if (ifd.fSamplesPerPixel < 1)
2626 if (ifd.fBitsPerSample [0] < 1)
2631 for (uint32 j = 1; j < Min_uint32 (ifd.fSamplesPerPixel,
2635 if (ifd.fBitsPerSample [j] !=
2636 ifd.fBitsPerSample [0])
2641 if (ifd.fSampleFormat [j] !=
2642 ifd.fSampleFormat [0])
2649 if ((ifd.fPlanarConfiguration != pcInterleaved ) &&
2650 (ifd.fPlanarConfiguration != pcPlanar ) &&
2651 (ifd.fPlanarConfiguration != pcRowInterleaved))
2656 if (ifd.fUsesStrips == ifd.fUsesTiles)
2661 uint32 tileCount = ifd.TilesPerImage ();
2668 bool needTileByteCounts = (ifd.TileByteCount (ifd.TileArea (0, 0)) == 0);
2676 if (ifd.fTileByteCount [0] < 1)
2688 if (ifd.fTileOffsetsCount != tileCount)
2696 if (ifd.fTileByteCountsCount != tileCount)
2705 if (!CanReadTile (ifd))
2759 const dng_ifd &ifd,
2775 , fIFD (ifd)
2915 const dng_ifd &ifd,
2926 if (ifd.fRowInterleaveFactor > 1 &&
2927 ifd.fRowInterleaveFactor < ifd.fImageLength)
2930 dng_ifd tempIFD (ifd);
2935 ifd.fRowInterleaveFactor);
2953 if (ifd.fPlanarConfiguration == pcPlanar)
2955 outerSamples = ifd.fSamplesPerPixel;
2959 innerSamples = ifd.fSamplesPerPixel;
2964 uint32 tilesAcross = ifd.TilesAcross ();
2965 uint32 tilesDown = ifd.TilesDown ();
2981 tileOffset [tileIndex] = ifd.fTileOffset [tileIndex];
2990 stream.SetReadPosition (ifd.fTileOffsetsOffset);
2995 tileOffset [tileIndex] = stream.TagValue_uint32 (ifd.fTileOffsetsType);
3037 uint32 subTileLength = ifd.fTileLength;
3039 if (ifd.TileByteCount (ifd.TileArea (0, 0)) != 0)
3042 uint32 bytesPerPixel = TagTypeSize (ifd.PixelType ());
3044 uint32 bytesPerRow = SafeUint32Mult (ifd.fTileWidth, innerSamples,
3047 subTileLength = Pin_uint32 (ifd.fSubTileBlockRows,
3049 ifd.fTileLength);
3051 subTileLength = subTileLength / ifd.fSubTileBlockRows
3052 * ifd.fSubTileBlockRows;
3073 tileByteCount [tileIndex] = ifd.fTileByteCount [tileIndex];
3082 stream.SetReadPosition (ifd.fTileByteCountsOffset);
3087 tileByteCount [tileIndex] = stream.TagValue_uint32 (ifd.fTileByteCountsType);
3131 bool needsCompressedBuffer = NeedsCompressedBuffer (ifd);
3150 if (ifd.IsBaselineJPEG ())
3153 jpegImage->fImageSize.h = ifd.fImageWidth;
3154 jpegImage->fImageSize.v = ifd.fImageLength;
3156 jpegImage->fTileSize.h = ifd.fTileWidth;
3157 jpegImage->fTileSize.v = ifd.fTileLength;
3159 jpegImage->fUsesStrips = ifd.fUsesStrips;
3176 if (ifd.fJPEGTablesOffset && ifd.fJPEGTablesCount)
3179 if (ifd.IsBaselineJPEG ())
3182 fJPEGTables.Reset (host.Allocate (ifd.fJPEGTablesCount));
3184 stream.SetReadPosition (ifd.fJPEGTablesOffset);
3212 (subTileLength == ifd.fTileLength) &&
3213 (ifd.fCompression != ccUncompressed);
3227 ifd,
3283 dng_rect tileArea = ifd.TileArea (rowIndex, colIndex);
3308 subByteCount = ifd.TileByteCount (subArea);
3342 ifd,