kopia lustrzana https://gitlab.com/sane-project/backends
Fixed some warnings (bug #300823).
rodzic
a70f09e4ca
commit
9e3a4cefbf
|
@ -16,6 +16,7 @@
|
||||||
doesn't work on 64 bit platforms as size_t is 64 bits there
|
doesn't work on 64 bit platforms as size_t is 64 bits there
|
||||||
while the length of a data block is defined as 32 bits in the
|
while the length of a data block is defined as 32 bits in the
|
||||||
SANE network standard (bug #300837).
|
SANE network standard (bug #300837).
|
||||||
|
* backend/microtek2.c: Fixed some warnings (bug #300823).
|
||||||
|
|
||||||
2004-10-02 Thomas Soumarmon <thomas.soumarmon@cogitae.net>
|
2004-10-02 Thomas Soumarmon <thomas.soumarmon@cogitae.net>
|
||||||
|
|
||||||
|
|
|
@ -6383,6 +6383,9 @@ prepare_shading_data(Microtek2_Scanner *ms, u_int32_t lines, u_int8_t **data)
|
||||||
+ color * ( ms->bpl / ms->lut_entry_size / 3 )
|
+ color * ( ms->bpl / ms->lut_entry_size / 3 )
|
||||||
+ i);
|
+ i);
|
||||||
value /= lines;
|
value /= lines;
|
||||||
|
*((u_int16_t *) *data
|
||||||
|
+ color * ( mi->geo_width / mi->calib_divisor ) + i) =
|
||||||
|
(u_int16_t) MIN(0xffff, value);
|
||||||
#else
|
#else
|
||||||
/* use a median filter to get the shading data -- should be better */
|
/* use a median filter to get the shading data -- should be better */
|
||||||
*(sortbuf + line ) =
|
*(sortbuf + line ) =
|
||||||
|
@ -6393,10 +6396,9 @@ prepare_shading_data(Microtek2_Scanner *ms, u_int32_t lines, u_int8_t **data)
|
||||||
qsort(sortbuf, lines, sizeof(u_int16_t),
|
qsort(sortbuf, lines, sizeof(u_int16_t),
|
||||||
(qsortfunc)compare_func_16);
|
(qsortfunc)compare_func_16);
|
||||||
value = *(sortbuf + ( lines - 1 ) / 2 );
|
value = *(sortbuf + ( lines - 1 ) / 2 );
|
||||||
#endif
|
|
||||||
*((u_int16_t *) *data
|
*((u_int16_t *) *data
|
||||||
+ color * ( mi->geo_width / mi->calib_divisor ) + i) =
|
+ color * ( mi->geo_width / mi->calib_divisor ) + i) = value;
|
||||||
(u_int16_t) MIN(0xffff, value);
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -6422,6 +6424,9 @@ prepare_shading_data(Microtek2_Scanner *ms, u_int32_t lines, u_int8_t **data)
|
||||||
+ color);
|
+ color);
|
||||||
|
|
||||||
value /= lines;
|
value /= lines;
|
||||||
|
*((u_int16_t *) *data
|
||||||
|
+ color * ( mi->geo_width / mi->calib_divisor ) + i) =
|
||||||
|
(u_int16_t) MIN(0xffff, value);
|
||||||
#else
|
#else
|
||||||
/* use a median filter to get the shading data -- should be better */
|
/* use a median filter to get the shading data -- should be better */
|
||||||
*(sortbuf + line ) =
|
*(sortbuf + line ) =
|
||||||
|
@ -6432,10 +6437,9 @@ prepare_shading_data(Microtek2_Scanner *ms, u_int32_t lines, u_int8_t **data)
|
||||||
qsort(sortbuf, lines, sizeof(u_int16_t),
|
qsort(sortbuf, lines, sizeof(u_int16_t),
|
||||||
(qsortfunc)compare_func_16);
|
(qsortfunc)compare_func_16);
|
||||||
value = *(sortbuf + ( lines - 1 ) / 2 );
|
value = *(sortbuf + ( lines - 1 ) / 2 );
|
||||||
#endif
|
|
||||||
*((u_int16_t *) *data
|
*((u_int16_t *) *data
|
||||||
+ color * ( mi->geo_width / mi->calib_divisor ) + i) =
|
+ color * ( mi->geo_width / mi->calib_divisor ) + i) = value;
|
||||||
(u_int16_t) MIN(0xffff, value);
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -6469,9 +6473,14 @@ prepare_shading_data(Microtek2_Scanner *ms, u_int32_t lines, u_int8_t **data)
|
||||||
+ color);
|
+ color);
|
||||||
|
|
||||||
value /= lines;
|
value /= lines;
|
||||||
|
#ifndef MICROTEK2_CALIB_USE_MEDIAN
|
||||||
*((u_int16_t *) *data
|
*((u_int16_t *) *data
|
||||||
+ color * ( mi->geo_width / mi->calib_divisor ) + i) =
|
+ color * ( mi->geo_width / mi->calib_divisor ) + i) =
|
||||||
(u_int16_t) MIN(0xffff, value);
|
(u_int16_t) MIN(0xffff, value);
|
||||||
|
#else
|
||||||
|
*((u_int16_t *) *data
|
||||||
|
+ color * ( mi->geo_width / mi->calib_divisor ) + i) = value;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue