]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - imdct.c
Fix two gcc warnings on 64 bit archs.
[paraslash.git] / imdct.c
diff --git a/imdct.c b/imdct.c
index 2d452630b8b5cec24ec924cfef2f37acf0c16e90..ac085bbc519dcd5dfa8b359f96475270ef2e1a48 100644 (file)
--- a/imdct.c
+++ b/imdct.c
@@ -39,13 +39,15 @@ struct fft_context {
 };
 
 struct mdct_context {
-       /** Size of MDCT (i.e. number of input data * 2). */
+       /** Size of MDCT (number of input data * 2). */
        int n;
        /** n = 2^n bits. */
        int nbits;
-       /** pre/post rotation tables */
+       /** Cosine table for pre/post rotation. */
        fftsample_t *tcos;
+       /** Sine table for pre/post rotation. */
        fftsample_t *tsin;
+       /** The context for the underlying fast Fourier transform. */
        struct fft_context fft;
 };
 
@@ -85,7 +87,8 @@ static int split_radix_permutation(int i, int n)
                return split_radix_permutation(i, m) * 4 - 1;
 }
 
-#define SQRTHALF (float)0.70710678118654752440 /* 1/sqrt(2) */
+/** 1 / sqrt(2). */
+#define SQRTHALF (float)0.70710678118654752440
 
 #define BF(x,y,a,b) {\
     x = a - b;\
@@ -297,19 +300,22 @@ static void imdct_half(struct mdct_context *s, fftsample_t *output,
 }
 
 /**
- * Compute the inverse MDCT of size N = 2^nbits.
+ * Compute the inverse MDCT.
  *
+ * \param ctx The initialized context structure.
  * \param output N samples.
  * \param input N/2 samples.
+ *
+ * \sa \ref imdct_init().
  */
-void imdct(struct mdct_context *s, float *output, const float *input)
+void imdct(struct mdct_context *ctx, float *output, const float *input)
 {
        int k;
-       int n = 1 << s->nbits;
+       int n = 1 << ctx->nbits;
        int n2 = n >> 1;
        int n4 = n >> 2;
 
-       imdct_half(s, output + n4, input);
+       imdct_half(ctx, output + n4, input);
 
        for (k = 0; k < n4; k++) {
                output[k] = -output[n2 - k - 1];
@@ -381,6 +387,11 @@ fail:
        return ret;
 }
 
+/**
+ * Deallocate imdct resources.
+ *
+ * \param ctx The pointer obtained by imdct_init().
+ */
 void imdct_end(struct mdct_context *ctx)
 {
        free(ctx->tcos);