Mercurial > mplayer.hg
comparison postproc/swscale.c @ 12385:b5c106b694e4
this isn't actually stupid, but it's not valid C and gcc 3.5 rejects it as such
author | rfelker |
---|---|
date | Sat, 01 May 2004 20:15:21 +0000 |
parents | b80f95e24c96 |
children | d2aef091743c |
comparison
equal
deleted
inserted
replaced
12384:f191e76af463 | 12385:b5c106b694e4 |
---|---|
354 ((uint8_t*)dest)[1]= g[Y1];\ | 354 ((uint8_t*)dest)[1]= g[Y1];\ |
355 ((uint8_t*)dest)[2]= b[Y1];\ | 355 ((uint8_t*)dest)[2]= b[Y1];\ |
356 ((uint8_t*)dest)[3]= r[Y2];\ | 356 ((uint8_t*)dest)[3]= r[Y2];\ |
357 ((uint8_t*)dest)[4]= g[Y2];\ | 357 ((uint8_t*)dest)[4]= g[Y2];\ |
358 ((uint8_t*)dest)[5]= b[Y2];\ | 358 ((uint8_t*)dest)[5]= b[Y2];\ |
359 ((uint8_t*)dest)+=6;\ | 359 dest+=6;\ |
360 }\ | 360 }\ |
361 break;\ | 361 break;\ |
362 case IMGFMT_BGR24:\ | 362 case IMGFMT_BGR24:\ |
363 func(uint8_t)\ | 363 func(uint8_t)\ |
364 ((uint8_t*)dest)[0]= b[Y1];\ | 364 ((uint8_t*)dest)[0]= b[Y1];\ |
365 ((uint8_t*)dest)[1]= g[Y1];\ | 365 ((uint8_t*)dest)[1]= g[Y1];\ |
366 ((uint8_t*)dest)[2]= r[Y1];\ | 366 ((uint8_t*)dest)[2]= r[Y1];\ |
367 ((uint8_t*)dest)[3]= b[Y2];\ | 367 ((uint8_t*)dest)[3]= b[Y2];\ |
368 ((uint8_t*)dest)[4]= g[Y2];\ | 368 ((uint8_t*)dest)[4]= g[Y2];\ |
369 ((uint8_t*)dest)[5]= r[Y2];\ | 369 ((uint8_t*)dest)[5]= r[Y2];\ |
370 ((uint8_t*)dest)+=6;\ | 370 dest+=6;\ |
371 }\ | 371 }\ |
372 break;\ | 372 break;\ |
373 case IMGFMT_RGB16:\ | 373 case IMGFMT_RGB16:\ |
374 case IMGFMT_BGR16:\ | 374 case IMGFMT_BGR16:\ |
375 {\ | 375 {\ |
447 acc+= acc + g[((buf0[i+4]*yalpha1+buf1[i+4]*yalpha)>>19) + d128[4]];\ | 447 acc+= acc + g[((buf0[i+4]*yalpha1+buf1[i+4]*yalpha)>>19) + d128[4]];\ |
448 acc+= acc + g[((buf0[i+5]*yalpha1+buf1[i+5]*yalpha)>>19) + d128[5]];\ | 448 acc+= acc + g[((buf0[i+5]*yalpha1+buf1[i+5]*yalpha)>>19) + d128[5]];\ |
449 acc+= acc + g[((buf0[i+6]*yalpha1+buf1[i+6]*yalpha)>>19) + d128[6]];\ | 449 acc+= acc + g[((buf0[i+6]*yalpha1+buf1[i+6]*yalpha)>>19) + d128[6]];\ |
450 acc+= acc + g[((buf0[i+7]*yalpha1+buf1[i+7]*yalpha)>>19) + d128[7]];\ | 450 acc+= acc + g[((buf0[i+7]*yalpha1+buf1[i+7]*yalpha)>>19) + d128[7]];\ |
451 ((uint8_t*)dest)[0]= acc;\ | 451 ((uint8_t*)dest)[0]= acc;\ |
452 ((uint8_t*)dest)++;\ | 452 dest++;\ |
453 }\ | 453 }\ |
454 \ | 454 \ |
455 /*\ | 455 /*\ |
456 ((uint8_t*)dest)-= dstW>>4;\ | 456 ((uint8_t*)dest)-= dstW>>4;\ |
457 {\ | 457 {\ |
537 ((uint8_t*)dest)[1]= g[Y1]; | 537 ((uint8_t*)dest)[1]= g[Y1]; |
538 ((uint8_t*)dest)[2]= b[Y1]; | 538 ((uint8_t*)dest)[2]= b[Y1]; |
539 ((uint8_t*)dest)[3]= r[Y2]; | 539 ((uint8_t*)dest)[3]= r[Y2]; |
540 ((uint8_t*)dest)[4]= g[Y2]; | 540 ((uint8_t*)dest)[4]= g[Y2]; |
541 ((uint8_t*)dest)[5]= b[Y2]; | 541 ((uint8_t*)dest)[5]= b[Y2]; |
542 ((uint8_t*)dest)+=6; | 542 dest+=6; |
543 } | 543 } |
544 break; | 544 break; |
545 case IMGFMT_BGR24: | 545 case IMGFMT_BGR24: |
546 YSCALE_YUV_2_RGBX_C(uint8_t) | 546 YSCALE_YUV_2_RGBX_C(uint8_t) |
547 ((uint8_t*)dest)[0]= b[Y1]; | 547 ((uint8_t*)dest)[0]= b[Y1]; |
548 ((uint8_t*)dest)[1]= g[Y1]; | 548 ((uint8_t*)dest)[1]= g[Y1]; |
549 ((uint8_t*)dest)[2]= r[Y1]; | 549 ((uint8_t*)dest)[2]= r[Y1]; |
550 ((uint8_t*)dest)[3]= b[Y2]; | 550 ((uint8_t*)dest)[3]= b[Y2]; |
551 ((uint8_t*)dest)[4]= g[Y2]; | 551 ((uint8_t*)dest)[4]= g[Y2]; |
552 ((uint8_t*)dest)[5]= r[Y2]; | 552 ((uint8_t*)dest)[5]= r[Y2]; |
553 ((uint8_t*)dest)+=6; | 553 dest+=6; |
554 } | 554 } |
555 break; | 555 break; |
556 case IMGFMT_RGB16: | 556 case IMGFMT_RGB16: |
557 case IMGFMT_BGR16: | 557 case IMGFMT_BGR16: |
558 { | 558 { |
643 } | 643 } |
644 acc+= acc + g[Y1+d128[(i+0)&7]]; | 644 acc+= acc + g[Y1+d128[(i+0)&7]]; |
645 acc+= acc + g[Y2+d128[(i+1)&7]]; | 645 acc+= acc + g[Y2+d128[(i+1)&7]]; |
646 if((i&7)==6){ | 646 if((i&7)==6){ |
647 ((uint8_t*)dest)[0]= acc; | 647 ((uint8_t*)dest)[0]= acc; |
648 ((uint8_t*)dest)++; | 648 dest++; |
649 } | 649 } |
650 } | 650 } |
651 } | 651 } |
652 break; | 652 break; |
653 case IMGFMT_YUY2: | 653 case IMGFMT_YUY2: |