[FFmpeg-cvslog] r22617 - in trunk/libavcodec: dct.c fft.h
vitor
subversion
Sun Mar 21 12:31:11 CET 2010
Author: vitor
Date: Sun Mar 21 12:31:11 2010
New Revision: 22617
Log:
Call DCT by function pointer. Needed for any future ASM implementation and
allows further cleanup.
Modified:
trunk/libavcodec/dct.c
trunk/libavcodec/fft.h
Modified: trunk/libavcodec/dct.c
==============================================================================
--- trunk/libavcodec/dct.c Sun Mar 21 12:28:38 2010 (r22616)
+++ trunk/libavcodec/dct.c Sun Mar 21 12:31:11 2010 (r22617)
@@ -105,7 +105,7 @@ static void ff_dct_calc_c(DCTContext *ct
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, i
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;
}
Modified: trunk/libavcodec/fft.h
==============================================================================
--- trunk/libavcodec/fft.h Sun Mar 21 12:28:38 2010 (r22616)
+++ trunk/libavcodec/fft.h Sun Mar 21 12:31:11 2010 (r22617)
@@ -220,6 +220,7 @@ struct DCTContext {
RDFTContext rdft;
const float *costab;
FFTSample *csc2;
+ void (*dct_calc)(struct DCTContext *s, FFTSample *data);
};
/**
More information about the ffmpeg-cvslog
mailing list