Browse Source

Support reading 64bit sgi images.

Reviewed-by: Jean First
tags/n0.10
Carl Eugen Hoyos 13 years ago
parent
commit
0b1f20e23c
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/sgidec.c

+ 2
- 2
libavcodec/sgidec.c 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;
} else if (s->depth == SGI_RGB) {
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) {
avctx->pix_fmt = PIX_FMT_RGBA;
} else if (s->depth == SGI_RGBA) {
avctx->pix_fmt = s->bytes_per_channel == 2 ? PIX_FMT_RGBA64BE : PIX_FMT_RGBA;
} else {
av_log(avctx, AV_LOG_ERROR, "wrong picture format\n");
return -1;


Loading…
Cancel
Save