Commit 64c82a74 authored by Oded Shimon's avatar Oded Shimon

Original Commit: r105 | ods15 | 2006-10-01 18:09:55 +0200 (Sun, 01 Oct 2006) | 2 lines

slight simplification for channel coupling

Originally committed as revision 6509 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent c2ee47ac
...@@ -1424,17 +1424,10 @@ static int vorbis_encode_frame(AVCodecContext * avccontext, unsigned char * pack ...@@ -1424,17 +1424,10 @@ static int vorbis_encode_frame(AVCodecContext * avccontext, unsigned char * pack
float * ang = venc->coeffs + mapping->angle[i] * samples; float * ang = venc->coeffs + mapping->angle[i] * samples;
int j; int j;
for (j = 0; j < samples; j++) { for (j = 0; j < samples; j++) {
float m = mag[j];
float a = ang[j]; float a = ang[j];
if (m > 0) { ang[j] -= mag[j];
ang[j] = m - a; if (mag[j] > 0) ang[j] = -ang[j];
if (a > m) mag[j] = a; if (ang[j] < 0) mag[j] = a;
else mag[j] = m;
} else {
ang[j] = a - m;
if (a > m) mag[j] = m;
else mag[j] = a;
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment