summaryrefslogtreecommitdiff
path: root/libavcodec/tiff.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-05-09 21:59:20 +0200
committerDiego Biurrun <diego@biurrun.de>2011-05-11 13:55:44 +0200
commitb437f5b055497fc81b8061de593f3ef27657c1e3 (patch)
treeeccc150dfe339a518bd7a32790df37b241627f27 /libavcodec/tiff.c
parentbea705752d6448578482cfa022944a9795388f14 (diff)
tiff: add support for inverted FillOrder for uncompressed data
Fix decoding of file b.tif, trac issue #168. Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r--libavcodec/tiff.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 3cc3a42500..1ec78a7125 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: