summaryrefslogtreecommitdiff
path: root/apps/plugins/jpeg/jpeg_decoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/jpeg/jpeg_decoder.c')
-rw-r--r--apps/plugins/jpeg/jpeg_decoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/jpeg/jpeg_decoder.c b/apps/plugins/jpeg/jpeg_decoder.c
index 71d5088..c90bff8 100644
--- a/apps/plugins/jpeg/jpeg_decoder.c
+++ b/apps/plugins/jpeg/jpeg_decoder.c
@@ -1067,12 +1067,12 @@ INLINE void check_bit_buffer(struct bitstream* pb, int nbits)
INLINE int get_bits(struct bitstream* pb, int nbits)
{
- return ((int) (pb->get_buffer >> (pb->bits_left -= nbits))) & ((1<<nbits)-1);
+ return ((int) (pb->get_buffer >> (pb->bits_left -= nbits))) & (BIT_N(nbits)-1);
}
INLINE int peek_bits(struct bitstream* pb, int nbits)
{
- return ((int) (pb->get_buffer >> (pb->bits_left - nbits))) & ((1<<nbits)-1);
+ return ((int) (pb->get_buffer >> (pb->bits_left - nbits))) & (BIT_N(nbits)-1);
}
INLINE void drop_bits(struct bitstream* pb, int nbits)