[Ffmpeg-devel] Fix missing declaration for Altivec
Guillaume POIRIER
poirierg
Fri Mar 30 16:29:54 CEST 2007
Hi,
On 3/30/07, Stanislav Brabec <sbrabec at suse.cz> wrote:
> M?ns Rullg?rd wrote:
> > Stanislav Brabec said:
> > > Hallo.
> > >
> > > Attached patch fixes missing declaration if HAVE_ALTIVEC is true.
>
> > Firmly rejected. Prototypes for extern functions belong in a header file
> > included by the file with the function definition and every file that uses
> > the function. Anything else is asking for trouble.
>
> Well, than it should be put into swscale_internal.h or so. Otherwise
> compiler uses incompatible implicit all-args-int declaration.
>
> What about this nicer patch:
>
> Fixes:
> yuv2rgb.c: In function 'yuv2rgb_get_func_ptr':
> yuv2rgb.c:609: warning: implicit declaration of function 'yuv2rgb_init_altivec'
> yuv2rgb.c:609: warning: initialization makes pointer from integer without a cast
> ================================================================================
> --- libswscale/swscale_internal.h
> +++ libswscale/swscale_internal.h
> @@ -167,6 +167,9 @@
>
> SwsFunc yuv2rgb_get_func_ptr (SwsContext *c);
> int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation);
> +#ifdef HAVE_ALTIVEC
> + SwsFunc yuv2rgb_init_altivec(SwsContext *);
> +#endif
Are you sure it needs to be protected by HAVE_ALTIVEC? At first sight,
it doesn't seem to be necessary.
Guillaume
--
Rich, you're forgetting one thing here: *everybody* except you is
stupid.
M?ns Rullg?rd
More information about the ffmpeg-devel
mailing list