[Ffmpeg-devel] Fix missing declaration for Altivec

Stanislav Brabec sbrabec
Fri Mar 30 16:13:02 CEST 2007

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:

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);
+  SwsFunc yuv2rgb_init_altivec(SwsContext *);
 char *sws_format_name(int format);

Best Regards / S pozdravem,

Stanislav Brabec
software developer
SUSE LINUX, s. r. o.                          e-mail: sbrabec at suse.cz
Lihovarsk? 1060/12                            tel: +420 284 028 966
190 00 Praha 9                                fax: +420 284 028 951
Czech Republic                                http://www.suse.cz/

More information about the ffmpeg-devel mailing list