Revision 9c8d9f25

View differences:

libavcodec/alac.c
412 412
    /* weighted interlacing */
413 413
    if (interlacing_leftweight) {
414 414
        for (i = 0; i < numsamples; i++) {
415
            int32_t difference, midright;
416
            int16_t left;
417
            int16_t right;
415
            int32_t a, b;
418 416

  
419
            midright = buffer[0][i];
420
            difference = buffer[1][i];
417
            a = buffer[0][i];
418
            b = buffer[1][i];
421 419

  
420
            a -= (b * interlacing_leftweight) >> interlacing_shift;
421
            b += a;
422 422

  
423
            right = midright - ((difference * interlacing_leftweight) >> interlacing_shift);
424
            left = right + difference;
425

  
426
            buffer_out[i*numchannels] = left;
427
            buffer_out[i*numchannels + 1] = right;
423
            buffer_out[i*numchannels] = b;
424
            buffer_out[i*numchannels + 1] = a;
428 425
        }
429 426

  
430 427
        return;

Also available in: Unified diff