[FFmpeg-devel] [FFmpeg-cvslog] vf_yadif: silence a warning.
James Darnley
james.darnley at gmail.com
Tue Feb 12 21:30:55 CET 2013
On 2013-02-06 14:59, Anton Khirnov wrote:
> ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Jan 26 20:49:16 2013 +0100| [99162f8d46db7ec02facae035c4ff573d2d8d612] | committer: Anton Khirnov
>
> 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)'
>
>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99162f8d46db7ec02facae035c4ff573d2d8d612
> ---
>
> 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 db9c71c..ae49013 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;
I want to start a discussion about reverting this commit. Does anyone
agree with me that this is ugly? All this change just to silence one
warning that I thought an existing void pointer cast was there for.
This is my only complaint about it. It does what it says quite well.
I made a brief comment about it on #ffmpeg-devel last night but I don't
think anybody was interested.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 552 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130212/7452a6a7/attachment.asc>
More information about the ffmpeg-devel
mailing list