[FFmpeg-cvslog] avcodec/ac3dec_fixed: Remove some temporary variables from scale_coefs()

Michael Niedermayer git at videolan.org
Mon Jun 8 01:21:49 EEST 2020


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Feb  2 00:07:19 2020 +0100| [27c42d33bce9fa10fc91c54be3751565d5a4eae3] | committer: Michael Niedermayer

avcodec/ac3dec_fixed: Remove some temporary variables from scale_coefs()

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=27c42d33bce9fa10fc91c54be3751565d5a4eae3
---

 libavcodec/ac3dec_fixed.c | 30 ++++++++----------------------
 1 file changed, 8 insertions(+), 22 deletions(-)

diff --git a/libavcodec/ac3dec_fixed.c b/libavcodec/ac3dec_fixed.c
index 1e1edc8964..336a538cad 100644
--- a/libavcodec/ac3dec_fixed.c
+++ b/libavcodec/ac3dec_fixed.c
@@ -110,28 +110,14 @@ static void scale_coefs (
       mul <<= shift;
       for (i=0; i<len; i+=8) {
 
-          temp = src[i] * mul;
-          temp1 = src[i+1] * mul;
-          temp2 = src[i+2] * mul;
-
-          dst[i] = temp;
-          temp3 = src[i+3] * mul;
-
-          dst[i+1] = temp1;
-          temp4 = src[i + 4] * mul;
-          dst[i+2] = temp2;
-
-          temp5 = src[i+5] * mul;
-          dst[i+3] = temp3;
-          temp6 = src[i+6] * mul;
-
-          dst[i+4] = temp4;
-          temp7 = src[i+7] * mul;
-
-          dst[i+5] = temp5;
-          dst[i+6] = temp6;
-          dst[i+7] = temp7;
-
+          dst[i]   = src[i  ] * mul;
+          dst[i+1] = src[i+1] * mul;
+          dst[i+2] = src[i+2] * mul;
+          dst[i+3] = src[i+3] * mul;
+          dst[i+4] = src[i+4] * mul;
+          dst[i+5] = src[i+5] * mul;
+          dst[i+6] = src[i+6] * mul;
+          dst[i+7] = src[i+7] * mul;
       }
     }
 }



More information about the ffmpeg-cvslog mailing list