[FFmpeg-cvslog] Supoort decoding of gray16 images with libopenjpeg.
Michael Bradshaw
git at videolan.org
Mon Jan 30 23:54:45 CET 2012
ffmpeg | branch: master | Michael Bradshaw <mbradshaw at sorensonmedia.com> | Mon Jan 30 23:53:25 2012 +0100| [f0d6828dbe308b277525d3df19c0014833be2271] | committer: Carl Eugen Hoyos
Supoort decoding of gray16 images with libopenjpeg.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f0d6828dbe308b277525d3df19c0014833be2271
---
libavcodec/libopenjpegdec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index 07cca25..3139b85 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -258,7 +258,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
avcodec_set_dimensions(avctx, width, height);
switch (image->numcomps) {
- case 1: avctx->pix_fmt = PIX_FMT_GRAY8;
+ case 1: avctx->pix_fmt = (image->comps[0].bpp == 8) ? PIX_FMT_GRAY8 : PIX_FMT_GRAY16;
break;
case 3: avctx->pix_fmt = check_image_attributes(avctx, image);
break;
More information about the ffmpeg-cvslog
mailing list