diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-01-14 01:10:13 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-01-14 01:10:13 +0100 |
commit | c714cd3bd4af70e0cba1db399ca420b1f51a773d (patch) | |
tree | 16ff85345ee078d3702e55b89654445d60c01e11 /libavcodec/tiff.c | |
parent | 93af38ca93f28d8480acee5f1d8eda88dabd706b (diff) | |
download | ffmpeg-c714cd3bd4af70e0cba1db399ca420b1f51a773d.tar.gz |
Support 64bit tiff images.
Fixes a part of ticket #503.
Reviewed-by: Paul B Mahol
Reviewed-by: Jean First
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r-- | libavcodec/tiff.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 67aeb2398f..6c440ad500 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -302,6 +302,9 @@ static int init_image(TiffContext *s) case 483: s->avctx->pix_fmt = s->le ? PIX_FMT_RGB48LE : PIX_FMT_RGB48BE; break; + case 644: + s->avctx->pix_fmt = s->le ? PIX_FMT_RGBA64LE : PIX_FMT_RGBA64BE; + break; default: av_log(s->avctx, AV_LOG_ERROR, "This format is not supported (bpp=%d, bppcount=%d)\n", @@ -647,13 +650,15 @@ static int decode_frame(AVCodecContext *avctx, dst = p->data[0]; soff = s->bpp >> 3; ssize = s->width * soff; - if (s->avctx->pix_fmt == PIX_FMT_RGB48LE) { + if (s->avctx->pix_fmt == PIX_FMT_RGB48LE || + s->avctx->pix_fmt == PIX_FMT_RGBA64LE) { for (i = 0; i < s->height; i++) { for (j = soff; j < ssize; j += 2) AV_WL16(dst + j, AV_RL16(dst + j) + AV_RL16(dst + j - soff)); dst += stride; } - } else if (s->avctx->pix_fmt == PIX_FMT_RGB48BE) { + } else if (s->avctx->pix_fmt == PIX_FMT_RGB48BE || + s->avctx->pix_fmt == PIX_FMT_RGBA64BE) { for (i = 0; i < s->height; i++) { for (j = soff; j < ssize; j += 2) AV_WB16(dst + j, AV_RB16(dst + j) + AV_RB16(dst + j - soff)); |