summaryrefslogtreecommitdiff
path: root/libavcodec/tiff.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2006-11-13 11:39:28 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2006-11-13 11:39:28 +0000
commitee0a03582074b46d214df59bfe824f5b2cda4129 (patch)
treefcf86662ab282e82ea10301c905c520793a33a2d /libavcodec/tiff.c
parent2878cecd6d5d1a4c835596bdc097706ae9206b1e (diff)
Support for 16-bit grayscale
Originally committed as revision 7012 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r--libavcodec/tiff.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 62e2a390b1..5925af1ae9 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -255,6 +255,14 @@ static int tiff_decode_tag(TiffContext *s, uint8_t *start, uint8_t *buf, uint8_t
case 24:
s->avctx->pix_fmt = PIX_FMT_RGB24;
break;
+ case 16:
+ if(count == 1){
+ s->avctx->pix_fmt = PIX_FMT_GRAY16BE;
+ }else{
+ av_log(s->avctx, AV_LOG_ERROR, "This format is not supported (bpp=%i)\n", s->bpp);
+ return -1;
+ }
+ break;
default:
av_log(s->avctx, AV_LOG_ERROR, "This format is not supported (bpp=%i)\n", s->bpp);
return -1;