From e30ab38e94252398e4390e12e1a883d24cc5afa5 Mon Sep 17 00:00:00 2001 From: Vitor Sessak Date: Sun, 21 Mar 2010 11:31:11 +0000 Subject: Call DCT by function pointer. Needed for any future ASM implementation and allows further cleanup. Originally committed as revision 22617 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/dct.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavcodec/dct.c') diff --git a/libavcodec/dct.c b/libavcodec/dct.c index fbcfeeb105..7cc383379b 100644 --- a/libavcodec/dct.c +++ b/libavcodec/dct.c @@ -105,7 +105,7 @@ static void ff_dct_calc_c(DCTContext *ctx, FFTSample *data) void ff_dct_calc(DCTContext *s, FFTSample *data) { - ff_dct_calc_c(s, data); + s->dct_calc(s, data); } av_cold int ff_dct_init(DCTContext *s, int nbits, int inverse) @@ -130,6 +130,8 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, int inverse) for (i = 0; i < n/2; i++) s->csc2[i] = 0.5 / sin((M_PI / (2*n) * (2*i + 1))); + s->dct_calc = ff_dct_calc_c; + return 0; } -- cgit v1.2.3