[Ffmpeg-devel] [PATCH] TIFF encoder (Google SoC qualification task)

Kamil Nowosad k.nowosad
Wed Apr 4 12:39:56 CEST 2007


The photometric_interpretation patch had a stupid typo... 
I'm sorry. Here's the corrected version.

-- 
Best regards,
Kamil Nowosad
-------------- next part --------------
Index: libavcodec/tiffenc.c
===================================================================
--- libavcodec/tiffenc.c	(wersja 8622)
+++ libavcodec/tiffenc.c	(kopia robocza)
@@ -44,7 +44,7 @@
     unsigned int bpp;                   ///< bits per pixel
     int compr;                          ///< compression level
     int bpp_tab_size;                   ///< bpp_tab size
-    int invert;                         ///< photometric interpretation
+    int photometric_interpretation;     ///< photometric interpretation
     int strips;                         ///< number of strips
     int rps;                            ///< row per strip
     uint8_t entries[TIFF_MAX_ENTRY*12]; ///< entires in header
@@ -202,23 +202,23 @@
     switch (avctx->pix_fmt) {
     case PIX_FMT_RGB24:
         s->bpp = 24;
-        s->invert = 2;
+        s->photometric_interpretation = 2;
         break;
     case PIX_FMT_GRAY8:
         s->bpp = 8;
-        s->invert = 1;
+        s->photometric_interpretation = 1;
         break;
     case PIX_FMT_PAL8:
         s->bpp = 8;
-        s->invert = 3;
+        s->photometric_interpretation = 3;
         break;
     case PIX_FMT_MONOBLACK:
         s->bpp = 1;
-        s->invert = 1;
+        s->photometric_interpretation = 1;
         break;
     case PIX_FMT_MONOWHITE:
         s->bpp = 1;
-        s->invert = 0;
+        s->photometric_interpretation = 0;
         break;
     default:
         av_log(s->avctx, AV_LOG_ERROR,
@@ -300,7 +300,7 @@
     add_entry(s, TIFF_BPP,               TIFF_SHORT,    s->bpp_tab_size, bpp_tab);
 
     add_entry(s, TIFF_COMPR,             TIFF_SHORT,    1,      (uint16_t[]) {s->compr});
-    add_entry(s, TIFF_INVERT,            TIFF_SHORT,    1,      (uint16_t[]) {s->invert});
+    add_entry(s, TIFF_INVERT,            TIFF_SHORT,    1,      (uint16_t[]) {s->photometric_interpretation});
     add_entry(s, TIFF_STRIP_OFFS,        TIFF_LONG,     strips, strip_offsets);
 
     if (s->bpp_tab_size)



More information about the ffmpeg-devel mailing list