Lines Matching refs:shift
1895 int shift = 8 - png_ptr->sig_bit.red; in png_init_read_transformations() local
1903 if (shift > 0 && shift < 8) in png_init_read_transformations()
1908 component >>= shift; in png_init_read_transformations()
1912 shift = 8 - png_ptr->sig_bit.green; in png_init_read_transformations()
1913 if (shift > 0 && shift < 8) in png_init_read_transformations()
1918 component >>= shift; in png_init_read_transformations()
1922 shift = 8 - png_ptr->sig_bit.blue; in png_init_read_transformations()
1923 if (shift > 0 && shift < 8) in png_init_read_transformations()
1928 component >>= shift; in png_init_read_transformations()
2167 png_uint_32 shift = 7U - ((row_width + 7U) & 0x07); in png_do_unpack() local
2170 *dp = (png_byte)((*sp >> shift) & 0x01); in png_do_unpack()
2172 if (shift == 7) in png_do_unpack()
2174 shift = 0; in png_do_unpack()
2179 shift++; in png_do_unpack()
2191 png_uint_32 shift = ((3U - ((row_width + 3U) & 0x03)) << 1); in png_do_unpack() local
2194 *dp = (png_byte)((*sp >> shift) & 0x03); in png_do_unpack()
2196 if (shift == 6) in png_do_unpack()
2198 shift = 0; in png_do_unpack()
2203 shift += 2; in png_do_unpack()
2214 png_uint_32 shift = ((1U - ((row_width + 1U) & 0x01)) << 2); in png_do_unpack() local
2217 *dp = (png_byte)((*sp >> shift) & 0x0f); in png_do_unpack()
2219 if (shift == 4) in png_do_unpack()
2221 shift = 0; in png_do_unpack()
2226 shift = 4; in png_do_unpack()
2262 int shift[4]; in png_do_unshift() local
2268 shift[channels++] = bit_depth - sig_bits->red; in png_do_unshift()
2269 shift[channels++] = bit_depth - sig_bits->green; in png_do_unshift()
2270 shift[channels++] = bit_depth - sig_bits->blue; in png_do_unshift()
2275 shift[channels++] = bit_depth - sig_bits->gray; in png_do_unshift()
2280 shift[channels++] = bit_depth - sig_bits->alpha; in png_do_unshift()
2291 if (shift[c] <= 0 || shift[c] >= bit_depth) in png_do_unshift()
2292 shift[c] = 0; in png_do_unshift()
2330 int gray_shift = shift[0]; in png_do_unshift()
2352 int b = *bp >> shift[channel]; in png_do_unshift()
2372 value >>= shift[channel]; in png_do_unshift()
3216 int shift; in png_do_compose() local
3229 shift = 7; in png_do_compose()
3232 if ((png_uint_16)((*sp >> shift) & 0x01) in png_do_compose()
3235 unsigned int tmp = *sp & (0x7f7f >> (7 - shift)); in png_do_compose()
3237 (unsigned int)(png_ptr->background.gray << shift); in png_do_compose()
3241 if (shift == 0) in png_do_compose()
3243 shift = 7; in png_do_compose()
3248 shift--; in png_do_compose()
3259 shift = 6; in png_do_compose()
3262 if ((png_uint_16)((*sp >> shift) & 0x03) in png_do_compose()
3265 unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); in png_do_compose()
3267 (unsigned int)png_ptr->background.gray << shift; in png_do_compose()
3273 unsigned int p = (*sp >> shift) & 0x03; in png_do_compose()
3276 unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); in png_do_compose()
3277 tmp |= (unsigned int)(g << shift); in png_do_compose()
3281 if (shift == 0) in png_do_compose()
3283 shift = 6; in png_do_compose()
3288 shift -= 2; in png_do_compose()
3296 shift = 6; in png_do_compose()
3299 if ((png_uint_16)((*sp >> shift) & 0x03) in png_do_compose()
3302 unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); in png_do_compose()
3304 (unsigned int)png_ptr->background.gray << shift; in png_do_compose()
3308 if (shift == 0) in png_do_compose()
3310 shift = 6; in png_do_compose()
3315 shift -= 2; in png_do_compose()
3327 shift = 4; in png_do_compose()
3330 if ((png_uint_16)((*sp >> shift) & 0x0f) in png_do_compose()
3333 unsigned int tmp = *sp & (0x0f0f >> (4 - shift)); in png_do_compose()
3335 (unsigned int)(png_ptr->background.gray << shift); in png_do_compose()
3341 unsigned int p = (*sp >> shift) & 0x0f; in png_do_compose()
3344 unsigned int tmp = *sp & (0x0f0f >> (4 - shift)); in png_do_compose()
3345 tmp |= (unsigned int)(g << shift); in png_do_compose()
3349 if (shift == 0) in png_do_compose()
3351 shift = 4; in png_do_compose()
3356 shift -= 4; in png_do_compose()
3364 shift = 4; in png_do_compose()
3367 if ((png_uint_16)((*sp >> shift) & 0x0f) in png_do_compose()
3370 unsigned int tmp = *sp & (0x0f0f >> (4 - shift)); in png_do_compose()
3372 (unsigned int)(png_ptr->background.gray << shift); in png_do_compose()
3376 if (shift == 0) in png_do_compose()
3378 shift = 4; in png_do_compose()
3383 shift -= 4; in png_do_compose()
4213 int shift, value; in png_do_expand_palette() local
4230 shift = 7 - (int)((row_width + 7) & 0x07); in png_do_expand_palette()
4233 if ((*sp >> shift) & 0x01) in png_do_expand_palette()
4239 if (shift == 7) in png_do_expand_palette()
4241 shift = 0; in png_do_expand_palette()
4246 shift++; in png_do_expand_palette()
4257 shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); in png_do_expand_palette()
4260 value = (*sp >> shift) & 0x03; in png_do_expand_palette()
4262 if (shift == 6) in png_do_expand_palette()
4264 shift = 0; in png_do_expand_palette()
4269 shift += 2; in png_do_expand_palette()
4280 shift = (int)((row_width & 0x01) << 2); in png_do_expand_palette()
4283 value = (*sp >> shift) & 0x0f; in png_do_expand_palette()
4285 if (shift == 4) in png_do_expand_palette()
4287 shift = 0; in png_do_expand_palette()
4292 shift += 4; in png_do_expand_palette()
4386 int shift, value; in png_do_expand() local
4406 shift = 7 - (int)((row_width + 7) & 0x07); in png_do_expand()
4409 if ((*sp >> shift) & 0x01) in png_do_expand()
4415 if (shift == 7) in png_do_expand()
4417 shift = 0; in png_do_expand()
4422 shift++; in png_do_expand()
4434 shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); in png_do_expand()
4437 value = (*sp >> shift) & 0x03; in png_do_expand()
4440 if (shift == 6) in png_do_expand()
4442 shift = 0; in png_do_expand()
4447 shift += 2; in png_do_expand()
4459 shift = (int)((1 - ((row_width + 1) & 0x01)) << 2); in png_do_expand()
4462 value = (*sp >> shift) & 0x0f; in png_do_expand()
4464 if (shift == 4) in png_do_expand()
4466 shift = 0; in png_do_expand()
4471 shift = 4; in png_do_expand()
4971 &(png_ptr->shift)); in png_do_read_transformations()