From 99162f8d46db7ec02facae035c4ff573d2d8d612 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 26 Jan 2013 20:49:16 +0100 Subject: [PATCH] vf_yadif: silence a warning. clang says: libavfilter/vf_yadif.c:192:28: warning: incompatible pointer types assigning to 'void (*)(uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int)' from 'void (uint16_t *, uint16_t *, uint16_t *, uint16_t *, int, int, int, int, int)' --- libavfilter/vf_yadif.c | 16 ++++++++++++---- libavfilter/x86/vf_yadif_init.c | 12 ++++++------ libavfilter/yadif.h | 4 ++-- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index db9c71c973..ae49013a70 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -81,10 +81,14 @@ next2++; \ } -static void filter_line_c(uint8_t *dst, - uint8_t *prev, uint8_t *cur, uint8_t *next, +static void filter_line_c(void *dst1, + void *prev1, void *cur1, void *next1, int w, int prefs, int mrefs, int parity, int mode) { + uint8_t *dst = dst1; + uint8_t *prev = prev1; + uint8_t *cur = cur1; + uint8_t *next = next1; int x; uint8_t *prev2 = parity ? prev : cur ; uint8_t *next2 = parity ? cur : next; @@ -92,11 +96,15 @@ static void filter_line_c(uint8_t *dst, FILTER } -static void filter_line_c_16bit(uint16_t *dst, - uint16_t *prev, uint16_t *cur, uint16_t *next, +static void filter_line_c_16bit(void *dst1, + void *prev1, void *cur1, void *next1, int w, int prefs, int mrefs, int parity, int mode) { + uint16_t *dst = dst1; + uint16_t *prev = prev1; + uint16_t *cur = cur1; + uint16_t *next = next1; int x; uint16_t *prev2 = parity ? prev : cur ; uint16_t *next2 = parity ? cur : next; diff --git a/libavfilter/x86/vf_yadif_init.c b/libavfilter/x86/vf_yadif_init.c index 0cee8e56b4..2ffeca0f76 100644 --- a/libavfilter/x86/vf_yadif_init.c +++ b/libavfilter/x86/vf_yadif_init.c @@ -27,14 +27,14 @@ #include "libavcodec/x86/dsputil_mmx.h" #include "libavfilter/yadif.h" -void ff_yadif_filter_line_mmxext(uint8_t *dst, uint8_t *prev, uint8_t *cur, - uint8_t *next, int w, int prefs, +void ff_yadif_filter_line_mmxext(void *dst, void *prev, void *cur, + void *next, int w, int prefs, int mrefs, int parity, int mode); -void ff_yadif_filter_line_sse2(uint8_t *dst, uint8_t *prev, uint8_t *cur, - uint8_t *next, int w, int prefs, +void ff_yadif_filter_line_sse2(void *dst, void *prev, void *cur, + void *next, int w, int prefs, int mrefs, int parity, int mode); -void ff_yadif_filter_line_ssse3(uint8_t *dst, uint8_t *prev, uint8_t *cur, - uint8_t *next, int w, int prefs, +void ff_yadif_filter_line_ssse3(void *dst, void *prev, void *cur, + void *next, int w, int prefs, int mrefs, int parity, int mode); av_cold void ff_yadif_init_x86(YADIFContext *yadif) diff --git a/libavfilter/yadif.h b/libavfilter/yadif.h index 06b39c69de..e6f713b26c 100644 --- a/libavfilter/yadif.h +++ b/libavfilter/yadif.h @@ -50,8 +50,8 @@ typedef struct YADIFContext { AVFilterBufferRef *next; AVFilterBufferRef *prev; AVFilterBufferRef *out; - void (*filter_line)(uint8_t *dst, - uint8_t *prev, uint8_t *cur, uint8_t *next, + void (*filter_line)(void *dst, + void *prev, void *cur, void *next, int w, int prefs, int mrefs, int parity, int mode); const AVPixFmtDescriptor *csp;