summaryrefslogtreecommitdiff
path: root/libavcodec/dct.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2010-03-21 11:31:11 +0000
committerVitor Sessak <vitor1001@gmail.com>2010-03-21 11:31:11 +0000
commite30ab38e94252398e4390e12e1a883d24cc5afa5 (patch)
treebb2cdbdbf7a4477bacc54cc29ba51472e3059f41 /libavcodec/dct.c
parent89d7df7c743abb434916d6209474f975b1f3df86 (diff)
downloadffmpeg-e30ab38e94252398e4390e12e1a883d24cc5afa5.tar.gz
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
Diffstat (limited to 'libavcodec/dct.c')
-rw-r--r--libavcodec/dct.c4
1 files changed, 3 insertions, 1 deletions
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;
}