• Home
  • Raw
  • Download

Lines Matching +full:2 +full:c

2    Decompression for chipset version 2 et 3
3 (C) 2004-2006 Luc Saillard (luc@saillard.org)
13 the Free Software Foundation; either version 2 of the License, or
36 * 0: use a C version of this tests: { a<0?0:(a>255?255:a) }
139 p0[k + 0x10] = (2 * pw) + 0x80; in build_table_color()
143 p0[k + 0x50] = (-2 * pw) + 0x80; in build_table_color()
173 * if look_bits(2) == 0: # op == 2 in the lookup table
174 * skip_bits(2)
193 * op == 2 when (i%4)==0
270 {0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,},
271 {0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,},
275 {1, 3, 0, 2, 1, 3, 0, 2, 1, 3, 0, 2, 1, 3, 0, 2,},
276 {0, 3, 3, 0, 1, 2, 2, 1, 2, 1, 1, 2, 3, 0, 0, 3,},
277 {0, 1, 2, 3, 3, 2, 1, 0, 3, 2, 1, 0, 0, 1, 2, 3,},
278 {1, 1, 1, 1, 3, 3, 3, 3, 0, 0, 0, 0, 2, 2, 2, 2,},
282 {1, 3, 0, 2, 2, 0, 3, 1, 2, 0, 3, 1, 1, 3, 0, 2,},
283 {1, 2, 2, 1, 3, 0, 0, 3, 0, 3, 3, 0, 2, 1, 1, 2,},
289 static unsigned char pwc_crop_table[256 + 2*MAX_OUTER_CROP_VALUE];
304 if (pdec->last_cmd_valid && pdec->last_cmd == cmd[2]) in pwc_dec23_init()
308 flags = cmd[2] & 0x18; in pwc_dec23_init()
316 version = cmd[2] >> 5; in pwc_dec23_init()
322 flags = cmd[2] & 6; in pwc_dec23_init()
323 if (flags == 2) in pwc_dec23_init()
330 version = cmd[2] >> 3; in pwc_dec23_init()
354 pdec->last_cmd = cmd[2]; in pwc_dec23_init()
365 const int *c = src; in copy_image_block_Y() local
368 *d++ = cm[c[0] >> scalebits]; in copy_image_block_Y()
369 *d++ = cm[c[1] >> scalebits]; in copy_image_block_Y()
370 *d++ = cm[c[2] >> scalebits]; in copy_image_block_Y()
371 *d++ = cm[c[3] >> scalebits]; in copy_image_block_Y()
374 *d++ = cm[c[4] >> scalebits]; in copy_image_block_Y()
375 *d++ = cm[c[5] >> scalebits]; in copy_image_block_Y()
376 *d++ = cm[c[6] >> scalebits]; in copy_image_block_Y()
377 *d++ = cm[c[7] >> scalebits]; in copy_image_block_Y()
379 d = dst + bytes_per_line*2; in copy_image_block_Y()
380 *d++ = cm[c[8] >> scalebits]; in copy_image_block_Y()
381 *d++ = cm[c[9] >> scalebits]; in copy_image_block_Y()
382 *d++ = cm[c[10] >> scalebits]; in copy_image_block_Y()
383 *d++ = cm[c[11] >> scalebits]; in copy_image_block_Y()
386 *d++ = cm[c[12] >> scalebits]; in copy_image_block_Y()
387 *d++ = cm[c[13] >> scalebits]; in copy_image_block_Y()
388 *d++ = cm[c[14] >> scalebits]; in copy_image_block_Y()
389 *d++ = cm[c[15] >> scalebits]; in copy_image_block_Y()
392 const int *c = src; in copy_image_block_Y()
394 for (i = 0; i < 4; i++, c++) in copy_image_block_Y()
395 *d++ = CLAMP((*c) >> scalebits); in copy_image_block_Y()
398 for (i = 0; i < 4; i++, c++) in copy_image_block_Y()
399 *d++ = CLAMP((*c) >> scalebits); in copy_image_block_Y()
401 d = dst + bytes_per_line*2; in copy_image_block_Y()
402 for (i = 0; i < 4; i++, c++) in copy_image_block_Y()
403 *d++ = CLAMP((*c) >> scalebits); in copy_image_block_Y()
406 for (i = 0; i < 4; i++, c++) in copy_image_block_Y()
407 *d++ = CLAMP((*c) >> scalebits); in copy_image_block_Y()
420 const int *c = src; in copy_image_block_CrCb() local
423 *d++ = cm[c[0] >> scalebits]; in copy_image_block_CrCb()
424 *d++ = cm[c[4] >> scalebits]; in copy_image_block_CrCb()
425 *d++ = cm[c[1] >> scalebits]; in copy_image_block_CrCb()
426 *d++ = cm[c[5] >> scalebits]; in copy_image_block_CrCb()
427 *d++ = cm[c[2] >> scalebits]; in copy_image_block_CrCb()
428 *d++ = cm[c[6] >> scalebits]; in copy_image_block_CrCb()
429 *d++ = cm[c[3] >> scalebits]; in copy_image_block_CrCb()
430 *d++ = cm[c[7] >> scalebits]; in copy_image_block_CrCb()
433 *d++ = cm[c[12] >> scalebits]; in copy_image_block_CrCb()
434 *d++ = cm[c[8] >> scalebits]; in copy_image_block_CrCb()
435 *d++ = cm[c[13] >> scalebits]; in copy_image_block_CrCb()
436 *d++ = cm[c[9] >> scalebits]; in copy_image_block_CrCb()
437 *d++ = cm[c[14] >> scalebits]; in copy_image_block_CrCb()
438 *d++ = cm[c[10] >> scalebits]; in copy_image_block_CrCb()
439 *d++ = cm[c[15] >> scalebits]; in copy_image_block_CrCb()
440 *d++ = cm[c[11] >> scalebits]; in copy_image_block_CrCb()
510 if (look_nbits(pdec,2) == 0) { in decode_block()
511 skip_nbits(pdec, 2); in decode_block()
524 channel_v = ((channel_v & 1) << 2) | (channel_v & 2) | ((channel_v & 4) >> 2); in decode_block()
545 if (op == 2) { in decode_block()
546 skip_nbits(pdec, 2); in decode_block()
562 nbits = ptable8004[offset1 * 2]; in decode_block()
569 shift = ptable8004[offset1 * 2 + 1]; in decode_block()
582 offset1 += hash_table_ops [htable_idx * 4 + 2]; in decode_block()
594 } while (op != 2); in decode_block()
630 /* pass 2: uncompress UV component */ in DecompressBand23()
639 copy_image_block_CrCb(pdec->temp_colors, planar_u, real_image_width/2, pdec->scalebits); in DecompressBand23()
642 copy_image_block_CrCb(pdec->temp_colors, planar_v, real_image_width/2, pdec->scalebits); in DecompressBand23()
646 nblocks -= 2; in DecompressBand23()