diff mbox series

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

Message ID 20200202001639.32084-4-michael@niedermayer.cc
State Accepted
Commit 27c42d33bce9fa10fc91c54be3751565d5a4eae3
Headers show
Series [FFmpeg-devel,1/4] avcodec/ac3dec_fixed: Fix several invalid left shifts in scale_coefs()
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Michael Niedermayer Feb. 2, 2020, 12:16 a.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/ac3dec_fixed.c | 30 ++++++++----------------------
 1 file changed, 8 insertions(+), 22 deletions(-)

Comments

Michael Niedermayer June 7, 2020, 8:24 p.m. UTC | #1
On Sun, Feb 02, 2020 at 01:16:39AM +0100, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/ac3dec_fixed.c | 30 ++++++++----------------------
>  1 file changed, 8 insertions(+), 22 deletions(-)

will apply

[...]
diff mbox series

Patch

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;
       }
     }
 }