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

Loren Merritt lorenm
Sat Nov 12 06:26:06 CET 2005


On Sat, 12 Nov 2005, g. wrote:
> Loren Merritt writes:
>> On Thu, 10 Nov 2005, g. wrote:
>>>
>>> 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;
> }

done.

--Loren Merritt





More information about the ffmpeg-devel mailing list