diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2009-04-18 23:46:41 +0400 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2009-04-18 23:46:41 +0400 |
commit | 63ad832dd66964f961b12fb2e4dc46bfdd7d4e16 (patch) | |
tree | 1cec9a05547a1883e9126b8a42801cb50191358e /libavcodec/mlpdec.c | |
parent | 15e6748b724299b86e8919b0797c398c27449ddf (diff) |
mlpdec: Use some context arrays with local variables in rematrix_channels().
Originally committed as revision 18613 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r-- | libavcodec/mlpdec.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 25d0b4f0c1..e6b7b048a4 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -848,23 +848,25 @@ static void rematrix_channels(MLPDecodeContext *m, unsigned int substr) int matrix_noise_shift = s->matrix_noise_shift[mat]; unsigned int dest_ch = s->matrix_out_ch[mat]; int32_t mask = MSB_MASK(s->quant_step_size[dest_ch]); + int32_t *coeffs = s->matrix_coeff[mat]; int index = s->num_primitive_matrices - mat; int index2 = 2 * index + 1; /* TODO: DSPContext? */ for (i = 0; i < s->blockpos; i++) { + int32_t *samples = m->sample_buffer[i]; int64_t accum = 0; for (src_ch = 0; src_ch <= maxchan; src_ch++) { - accum += (int64_t)m->sample_buffer[i][src_ch] - * s->matrix_coeff[mat][src_ch]; + accum += (int64_t)samples[src_ch] + * coeffs[src_ch]; } if (matrix_noise_shift) { index &= m->access_unit_size_pow2 - 1; accum += m->noise_buffer[index] << (matrix_noise_shift + 7); index += index2; } - m->sample_buffer[i][dest_ch] = ((accum >> 14) & mask) + samples[dest_ch] = ((accum >> 14) & mask) + m->bypassed_lsbs[i][mat]; } } |