[FFmpeg-cvslog] Support reading 64bit sgi images.

Carl Eugen Hoyos git at videolan.org
Sat Jan 14 01:16:48 CET 2012


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat Jan 14 01:14:51 2012 +0100| [0b1f20e23c3d61d06c86ee1aa160cd4da8b47b0c] | committer: Carl Eugen Hoyos

Support reading 64bit sgi images.

Reviewed-by: Jean First

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b1f20e23c3d61d06c86ee1aa160cd4da8b47b0c
---

 libavcodec/sgidec.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index 98327a8..b84949d 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -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;



More information about the ffmpeg-cvslog mailing list