[MPlayer-dev-eng] main: [BUG?] draw_slice in vd_libmpeg2.c and [PATCH] some warning fixes
Alex Beregszaszi
alex at fsn.hu
Sun Jun 1 23:16:26 CEST 2003
Hi,
> draw_slice() is defined in libmpcodecs/vf.h:
> void (*draw_slice)(struct vf_instance_s* vf,
> unsigned char** src, int* stride, int w,int h, int x, int y);
>
> convert() is defined in libmpeg2/mpeg2_internal.h
> void (* convert) (void * fbuf_id, uint8_t * const * src,
> unsigned int v_offset);
>
> As you see, these are quite different.
But have a closer look there.. the draw_slice() is defined locally as
the convert() function requires it, ok it differs, and basically it's
just a hack...
static void draw_slice (void * _sh, uint8_t ** src, unsigned int y)
> And here's a patch that tries to fix some warnings:
>
> vf.c:496: warning: passing arg 6 of `memcpy_pic' makes integer from
> pointer without a cast-> I think it should be stride[0], not stride as
> parameter, but I don't pretend to understand the code, so I might be
> wrong.
Yes it looks buggy, Arpi? Rich? Michael? or whoever wrote the slices RGB
support.
> Also I think it's a good idea to remove duplicate definitions of
> get_sws_cpuflags() from Gui/wm/ws.c and libmpcodecs/vf_scale.c and put
> it in postproc/swscale.[ch] so that it can be automatically visible in
> vf_sab.c and vf_smartblur.c where it's used (and gives "implicit
> declaration" warnings now).
The basic ide on that was that swscale/ should be as independt as it
could be.
I prupose making get_sws_cpuflags() global in vf_scale.c and the others
should
call it from there.
> demux_ts.c:221: warning: implicit declaration of function `ts_parse'
> -> either add a forward declaration or move the whole definition up
ok, but could you leave the /* forward declaration */ comment out?
and put these decl. always into the footer of the sources
> rgb2rgb.h:123: warning: implicit declaration of function `printf'
> -> missing #include <stdio.h> in rgb2rgb.c
printf's should be changed to MSG_FATAL() (defined in
swscale_internal.h)
> vo_dga.c:328: warning: implicit declaration of function `rgb15to16'
> -> missing #include "../postproc/rgb2rgb.h"
>
> vo_dga.c:687: warning: implicit declaration of function `SwScale_Init'
> -> could as well be removed, because it doesn't do anything according
I have a 'reworked' dga code in my local tree, which removes all that
stuff.
--
Alex Beregszaszi <alex at fsn.hu>
(MPlayer Core Developer -- http://www.mplayerhq.hu/)
More information about the MPlayer-dev-eng
mailing list