aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dct.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2010-03-21 11:28:38 +0000
committerVitor Sessak <vitor1001@gmail.com>2010-03-21 11:28:38 +0000
commit89d7df7c743abb434916d6209474f975b1f3df86 (patch)
tree003bf4c38dbbfecc9adbce8c256bbc9bd586a719 /libavcodec/dct.c
parent2758004fce43a3462d437422a071649111d15f83 (diff)
downloadffmpeg-89d7df7c743abb434916d6209474f975b1f3df86.tar.gz
Cosmetics: move ff_dct_init() to the bottom of the file
Originally committed as revision 22616 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dct.c')
-rw-r--r--libavcodec/dct.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/libavcodec/dct.c b/libavcodec/dct.c
index d627a55664..fbcfeeb105 100644
--- a/libavcodec/dct.c
+++ b/libavcodec/dct.c
@@ -31,31 +31,6 @@
#include "libavutil/mathematics.h"
#include "fft.h"
-av_cold int ff_dct_init(DCTContext *s, int nbits, int inverse)
-{
- int n = 1 << nbits;
- int i;
-
- s->nbits = nbits;
- s->inverse = inverse;
-
- ff_init_ff_cos_tabs(nbits+2);
-
- s->costab = ff_cos_tabs[nbits+2];
-
- s->csc2 = av_malloc(n/2 * sizeof(FFTSample));
-
- if (ff_rdft_init(&s->rdft, nbits, inverse) < 0) {
- av_free(s->csc2);
- return -1;
- }
-
- for (i = 0; i < n/2; i++)
- s->csc2[i] = 0.5 / sin((M_PI / (2*n) * (2*i + 1)));
-
- return 0;
-}
-
/* sin((M_PI * x / (2*n)) */
#define SIN(s,n,x) (s->costab[(n) - (x)])
@@ -133,6 +108,31 @@ void ff_dct_calc(DCTContext *s, FFTSample *data)
ff_dct_calc_c(s, data);
}
+av_cold int ff_dct_init(DCTContext *s, int nbits, int inverse)
+{
+ int n = 1 << nbits;
+ int i;
+
+ s->nbits = nbits;
+ s->inverse = inverse;
+
+ ff_init_ff_cos_tabs(nbits+2);
+
+ s->costab = ff_cos_tabs[nbits+2];
+
+ s->csc2 = av_malloc(n/2 * sizeof(FFTSample));
+
+ if (ff_rdft_init(&s->rdft, nbits, inverse) < 0) {
+ av_free(s->csc2);
+ return -1;
+ }
+
+ for (i = 0; i < n/2; i++)
+ s->csc2[i] = 0.5 / sin((M_PI / (2*n) * (2*i + 1)));
+
+ return 0;
+}
+
av_cold void ff_dct_end(DCTContext *s)
{
ff_rdft_end(&s->rdft);