[FFmpeg-cvslog] tiff: add support for inverted FillOrder for uncompressed data

Stefano Sabatini git at videolan.org
Thu May 12 04:55:12 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Mon May  9 21:59:20 2011 +0200| [b437f5b055497fc81b8061de593f3ef27657c1e3] | committer: Diego Biurrun

tiff: add support for inverted FillOrder for uncompressed data

Fix decoding of file b.tif, trac issue #168.

Signed-off-by: Diego Biurrun <diego at biurrun.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b437f5b055497fc81b8061de593f3ef27657c1e3
---

 libavcodec/tiff.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 3cc3a42..1ec78a7 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -170,7 +170,13 @@ static int tiff_unpack_strip(TiffContext *s, uint8_t* dst, int stride, const uin
         }
         switch(s->compr){
         case TIFF_RAW:
-            memcpy(dst, src, width);
+            if (!s->fill_order) {
+                memcpy(dst, src, width);
+            } else {
+                int i;
+                for (i = 0; i < width; i++)
+                    dst[i] = av_reverse[src[i]];
+            }
             src += width;
             break;
         case TIFF_PACKBITS:



More information about the ffmpeg-cvslog mailing list