[FFmpeg-devel] [PATCH] ra144enc: fix use of scalarprod_int16

James Almer jamrial at gmail.com
Wed Mar 5 23:19:00 CET 2014


On 05/03/14 5:50 PM, Christophe Gisquet wrote:
> Hi,
> 
> 2014-03-05 19:51 GMT+01:00 James Almer <jamrial at gmail.com>:
>> This doesn't appear to have fixed the problem.
> 
> I guess Michael's addition is the one not working?

No, i meant the usage of emms_c() in ra144enc.c

> 
>> Adding
>>
>> %if mmsize == 8
>>     emms
>> %endif
>>
>> at the end of scalarproduct_int16 in dsputil.c like it's done in other files
>> however worked for me.
> 
> The issue here is that emms might be emitted quite frequently, which I
> believe was Michael's reason to do this. I have just verified he is
> right: the ssse3 version takes ~155 cycles, and adding unconditionally
> emms brings it to 185.

Michael's addition was correct in that, as you said, prevented calling it 
unconditionally, but the actual change of using emms_c() in ra144enc.c is in 
itself not working (at least not on the systems i tried).
Adding emms at the end of scalarproduct_int16 using the above code worked 
for me, and is also used only for mmx.

> 
> Anyway, this is weird. At this point, I think this is causing more
> headaches than encoding with such a codec is worth.
> 
> I'd suggest reverting the change altogether, because adding emms to
> the dsp is probably more detrimental.
> 



More information about the ffmpeg-devel mailing list