Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-02-11 00:15:01 +0300
committerMichael Niedermayer <michaelni@gmx.at>2011-02-11 04:54:10 +0300
commit95234e051bbde20bb580fd8e7b1c8dc54773d332 (patch)
treeb11f4735ed983ffdc35d5e2a072866a3e2e34dfc /libavcodec
parent4ca29c6534eff7cd1fda521800e52e14a16d3e0e (diff)
ac3enc: remove right shifting from lshift_tab() and make lshift unsigned.
Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit d4582889eefeee4dd23face9e74b2829dbaaeae5)
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ac3enc_fixed.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c
index 90e148b949..ff400b8aaf 100644
--- a/libavcodec/ac3enc_fixed.c
+++ b/libavcodec/ac3enc_fixed.c
@@ -286,19 +286,15 @@ static int log2_tab(int16_t *tab, int n)
* Left-shift each value in an array by a specified amount.
* @param tab input array
* @param n number of values in the array
- * @param lshift left shift amount. a negative value means right shift.
+ * @param lshift left shift amount
*/
-static void lshift_tab(int16_t *tab, int n, int lshift)
+static void lshift_tab(int16_t *tab, int n, unsigned int lshift)
{
int i;
if (lshift > 0) {
for (i = 0; i < n; i++)
tab[i] <<= lshift;
- } else if (lshift < 0) {
- lshift = -lshift;
- for (i = 0; i < n; i++)
- tab[i] >>= lshift;
}
}