[FFmpeg-cvslog] r21338 - in trunk: configure libavcodec/Makefile libavcodec/dct.c libavcodec/dsputil.h libavcodec/fft-test.c

Måns Rullgård mans
Wed Jan 20 04:18:42 CET 2010


Vitor Sessak <vitor1001 at gmail.com> writes:

> M?ns Rullg?rd wrote:
>> vitor <subversion at mplayerhq.hu> writes:
>>
>>> +void ff_dct_calc(DCTContext *s, FFTSample *data)
>>> +{
>>> +    ff_dct_calc_c(s, data);
>>> +}
>>>
>>> Modified: trunk/libavcodec/dsputil.h
>>> ==============================================================================
>>> --- trunk/libavcodec/dsputil.h	Wed Jan 20 01:34:10 2010	(r21337)
>>> +++ trunk/libavcodec/dsputil.h	Wed Jan 20 01:39:47 2010	(r21338)
>>> @@ -899,6 +899,26 @@ int ff_rdft_init(RDFTContext *s, int nbi
>>>  void ff_rdft_calc(RDFTContext *s, FFTSample *data);
>>>  void ff_rdft_end(RDFTContext *s);
>>>
>>> +/* Discrete Cosine Transform */
>>> +
>>> +typedef struct {
>>> +    int nbits;
>>> +    int inverse;
>>> +    FFTSample *data;
>>> +    RDFTContext rdft;
>>> +    const float *costab;
>>> +    FFTSample *csc2;
>>> +} DCTContext;
>>> +
>>> +/**
>>> + * Sets up (Inverse)DCT.
>>> + * @param nbits           log2 of the length of the input array
>>> + * @param inverse         >0 forward transform, <0 inverse transform
>>> + */
>>> +int  ff_dct_init(DCTContext *s, int nbits, int inverse);
>>> +void ff_dct_calc(DCTContext *s, FFTSample *data);
>>> +void ff_dct_end (DCTContext *s);
>>> +
>>>  #define WRAPPER8_16(name8, name16)\
>>>  static int name16(void /*MpegEncContext*/ *s, uint8_t *dst, uint8_t *src, int stride, int h){\
>>>      return name8(s, dst           , src           , stride, h)\
>> Sorry for late comment...
>> You should use a function pointer in DCTContext pointing at
>> ff_dct_calc_c or some simd version,
>
> I thought it would make more sense doing this when we would have a
> SIMD version of it.

More work for whoever does the first simd version...

> ITOH, just renaming ff_dct_calc_c() to ff_dct_calc() would make a
> patch adding simd less readable.

True.  Oh well, it's not important.

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



More information about the ffmpeg-cvslog mailing list