changeset 2940:8aa244d7c274 libavcodec

use sse16_sse2() in nsse
author lorenm
date Sat, 12 Nov 2005 05:23:25 +0000
parents 04cf75617d00
children 6c44e5c752f1
files i386/dsputil_mmx.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/i386/dsputil_mmx.c	Thu Nov 10 18:05:45 2005 +0000
+++ b/i386/dsputil_mmx.c	Sat Nov 12 05:23:25 2005 +0000
@@ -1165,8 +1165,11 @@
 
 static int nsse16_mmx(void *p, uint8_t * pix1, uint8_t * pix2, int line_size, int h) {
     MpegEncContext *c = p;
-    int score1= sse16_mmx(c, pix1, pix2, line_size, h);
-    int score2= hf_noise16_mmx(pix1, line_size, h) - hf_noise16_mmx(pix2, line_size, h);
+    int score1, score2;
+
+    if(c) score1 = c->dsp.sse[0](c, pix1, pix2, line_size, h);
+    else  score1 = sse16_mmx(c, pix1, pix2, line_size, h);
+    score2= hf_noise16_mmx(pix1, line_size, h) - hf_noise16_mmx(pix2, line_size, h);
 
     if(c) return score1 + ABS(score2)*c->avctx->nsse_weight;
     else  return score1 + ABS(score2)*8;