# HG changeset patch # User reimar # Date 1215802849 0 # Node ID 2de688c15263a67e507ac2857d9dd80d9afeef90 # Parent 847ed11ede5e8840784bf7cfcce14e3da3609f3c Add a comment on shift vs. division diff -r 847ed11ede5e -r 2de688c15263 libmpcodecs/ad_msadpcm.c --- a/libmpcodecs/ad_msadpcm.c Fri Jul 11 18:59:03 2008 +0000 +++ b/libmpcodecs/ad_msadpcm.c Fri Jul 11 19:00:49 2008 +0000 @@ -171,6 +171,9 @@ upper_nibble ^= 1; SE_4BIT(snibble); + // should this really be a division and not a shift? + // coefficients were originally scaled by for, which might have + // been an optimization for 8-bit CPUs _if_ a shift is correct predictor = ( ((sample1[current_channel] * coeff1[current_channel]) + (sample2[current_channel] * coeff2[current_channel])) / 64) +