[FFmpeg-devel] [PATCH] Call rdft by function pointer
Alex Converse
alex.converse
Tue Mar 16 06:27:39 CET 2010
2010/3/14 M?ns Rullg?rd <mans at mansr.com>:
> Alex Converse <alex.converse at gmail.com> writes:
>
>> Call the RDFT by a function pointer like other FFT related transforms.
>> This makes instruction set optimized versions possible.
>>
>> --Alex
>>
>> diff --git a/libavcodec/fft.c b/libavcodec/fft.c
>> index 7275d98..8c96fd3 100644
>> --- a/libavcodec/fft.c
>> +++ b/libavcodec/fft.c
>> @@ -107,6 +107,9 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
>> ? ? ?s->imdct_half ?= ff_imdct_half_c;
>> ? ? ?s->mdct_calc ? = ff_mdct_calc_c;
>> ?#endif
>> +#if CONFIG_RDFT
>> + ? ?s->rdft_calc ? = ff_rdft_calc_c;
>> +#endif
>> ? ? ?s->exptab1 ? ? = NULL;
>> ? ? ?s->split_radix = 1;
>>
>> diff --git a/libavcodec/fft.h b/libavcodec/fft.h
>> index 636f76b..2c5ac2f 100644
>> --- a/libavcodec/fft.h
>> +++ b/libavcodec/fft.h
>> @@ -27,6 +27,8 @@
>> ?#include "libavutil/mem.h"
>> ?#include "avfft.h"
>>
>> +struct RDFTContext;
>
> Already declared in avfft.h, but read on.
>
Fixed
>> ?/* FFT computation */
>>
>> ?struct FFTContext {
>> @@ -46,6 +48,7 @@ struct FFTContext {
>> ? ? ?void (*imdct_calc)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
>> ? ? ?void (*imdct_half)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
>> ? ? ?void (*mdct_calc)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
>> + ? ?void (*rdft_calc)(struct RDFTContext *s, FFTSample *z);
>
> Why don't you put this in RDFTContext instead?
>
Moved.
--Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rdft-call-by-function-pointer.diff
Type: text/x-patch
Size: 1607 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100316/fd04b35d/attachment.bin>
More information about the ffmpeg-devel
mailing list