
#if defined(__cplusplus)
extern "C" { 
#endif

#ifndef _TSC
#define _TSC
  typedef struct { unsigned int high, low; } TSC;
#endif

#ifndef _getTSC
#define getTSC(t) asm volatile("push %%edx \n\t push %%eax \n\t cpuid \n\t rdtsc\n\t movl %%edx, %0\n\t movl %%eax, %1\n\t pop %%eax \n\t pop %%edx \n\t" : "=m" (t.high), "=m" (t.low))
#endif
  
  int Diff(Picture *Src1, Picture *Src2, Picture *Dest);

  int ImgAbsDiff(unsigned char *Src1, 
		 unsigned char *Src2, 
		 unsigned char *Dest,int length);
  int detect_mmx( void );
       
  TSC TSCdiff(TSC t1, TSC t2);
  float TSCdiff_to_sec(TSC diff);
  void PrintResults(TSC mmx, TSC nor);

#if defined(__cplusplus)
       }
#endif
