Lines Matching refs:rasterP

125 allocateRasterArray(JNIEnv *env, RasterS_t *rasterP,
159 static int expandPackedBCR(JNIEnv *env, RasterS_t *rasterP, int component,
161 static int expandPackedSCR(JNIEnv *env, RasterS_t *rasterP, int component,
163 static int expandPackedICR(JNIEnv *env, RasterS_t *rasterP, int component,
165 static int expandPackedBCRdefault(JNIEnv *env, RasterS_t *rasterP,
168 static int expandPackedSCRdefault(JNIEnv *env, RasterS_t *rasterP,
171 static int expandPackedICRdefault(JNIEnv *env, RasterS_t *rasterP,
174 static int setPackedBCR(JNIEnv *env, RasterS_t *rasterP, int component,
176 static int setPackedSCR(JNIEnv *env, RasterS_t *rasterP, int component,
178 static int setPackedICR(JNIEnv *env, RasterS_t *rasterP, int component,
180 static int setPackedBCRdefault(JNIEnv *env, RasterS_t *rasterP,
183 static int setPackedSCRdefault(JNIEnv *env, RasterS_t *rasterP,
186 static int setPackedICRdefault(JNIEnv *env, RasterS_t *rasterP,
1779 RasterS_t *rasterP = &imageP->raster;
1784 jobject jbaseraster = (*env)->GetObjectField(env, rasterP->jraster,
1786 width = rasterP->width;
1787 height = rasterP->height;
1790 !(*env)->IsSameObject(env, rasterP->jraster, jbaseraster)) {
1798 xOff = (*env)->GetIntField(env, rasterP->jraster, g_RasterXOffsetID);
1799 yOff = (*env)->GetIntField(env, rasterP->jraster, g_RasterYOffsetID);
1805 if (xOff + rasterP->width < baseXoff + baseWidth) {
1809 if (yOff + rasterP->height < baseYoff + baseHeight) {
1994 RasterS_t *rasterP, int component, unsigned char *bdataP) {
1996 if (rasterP->rasterType == COMPONENT_RASTER_TYPE) {
1997 switch (rasterP->dataType) {
1999 if (expandPackedBCR(env, rasterP, component, bdataP) < 0) {
2006 if (expandPackedICR(env, rasterP, component, bdataP) < 0) {
2013 if (expandPackedICR(env, rasterP, component, bdataP) < 0) {
2036 RasterS_t *rasterP = &imageP->raster;
2046 int scanLength = rasterP->width * 4;
2055 for (y=0; y < rasterP->height; y+=numLines) {
2057 if (y+numLines > rasterP->height) {
2058 numLines = rasterP->height - y;
2063 rasterP->width, numLines,
2064 jpixels,0, rasterP->width);
2083 RasterS_t *rasterP = &imageP->raster;
2089 int nbytes = rasterP->width*4*NUM_LINES;
2098 for (y=0; y < rasterP->height; y+=NUM_LINES) {
2099 if (y+numLines > rasterP->height) {
2100 numLines = rasterP->height - y;
2101 nbytes = rasterP->width*4*numLines;
2117 rasterP->width, numLines, jpixels, 0,
2118 rasterP->width);
2136 RasterS_t *rasterP = &imageP->raster;
2144 width = rasterP->width;
2145 height = rasterP->height;
2158 baseWidth = rasterP->baseRasterWidth;
2159 baseHeight = rasterP->baseRasterHeight;
2160 baseXoff = rasterP->baseOriginX;
2161 baseYoff = rasterP->baseOriginY;
2163 if (rasterP->minX + rasterP->width < baseXoff + baseWidth) {
2167 if (rasterP->minY + rasterP->height < baseYoff + baseHeight) {
2172 if (rasterP->minX > baseXoff ) {
2177 if (rasterP->minY > baseYoff) {
2207 if (rasterP->rasterType == COMPONENT_RASTER_TYPE) {
2217 return expandPackedBCRdefault(env, rasterP, -1, cDataP,
2220 return expandPackedSCRdefault(env, rasterP, -1, cDataP,
2223 return expandPackedICRdefault(env, rasterP, -1, cDataP,
2232 dataP = (void *) (*env)->GetPrimitiveArrayCritical(env, rasterP->jdata,
2258 (*env)->ReleasePrimitiveArrayCritical(env, rasterP->jdata, dataP,
2287 (*env)->ReleasePrimitiveArrayCritical(env, rasterP->jdata, dataP,
2297 allocateRasterArray(JNIEnv *env, RasterS_t *rasterP,
2310 width = rasterP->width;
2311 height = rasterP->height;
2313 if (rasterP->numBands <= 0 || rasterP->numBands > 4) {
2329 baseWidth = rasterP->baseRasterWidth;
2330 baseHeight = rasterP->baseRasterHeight;
2331 baseXoff = rasterP->baseOriginX;
2332 baseYoff = rasterP->baseOriginY;
2334 if (rasterP->minX + rasterP->width < baseXoff + baseWidth) {
2338 if (rasterP->minY + rasterP->height < baseYoff + baseHeight) {
2343 if (rasterP->minX > baseXoff ) {
2348 if (rasterP->minY > baseYoff) {
2357 switch (rasterP->type) {
2359 if (!((rasterP->chanOffsets[0] == 0 || SAFE_TO_ALLOC_2(rasterP->chanOffsets[0], 4)) &&
2361 SAFE_TO_ALLOC_3(height, rasterP->scanlineStride, 4)))
2365 offset = 4 * rasterP->chanOffsets[0];
2366 dataSize = 4 * (*env)->GetArrayLength(env, rasterP->jdata);
2369 width > rasterP->scanlineStride ||
2370 height * rasterP->scanlineStride * 4 > dataSize - offset)
2375 dataP = (void *) (*env)->GetPrimitiveArrayCritical(env, rasterP->jdata,
2382 rasterP->scanlineStride*4,
2387 if (!(SAFE_TO_ALLOC_2(width, rasterP->numBands) &&
2388 SAFE_TO_ALLOC_2(height, rasterP->scanlineStride)))
2392 offset = rasterP->chanOffsets[0];
2393 dataSize = (*env)->GetArrayLength(env, rasterP->jdata);
2396 width * rasterP->numBands > rasterP->scanlineStride ||
2397 height * rasterP->scanlineStride > dataSize - offset)
2402 dataP = (void *) (*env)->GetPrimitiveArrayCritical(env, rasterP->jdata,
2407 *mlibImagePP = (*sMlibSysFns.createStructFP)(MLIB_BYTE, rasterP->numBands,
2409 rasterP->scanlineStride,
2414 if (!((rasterP->chanOffsets[0] == 0 || SAFE_TO_ALLOC_2(rasterP->chanOffsets[0], 2)) &&
2415 SAFE_TO_ALLOC_3(width, rasterP->numBands, 2) &&
2416 SAFE_TO_ALLOC_3(height, rasterP->scanlineStride, 2)))
2420 offset = rasterP->chanOffsets[0] * 2;
2421 dataSize = 2 * (*env)->GetArrayLength(env, rasterP->jdata);
2424 width * rasterP->numBands > rasterP->scanlineStride ||
2425 height * rasterP->scanlineStride * 2 > dataSize - offset)
2430 dataP = (void *) (*env)->GetPrimitiveArrayCritical(env, rasterP->jdata,
2436 rasterP->numBands,
2438 rasterP->scanlineStride*2,
2444 *mlibImagePP = (*sMlibSysFns.createFP)(MLIB_BYTE, rasterP->numBands,
2451 return expandPackedBCR(env, rasterP, -1, cDataP);
2454 if (rasterP->sppsm.maxBitSize <= 8) {
2455 *mlibImagePP = (*sMlibSysFns.createFP)(MLIB_BYTE, rasterP->numBands,
2462 return expandPackedSCR(env, rasterP, -1, cDataP);
2466 if (rasterP->sppsm.maxBitSize <= 8) {
2467 *mlibImagePP = (*sMlibSysFns.createFP)(MLIB_BYTE, rasterP->numBands,
2474 return expandPackedICR(env, rasterP, -1, cDataP);
2480 switch (rasterP->dataType) {
2482 if ((*mlibImagePP = (*sMlibSysFns.createFP)(MLIB_BYTE, rasterP->numBands,
2488 if (awt_getPixelByte(env, -1, rasterP, cDataP) < 0) {
2497 rasterP->numBands,
2503 if (awt_getPixelShort(env, -1, rasterP, sdataP) < 0) {
2556 RasterS_t *rasterP = &dstP->raster;
2614 if (!SAFE_TO_MULT(rasterP->scanlineStride, \
2615 (rasterP->height - 1))) \
2619 lastScanOffset = rasterP->scanlineStride * \
2620 (rasterP->height - 1); \
2627 if (!SAFE_TO_MULT((elements_per_pixel), rasterP->width)) { \
2630 offset = (elements_per_pixel) * rasterP->width; \
2648 RasterS_t *rasterP = &dstP->raster;
2649 jsize dataArrayLength = (*env)->GetArrayLength(env, rasterP->jdata);
2672 rasterP->jdata, NULL);
2675 for (y=0; y < rasterP->height;
2676 y++, cmDataP += mStride, cDataP += rasterP->scanlineStride)
2678 memcpy(cDataP, cmDataP, rasterP->width*hintP->numChans);
2680 (*env)->ReleasePrimitiveArrayCritical(env, rasterP->jdata, dataP,
2690 rasterP->jdata, NULL);
2693 for (y=0; y < rasterP->height;
2694 y++, smDataP += mStride, sDataP += rasterP->scanlineStride)
2696 memcpy(sDataP, smDataP, rasterP->width*hintP->numChans);
2698 (*env)->ReleasePrimitiveArrayCritical(env, rasterP->jdata, sdataP,
2705 return setPackedBCRdefault(env, rasterP, -1,
2709 return setPackedSCRdefault(env, rasterP, -1,
2713 return setPackedICRdefault(env, rasterP, -1,
2719 return awt_setPixelShort(env, -1, rasterP,
2768 RasterS_t *rasterP = &dstP->raster;
2811 rasterP->jdata, NULL);
2817 (*env)->ReleasePrimitiveArrayCritical(env, rasterP->jdata, dataP,
2825 for (y=0; y < rasterP->height; y++, cDataP += rasterP->scanlineStride) {
2827 for (x=0; x < rasterP->width; x++, cP += rasterP->pixelStride) {
2835 (*env)->ReleasePrimitiveArrayCritical(env, rasterP->jdata, dataP,
2843 RasterS_t *rasterP = &imageP->raster;
2849 int width = rasterP->width;
2850 int height = rasterP->height;
2858 rasterP->jdata, NULL);
2867 rasterP->jdata, dataP,
2873 if (rasterP->dataType == BYTE_DATA_TYPE) {
2879 for (x=0; x < width; x++, cP += rasterP->pixelStride) {
2883 cDataP += rasterP->scanlineStride;
2886 else if (rasterP->dataType == SHORT_DATA_TYPE) {
2893 for (x=0; x < width; x++, sP+=rasterP->pixelStride) {
2897 sDataP += rasterP->scanlineStride;
2908 (*env)->ReleasePrimitiveArrayCritical(env, rasterP->jdata,
2913 static int expandPackedBCR(JNIEnv *env, RasterS_t *rasterP, int component,
2923 if (rasterP->numBands > MAX_NUMBANDS) {
2928 jInDataP = (*env)->GetObjectField(env, rasterP->jraster, g_BCRdataID);
2933 lineInP = (unsigned char *)inDataP + rasterP->chanOffsets[0];
2936 for (c=0; c < rasterP->numBands; c++) {
2937 roff[c] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
2945 if (rasterP->numBands < 4) {
2947 for (y=0; y < rasterP->height; y++) {
2949 for (x=0; x < rasterP->width; x++) {
2950 for (c=0; c < rasterP->numBands; c++) {
2952 (((*inP&rasterP->sppsm.maskArray[c]) >> roff[c])
2957 lineInP += rasterP->scanlineStride;
2961 for (y=0; y < rasterP->height; y++) {
2963 for (x=0; x < rasterP->width; x++) {
2964 for (c=0; c < rasterP->numBands; c++) {
2966 (((*inP&rasterP->sppsm.maskArray[c]) >> roff[c])
2971 lineInP += rasterP->scanlineStride;
2977 roff[0] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
2983 for (y=0; y < rasterP->height; y++) {
2985 for (x=0; x < rasterP->width; x++) {
2987 ((*inP & rasterP->sppsm.maskArray[c])>>roff[0])<<loff[0];
2990 lineInP += rasterP->scanlineStride;
3000 static int expandPackedBCRdefault(JNIEnv *env, RasterS_t *rasterP,
3010 int numBands = rasterP->numBands - (forceAlpha ? 0 : 1);
3013 if (rasterP->numBands > MAX_NUMBANDS) {
3018 jInDataP = (*env)->GetObjectField(env, rasterP->jraster, g_BCRdataID);
3023 lineInP = (unsigned char *)inDataP + rasterP->chanOffsets[0];
3026 for (c=0; c < rasterP->numBands; c++) {
3027 roff[c] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3037 for (y=0; y < rasterP->height; y++) {
3039 for (x=0; x < rasterP->width; x++) {
3043 (((*inP&rasterP->sppsm.maskArray[c]) >> roff[c])
3048 lineInP += rasterP->scanlineStride;
3052 for (y=0; y < rasterP->height; y++) {
3054 for (x=0; x < rasterP->width; x++) {
3056 (((*inP&rasterP->sppsm.maskArray[a]) >> roff[a])
3060 (((*inP&rasterP->sppsm.maskArray[c]) >> roff[c])
3065 lineInP += rasterP->scanlineStride;
3071 roff[0] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3077 for (y=0; y < rasterP->height; y++) {
3079 for (x=0; x < rasterP->width; x++) {
3081 ((*inP & rasterP->sppsm.maskArray[c])>>roff[0])<<loff[0];
3084 lineInP += rasterP->scanlineStride;
3094 static int expandPackedSCR(JNIEnv *env, RasterS_t *rasterP, int component,
3104 if (rasterP->numBands > MAX_NUMBANDS) {
3109 jInDataP = (*env)->GetObjectField(env, rasterP->jraster, g_SCRdataID);
3114 lineInP = (unsigned short *)inDataP + rasterP->chanOffsets[0];
3117 for (c=0; c < rasterP->numBands; c++) {
3118 roff[c] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3126 if (rasterP->numBands < 4) {
3128 for (y=0; y < rasterP->height; y++) {
3130 for (x=0; x < rasterP->width; x++) {
3131 for (c=0; c < rasterP->numBands; c++) {
3137 (((*inP&rasterP->sppsm.maskArray[c]) >> roff[c])
3142 lineInP += rasterP->scanlineStride;
3145 for (y=0; y < rasterP->height; y++) {
3147 for (x=0; x < rasterP->width; x++) {
3148 for (c=0; c < rasterP->numBands; c++) {
3154 (((*inP&rasterP->sppsm.maskArray[c]) >> roff[c])
3159 lineInP += rasterP->scanlineStride;
3165 roff[0] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3171 for (y=0; y < rasterP->height; y++) {
3173 for (x=0; x < rasterP->width; x++) {
3175 ((*inP & rasterP->sppsm.maskArray[c])>>roff[0])<<loff[0];
3178 lineInP += rasterP->scanlineStride;
3188 static int expandPackedSCRdefault(JNIEnv *env, RasterS_t *rasterP,
3198 int numBands = rasterP->numBands - (forceAlpha ? 0 : 1);
3201 if (rasterP->numBands > MAX_NUMBANDS) {
3206 jInDataP = (*env)->GetObjectField(env, rasterP->jraster, g_SCRdataID);
3211 lineInP = (unsigned short *)inDataP + rasterP->chanOffsets[0];
3214 for (c=0; c < rasterP->numBands; c++) {
3215 roff[c] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3225 for (y=0; y < rasterP->height; y++) {
3227 for (x=0; x < rasterP->width; x++) {
3235 (((*inP&rasterP->sppsm.maskArray[c]) >> roff[c])
3240 lineInP += rasterP->scanlineStride;
3244 for (y=0; y < rasterP->height; y++) {
3246 for (x=0; x < rasterP->width; x++) {
3248 (((*inP&rasterP->sppsm.maskArray[a]) >> roff[a])
3256 (((*inP&rasterP->sppsm.maskArray[c]) >> roff[c])
3261 lineInP += rasterP->scanlineStride;
3267 roff[0] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3273 for (y=0; y < rasterP->height; y++) {
3275 for (x=0; x < rasterP->width; x++) {
3277 ((*inP & rasterP->sppsm.maskArray[c])>>roff[0])<<loff[0];
3280 lineInP += rasterP->scanlineStride;
3291 static int expandPackedICR(JNIEnv *env, RasterS_t *rasterP, int component,
3301 if (rasterP->numBands > MAX_NUMBANDS) {
3306 jInDataP = (*env)->GetObjectField(env, rasterP->jraster, g_ICRdataID);
3311 lineInP = (unsigned int *)inDataP + rasterP->chanOffsets[0];
3314 for (c=0; c < rasterP->numBands; c++) {
3315 roff[c] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3323 if (rasterP->numBands < 4) {
3324 for (y=0; y < rasterP->height; y++) {
3326 for (x=0; x < rasterP->width; x++) {
3327 for (c=0; c < rasterP->numBands; c++) {
3332 *outP++ = (unsigned char)(((*inP&rasterP->sppsm.maskArray[c]) >> roff[c])
3337 lineInP += rasterP->scanlineStride;
3341 for (y=0; y < rasterP->height; y++) {
3343 for (x=0; x < rasterP->width; x++) {
3344 for (c=0; c < rasterP->numBands; c++) {
3349 *outP++ = (unsigned char)(((*inP&rasterP->sppsm.maskArray[c]) >> roff[c])
3354 lineInP += rasterP->scanlineStride;
3360 roff[0] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3366 for (y=0; y < rasterP->height; y++) {
3368 for (x=0; x < rasterP->width; x++) {
3369 *outP++ = (unsigned char)(((*inP & rasterP->sppsm.maskArray[c])>>roff[0])<<loff[0]);
3372 lineInP += rasterP->scanlineStride;
3382 static int expandPackedICRdefault(JNIEnv *env, RasterS_t *rasterP,
3392 int numBands = rasterP->numBands - (forceAlpha ? 0 : 1);
3395 if (rasterP->numBands > MAX_NUMBANDS) {
3400 jInDataP = (*env)->GetObjectField(env, rasterP->jraster, g_ICRdataID);
3405 lineInP = (unsigned int *)inDataP + rasterP->chanOffsets[0];
3408 for (c=0; c < rasterP->numBands; c++) {
3409 roff[c] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3419 for (y=0; y < rasterP->height; y++) {
3421 for (x=0; x < rasterP->width; x++) {
3428 *outP++ = (unsigned char)(((*inP&rasterP->sppsm.maskArray[c]) >> roff[c])
3433 lineInP += rasterP->scanlineStride;
3437 for (y=0; y < rasterP->height; y++) {
3439 for (x=0; x < rasterP->width; x++) {
3440 *outP++ = (unsigned char)(((*inP&rasterP->sppsm.maskArray[a]) >> roff[a])
3447 *outP++ = (unsigned char)(((*inP&rasterP->sppsm.maskArray[c]) >> roff[c])
3452 lineInP += rasterP->scanlineStride;
3458 roff[0] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3464 for (y=0; y < rasterP->height; y++) {
3466 for (x=0; x < rasterP->width; x++) {
3467 *outP++ = (unsigned char)(((*inP & rasterP->sppsm.maskArray[c])>>roff[0])<<loff[0]);
3470 lineInP += rasterP->scanlineStride;
3480 static int setPackedBCR(JNIEnv *env, RasterS_t *rasterP, int component,
3491 if (rasterP->numBands > MAX_NUMBANDS) {
3496 jOutDataP = (*env)->GetObjectField(env, rasterP->jraster, g_BCRdataID);
3502 CHECK_DST_ARRAY(rasterP->chanOffsets[0], 1);
3508 lineOutP = outDataP + rasterP->chanOffsets[0];
3511 for (c=0; c < rasterP->numBands; c++) {
3512 loff[c] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3520 for (y=0; y < rasterP->height; y++) {
3523 for (x=0; x < rasterP->width; x++) {
3524 for (c=0; c < rasterP->numBands; c++, inP++) {
3525 *outP |= (*inP<<loff[c]>>roff[c])&rasterP->sppsm.maskArray[c];
3529 lineOutP += rasterP->scanlineStride;
3534 loff[0] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3540 for (y=0; y < rasterP->height; y++) {
3542 for (x=0; x < rasterP->width; x++, inP++) {
3543 *outP |= (*inP<<loff[0]>>roff[0])&rasterP->sppsm.maskArray[c];
3546 lineOutP += rasterP->scanlineStride;
3556 static int setPackedSCR(JNIEnv *env, RasterS_t *rasterP, int component,
3567 if (rasterP->numBands > MAX_NUMBANDS) {
3572 jOutDataP = (*env)->GetObjectField(env, rasterP->jraster, g_SCRdataID);
3578 CHECK_DST_ARRAY(rasterP->chanOffsets[0], 1);
3584 lineOutP = outDataP + rasterP->chanOffsets[0];
3587 for (c=0; c < rasterP->numBands; c++) {
3588 loff[c] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3596 for (y=0; y < rasterP->height; y++) {
3598 for (x=0; x < rasterP->width; x++) {
3599 for (c=0; c < rasterP->numBands; c++, inP++) {
3601 *outP |= (*inP<<loff[c]>>roff[c])&rasterP->sppsm.maskArray[c];
3605 lineOutP += rasterP->scanlineStride;
3610 loff[0] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3616 for (y=0; y < rasterP->height; y++) {
3618 for (x=0; x < rasterP->width; x++, inP++) {
3619 *outP |= (*inP<<loff[0]>>roff[0])&rasterP->sppsm.maskArray[c];
3622 lineOutP += rasterP->scanlineStride;
3632 static int setPackedICR(JNIEnv *env, RasterS_t *rasterP, int component,
3643 if (rasterP->numBands > MAX_NUMBANDS) {
3648 jOutDataP = (*env)->GetObjectField(env, rasterP->jraster, g_ICRdataID);
3654 CHECK_DST_ARRAY(rasterP->chanOffsets[0], 1);
3660 lineOutP = outDataP + rasterP->chanOffsets[0];
3663 for (c=0; c < rasterP->numBands; c++) {
3664 loff[c] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3672 for (y=0; y < rasterP->height; y++) {
3674 for (x=0; x < rasterP->width; x++) {
3675 for (c=0; c < rasterP->numBands; c++, inP++) {
3677 *outP |= (*inP<<loff[c]>>roff[c])&rasterP->sppsm.maskArray[c];
3681 lineOutP += rasterP->scanlineStride;
3686 loff[0] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3693 for (y=0; y < rasterP->height; y++) {
3695 for (x=0; x < rasterP->width; x++, inP++) {
3696 *outP |= (*inP<<loff[0]>>roff[0])&rasterP->sppsm.maskArray[c];
3699 lineOutP += rasterP->scanlineStride;
3709 static int setPackedBCRdefault(JNIEnv *env, RasterS_t *rasterP,
3720 int a = rasterP->numBands - 1;
3722 if (rasterP->numBands > MAX_NUMBANDS) {
3727 jOutDataP = (*env)->GetObjectField(env, rasterP->jraster, g_BCRdataID);
3733 CHECK_DST_ARRAY(rasterP->chanOffsets[0], 1);
3739 lineOutP = outDataP + rasterP->chanOffsets[0];
3742 for (c=0; c < rasterP->numBands; c++) {
3743 loff[c] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3752 for (y=0; y < rasterP->height; y++) {
3755 for (x=0; x < rasterP->width; x++) {
3757 rasterP->sppsm.maskArray[a];
3759 for (c=0; c < rasterP->numBands-1; c++, inP++) {
3761 rasterP->sppsm.maskArray[c];
3765 lineOutP += rasterP->scanlineStride;
3769 for (y=0; y < rasterP->height; y++) {
3772 for (x=0; x < rasterP->width; x++) {
3774 for (c=0; c < rasterP->numBands; c++, inP++) {
3775 *outP |= (*inP<<loff[c]>>roff[c])&rasterP->sppsm.maskArray[c];
3779 lineOutP += rasterP->scanlineStride;
3785 loff[0] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3791 for (y=0; y < rasterP->height; y++) {
3793 for (x=0; x < rasterP->width; x++, inP++) {
3794 *outP |= (*inP<<loff[0]>>roff[0])&rasterP->sppsm.maskArray[c];
3797 lineOutP += rasterP->scanlineStride;
3807 static int setPackedSCRdefault(JNIEnv *env, RasterS_t *rasterP,
3818 int a = rasterP->numBands - 1;
3820 if (rasterP->numBands > MAX_NUMBANDS) {
3825 jOutDataP = (*env)->GetObjectField(env, rasterP->jraster, g_SCRdataID);
3830 CHECK_DST_ARRAY(rasterP->chanOffsets[0], 1);
3836 lineOutP = outDataP + rasterP->chanOffsets[0];
3839 for (c=0; c < rasterP->numBands; c++) {
3840 loff[c] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3849 for (y=0; y < rasterP->height; y++) {
3851 for (x=0; x < rasterP->width; x++) {
3853 rasterP->sppsm.maskArray[a];
3855 for (c=0; c < rasterP->numBands-1; c++, inP++) {
3858 rasterP->sppsm.maskArray[c];
3862 lineOutP += rasterP->scanlineStride;
3866 for (y=0; y < rasterP->height; y++) {
3868 for (x=0; x < rasterP->width; x++) {
3870 for (c=0; c < rasterP->numBands; c++, inP++) {
3872 *outP |= (*inP<<loff[c]>>roff[c])&rasterP->sppsm.maskArray[c];
3876 lineOutP += rasterP->scanlineStride;
3882 loff[0] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3888 for (y=0; y < rasterP->height; y++) {
3890 for (x=0; x < rasterP->width; x++, inP++) {
3891 *outP |= (*inP<<loff[0]>>roff[0])&rasterP->sppsm.maskArray[c];
3894 lineOutP += rasterP->scanlineStride;
3904 static int setPackedICRdefault(JNIEnv *env, RasterS_t *rasterP,
3915 int a = rasterP->numBands - 1;
3917 if (rasterP->numBands > MAX_NUMBANDS) {
3922 jOutDataP = (*env)->GetObjectField(env, rasterP->jraster, g_ICRdataID);
3928 CHECK_DST_ARRAY(rasterP->chanOffsets[0], 1);
3934 lineOutP = outDataP + rasterP->chanOffsets[0];
3937 for (c=0; c < rasterP->numBands; c++) {
3938 loff[c] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3947 for (y=0; y < rasterP->height; y++) {
3949 for (x=0; x < rasterP->width; x++) {
3951 rasterP->sppsm.maskArray[a];
3953 for (c=0; c < rasterP->numBands-1; c++, inP++) {
3956 rasterP->sppsm.maskArray[c];
3960 lineOutP += rasterP->scanlineStride;
3964 for (y=0; y < rasterP->height; y++) {
3966 for (x=0; x < rasterP->width; x++) {
3968 for (c=0; c < rasterP->numBands; c++, inP++) {
3971 rasterP->sppsm.maskArray[c];
3975 lineOutP += rasterP->scanlineStride;
3981 loff[0] = rasterP->sppsm.offsets[c] + (rasterP->sppsm.nBits[c]-8);
3988 for (y=0; y < rasterP->height; y++) {
3990 for (x=0; x < rasterP->width; x++, inP++) {
3991 *outP |= (*inP<<loff[0]>>roff[0])&rasterP->sppsm.maskArray[c];
3994 lineOutP += rasterP->scanlineStride;