[FFmpeg-cvslog] ppc: dsputil: Drop some unnecessary parentheses

Diego Biurrun git at videolan.org
Thu Mar 20 21:50:41 CET 2014


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Jan 15 12:14:20 2014 +0100| [8bd6f88266740068415f7da0628117f1b802efb9] | committer: Diego Biurrun

ppc: dsputil: Drop some unnecessary parentheses

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

 libavcodec/ppc/dsputil_altivec.c |   12 ++++++------
 libavcodec/ppc/dsputil_ppc.c     |    6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavcodec/ppc/dsputil_altivec.c b/libavcodec/ppc/dsputil_altivec.c
index c075c44..2091023 100644
--- a/libavcodec/ppc/dsputil_altivec.c
+++ b/libavcodec/ppc/dsputil_altivec.c
@@ -612,14 +612,14 @@ static void add_bytes_altivec(uint8_t *dst, uint8_t *src, int w)
     register vector unsigned char vdst, vsrc;
 
     /* dst and src are 16 bytes-aligned (guaranteed). */
-    for (i = 0; (i + 15) < w; i += 16) {
+    for (i = 0; i + 15 < w; i += 16) {
         vdst = vec_ld(i, (unsigned char *) dst);
         vsrc = vec_ld(i, (unsigned char *) src);
         vdst = vec_add(vsrc, vdst);
         vec_st(vdst, i, (unsigned char *) dst);
     }
     /* If w is not a multiple of 16. */
-    for (; (i < w); i++)
+    for (; i < w; i++)
         dst[i] = src[i];
 }
 
@@ -658,10 +658,10 @@ static int hadamard8_diff8x8_altivec(/* MpegEncContext */ void *s, uint8_t *dst,
         register vector signed short srcV, dstV;                            \
         register vector signed short but0, but1, but2, op1, op2, op3;       \
         src1 = vec_ld(stride * i, src);                                     \
-        src2 = vec_ld((stride * i) + 15, src);                              \
+        src2 = vec_ld(stride * i + 15, src);                                \
         srcO = vec_perm(src1, src2, vec_lvsl(stride * i, src));             \
         dst1 = vec_ld(stride * i, dst);                                     \
-        dst2 = vec_ld((stride * i) + 15, dst);                              \
+        dst2 = vec_ld(stride * i + 15, dst);                                \
         dstO = vec_perm(dst1, dst2, vec_lvsl(stride * i, dst));             \
         /* Promote the unsigned chars to signed shorts. */                  \
         /* We're in the 8x8 function, we only care for the first 8. */      \
@@ -828,10 +828,10 @@ static int hadamard8_diff16x8_altivec(/* MpegEncContext */ void *s, uint8_t *dst
             op3S  __asm__ ("v30");                                          \
                                                                             \
         src1 = vec_ld(stride * i, src);                                     \
-        src2 = vec_ld((stride * i) + 16, src);                              \
+        src2 = vec_ld(stride * i + 16, src);                                \
         srcO = vec_perm(src1, src2, vec_lvsl(stride * i, src));             \
         dst1 = vec_ld(stride * i, dst);                                     \
-        dst2 = vec_ld((stride * i) + 16, dst);                              \
+        dst2 = vec_ld(stride * i + 16, dst);                                \
         dstO = vec_perm(dst1, dst2, vec_lvsl(stride * i, dst));             \
         /* Promote the unsigned chars to signed shorts. */                  \
         srcV = (vector signed short) vec_mergeh((vector signed char) vzero, \
diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c
index c980fdc..eac0d3d 100644
--- a/libavcodec/ppc/dsputil_ppc.c
+++ b/libavcodec/ppc/dsputil_ppc.c
@@ -51,7 +51,7 @@
  */
 static void clear_blocks_dcbz32_ppc(int16_t *blocks)
 {
-    register int misal = ((unsigned long) blocks & 0x00000010);
+    register int misal = (unsigned long) blocks & 0x00000010;
     register int i = 0;
 
     if (misal) {
@@ -77,7 +77,7 @@ static void clear_blocks_dcbz32_ppc(int16_t *blocks)
 #if HAVE_DCBZL
 static void clear_blocks_dcbz128_ppc(int16_t *blocks)
 {
-    register int misal = ((unsigned long) blocks & 0x0000007f);
+    register int misal = (unsigned long) blocks & 0x0000007f;
     register int i = 0;
 
     if (misal) {
@@ -113,7 +113,7 @@ static long check_dcbzl_effect(void)
     if (!fakedata)
         return 0L;
 
-    fakedata_middle = (fakedata + 512);
+    fakedata_middle = fakedata + 512;
 
     memset(fakedata, 0xFF, 1024);
 



More information about the ffmpeg-cvslog mailing list