Revision ff00b94e libavcodec/wmadec.c

View differences:

libavcodec/wmadec.c
315 315
{
316 316
    int last_exp, n, code;
317 317
    const uint16_t *ptr;
318
    float v, *q, max_scale, *q_end;
318
    float v, max_scale;
319
    uint32_t *q, *q_end, iv;
319 320
    const float *ptab = pow_tab + 60;
321
    const uint32_t *iptab = (const uint32_t*)ptab;
320 322

  
321 323
    ptr = s->exponent_bands[s->frame_len_bits - s->block_len_bits];
322
    q = s->exponents[ch];
324
    q = (uint32_t *)s->exponents[ch];
323 325
    q_end = q + s->block_len;
324 326
    max_scale = 0;
325 327
    if (s->version == 1) {
326 328
        last_exp = get_bits(&s->gb, 5) + 10;
327 329
        v = ptab[last_exp];
330
        iv = iptab[last_exp];
328 331
        max_scale = v;
329 332
        n = *ptr++;
330 333
        do {
331
            *q++ = v;
332
        } while (--n);
334
            *q++ = iv;
335
            *q++ = iv;
336
            *q++ = iv;
337
            *q++ = iv;
338
        } while (n -= 4);
333 339
    }else
334 340
        last_exp = 36;
335 341

  
......
342 348
        if ((unsigned)last_exp + 60 > FF_ARRAY_ELEMS(pow_tab))
343 349
            return -1;
344 350
        v = ptab[last_exp];
351
        iv = iptab[last_exp];
345 352
        if (v > max_scale)
346 353
            max_scale = v;
347 354
        n = *ptr++;
348 355
        do {
349
            *q++ = v;
350
        } while (--n);
356
            *q++ = iv;
357
            *q++ = iv;
358
            *q++ = iv;
359
            *q++ = iv;
360
        } while (n -= 4);
351 361
    }
352 362
    s->max_exponent[ch] = max_scale;
353 363
    return 0;

Also available in: Unified diff