1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Support reading 64bit sgi images.

Reviewed-by: Jean First
This commit is contained in:
Carl Eugen Hoyos 2012-01-14 01:14:51 +01:00
parent 3fe4540b08
commit 0b1f20e23c

View File

@ -208,8 +208,8 @@ static int decode_frame(AVCodecContext *avctx,
avctx->pix_fmt = s->bytes_per_channel == 2 ? PIX_FMT_GRAY16BE : PIX_FMT_GRAY8; avctx->pix_fmt = s->bytes_per_channel == 2 ? PIX_FMT_GRAY16BE : PIX_FMT_GRAY8;
} else if (s->depth == SGI_RGB) { } else if (s->depth == SGI_RGB) {
avctx->pix_fmt = s->bytes_per_channel == 2 ? PIX_FMT_RGB48BE : PIX_FMT_RGB24; avctx->pix_fmt = s->bytes_per_channel == 2 ? PIX_FMT_RGB48BE : PIX_FMT_RGB24;
} else if (s->depth == SGI_RGBA && s->bytes_per_channel == 1) { } else if (s->depth == SGI_RGBA) {
avctx->pix_fmt = PIX_FMT_RGBA; avctx->pix_fmt = s->bytes_per_channel == 2 ? PIX_FMT_RGBA64BE : PIX_FMT_RGBA;
} else { } else {
av_log(avctx, AV_LOG_ERROR, "wrong picture format\n"); av_log(avctx, AV_LOG_ERROR, "wrong picture format\n");
return -1; return -1;