Mercurial > mplayer.hg
comparison libswscale/swscale.c @ 21758:bb3212f8b1fe
Add some explicit casts to avoid "assignment from incompatible pointer type"
warnings
author | lucabe |
---|---|
date | Tue, 26 Dec 2006 17:41:38 +0000 |
parents | 5ff16d925594 |
children | 8e1f3387d864 |
comparison
equal
deleted
inserted
replaced
21757:51f84ed3251b | 21758:bb3212f8b1fe |
---|---|
415 else if(V<0) V=0;\ | 415 else if(V<0) V=0;\ |
416 } | 416 } |
417 | 417 |
418 #define YSCALE_YUV_2_RGBX_C(type) \ | 418 #define YSCALE_YUV_2_RGBX_C(type) \ |
419 YSCALE_YUV_2_PACKEDX_C(type)\ | 419 YSCALE_YUV_2_PACKEDX_C(type)\ |
420 r = c->table_rV[V];\ | 420 r = (type *)c->table_rV[V];\ |
421 g = c->table_gU[U] + c->table_gV[V];\ | 421 g = (type *)(c->table_gU[U] + c->table_gV[V]);\ |
422 b = c->table_bU[U];\ | 422 b = (type *)c->table_bU[U];\ |
423 | 423 |
424 #define YSCALE_YUV_2_PACKED2_C \ | 424 #define YSCALE_YUV_2_PACKED2_C \ |
425 for(i=0; i<(dstW>>1); i++){\ | 425 for(i=0; i<(dstW>>1); i++){\ |
426 const int i2= 2*i;\ | 426 const int i2= 2*i;\ |
427 int Y1= (buf0[i2 ]*yalpha1+buf1[i2 ]*yalpha)>>19;\ | 427 int Y1= (buf0[i2 ]*yalpha1+buf1[i2 ]*yalpha)>>19;\ |
430 int V= (uvbuf0[i+2048]*uvalpha1+uvbuf1[i+2048]*uvalpha)>>19;\ | 430 int V= (uvbuf0[i+2048]*uvalpha1+uvbuf1[i+2048]*uvalpha)>>19;\ |
431 | 431 |
432 #define YSCALE_YUV_2_RGB2_C(type) \ | 432 #define YSCALE_YUV_2_RGB2_C(type) \ |
433 YSCALE_YUV_2_PACKED2_C\ | 433 YSCALE_YUV_2_PACKED2_C\ |
434 type *r, *b, *g;\ | 434 type *r, *b, *g;\ |
435 r = c->table_rV[V];\ | 435 r = (type *)c->table_rV[V];\ |
436 g = c->table_gU[U] + c->table_gV[V];\ | 436 g = (type *)(c->table_gU[U] + c->table_gV[V]);\ |
437 b = c->table_bU[U];\ | 437 b = (type *)c->table_bU[U];\ |
438 | 438 |
439 #define YSCALE_YUV_2_PACKED1_C \ | 439 #define YSCALE_YUV_2_PACKED1_C \ |
440 for(i=0; i<(dstW>>1); i++){\ | 440 for(i=0; i<(dstW>>1); i++){\ |
441 const int i2= 2*i;\ | 441 const int i2= 2*i;\ |
442 int Y1= buf0[i2 ]>>7;\ | 442 int Y1= buf0[i2 ]>>7;\ |
445 int V= (uvbuf1[i+2048])>>7;\ | 445 int V= (uvbuf1[i+2048])>>7;\ |
446 | 446 |
447 #define YSCALE_YUV_2_RGB1_C(type) \ | 447 #define YSCALE_YUV_2_RGB1_C(type) \ |
448 YSCALE_YUV_2_PACKED1_C\ | 448 YSCALE_YUV_2_PACKED1_C\ |
449 type *r, *b, *g;\ | 449 type *r, *b, *g;\ |
450 r = c->table_rV[V];\ | 450 r = (type *)c->table_rV[V];\ |
451 g = c->table_gU[U] + c->table_gV[V];\ | 451 g = (type *)(c->table_gU[U] + c->table_gV[V]);\ |
452 b = c->table_bU[U];\ | 452 b = (type *)c->table_bU[U];\ |
453 | 453 |
454 #define YSCALE_YUV_2_PACKED1B_C \ | 454 #define YSCALE_YUV_2_PACKED1B_C \ |
455 for(i=0; i<(dstW>>1); i++){\ | 455 for(i=0; i<(dstW>>1); i++){\ |
456 const int i2= 2*i;\ | 456 const int i2= 2*i;\ |
457 int Y1= buf0[i2 ]>>7;\ | 457 int Y1= buf0[i2 ]>>7;\ |
460 int V= (uvbuf0[i+2048] + uvbuf1[i+2048])>>8;\ | 460 int V= (uvbuf0[i+2048] + uvbuf1[i+2048])>>8;\ |
461 | 461 |
462 #define YSCALE_YUV_2_RGB1B_C(type) \ | 462 #define YSCALE_YUV_2_RGB1B_C(type) \ |
463 YSCALE_YUV_2_PACKED1B_C\ | 463 YSCALE_YUV_2_PACKED1B_C\ |
464 type *r, *b, *g;\ | 464 type *r, *b, *g;\ |
465 r = c->table_rV[V];\ | 465 r = (type *)c->table_rV[V];\ |
466 g = c->table_gU[U] + c->table_gV[V];\ | 466 g = (type *)(c->table_gU[U] + c->table_gV[V]);\ |
467 b = c->table_bU[U];\ | 467 b = (type *)c->table_bU[U];\ |
468 | 468 |
469 #define YSCALE_YUV_2_ANYRGB_C(func, func2)\ | 469 #define YSCALE_YUV_2_ANYRGB_C(func, func2)\ |
470 switch(c->dstFormat)\ | 470 switch(c->dstFormat)\ |
471 {\ | 471 {\ |
472 case PIX_FMT_RGB32:\ | 472 case PIX_FMT_RGB32:\ |