[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 01:47:17 CET 2010
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, and either move ff_dct_calc to the
header file (and make it inline) or lose it entirely. See fft and
mdct.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-cvslog
mailing list