]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Add some more documentation
authorAndre Noll <maan@systemlinux.org>
Tue, 20 Oct 2009 16:42:33 +0000 (18:42 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 18 Nov 2009 18:34:27 +0000 (19:34 +0100)
bitstream.c
imdct.c
wmadec_filter.c

index d9d5233a9cde81ad2265ab06fe425f549ab85c51..f0f6012c84a1e4df95b7293f4b1c1459f937e275 100644 (file)
@@ -132,10 +132,11 @@ static int build_table(struct vlc *vlc, int table_nb_bits, int nb_codes,
 /**
  * Build VLC decoding tables suitable for use with get_vlc().
  *
- * \param nb_bits Set the decoding table size (2^nb_bits)
- * entries. The bigger it is, the faster is the decoding. But
- * it should not be too big to save memory and L1 cache. '9'
- * is a good compromise.
+ * \param vlc The structure to be initialized.
+ *
+ * \param nb_bits Set the decoding table size (2^nb_bits) entries. The bigger
+ * it is, the faster is the decoding. But it should not be too big to save
+ * memory and L1 cache. '9' is a good compromise.
  *
  * \param nb_codes Number of vlcs codes.
  *
@@ -169,6 +170,8 @@ void free_vlc(struct vlc *vlc)
  *
  * \param gbc The getbit context structure.
  *
+ * \param table The vlc tables to use.
+ *
  * \param bits The number of bits which will be read at once, must be
  * identical to nb_bits in init_vlc().
  *
diff --git a/imdct.c b/imdct.c
index 2d452630b8b5cec24ec924cfef2f37acf0c16e90..db7a6d5c7924951d483d5cd9e064b4aeecb6b393 100644 (file)
--- a/imdct.c
+++ b/imdct.c
@@ -297,19 +297,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];
index ca5e22a40ccfd1bd00f564d51113981d0efa1106..85ba871c3761829b92a0c04eca7a4fd1c679f6b7 100644 (file)
@@ -178,6 +178,7 @@ static void init_coef_vlc(struct vlc *vlc, uint16_t **prun_table,
        uint16_t *run_table, *level_table;
        int i, l, j, k, level;
 
+       PARA_ERROR_LOG("n: %d\n", n);
        init_vlc(vlc, VLCBITS, n, table_bits, table_codes, 4);
 
        run_table = para_malloc(n * sizeof(uint16_t));