[FFmpeg-devel] [PATCH] hardcoded ff_cos tables

Måns Rullgård mans
Wed Oct 14 18:36:07 CEST 2009


Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:

> On Wed, Oct 14, 2009 at 05:01:25PM +0100, M?ns Rullg?rd wrote:
>> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
>> 
>> > On Wed, Oct 14, 2009 at 01:39:46PM +0100, M?ns Rullg?rd wrote:
>> >> >> +#endif
>> >> >
>> >> > Please add an #endif comment.
>> >> 
>> >> I still think this should be a C file.
>> >
>> > Uh, you misread it a bit.
>> > The generated file is a .c file.
>> > I just also need the extern declarations, which are in that
>> > .h file.
>> > Of course I could just add them to fft.c directly where
>> > the declarations are for the non-hardcoded case,
>> > but a separate header seemed nicer to me.
>> 
>> I thought they were already declared somewhere, what with them being
>> extern.  Since that is apparently not the case (they are only used
>> from assembler code and fft.c), declarations should of course be added
>> to some header file.  I'm not convinced a new file just for these
>> arrays is justified though.  Why not add them wherever ff_cos_tabs is
>> declared?
>
> Because they need to be const for the hardcoded case and not const
> for the other one (well, actually they are not needed at all in that
> case).

Whatever you're putting in this file you could put in an existing
file.  As for the need, everything with external linkage should be
declared in some header IMHO.  Furthermore, someone might want to use
those tables from C code too, not just asm.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list