summaryrefslogtreecommitdiff
path: root/libavcodec/alac.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2007-07-18 20:23:43 +0000
committerVitor Sessak <vitor1001@gmail.com>2007-07-18 20:23:43 +0000
commit9c8d9f251ea9ea5f85f546a82b62bd6e540335a0 (patch)
tree2b04d150faef79207f6db29f579b0c8de83f29a4 /libavcodec/alac.c
parentac0691071e3bd6b188ec324a5817937a35d5b5a8 (diff)
Another minor simplification
Originally committed as revision 9744 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/alac.c')
-rw-r--r--libavcodec/alac.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index 942f6865d4..03f9ae3f39 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -412,19 +412,16 @@ static void deinterlace_16(int32_t *buffer[MAX_CHANNELS],
/* weighted interlacing */
if (interlacing_leftweight) {
for (i = 0; i < numsamples; i++) {
- int32_t difference, midright;
- int16_t left;
- int16_t right;
+ int32_t a, b;
- midright = buffer[0][i];
- difference = buffer[1][i];
+ a = buffer[0][i];
+ b = buffer[1][i];
+ a -= (b * interlacing_leftweight) >> interlacing_shift;
+ b += a;
- right = midright - ((difference * interlacing_leftweight) >> interlacing_shift);
- left = right + difference;
-
- buffer_out[i*numchannels] = left;
- buffer_out[i*numchannels + 1] = right;
+ buffer_out[i*numchannels] = b;
+ buffer_out[i*numchannels + 1] = a;
}
return;