[Cin] filetiff patch

Andrew Randrianasulu randrianasulu at gmail.com
Sun Mar 15 15:52:54 CET 2020


I tried few more compression schemas from libtiff 4.0.10 tiff.h:

#define TIFFTAG_COMPRESSION             259     /* data compression technique */
#define     COMPRESSION_NONE            1       /* dump mode */
#define     COMPRESSION_CCITTRLE        2       /* CCITT modified Huffman RLE */
#define     COMPRESSION_CCITTFAX3       3       /* CCITT Group 3 fax encoding */
#define     COMPRESSION_CCITT_T4        3       /* CCITT T.4 (TIFF 6 name) */
#define     COMPRESSION_CCITTFAX4       4       /* CCITT Group 4 fax encoding */
#define     COMPRESSION_CCITT_T6        4       /* CCITT T.6 (TIFF 6 name) */
#define     COMPRESSION_LZW             5       /* Lempel-Ziv  & Welch */
#define     COMPRESSION_OJPEG           6       /* !6.0 JPEG */
#define     COMPRESSION_JPEG            7       /* %JPEG DCT compression */
#define     COMPRESSION_T85                     9       /* !TIFF/FX T.85 JBIG compression */
#define     COMPRESSION_T43                     10      /* !TIFF/FX T.43 colour by layered JBIG compression */
#define     COMPRESSION_NEXT            32766   /* NeXT 2-bit RLE */
#define     COMPRESSION_CCITTRLEW       32771   /* #1 w/ word alignment */
#define     COMPRESSION_PACKBITS        32773   /* Macintosh RLE */
#define     COMPRESSION_THUNDERSCAN     32809   /* ThunderScan RLE */
/* codes 32895-32898 are reserved for ANSI IT8 TIFF/IT <dkelly at apago.com) */
#define     COMPRESSION_IT8CTPAD        32895   /* IT8 CT w/padding */
#define     COMPRESSION_IT8LW           32896   /* IT8 Linework RLE */
#define     COMPRESSION_IT8MP           32897   /* IT8 Monochrome picture */
#define     COMPRESSION_IT8BL           32898   /* IT8 Binary line art */
/* compression codes 32908-32911 are reserved for Pixar */
#define     COMPRESSION_PIXARFILM       32908   /* Pixar companded 10bit LZW */
#define     COMPRESSION_PIXARLOG        32909   /* Pixar companded 11bit ZIP */
#define     COMPRESSION_DEFLATE         32946   /* Deflate compression */
#define     COMPRESSION_ADOBE_DEFLATE   8       /* Deflate compression,
                                                   as recognized by Adobe */
/* compression code 32947 is reserved for Oceana Matrix <dev at oceana.com> */
#define     COMPRESSION_DCS             32947   /* Kodak DCS encoding */
#define     COMPRESSION_JBIG            34661   /* ISO JBIG */
#define     COMPRESSION_SGILOG          34676   /* SGI Log Luminance RLE */
#define     COMPRESSION_SGILOG24        34677   /* SGI Log 24-bit packed */
#define     COMPRESSION_JP2000          34712   /* Leadtools JPEG2000 */
#define     COMPRESSION_LERC            34887   /* ESRI Lerc codec: https://github.com/Esri/lerc */
/* compression codes 34887-34889 are reserved for ESRI */
#define     COMPRESSION_LZMA            34925   /* LZMA2 */
#define     COMPRESSION_ZSTD            50000   /* ZSTD: WARNING not registered in Adobe-maintained registry */
#define     COMPRESSION_WEBP            50001   /* WEBP: WARNING not registered in Adobe-maintained registry */

Sadly, only deflate worked with 32-bit floating point session.

Others complained like
FileTIFF: Compression scheme 32908 scanline encoding is not implemented.

Also, GIMP complained a bit, but allow me to open image anyway:

tiff_io_warning: [TIFFReadDirectory] Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
tiff_io_warning: [TIFFReadDirectory] Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
tiff_io_warning: [TIFFReadDirectory] Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
tiff_io_warning: [TIFFReadDirectory] Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
bps: 32
load_contiguous
bytes_per_pixel: 16, format: 16

Probably for other compression schemas differet, non-scanline method of calling libtiff must be used?

Also, a bit of nipicking (?) but Cinelerra doesn' show single-frame rendering correctly in stats:

** rendered 0 frames in 14.170 secs, 0.000 fps
Render::render_single: Session finished.
** rendered 355 frames in 249.619 secs, 1.422 fps
Render::render_single: Session finished.
** rendered 0 frames in 3.640 secs, 0.000 fps

Shouldn't it be 1 frame, at least?




-------------- next part --------------
A non-text attachment was scrubbed...
Name: TIFF.diff
Type: text/x-diff
Size: 2141 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20200315/552da60d/attachment-0001.bin>


More information about the Cin mailing list