projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd54dd0
)
jpeg2000: Correctly calculate sgnd
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 1 Jul 2013 08:01:09 +0000
(10:01 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Tue, 2 Jul 2013 18:05:44 +0000
(20:05 +0200)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/jpeg2000dec.c
patch
|
blob
|
history
diff --git
a/libavcodec/jpeg2000dec.c
b/libavcodec/jpeg2000dec.c
index
e1da04d
..
8df6ee2
100644
(file)
--- a/
libavcodec/jpeg2000dec.c
+++ b/
libavcodec/jpeg2000dec.c
@@
-198,7
+198,7
@@
static int get_siz(Jpeg2000DecoderContext *s)
uint8_t x = bytestream2_get_byteu(&s->g);
s->cbps[i] = (x & 0x7f) + 1;
s->precision = FFMAX(s->cbps[i], s->precision);
- s->sgnd[i] =
(x & 0x80) == 1
;
+ s->sgnd[i] =
!!(x & 0x80)
;
s->cdx[i] = bytestream2_get_byteu(&s->g);
s->cdy[i] = bytestream2_get_byteu(&s->g);