diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-07-19 01:07:38 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-07-19 15:49:21 +0000 |
commit | 5c858a0ac4a6dadc3d4d03c38e254fbdd4f59e5c (patch) | |
tree | eb9a2f3361381b41ce57eb6325883027f74462da | |
parent | 0fe8acf2d69bf4bce620128e48b62a957421a106 (diff) | |
download | ffmpeg-5c858a0ac4a6dadc3d4d03c38e254fbdd4f59e5c.tar.gz |
swscale/input: silence warnings about incompatible pointer types
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libswscale/input.c | 61 |
1 files changed, 43 insertions, 18 deletions
diff --git a/libswscale/input.c b/libswscale/input.c index 7363437158..9234646435 100644 --- a/libswscale/input.c +++ b/libswscale/input.c @@ -386,10 +386,12 @@ rgb16_32_wrapper(PIX_FMT_RGB565BE, rgb16be, 0, 0, 0, 0, 0xF800, 0x07E0, 0x0 rgb16_32_wrapper(PIX_FMT_RGB555BE, rgb15be, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT + 7) rgb16_32_wrapper(PIX_FMT_RGB444BE, rgb12be, 0, 0, 0, 0, 0x0F00, 0x00F0, 0x000F, 0, 4, 8, RGB2YUV_SHIFT + 4) -static void gbr24pToUV_half_c(uint16_t *dstU, uint16_t *dstV, +static void gbr24pToUV_half_c(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *gsrc, const uint8_t *bsrc, const uint8_t *rsrc, - int width, enum PixelFormat origin) + int width, uint32_t *unused) { + uint16_t *dstU = (uint16_t *)_dstU; + uint16_t *dstV = (uint16_t *)_dstV; int i; for (i = 0; i < width; i++) { unsigned int g = gsrc[2*i] + gsrc[2*i+1]; @@ -401,32 +403,37 @@ static void gbr24pToUV_half_c(uint16_t *dstU, uint16_t *dstV, } } -static void rgba64ToA_c(int16_t *dst, const uint16_t *src, const uint8_t *unused1, +static void rgba64ToA_c(uint8_t *_dst, const uint8_t *_src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused) { + int16_t *dst = (int16_t *)_dst; + const uint16_t *src = (const uint16_t *)_src; int i; for (i = 0; i < width; i++) dst[i] = src[4 * i + 3]; } -static void abgrToA_c(int16_t *dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused) +static void abgrToA_c(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused) { + int16_t *dst = (int16_t *)_dst; int i; for (i=0; i<width; i++) { dst[i]= src[4*i]<<6; } } -static void rgbaToA_c(int16_t *dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused) +static void rgbaToA_c(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused) { + int16_t *dst = (int16_t *)_dst; int i; for (i=0; i<width; i++) { dst[i]= src[4*i+3]<<6; } } -static void palToA_c(int16_t *dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *pal) +static void palToA_c(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *pal) { + int16_t *dst = (int16_t *)_dst; int i; for (i=0; i<width; i++) { int d= src[i]; @@ -435,8 +442,9 @@ static void palToA_c(int16_t *dst, const uint8_t *src, const uint8_t *unused1, c } } -static void palToY_c(int16_t *dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, long width, uint32_t *pal) +static void palToY_c(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *pal) { + int16_t *dst = (int16_t *)_dst; int i; for (i = 0; i < width; i++) { int d = src[i]; @@ -445,10 +453,12 @@ static void palToY_c(int16_t *dst, const uint8_t *src, const uint8_t *unused1, c } } -static void palToUV_c(uint16_t *dstU, int16_t *dstV, +static void palToUV_c(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *unused0, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *pal) { + uint16_t *dstU = (uint16_t *)_dstU; + int16_t *dstV = (int16_t *)_dstV; int i; av_assert1(src1 == src2); for (i = 0; i < width; i++) { @@ -459,8 +469,9 @@ static void palToUV_c(uint16_t *dstU, int16_t *dstV, } } -static void monowhite2Y_c(int16_t *dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused) +static void monowhite2Y_c(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused) { + int16_t *dst = (int16_t *)_dst; int i, j; width = (width + 7) >> 3; for (i = 0; i < width; i++) { @@ -475,8 +486,9 @@ static void monowhite2Y_c(int16_t *dst, const uint8_t *src, const uint8_t *unuse } } -static void monoblack2Y_c(int16_t *dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused) +static void monoblack2Y_c(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused) { + int16_t *dst = (int16_t *)_dst; int i, j; width = (width + 7) >> 3; for (i = 0; i < width; i++) { @@ -580,9 +592,10 @@ static void nv21ToUV_c(uint8_t *dstU, uint8_t *dstV, #define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos)) -static void bgr24ToY_c(int16_t *dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, +static void bgr24ToY_c(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused) { + int16_t *dst = (int16_t *)_dst; int i; for (i = 0; i < width; i++) { int b = src[i * 3 + 0]; @@ -593,9 +606,11 @@ static void bgr24ToY_c(int16_t *dst, const uint8_t *src, const uint8_t *unused1, } } -static void bgr24ToUV_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused0, const uint8_t *src1, +static void bgr24ToUV_c(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *unused0, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused) { + int16_t *dstU = (int16_t *)_dstU; + int16_t *dstV = (int16_t *)_dstV; int i; for (i = 0; i < width; i++) { int b = src1[3 * i + 0]; @@ -608,9 +623,11 @@ static void bgr24ToUV_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused0, co av_assert1(src1 == src2); } -static void bgr24ToUV_half_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused0, const uint8_t *src1, +static void bgr24ToUV_half_c(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *unused0, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused) { + int16_t *dstU = (int16_t *)_dstU; + int16_t *dstV = (int16_t *)_dstV; int i; for (i = 0; i < width; i++) { int b = src1[6 * i + 0] + src1[6 * i + 3]; @@ -623,9 +640,10 @@ static void bgr24ToUV_half_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused av_assert1(src1 == src2); } -static void rgb24ToY_c(int16_t *dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, +static void rgb24ToY_c(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused) { + int16_t *dst = (int16_t *)_dst; int i; for (i = 0; i < width; i++) { int r = src[i * 3 + 0]; @@ -636,9 +654,11 @@ static void rgb24ToY_c(int16_t *dst, const uint8_t *src, const uint8_t *unused1, } } -static void rgb24ToUV_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused0, const uint8_t *src1, +static void rgb24ToUV_c(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *unused0, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused) { + int16_t *dstU = (int16_t *)_dstU; + int16_t *dstV = (int16_t *)_dstV; int i; av_assert1(src1 == src2); for (i = 0; i < width; i++) { @@ -651,9 +671,11 @@ static void rgb24ToUV_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused0, co } } -static void rgb24ToUV_half_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused0, const uint8_t *src1, +static void rgb24ToUV_half_c(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *unused0, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused) { + int16_t *dstU = (int16_t *)_dstU; + int16_t *dstV = (int16_t *)_dstV; int i; av_assert1(src1 == src2); for (i = 0; i < width; i++) { @@ -666,8 +688,9 @@ static void rgb24ToUV_half_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused } } -static void planar_rgb_to_y(uint16_t *dst, const uint8_t *src[4], int width) +static void planar_rgb_to_y(uint8_t *_dst, const uint8_t *src[4], int width) { + uint16_t *dst = (uint16_t *)_dst; int i; for (i = 0; i < width; i++) { int g = src[0][i]; @@ -678,8 +701,10 @@ static void planar_rgb_to_y(uint16_t *dst, const uint8_t *src[4], int width) } } -static void planar_rgb_to_uv(uint16_t *dstU, uint16_t *dstV, const uint8_t *src[4], int width) +static void planar_rgb_to_uv(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *src[4], int width) { + uint16_t *dstU = (uint16_t *)_dstU; + uint16_t *dstV = (uint16_t *)_dstV; int i; for (i = 0; i < width; i++) { int g = src[0][i]; |