---
 libavcodec/ac3enc_float.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
index 2d7970d..d79d028 100644
--- a/libavcodec/ac3enc_float.c
+++ b/libavcodec/ac3enc_float.c
@@ -119,10 +119,12 @@ static void compute_rematrixing_strategy(AC3EncodeContext *s)
             for (i = start; i < end; i++) {
                 float lt = block->mdct_coef[0][i];
                 float rt = block->mdct_coef[1][i];
+                float md = lt + rt;
+                float sd = lt - rt;
                 sum[0] += lt * lt;
                 sum[1] += rt * rt;
-                sum[2] += (lt + rt) * (lt + rt);
-                sum[3] += (lt - rt) * (lt - rt);
+                sum[2] += md * md;
+                sum[3] += sd * sd;
             }
 
             /* compare sums to determine if rematrixing will be used for this band */
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc

Reply via email to