[FFmpeg-devel] [PATCH] Fix warnings in ff_yuv2rgb_c_init_tables (in libswscale/yuv2rgb.c)
Eli Friedman
eli.friedman
Tue Jul 6 05:38:49 CEST 2010
Patch attached. Fixes a bunch of warnings of the form "passing
argument 4 of ?fill_table? from incompatible pointer type".
-Eli
-------------- next part --------------
Index: yuv2rgb.c
===================================================================
--- yuv2rgb.c (revision 31641)
+++ yuv2rgb.c (working copy)
@@ -775,9 +775,9 @@
if (isNotNe)
for (i = 0; i < 1024*3; i++)
y_table16[i] = bswap_16(y_table16[i]);
- fill_table(c->table_rV, 2, crv, y_table16 + yoffs);
- fill_table(c->table_gU, 2, cgu, y_table16 + yoffs + 1024);
- fill_table(c->table_bU, 2, cbu, y_table16 + yoffs + 2048);
+ fill_table(c->table_rV, 2, crv, (uint8_t*)(y_table16 + yoffs));
+ fill_table(c->table_gU, 2, cgu, (uint8_t*)(y_table16 + yoffs + 1024));
+ fill_table(c->table_bU, 2, cbu, (uint8_t*)(y_table16 + yoffs + 2048));
fill_gv_table(c->table_gV, 2, cgv);
break;
case 15:
@@ -798,9 +798,9 @@
if(isNotNe)
for (i = 0; i < 1024*3; i++)
y_table16[i] = bswap_16(y_table16[i]);
- fill_table(c->table_rV, 2, crv, y_table16 + yoffs);
- fill_table(c->table_gU, 2, cgu, y_table16 + yoffs + 1024);
- fill_table(c->table_bU, 2, cbu, y_table16 + yoffs + 2048);
+ fill_table(c->table_rV, 2, crv, (uint8_t*)(y_table16 + yoffs));
+ fill_table(c->table_gU, 2, cgu, (uint8_t*)(y_table16 + yoffs + 1024));
+ fill_table(c->table_bU, 2, cbu, (uint8_t*)(y_table16 + yoffs + 2048));
fill_gv_table(c->table_gV, 2, cgv);
break;
case 24:
@@ -835,9 +835,9 @@
y_table32[i+2048] = yval << bbase;
yb += cy;
}
- fill_table(c->table_rV, 4, crv, y_table32 + yoffs);
- fill_table(c->table_gU, 4, cgu, y_table32 + yoffs + 1024);
- fill_table(c->table_bU, 4, cbu, y_table32 + yoffs + 2048);
+ fill_table(c->table_rV, 4, crv, (uint8_t*)(y_table32 + yoffs));
+ fill_table(c->table_gU, 4, cgu, (uint8_t*)(y_table32 + yoffs + 1024));
+ fill_table(c->table_bU, 4, cbu, (uint8_t*)(y_table32 + yoffs + 2048));
fill_gv_table(c->table_gV, 4, cgv);
break;
default:
More information about the ffmpeg-devel
mailing list