# HG changeset patch # User lucabe # Date 1167154898 0 # Node ID bb3212f8b1fed07d2a33fb3f098d21b84a0c8afa # Parent 51f84ed3251bbfbe46bb900ec479a64eb7c0b630 Add some explicit casts to avoid "assignment from incompatible pointer type" warnings diff -r 51f84ed3251b -r bb3212f8b1fe libswscale/swscale.c --- a/libswscale/swscale.c Tue Dec 26 16:28:34 2006 +0000 +++ b/libswscale/swscale.c Tue Dec 26 17:41:38 2006 +0000 @@ -417,9 +417,9 @@ #define YSCALE_YUV_2_RGBX_C(type) \ YSCALE_YUV_2_PACKEDX_C(type)\ - r = c->table_rV[V];\ - g = c->table_gU[U] + c->table_gV[V];\ - b = c->table_bU[U];\ + r = (type *)c->table_rV[V];\ + g = (type *)(c->table_gU[U] + c->table_gV[V]);\ + b = (type *)c->table_bU[U];\ #define YSCALE_YUV_2_PACKED2_C \ for(i=0; i<(dstW>>1); i++){\ @@ -432,9 +432,9 @@ #define YSCALE_YUV_2_RGB2_C(type) \ YSCALE_YUV_2_PACKED2_C\ type *r, *b, *g;\ - r = c->table_rV[V];\ - g = c->table_gU[U] + c->table_gV[V];\ - b = c->table_bU[U];\ + r = (type *)c->table_rV[V];\ + g = (type *)(c->table_gU[U] + c->table_gV[V]);\ + b = (type *)c->table_bU[U];\ #define YSCALE_YUV_2_PACKED1_C \ for(i=0; i<(dstW>>1); i++){\ @@ -447,9 +447,9 @@ #define YSCALE_YUV_2_RGB1_C(type) \ YSCALE_YUV_2_PACKED1_C\ type *r, *b, *g;\ - r = c->table_rV[V];\ - g = c->table_gU[U] + c->table_gV[V];\ - b = c->table_bU[U];\ + r = (type *)c->table_rV[V];\ + g = (type *)(c->table_gU[U] + c->table_gV[V]);\ + b = (type *)c->table_bU[U];\ #define YSCALE_YUV_2_PACKED1B_C \ for(i=0; i<(dstW>>1); i++){\ @@ -462,9 +462,9 @@ #define YSCALE_YUV_2_RGB1B_C(type) \ YSCALE_YUV_2_PACKED1B_C\ type *r, *b, *g;\ - r = c->table_rV[V];\ - g = c->table_gU[U] + c->table_gV[V];\ - b = c->table_bU[U];\ + r = (type *)c->table_rV[V];\ + g = (type *)(c->table_gU[U] + c->table_gV[V]);\ + b = (type *)c->table_bU[U];\ #define YSCALE_YUV_2_ANYRGB_C(func, func2)\ switch(c->dstFormat)\ diff -r 51f84ed3251b -r bb3212f8b1fe libswscale/yuv2rgb.c --- a/libswscale/yuv2rgb.c Tue Dec 26 16:28:34 2006 +0000 +++ b/libswscale/yuv2rgb.c Tue Dec 26 17:41:38 2006 +0000 @@ -213,9 +213,9 @@ #define RGB(i) \ U = pu[i]; \ V = pv[i]; \ - r = c->table_rV[V]; \ - g = c->table_gU[U] + c->table_gV[V]; \ - b = c->table_bU[U]; + r = (void *)c->table_rV[V]; \ + g = (void *)(c->table_gU[U] + c->table_gV[V]); \ + b = (void *)c->table_bU[U]; #define DST1(i) \ Y = py_1[2*i]; \