JavaOpenJpegDecoder.c : fixed a signed/unsigned behaviour when returning form C to JAVA
This commit is contained in:
parent
a695c8eb51
commit
83abf56736
|
@ -5,6 +5,9 @@ What's New for OpenJPEG
|
|||
! : changed
|
||||
+ : added
|
||||
|
||||
August 31, 2009
|
||||
* [antonin] JavaOpenJpegDecoder.c : fixed a signed/unsigned behaviour when returning form C to JAVA
|
||||
|
||||
August 21, 2008
|
||||
* [antonin] found a bug in tcd.c that was preventing to find the correct threshold in tcd_rateallocate.c for high-precision images. Applied a temporary patch but a better solution should be found.
|
||||
|
||||
|
|
|
@ -782,11 +782,11 @@ JNIEXPORT jint JNICALL Java_org_openJpeg_OpenJPEGJavaDecoder_internalDecodeJ2Kto
|
|||
ptr2 = image->comps[2].data;
|
||||
#ifdef CHECK_THRESHOLDS
|
||||
if (image->comps[0].sgnd) {
|
||||
min_value = 0;
|
||||
max_value = 255;
|
||||
} else {
|
||||
min_value = -128;
|
||||
max_value = 127;
|
||||
} else {
|
||||
min_value = 0;
|
||||
max_value = 255;
|
||||
}
|
||||
#endif
|
||||
// Get the pointer to the Java structure where the data must be copied
|
||||
|
@ -828,11 +828,11 @@ JNIEXPORT jint JNICALL Java_org_openJpeg_OpenJPEGJavaDecoder_internalDecodeJ2Kto
|
|||
ptrBBody = jbBody;
|
||||
#ifdef CHECK_THRESHOLDS
|
||||
if (image->comps[0].sgnd) {
|
||||
min_value = 0;
|
||||
max_value = 255;
|
||||
} else {
|
||||
min_value = -128;
|
||||
max_value = 127;
|
||||
} else {
|
||||
min_value = 0;
|
||||
max_value = 255;
|
||||
}
|
||||
#endif
|
||||
//printf("C: transfering %d shorts to Java image8 pointer = %d\n", wr*hr,ptrSBody);
|
||||
|
@ -855,11 +855,11 @@ JNIEXPORT jint JNICALL Java_org_openJpeg_OpenJPEGJavaDecoder_internalDecodeJ2Kto
|
|||
ptrSBody = jsBody;
|
||||
#ifdef CHECK_THRESHOLDS
|
||||
if (image->comps[0].sgnd) {
|
||||
min_value = 0;
|
||||
max_value = 65535;
|
||||
} else {
|
||||
min_value = -32768;
|
||||
max_value = 32767;
|
||||
} else {
|
||||
min_value = 0;
|
||||
max_value = 65535;
|
||||
}
|
||||
printf("C: minValue = %d, maxValue = %d\n", min_value, max_value);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue