diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-13 02:24:56 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-13 12:44:37 +0200 |
commit | f57119b8e58cb5437c3ab40d797293ecb9b4a894 (patch) | |
tree | 1c621704c0e7755bc05170655841595012f978f1 /libavcodec/jpeg2000.c | |
parent | dc072c98677fde8d716e20e70b147989aac232e1 (diff) | |
download | ffmpeg-f57119b8e58cb5437c3ab40d797293ecb9b4a894.tar.gz |
jpeg2000: fix overflow in dequantization
Fixes decoding of file generated with:
ffmpeg -f lavfi -i smptehdbars=hd720 -pix_fmt rgb48 /tmp/o.jp2
Reviewed-by: Nicolas BERTRAND <nicoinattendu@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/jpeg2000.c')
-rw-r--r-- | libavcodec/jpeg2000.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c index f044164ed6..cb1a64d143 100644 --- a/libavcodec/jpeg2000.c +++ b/libavcodec/jpeg2000.c @@ -320,7 +320,7 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp, if (!av_codec_is_encoder(avctx->codec)) band->f_stepsize *= 0.5; - band->i_stepsize = band->f_stepsize * (1 << 16); + band->i_stepsize = band->f_stepsize * (1 << 15); /* computation of tbx_0, tbx_1, tby_0, tby_1 * see ISO/IEC 15444-1:2002 B.5 eq. B-15 and tbl B.1 |