aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-09 20:26:38 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-09 20:26:38 +0200
commit0916938a8dfac27096ed9f6873d32e24fa5f87c9 (patch)
tree93b8177b6c4ef334cc8d44b5b65c170f7eed137c
parent6bf8d9e1649da468e331c81b5948b752d0b687a7 (diff)
downloadffmpeg-0916938a8dfac27096ed9f6873d32e24fa5f87c9.tar.gz
avcodec/jpeg2000dec: Fix gain regression with gray16
Found-by: carl Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/jpeg2000dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index aecc6ebe02..24cb8a171f 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;