comparison libmpcodecs/vd_lcl.c @ 8972:2ed9b2143f94

Remove duplicated code
author rtognimp
date Fri, 17 Jan 2003 21:44:58 +0000
parents fb88ccbc5ccc
children f686c2a2b64c
comparison
equal deleted inserted replaced
8971:1a55bd301c66 8972:2ed9b2143f94
1 /* 1 /*
2 * 2 *
3 * LCL (LossLess Codec Library) Decoder for Mplayer 3 * LCL (LossLess Codec Library) Decoder for Mplayer
4 * (c) 2002 Roberto Togni 4 * (c) 2002, 2003 Roberto Togni
5 * 5 *
6 * Fourcc: MSZH, ZLIB 6 * Fourcc: MSZH, ZLIB
7 * 7 *
8 * Win32 dll: 8 * Win32 dll:
9 * Ver2.23 By Kenji Oshima 2000.09.20 9 * Ver2.23 By Kenji Oshima 2000.09.20
486 486
487 /* Apply PNG filter */ 487 /* Apply PNG filter */
488 if ((hc->codec == CODEC_ZLIB) && (hc->flags & FLAG_PNGFILTER)) { 488 if ((hc->codec == CODEC_ZLIB) && (hc->flags & FLAG_PNGFILTER)) {
489 switch (hc->imgtype) { 489 switch (hc->imgtype) {
490 case IMGTYPE_YUV111: 490 case IMGTYPE_YUV111:
491 for (row = 0; row < height; row++) { 491 case IMGTYPE_RGB24:
492 pixel_ptr = row * width * 3;
493 yq = encoded[pixel_ptr++];
494 uqvq = encoded[pixel_ptr++];
495 uqvq+=(encoded[pixel_ptr++] << 8);
496 for (col = 1; col < width; col++) {
497 encoded[pixel_ptr] = yq -= encoded[pixel_ptr];
498 uqvq -= (encoded[pixel_ptr+1] | (encoded[pixel_ptr+2]<<8));
499 encoded[pixel_ptr+1] = (uqvq) & 0xff;
500 encoded[pixel_ptr+2] = ((uqvq)>>8) & 0xff;
501 pixel_ptr += 3;
502 }
503 }
504 break;
505 case IMGTYPE_RGB24: // No
506 for (row = 0; row < height; row++) { 492 for (row = 0; row < height; row++) {
507 pixel_ptr = row * width * 3; 493 pixel_ptr = row * width * 3;
508 yq = encoded[pixel_ptr++]; 494 yq = encoded[pixel_ptr++];
509 uqvq = encoded[pixel_ptr++]; 495 uqvq = encoded[pixel_ptr++];
510 uqvq+=(encoded[pixel_ptr++] << 8); 496 uqvq+=(encoded[pixel_ptr++] << 8);