comparison alsdec.c @ 10774:fadd5dfac0f0 libavcodec

Replace array operator [] with direct access via pointer. Solves issue 1657.
author thilo.borgmann
date Tue, 05 Jan 2010 01:16:02 +0000
parents 997692df50c1
children 67e430033b14
comparison
equal deleted inserted replaced
10773:8413193405c5 10774:fadd5dfac0f0
737 if (bd->ra_block) { 737 if (bd->ra_block) {
738 for (smp = 0; smp < opt_order; smp++) { 738 for (smp = 0; smp < opt_order; smp++) {
739 y = 1 << 19; 739 y = 1 << 19;
740 740
741 for (sb = 0; sb < smp; sb++) 741 for (sb = 0; sb < smp; sb++)
742 y += MUL64(lpc_cof[sb],raw_samples[smp - (sb + 1)]); 742 y += MUL64(lpc_cof[sb], *(raw_samples + smp - (sb + 1)));
743 743
744 raw_samples[smp] -= y >> 20; 744 raw_samples[smp] -= y >> 20;
745 parcor_to_lpc(smp, quant_cof, lpc_cof); 745 parcor_to_lpc(smp, quant_cof, lpc_cof);
746 } 746 }
747 } else { 747 } else {
778 // reconstruct raw samples 778 // reconstruct raw samples
779 for (; smp < bd->block_length; smp++) { 779 for (; smp < bd->block_length; smp++) {
780 y = 1 << 19; 780 y = 1 << 19;
781 781
782 for (sb = 0; sb < opt_order; sb++) 782 for (sb = 0; sb < opt_order; sb++)
783 y += MUL64(bd->lpc_cof[sb],raw_samples[smp - (sb + 1)]); 783 y += MUL64(bd->lpc_cof[sb], *(raw_samples + smp - (sb + 1)));
784 784
785 raw_samples[smp] -= y >> 20; 785 raw_samples[smp] -= y >> 20;
786 } 786 }
787 787
788 // restore previous samples in case that they have been altered 788 // restore previous samples in case that they have been altered