diff options
author | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 06:09:30 +0000 |
---|---|---|
committer | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 06:09:30 +0000 |
commit | 64c82a7411ec88ddbbad9b7803eb6c0c58c666f6 (patch) | |
tree | e0f58c108e5e15607584ae77dd01fab09557666e /libavcodec/vorbis_enc.c | |
parent | c2ee47ac060c84ee7b858d3517fd07ca05d2e800 (diff) | |
download | ffmpeg-64c82a7411ec88ddbbad9b7803eb6c0c58c666f6.tar.gz |
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
Diffstat (limited to 'libavcodec/vorbis_enc.c')
-rw-r--r-- | libavcodec/vorbis_enc.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c index b43738f3a1..8922829977 100644 --- a/libavcodec/vorbis_enc.c +++ b/libavcodec/vorbis_enc.c @@ -1424,17 +1424,10 @@ static int vorbis_encode_frame(AVCodecContext * avccontext, unsigned char * pack float * ang = venc->coeffs + mapping->angle[i] * samples; int j; for (j = 0; j < samples; j++) { - float m = mag[j]; float a = ang[j]; - if (m > 0) { - ang[j] = m - a; - if (a > m) mag[j] = a; - else mag[j] = m; - } else { - ang[j] = a - m; - if (a > m) mag[j] = m; - else mag[j] = a; - } + ang[j] -= mag[j]; + if (mag[j] > 0) ang[j] = -ang[j]; + if (ang[j] < 0) mag[j] = a; } } |