@@ -163,7 +163,7 @@ ImagingFilter3x3(Imaging imOut, Imaging im, const float *kernel, float offset) {
163163 }
164164 } else {
165165 int bigendian = 0 ;
166- if (im -> type == IMAGING_TYPE_SPECIAL ) {
166+ if (im -> type == IMAGING_TYPE_I16 ) {
167167 if (
168168 im -> mode == IMAGING_MODE_I_16B
169169#ifdef WORDS_BIGENDIAN
@@ -180,12 +180,12 @@ ImagingFilter3x3(Imaging imOut, Imaging im, const float *kernel, float offset) {
180180 UINT8 * restrict out = (UINT8 * )imOut -> image [y ];
181181
182182 out [0 ] = in0 [0 ];
183- if (im -> type == IMAGING_TYPE_SPECIAL ) {
183+ if (im -> type == IMAGING_TYPE_I16 ) {
184184 out [1 ] = in0 [1 ];
185185 }
186186 for (x = 1 ; x < xsize - 1 ; x ++ ) {
187187 float ss = offset ;
188- if (im -> type == IMAGING_TYPE_SPECIAL ) {
188+ if (im -> type == IMAGING_TYPE_I16 ) {
189189 ss += kernel_i16 (3 , in1 , x , & kernel [0 ], bigendian );
190190 ss += kernel_i16 (3 , in0 , x , & kernel [3 ], bigendian );
191191 ss += kernel_i16 (3 , in_1 , x , & kernel [6 ], bigendian );
@@ -200,7 +200,7 @@ ImagingFilter3x3(Imaging imOut, Imaging im, const float *kernel, float offset) {
200200 out [x ] = clip8 (ss );
201201 }
202202 }
203- if (im -> type == IMAGING_TYPE_SPECIAL ) {
203+ if (im -> type == IMAGING_TYPE_I16 ) {
204204 out [x * 2 ] = in0 [x * 2 ];
205205 out [x * 2 + 1 ] = in0 [x * 2 + 1 ];
206206 } else {
@@ -324,7 +324,7 @@ ImagingFilter5x5(Imaging imOut, Imaging im, const float *kernel, float offset) {
324324 }
325325 } else {
326326 int bigendian = 0 ;
327- if (im -> type == IMAGING_TYPE_SPECIAL ) {
327+ if (im -> type == IMAGING_TYPE_I16 ) {
328328 if (
329329 im -> mode == IMAGING_MODE_I_16B
330330#ifdef WORDS_BIGENDIAN
@@ -344,13 +344,13 @@ ImagingFilter5x5(Imaging imOut, Imaging im, const float *kernel, float offset) {
344344
345345 out [0 ] = in0 [0 ];
346346 out [1 ] = in0 [1 ];
347- if (im -> type == IMAGING_TYPE_SPECIAL ) {
347+ if (im -> type == IMAGING_TYPE_I16 ) {
348348 out [2 ] = in0 [2 ];
349349 out [3 ] = in0 [3 ];
350350 }
351351 for (x = 2 ; x < xsize - 2 ; x ++ ) {
352352 float ss = offset ;
353- if (im -> type == IMAGING_TYPE_SPECIAL ) {
353+ if (im -> type == IMAGING_TYPE_I16 ) {
354354 ss += kernel_i16 (5 , in2 , x , & kernel [0 ], bigendian );
355355 ss += kernel_i16 (5 , in1 , x , & kernel [5 ], bigendian );
356356 ss += kernel_i16 (5 , in0 , x , & kernel [10 ], bigendian );
@@ -369,7 +369,7 @@ ImagingFilter5x5(Imaging imOut, Imaging im, const float *kernel, float offset) {
369369 out [x ] = clip8 (ss );
370370 }
371371 }
372- if (im -> type == IMAGING_TYPE_SPECIAL ) {
372+ if (im -> type == IMAGING_TYPE_I16 ) {
373373 out [x * 2 + 0 ] = in0 [x * 2 + 0 ];
374374 out [x * 2 + 1 ] = in0 [x * 2 + 1 ];
375375 out [x * 2 + 2 ] = in0 [x * 2 + 2 ];
@@ -479,8 +479,7 @@ ImagingFilter(Imaging im, int xsize, int ysize, const FLOAT32 *kernel, FLOAT32 o
479479 Imaging imOut ;
480480 ImagingSectionCookie cookie ;
481481
482- if (im -> type == IMAGING_TYPE_FLOAT32 ||
483- (im -> type == IMAGING_TYPE_SPECIAL && im -> bands != 1 )) {
482+ if (im -> type == IMAGING_TYPE_FLOAT32 ) {
484483 return (Imaging )ImagingError_ModeError ();
485484 }
486485
0 commit comments