Mercurial > libavcodec.hg
comparison tiff.c @ 8590:7a463923ecd1 libavcodec
Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1.
author | aurel |
---|---|
date | Tue, 13 Jan 2009 23:44:16 +0000 |
parents | 902c43f89d92 |
children | e9d9d946f213 |
comparison
equal
deleted
inserted
replaced
8589:a29b5b5c3c9d | 8590:7a463923ecd1 |
---|---|
23 * TIFF image decoder | 23 * TIFF image decoder |
24 * @file tiff.c | 24 * @file tiff.c |
25 * @author Konstantin Shishkov | 25 * @author Konstantin Shishkov |
26 */ | 26 */ |
27 #include "avcodec.h" | 27 #include "avcodec.h" |
28 #ifdef CONFIG_ZLIB | 28 #if CONFIG_ZLIB |
29 #include <zlib.h> | 29 #include <zlib.h> |
30 #endif | 30 #endif |
31 #include "lzw.h" | 31 #include "lzw.h" |
32 #include "tiff.h" | 32 #include "tiff.h" |
33 #include "faxcompr.h" | 33 #include "faxcompr.h" |
76 | 76 |
77 static int tiff_unpack_strip(TiffContext *s, uint8_t* dst, int stride, const uint8_t *src, int size, int lines){ | 77 static int tiff_unpack_strip(TiffContext *s, uint8_t* dst, int stride, const uint8_t *src, int size, int lines){ |
78 int c, line, pixels, code; | 78 int c, line, pixels, code; |
79 const uint8_t *ssrc = src; | 79 const uint8_t *ssrc = src; |
80 int width = s->width * s->bpp >> 3; | 80 int width = s->width * s->bpp >> 3; |
81 #ifdef CONFIG_ZLIB | 81 #if CONFIG_ZLIB |
82 uint8_t *zbuf; unsigned long outlen; | 82 uint8_t *zbuf; unsigned long outlen; |
83 | 83 |
84 if(s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DEFLATE){ | 84 if(s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DEFLATE){ |
85 outlen = width * lines; | 85 outlen = width * lines; |
86 zbuf = av_malloc(outlen); | 86 zbuf = av_malloc(outlen); |
296 case TIFF_G4: | 296 case TIFF_G4: |
297 s->fax_opts = 0; | 297 s->fax_opts = 0; |
298 break; | 298 break; |
299 case TIFF_DEFLATE: | 299 case TIFF_DEFLATE: |
300 case TIFF_ADOBE_DEFLATE: | 300 case TIFF_ADOBE_DEFLATE: |
301 #ifdef CONFIG_ZLIB | 301 #if CONFIG_ZLIB |
302 break; | 302 break; |
303 #else | 303 #else |
304 av_log(s->avctx, AV_LOG_ERROR, "Deflate: ZLib not compiled in\n"); | 304 av_log(s->avctx, AV_LOG_ERROR, "Deflate: ZLib not compiled in\n"); |
305 return -1; | 305 return -1; |
306 #endif | 306 #endif |