[MPlayer-dev-eng] [PATCH] SSE2 optimizations for libmpeg2

Alexander Strange astrange at ithinksw.com
Wed Apr 2 11:39:57 CEST 2008


On Apr 1, 2008, at 2:27 PM, Diego Biurrun wrote:
> On Tue, Mar 11, 2008 at 11:34:44AM +0800, Zuxy Meng wrote:
>>
>> 2008/2/19, Diego Biurrun <diego at biurrun.de>:
>>> On Tue, Feb 19, 2008 at 09:41:52AM +0100, Diego Biurrun wrote:
>>>> On Sun, Feb 17, 2008 at 10:26:07AM -0700, Loren Merritt wrote:
>>>>> On Sat, 16 Feb 2008, Diego Biurrun wrote:
>>>>>
>>>>>> I found this patch on the libmpeg2 mailing list, here it is,  
>>>>>> slightly
>>>>>> adapted and cleaned up.  I could only test compilation without  
>>>>>> SSE2 as I
>>>>>> don't have a SSE2 processor.  I'd be happy to hear about test  
>>>>>> results
>>>>>> and benchmarks.
>>>>>
>>>>> Cpu detection is broken, attached patch fixes it (to be applied  
>>>>> on top of
>>>>> the previous patch).
>>>>
>>>> Here is an updated single patch that also fixes illegal  
>>>> identifiers and
>>>> includes some cosmetical changes.
>>>
>>> And here is a version without the (apparently ineffectual) motion
>>> compensation bits.
>>
>> Are u going to apply this?
>
> I'm not at all sure.  According to Christophe Massiot on libmpeg2- 
> devel
> the output of this IDCT differs from the MMXEXT one even though they  
> use
> the same algorithm.  Thus I'm not sure if it will ever be acceptable
> upstream.
>
> There must still be a bug lurking in there.  Maybe you can find it?
>
> Diego

This should be rounder_sse2 (0):
static const int32_t rounder4_128[] ATTR_ALIGN(16) = rounder (0);

Attached patch fixes that and builds with the last change to libmpeg2.

I noticed lavc's copy of this has ROW_SHIFT 11 instead of 15, but  
changing that here makes everything go purple. I'll leave that to  
someone else if they want more precision.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libmpeg2_idct_patched.diff
Type: application/octet-stream
Size: 24114 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080402/0d52ac49/attachment.obj>
-------------- next part --------------




More information about the MPlayer-dev-eng mailing list