]> granicus.if.org Git - libvpx/commitdiff
vpx_convolve_avg_neon: prefer != 0 to > 0 in tests
authorJames Zern <jzern@google.com>
Wed, 28 Apr 2021 01:02:35 +0000 (18:02 -0700)
committerJames Zern <jzern@google.com>
Wed, 28 Apr 2021 01:03:30 +0000 (18:03 -0700)
this produces better assembly code

Change-Id: I174b67a595d7efeb60c921f066302043b1c7d84e

vpx_dsp/arm/vpx_convolve_avg_neon.c

index 07349d03ae570081db0cbdee0bf8226c014e4963..8e3ee599f4fefd47e3f4d5bd4be9ca8dcd12ba69 100644 (file)
@@ -43,7 +43,7 @@ void vpx_convolve_avg_neon(const uint8_t *src, ptrdiff_t src_stride,
       vst1_lane_u32((uint32_t *)dst, vreinterpret_u32_u8(dd0), 1);
       dst += dst_stride;
       h -= 2;
-    } while (h > 0);
+    } while (h != 0);
   } else if (w == 8) {  // avg8
     uint8x8_t s0, s1, d0, d1;
     uint8x16_t s01, d01;
@@ -64,7 +64,7 @@ void vpx_convolve_avg_neon(const uint8_t *src, ptrdiff_t src_stride,
       vst1_u8(dst, vget_high_u8(d01));
       dst += dst_stride;
       h -= 2;
-    } while (h > 0);
+    } while (h != 0);
   } else if (w < 32) {  // avg16
     uint8x16_t s0, s1, d0, d1;
     do {
@@ -83,7 +83,7 @@ void vpx_convolve_avg_neon(const uint8_t *src, ptrdiff_t src_stride,
       vst1q_u8(dst, d1);
       dst += dst_stride;
       h -= 2;
-    } while (h > 0);
+    } while (h != 0);
   } else if (w == 32) {  // avg32
     uint8x16_t s0, s1, s2, s3, d0, d1, d2, d3;
     do {
@@ -110,7 +110,7 @@ void vpx_convolve_avg_neon(const uint8_t *src, ptrdiff_t src_stride,
       vst1q_u8(dst + 16, d3);
       dst += dst_stride;
       h -= 2;
-    } while (h > 0);
+    } while (h != 0);
   } else {  // avg64
     uint8x16_t s0, s1, s2, s3, d0, d1, d2, d3;
     do {