From fc231c7a355db9ee7270510a579d029dfeb1ec03 Mon Sep 17 00:00:00 2001 From: halleyscometsw Date: Fri, 15 Feb 2008 16:32:59 +0000 Subject: [PATCH] remove unused quanize() left over from the G.721 encoder git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@33 51a99a44-fe44-0410-b1ba-c3e57ba2b86b --- src/coding/g721_decoder.c | 53 --------------------------------------- 1 file changed, 53 deletions(-) diff --git a/src/coding/g721_decoder.c b/src/coding/g721_decoder.c index 0150ae0a..ecf21e50 100644 --- a/src/coding/g721_decoder.c +++ b/src/coding/g721_decoder.c @@ -174,59 +174,6 @@ step_size( } } -/* - * quantize() - * - * Given a raw sample, 'd', of the difference signal and a - * quantization step size scale factor, 'y', this routine returns the - * ADPCM codeword to which that sample gets quantized. The step - * size scale factor division operation is done in the log base 2 domain - * as a subtraction. - */ -int -quantize( - int d, /* Raw difference signal sample */ - int y, /* Step size multiplier */ - short *table, /* quantization table */ - int size) /* table size of short integers */ -{ - short dqm; /* Magnitude of 'd' */ - short exp; /* Integer part of base 2 log of 'd' */ - short mant; /* Fractional part of base 2 log */ - short dl; /* Log of magnitude of 'd' */ - short dln; /* Step size scale factor normalized log */ - int i; - - /* - * LOG - * - * Compute base 2 log of 'd', and store in 'dl'. - */ - dqm = abs(d); - exp = quan(dqm >> 1, power2, 15); - mant = ((dqm << 7) >> exp) & 0x7F; /* Fractional portion. */ - dl = (exp << 7) + mant; - - /* - * SUBTB - * - * "Divide" by step size multiplier. - */ - dln = dl - (y >> 2); - - /* - * QUAN - * - * Obtain codword i for 'd'. - */ - i = quan(dln, table, size); - if (d < 0) /* take 1's complement of i */ - return ((size << 1) + 1 - i); - else if (i == 0) /* take 1's complement of 0 */ - return ((size << 1) + 1); /* new in 1988 */ - else - return (i); -} /* * reconstruct() *