diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-07-11 18:59:03 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-07-11 18:59:03 +0000 |
commit | 68e6f22bbc24352e1eea71054f861b3209b52a9d (patch) | |
tree | bfbbc3db217fc15b1b0f23d6ca4cf726cd77a0d9 | |
parent | 4366cc211cb7ab9ed2bc3d25de5bd8ea507f445e (diff) | |
download | mpv-68e6f22bbc24352e1eea71054f861b3209b52a9d.tar.bz2 mpv-68e6f22bbc24352e1eea71054f861b3209b52a9d.tar.xz |
Scale msadpcm coefficients to fit into 8 bits
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27258 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpcodecs/ad_msadpcm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libmpcodecs/ad_msadpcm.c b/libmpcodecs/ad_msadpcm.c index 5f3d330b42..38d35884c8 100644 --- a/libmpcodecs/ad_msadpcm.c +++ b/libmpcodecs/ad_msadpcm.c @@ -34,14 +34,14 @@ static const int ms_adapt_table[] = 768, 614, 512, 409, 307, 230, 230, 230 }; -static const int ms_adapt_coeff1[] = +static const int8_t ms_adapt_coeff1[] = { - 256, 512, 0, 192, 240, 460, 392 + 64, 128, 0, 48, 60, 115, 98 }; -static const int ms_adapt_coeff2[] = +static const int8_t ms_adapt_coeff2[] = { - 0, -256, 0, 64, 0, -208, -232 + 0, -64, 0, 16, 0, -52, -58 }; #define MS_ADPCM_PREAMBLE_SIZE 6 @@ -173,7 +173,7 @@ static int ms_adpcm_decode_block(unsigned short *output, unsigned char *input, predictor = ( ((sample1[current_channel] * coeff1[current_channel]) + - (sample2[current_channel] * coeff2[current_channel])) / 256) + + (sample2[current_channel] * coeff2[current_channel])) / 64) + (snibble * idelta[current_channel]); CLAMP_S16(predictor); sample2[current_channel] = sample1[current_channel]; |