Mercurial > libavcodec.hg
comparison alac.c @ 5372:04a9bb415804 libavcodec
Another minor simplification
author | vitor |
---|---|
date | Wed, 18 Jul 2007 20:23:43 +0000 |
parents | a31f6ae7e83d |
children | 2433e0070455 |
comparison
equal
deleted
inserted
replaced
5371:74680ec68fd1 | 5372:04a9bb415804 |
---|---|
410 return; | 410 return; |
411 | 411 |
412 /* weighted interlacing */ | 412 /* weighted interlacing */ |
413 if (interlacing_leftweight) { | 413 if (interlacing_leftweight) { |
414 for (i = 0; i < numsamples; i++) { | 414 for (i = 0; i < numsamples; i++) { |
415 int32_t difference, midright; | 415 int32_t a, b; |
416 int16_t left; | 416 |
417 int16_t right; | 417 a = buffer[0][i]; |
418 | 418 b = buffer[1][i]; |
419 midright = buffer[0][i]; | 419 |
420 difference = buffer[1][i]; | 420 a -= (b * interlacing_leftweight) >> interlacing_shift; |
421 | 421 b += a; |
422 | 422 |
423 right = midright - ((difference * interlacing_leftweight) >> interlacing_shift); | 423 buffer_out[i*numchannels] = b; |
424 left = right + difference; | 424 buffer_out[i*numchannels + 1] = a; |
425 | |
426 buffer_out[i*numchannels] = left; | |
427 buffer_out[i*numchannels + 1] = right; | |
428 } | 425 } |
429 | 426 |
430 return; | 427 return; |
431 } | 428 } |
432 | 429 |