[FFmpeg-cvslog] sgi: decode images with 4 channels at 8 and 16 bits
Carl Eugen Hoyos
git at videolan.org
Tue Apr 1 04:04:37 CEST 2014
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat Jan 14 01:14:51 2012 +0100| [f8dea10d3f09376894613d0266c34d1a16ac735f] | committer: Vittorio Giovara
sgi: decode images with 4 channels at 8 and 16 bits
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f8dea10d3f09376894613d0266c34d1a16ac735f
---
Changelog | 1 +
libavcodec/sgidec.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Changelog b/Changelog
index e6a9431..c29d227 100644
--- a/Changelog
+++ b/Changelog
@@ -11,6 +11,7 @@ version <next>:
- XBM decoder
- bmp standalone parser
- OpenEXR image decoder
+- support decoding 4-channel SGI images
version 10:
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index 04cfcd0..357d54e 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -198,8 +198,8 @@ static int decode_frame(AVCodecContext *avctx,
avctx->pix_fmt = s->bytes_per_channel == 2 ? AV_PIX_FMT_GRAY16BE : AV_PIX_FMT_GRAY8;
} else if (s->depth == SGI_RGB) {
avctx->pix_fmt = s->bytes_per_channel == 2 ? AV_PIX_FMT_RGB48BE : AV_PIX_FMT_RGB24;
- } else if (s->depth == SGI_RGBA && s->bytes_per_channel == 1) {
- avctx->pix_fmt = AV_PIX_FMT_RGBA;
+ } else if (s->depth == SGI_RGBA) {
+ avctx->pix_fmt = s->bytes_per_channel == 2 ? AV_PIX_FMT_RGBA64BE : AV_PIX_FMT_RGBA;
} else {
av_log(avctx, AV_LOG_ERROR, "wrong picture format\n");
return -1;
More information about the ffmpeg-cvslog
mailing list