Mercurial > libavcodec.hg
comparison i386/dsputil_mmx.c @ 2940:8aa244d7c274 libavcodec
use sse16_sse2() in nsse
author | lorenm |
---|---|
date | Sat, 12 Nov 2005 05:23:25 +0000 |
parents | d772011258ec |
children | ef2149182f1c |
comparison
equal
deleted
inserted
replaced
2939:04cf75617d00 | 2940:8aa244d7c274 |
---|---|
1163 return tmp + hf_noise8_mmx(pix+8, line_size, h); | 1163 return tmp + hf_noise8_mmx(pix+8, line_size, h); |
1164 } | 1164 } |
1165 | 1165 |
1166 static int nsse16_mmx(void *p, uint8_t * pix1, uint8_t * pix2, int line_size, int h) { | 1166 static int nsse16_mmx(void *p, uint8_t * pix1, uint8_t * pix2, int line_size, int h) { |
1167 MpegEncContext *c = p; | 1167 MpegEncContext *c = p; |
1168 int score1= sse16_mmx(c, pix1, pix2, line_size, h); | 1168 int score1, score2; |
1169 int score2= hf_noise16_mmx(pix1, line_size, h) - hf_noise16_mmx(pix2, line_size, h); | 1169 |
1170 if(c) score1 = c->dsp.sse[0](c, pix1, pix2, line_size, h); | |
1171 else score1 = sse16_mmx(c, pix1, pix2, line_size, h); | |
1172 score2= hf_noise16_mmx(pix1, line_size, h) - hf_noise16_mmx(pix2, line_size, h); | |
1170 | 1173 |
1171 if(c) return score1 + ABS(score2)*c->avctx->nsse_weight; | 1174 if(c) return score1 + ABS(score2)*c->avctx->nsse_weight; |
1172 else return score1 + ABS(score2)*8; | 1175 else return score1 + ABS(score2)*8; |
1173 } | 1176 } |
1174 | 1177 |