From b437f5b055497fc81b8061de593f3ef27657c1e3 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Mon, 9 May 2011 21:59:20 +0200 Subject: tiff: add support for inverted FillOrder for uncompressed data Fix decoding of file b.tif, trac issue #168. Signed-off-by: Diego Biurrun --- libavcodec/tiff.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libavcodec') 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: -- cgit v1.2.3