[Ffmpeg-devel] Re: ffmpeg now 2x slower: sse16 vs nsse16

g. the_ether
Sat Nov 12 02:44:25 CET 2005


Loren Merritt <lorenm <at> u.washington.edu> writes:

> 
> On Thu, 10 Nov 2005, g. wrote:
> >
> > I sorted it out in the end. Someone had moved where the default search 
method
> > was initialised so I ended up doing more MV searching than previously.
> >
> > BTW, there is a small bug in nsse16_mmx in dsputil_mmx.c. There out to be:
> >
> > if(mm_flags & MM_SSE2)
> >
> > so as to choose between calling sse16_mmx or sse16_sse2
> 
> There is already:
> 
>      c->sse[0] = (mm_flags & MM_SSE2) ? sse16_sse2 : sse16_mmx;

No, I'm afraid you misread my posting. I wrote about the definition of 
nsse16_mmx which calls sse16_mmx, not sse16_sse2 nor c->sse[0].

The correct definition should be:

static int nsse16_mmx(void *p, uint8_t * pix1, uint8_t * pix2, int line_size, 
int h) {
MpegEncContext *c = p;
    int score1;
    int score2;
		
		if( mm_flags & MM_SSE2 )
			score1 = sse16_sse2(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;
}

g.





More information about the ffmpeg-devel mailing list