From ffc22175d30109188d9ab959a35d3a7a288146d2 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 11 Jul 2008 19:00:49 +0000 Subject: [PATCH] Add a comment on shift vs. division git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27259 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ad_msadpcm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmpcodecs/ad_msadpcm.c b/libmpcodecs/ad_msadpcm.c index 38d35884c8..7e5ea7b071 100644 --- a/libmpcodecs/ad_msadpcm.c +++ b/libmpcodecs/ad_msadpcm.c @@ -171,6 +171,9 @@ static int ms_adpcm_decode_block(unsigned short *output, unsigned char *input, 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) +