]> granicus.if.org Git - libvpx/commitdiff
Repeat 64 times and clean-up unused functions
authorYi Luo <luoyi@google.com>
Sat, 28 May 2016 01:07:06 +0000 (18:07 -0700)
committerYi Luo <luoyi@google.com>
Sat, 28 May 2016 01:07:06 +0000 (18:07 -0700)
convolve/filtering.c

index 2cd3fb2a3f2323a7a94f3cedf99172c813b42215..5a88d53ad8d903db888b4195fb9b34b40507692e 100644 (file)
@@ -98,14 +98,6 @@ const struct Filter pfilter_10tap = {
   pfilter10, 7
 };
 
-static int get_looping_count(int width, struct Filter f) {
-  return width / f.signalSpan;
-}
-
-static int get_looping_resid(int width, struct Filter f) {
-  return width % f.signalSpan;
-}
-
 static inline __m128i multiply_add(const __m128i ps0, const __m128i ps1,
                                    const __m128i fl0, const __m128i fl1) {
   __m128i sum;
@@ -235,18 +227,27 @@ int main(int argc, char **argv)
   uint8_t *ppixel = pixel + block_size;
   int *pbuffer = buffer + block_size;
   uint32_t start, end;
+  int count;
 
   init_state(buffer, pixel, width, block_size);
   init_state(pbuffer, ppixel, width, block_size);
 
+  count = 0;
   start = readtsc();
-  convolve(pixel, width, filter12, 12, buffer);
+  do {
+    convolve(pixel, width, filter12, 12, buffer);
+    count++;
+  } while (count < 64);
   end = readtsc();
 
   printf("C version cycles: %d\n", end - start);
 
+  count = 0;
   start = readtsc();
-  convolve_sse4_1(ppixel, pfilter_12tap, width, pbuffer);
+  do {
+    convolve_sse4_1(ppixel, pfilter_12tap, width, pbuffer);
+    count++;
+  } while (count < 64);
   end = readtsc();
 
   printf("SIMD version cycles: %d\n", end - start);