* /author Zachary Drew, Copyright 2005
*
* Currently only uses Gamma data for comparisonon (bug or feature?)
- * Vector optimization coming soon.
+ * SSE optimized where available.
*
* Vector orientation: The vector data that is generated for the current frame specifies
* the motion from the previous frame to the current frame. To know how a macroblock
#include <sys/time.h>
#include <unistd.h>
+#ifndef __DARWIN__
#include "sad_sse.h"
+#endif
#define NDEBUG
#include <assert.h>
// Keep track of best and former best candidates
motion_vector best, former;
+ former.dx = 0;
+ former.dy = 0;
// The direction of the refinement needs to be known
motion_vector current;
} /* End column loop */
} /* End row loop */
+#ifndef __DARWIN__
asm volatile ( "emms" );
+#endif
#ifdef COUNT_COMPARES
fprintf(stderr, "%d comparisons per block were made", compares/count);
static void init_optimizations( struct motion_est_context_s *c )
{
switch(c->mb_w){
+#ifndef __DARWIN__
case 4: if(c->mb_h == 4) c->compare_optimized = sad_sse_422_luma_4x4;
else c->compare_optimized = sad_sse_422_luma_4w;
break;
break;
case 64: c->compare_optimized = sad_sse_422_luma_64w;
break;
+#endif
default: c->compare_optimized = sad_reference;
break;
}