[FFmpeg-cvslog] avcodec/jpeg2000dec: Fix gain regression with gray16

Michael Niedermayer git at videolan.org
Tue Jun 9 20:44:46 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jun  9 20:26:38 2015 +0200| [0916938a8dfac27096ed9f6873d32e24fa5f87c9] | committer: Michael Niedermayer

avcodec/jpeg2000dec: Fix gain regression with gray16

Found-by: carl
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/jpeg2000dec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index aecc6eb..24cb8a1 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1330,7 +1330,8 @@ static int jpeg2000_decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
             }
         }
     } else {
-        int precision = picture->format == AV_PIX_FMT_XYZ12 ? 16 : s->precision;
+        int precision = picture->format == AV_PIX_FMT_XYZ12 ||
+                        picture->format == AV_PIX_FMT_GRAY16 ? 16 : s->precision;
 
         for (compno = 0; compno < s->ncomponents; compno++) {
             Jpeg2000Component *comp = tile->comp + compno;



More information about the ffmpeg-cvslog mailing list