summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonin Descampe <antonin@gmail.com>2006-10-31 18:10:03 +0000
committerAntonin Descampe <antonin@gmail.com>2006-10-31 18:10:03 +0000
commit15949d43d15acc204f15dbff8da23bcf0ab5b187 (patch)
tree8df14921b75c52d9236f02cf64ef483dcdf012bb
parent696cd710dfe0837b9096c5011a7ed7949b4b6dd1 (diff)
fixed a cast problem in the maxlen variable
-rw-r--r--libopenjpeg/tcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopenjpeg/tcd.c b/libopenjpeg/tcd.c
index c0c4c52f..fa7154ae 100644
--- a/libopenjpeg/tcd.c
+++ b/libopenjpeg/tcd.c
@@ -1020,7 +1020,7 @@ bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_image_in
double hi = max;
int success = 0;
/* TODO: remove maxlen */
- int maxlen = tcd_tcp->rates[layno] ? (tcd_tcp->rates[layno] < len ? tcd_tcp->rates[layno] : len) : len;
+ int maxlen = tcd_tcp->rates[layno] ? int_min(((int) ceil(tcd_tcp->rates[layno])), len) : len;
double goodthresh = 0;
int i;
double distotarget; /* fixed_quality */