From: Andre Noll Date: Tue, 20 Oct 2009 16:42:33 +0000 (+0200) Subject: Add some more documentation X-Git-Tag: v0.4.1~43 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=5f440e02ddea20370917c67cc5ea71cedbbfabbc Add some more documentation --- diff --git a/bitstream.c b/bitstream.c index d9d5233a..f0f6012c 100644 --- a/bitstream.c +++ b/bitstream.c @@ -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 2d452630..db7a6d5c 100644 --- 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]; diff --git a/wmadec_filter.c b/wmadec_filter.c index ca5e22a4..85ba871c 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -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));