[xiph-commits] r11672 - in branches/theora-playtime: lib/x86_32_vs win32/VS2005/dump_video win32/VS2005/encoder_example win32/VS2005/libtheora

illiminable at svn.xiph.org illiminable at svn.xiph.org
Thu Jun 29 13:19:40 PDT 2006


Author: illiminable
Date: 2006-06-29 13:19:25 -0700 (Thu, 29 Jun 2006)
New Revision: 11672

Modified:
   branches/theora-playtime/lib/x86_32_vs/dct_decode_sse2.c
   branches/theora-playtime/lib/x86_32_vs/dsp_mmx.c
   branches/theora-playtime/lib/x86_32_vs/dsp_sse2.c
   branches/theora-playtime/lib/x86_32_vs/idct_sse2.c
   branches/theora-playtime/lib/x86_32_vs/perf_helper.c
   branches/theora-playtime/lib/x86_32_vs/perf_helper.h
   branches/theora-playtime/lib/x86_32_vs/quant_sse2.c
   branches/theora-playtime/win32/VS2005/dump_video/
   branches/theora-playtime/win32/VS2005/encoder_example/
   branches/theora-playtime/win32/VS2005/libtheora/
Log:
* More ignores
* Make the perf data a struct
* Remove all existing perf tests

Modified: branches/theora-playtime/lib/x86_32_vs/dct_decode_sse2.c
===================================================================
--- branches/theora-playtime/lib/x86_32_vs/dct_decode_sse2.c	2006-06-29 19:58:19 UTC (rev 11671)
+++ branches/theora-playtime/lib/x86_32_vs/dct_decode_sse2.c	2006-06-29 20:19:25 UTC (rev 11672)
@@ -12,10 +12,10 @@
 //static __declspec(align(16)) const unsigned int TripleMask[4] = { 0x0000FFFF, 0xFFFF0000, 0x0000FFFF, 0xFFFF0000 };
 //static const unsigned int* PTripleMaskPtr = TripleMask;
 
-static unsigned __int64 perf_filter_horiz_time;
-static unsigned __int64 perf_filter_horiz_min;
-static unsigned __int64 perf_filter_horiz_count;
 
+
+perf_info filter_horiz_perf;
+
 static void FilterHoriz__sse2(unsigned char * PixelPtr,
                         ogg_int32_t LineLength,
                         ogg_int32_t *BoundingValuePtr){
@@ -42,7 +42,7 @@
     PixelPtr += LineLength;
     
   }
-  //PERF_BLOCK_END("filter horiz C", perf_filter_horiz_time, perf_filter_horiz_count,perf_filter_horiz_min, 10000);
+  //PERF_BLOCK_END("filter horiz C", filter_horiz_perf, 10000);
 
 #else
     static __declspec(align(16)) unsigned char temp[128];
@@ -187,9 +187,7 @@
 {
   TH_DEBUG("enabling accelerated x86_32 mmx dsp functions.\n");
 
-  perf_filter_horiz_time = 0;
-  perf_filter_horiz_min = -1;
-  perf_filter_horiz_count = 0;
+  ClearPerfData(&filter_horiz_perf);
   funcs->FilterHoriz = FilterHoriz__sse2;
 
 }
\ No newline at end of file

Modified: branches/theora-playtime/lib/x86_32_vs/dsp_mmx.c
===================================================================
--- branches/theora-playtime/lib/x86_32_vs/dsp_mmx.c	2006-06-29 19:58:19 UTC (rev 11671)
+++ branches/theora-playtime/lib/x86_32_vs/dsp_mmx.c	2006-06-29 20:19:25 UTC (rev 11672)
@@ -940,7 +940,7 @@
 #else
   ogg_uint32_t  DiffVal;
 
-  PERF_BLOCK_START();
+  //PERF_BLOCK_START();
   __asm {
     align  16
 
@@ -1108,7 +1108,7 @@
     mov         DiffVal, eax
   };
 
-  PERF_BLOCK_END("sad8x8 mmx - ", perf_sad8x8_time, perf_sad8x8_count,perf_sad8x8_min, 50000);
+  //PERF_BLOCK_END("sad8x8 mmx - ", perf_sad8x8_time, perf_sad8x8_count,perf_sad8x8_min, 50000);
   return DiffVal;
 
  

Modified: branches/theora-playtime/lib/x86_32_vs/dsp_sse2.c
===================================================================
--- branches/theora-playtime/lib/x86_32_vs/dsp_sse2.c	2006-06-29 19:58:19 UTC (rev 11671)
+++ branches/theora-playtime/lib/x86_32_vs/dsp_sse2.c	2006-06-29 20:19:25 UTC (rev 11672)
@@ -26,10 +26,12 @@
 
 
 
-static unsigned __int64 perf_sad8x8_time;
-static unsigned __int64 perf_sad8x8_count;
-static unsigned __int64 perf_sad8x8_min;
+//static unsigned __int64 perf_sad8x8_time;
+//static unsigned __int64 perf_sad8x8_count;
+//static unsigned __int64 perf_sad8x8_min;
 
+
+
 //static const ogg_int64_t V128 = 0x0080008000800080LL;
 
 static __declspec(align(16)) const unsigned int V128_8x16bits[4] = { 0x00800080, 0x00800080, 0x00800080, 0x00800080 };
@@ -902,7 +904,6 @@
 #elif 1
   ogg_uint32_t  DiffVal;
 
- PERF_BLOCK_START();
   __asm {
     align  16
 
@@ -978,7 +979,6 @@
 
   };
 
- PERF_BLOCK_END("sad8x8 sse2 - ", perf_sad8x8_time, perf_sad8x8_count,perf_sad8x8_min, 50000);
     return DiffVal;
    
  
@@ -1657,8 +1657,6 @@
 
 
   
-perf_sad8x8_time = 0;
- perf_sad8x8_count = 0;
-perf_sad8x8_min = -1;
+
 }
 

Modified: branches/theora-playtime/lib/x86_32_vs/idct_sse2.c
===================================================================
--- branches/theora-playtime/lib/x86_32_vs/idct_sse2.c	2006-06-29 19:58:19 UTC (rev 11671)
+++ branches/theora-playtime/lib/x86_32_vs/idct_sse2.c	2006-06-29 20:19:25 UTC (rev 11672)
@@ -32,19 +32,19 @@
 #define xC6S2 25080
 #define xC7S1 12785
 
-static unsigned __int64 perf_dequant_slow_time;
-static unsigned __int64 perf_dequant_slow_count;
-static unsigned __int64 perf_dequant_slow_min;
+//static unsigned __int64 perf_dequant_slow_time;
+//static unsigned __int64 perf_dequant_slow_count;
+//static unsigned __int64 perf_dequant_slow_min;
+//
+//static unsigned __int64 perf_idct1_time;
+//static unsigned __int64 perf_idct1_count;
+//static unsigned __int64 perf_idct1_min;
+//
+//static unsigned __int64 perf_dequant_slow10_time;
+//static unsigned __int64 perf_dequant_slow10_count;
+//static unsigned __int64 perf_dequant_slow10_min;
 
-static unsigned __int64 perf_idct1_time;
-static unsigned __int64 perf_idct1_count;
-static unsigned __int64 perf_idct1_min;
 
-static unsigned __int64 perf_dequant_slow10_time;
-static unsigned __int64 perf_dequant_slow10_count;
-static unsigned __int64 perf_dequant_slow10_min;
-
-
 static void dequant_slow__sse2( ogg_int16_t * dequant_coeffs,
                    ogg_int16_t * quantized_list,
                    ogg_int32_t * DCT_block) 
@@ -780,18 +780,7 @@
 {
 
 
-    perf_dequant_slow_time = 0;
-    perf_dequant_slow_count = 0;
-    perf_dequant_slow_min = -1;
 
-    perf_dequant_slow10_time = 0;
-    perf_dequant_slow10_count = 0;
-    perf_dequant_slow10_min = -1;
-
-    perf_idct1_time = 0;
-    perf_idct1_count = 0;
-    perf_idct1_min = -1;
-
     /* TODO::: Match function order */
   funcs->dequant_slow = dequant_slow__sse2;
   funcs->IDct1 = IDct1__sse2;

Modified: branches/theora-playtime/lib/x86_32_vs/perf_helper.c
===================================================================
--- branches/theora-playtime/lib/x86_32_vs/perf_helper.c	2006-06-29 19:58:19 UTC (rev 11671)
+++ branches/theora-playtime/lib/x86_32_vs/perf_helper.c	2006-06-29 20:19:25 UTC (rev 11672)
@@ -18,3 +18,11 @@
 
 
 }
+
+void ClearPerfData(perf_info* inoutData)
+{
+	inoutData->sum = 0;
+	inoutData->count = 0;
+	inoutData->min = (unsigned __int64)-1;
+	inoutData->max = 0;
+}

Modified: branches/theora-playtime/lib/x86_32_vs/perf_helper.h
===================================================================
--- branches/theora-playtime/lib/x86_32_vs/perf_helper.h	2006-06-29 19:58:19 UTC (rev 11671)
+++ branches/theora-playtime/lib/x86_32_vs/perf_helper.h	2006-06-29 20:19:25 UTC (rev 11672)
@@ -6,35 +6,38 @@
 static unsigned __int64 perf_temp;
 static unsigned long depth = 0;
 
-/*
-//typedef struct {
-//    unsigned __int64 sum;
-//    unsigned __int64 count;
-//    unsigned __int64 min;
-//
-//} perf_info;
-*/
 
+typedef struct {
+    unsigned __int64 sum;
+    unsigned __int64 count;
+    unsigned __int64 min;
+	unsigned __int64 max;
+
+} perf_info;
+
+
 extern unsigned __int64 GetCPUTime();
+extern void ClearPerfData(perf_info* inoutData);
 #define PERF_DATA_ON
 #ifdef PERF_DATA_ON
 
 
 #define PERF_BLOCK_START()  perf_start_time[depth++] = GetCPUTime();
 
-#define PERF_BLOCK_END(s, x, y, l, z)                                                               \
+#define PERF_BLOCK_END(s, perf, z)                                                               \
         perf_temp = (GetCPUTime() - perf_start_time[--depth]);                                      \
-        (l) = ((l) > perf_temp) ? perf_temp : (l);                                                  \
-        x += perf_temp;                                                                             \
-        (y)++;                                                                                      \
-  if (((y) % (z)) == 0)                                                                             \
+        (perf.min) = ((perf.min) > perf_temp) ? perf_temp : (perf.min);                                                  \
+		(perf.max) = ((perf.max) > perf_temp) ? (perf.max) : perf_temp;                                  \
+        perf.sum += perf_temp;                                                                             \
+        (perf.count)++;                                                                                      \
+  if (((perf.count) % (z)) == 0)                                                                             \
   {                                                                                                 \
-    printf(s " - %lld from %lld iterations -- @%lld cycles -- min(%lld)\n", x, y, (x) / (y), l);    \
+    printf(s " - %lld from %lld iterations -- @%lld cycles -- min(%lld) -- max(%lld)\n", perf.sum, perf.count, (perf.sum) / (perf.count), perf.min, perf.max);    \
   }                
 
 #else
 #define PERF_BLOCK_START()
-#define PERF_BLOCK_END(s, x, y, l, z)
+#define PERF_BLOCK_END(s, perf, z)
 
 #endif
 

Modified: branches/theora-playtime/lib/x86_32_vs/quant_sse2.c
===================================================================
--- branches/theora-playtime/lib/x86_32_vs/quant_sse2.c	2006-06-29 19:58:19 UTC (rev 11671)
+++ branches/theora-playtime/lib/x86_32_vs/quant_sse2.c	2006-06-29 20:19:25 UTC (rev 11672)
@@ -22,9 +22,9 @@
 
 #include "perf_helper.h"
 
-static unsigned __int64 perf_quant_time;
-static unsigned __int64 perf_quant_min;
-static unsigned __int64 perf_quant_count;
+//static unsigned __int64 perf_quant_time;
+//static unsigned __int64 perf_quant_min;
+//static unsigned __int64 perf_quant_count;
 
 
 void quantize__sse2( PB_INSTANCE *pbi,
@@ -42,7 +42,7 @@
   ogg_uint32_t * ZigZagPtr = (ogg_uint32_t *)pbi->zigzag_index;
   ogg_int32_t temp;
 
-  PERF_BLOCK_START();
+  //PERF_BLOCK_START();
   /* Set the quantized_list to default to 0 */
   memset( quantized_list, 0, 64 * sizeof(Q_LIST_ENTRY) );
 
@@ -158,7 +158,7 @@
     ZigZagPtr += 8;
   }
 
-  PERF_BLOCK_END("quantize C", perf_quant_time, perf_quant_count, perf_quant_min, 20000);
+  //PERF_BLOCK_END("quantize C", perf_quant_time, perf_quant_count, perf_quant_min, 20000);
 
 #else
 static __declspec(align(16)) unsigned short Some511s[8] = { 0x01FF, 0x01FF, 0x01FF, 0x01FF, 0x01FF, 0x01FF, 0x01FF, 0x01FF };
@@ -440,9 +440,7 @@
 {
 #ifndef USE_NO_SSE2
   TH_DEBUG("enabling accelerated x86_32 sse2 quant functions.\n");
-  perf_quant_time = 0;
-  perf_quant_min = -1;
-  perf_quant_count = 0;
+
   funcs->quantize = quantize__sse2;
 
 #endif


Property changes on: branches/theora-playtime/win32/VS2005/dump_video
___________________________________________________________________
Name: svn:ignore
   - Debug

   + Debug
Release



Property changes on: branches/theora-playtime/win32/VS2005/encoder_example
___________________________________________________________________
Name: svn:ignore
   - Debug

   + Debug
Release



Property changes on: branches/theora-playtime/win32/VS2005/libtheora
___________________________________________________________________
Name: svn:ignore
   - Debug

   + Debug
Release




More information about the commits mailing list