[FFmpeg-cvslog] r26351 - trunk/libavcodec/ac3enc.c
jbr
subversion
Sat Jan 15 02:58:45 CET 2011
Author: jbr
Date: Sat Jan 15 02:58:45 2011
New Revision: 26351
Log:
Rearrange exponent buffer to group all blocks for a single channel together.
This will allow for faster and simpler processing of all blocks at once.
Modified:
trunk/libavcodec/ac3enc.c
Modified: trunk/libavcodec/ac3enc.c
==============================================================================
--- trunk/libavcodec/ac3enc.c Sat Jan 15 02:28:00 2011 (r26350)
+++ trunk/libavcodec/ac3enc.c Sat Jan 15 02:58:45 2011 (r26351)
@@ -1757,14 +1757,17 @@ static av_cold int allocate_buffers(AVCo
alloc_fail);
for (ch = 0; ch < s->channels; ch++) {
+ /* arrangement: block, channel, coeff */
block->bap[ch] = &s->bap_buffer [AC3_MAX_COEFS * (blk * s->channels + ch)];
block->mdct_coef[ch] = &s->mdct_coef_buffer [AC3_MAX_COEFS * (blk * s->channels + ch)];
- block->exp[ch] = &s->exp_buffer [AC3_MAX_COEFS * (blk * s->channels + ch)];
block->grouped_exp[ch] = &s->grouped_exp_buffer[128 * (blk * s->channels + ch)];
block->psd[ch] = &s->psd_buffer [AC3_MAX_COEFS * (blk * s->channels + ch)];
block->band_psd[ch] = &s->band_psd_buffer [64 * (blk * s->channels + ch)];
block->mask[ch] = &s->mask_buffer [64 * (blk * s->channels + ch)];
block->qmant[ch] = &s->qmant_buffer [AC3_MAX_COEFS * (blk * s->channels + ch)];
+
+ /* arrangement: channel, block, coeff */
+ block->exp[ch] = &s->exp_buffer [AC3_MAX_COEFS * (AC3_MAX_BLOCKS * ch + blk)];
}
}
More information about the ffmpeg-cvslog
mailing list