Revision d4582889

View differences:

libavcodec/ac3enc_fixed.c
286 286
 * Left-shift each value in an array by a specified amount.
287 287
 * @param tab    input array
288 288
 * @param n      number of values in the array
289
 * @param lshift left shift amount. a negative value means right shift.
289
 * @param lshift left shift amount
290 290
 */
291
static void lshift_tab(int16_t *tab, int n, int lshift)
291
static void lshift_tab(int16_t *tab, int n, unsigned int lshift)
292 292
{
293 293
    int i;
294 294

  
295 295
    if (lshift > 0) {
296 296
        for (i = 0; i < n; i++)
297 297
            tab[i] <<= lshift;
298
    } else if (lshift < 0) {
299
        lshift = -lshift;
300
        for (i = 0; i < n; i++)
301
            tab[i] >>= lshift;
302 298
    }
303 299
}
304 300

  

Also available in: Unified diff