/**
* 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.
*
*
* \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().
*
}
/**
- * 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];
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));