[theora-dev] [Fwd: Re: libtheora MMX patch]

Andrew Chew andrew at okashistudios.com
Tue Apr 8 21:07:02 PDT 2008

Forwarding an email exchange that I had with Nils Pipenbrinck regarding 
the state of the MMX patch for visual studio-style assembly.

I also run with the patches, and everything looks fine as far as I can tell.

Is this enough for a go-ahead to put that stuff into the mainline (if 
it's not there already)?

-------- Original Message --------
Subject: 	Re: libtheora MMX patch
Date: 	Sun, 06 Apr 2008 15:21:12 +0200
From: 	Nils Pipenbrinck <n.pipenbrinck at cubic.org>
To: 	Andrew Chew <andrew at okashistudios.com>
References: 	<4778152E.5010904 at cubic.org> 
<477857B8.1010102 at email.unc.edu> <4778AA4C.9010105 at cubic.org> 
<47F8463A.8000007 at okashistudios.com>

Hi Andrew,

I run the original C-code against the mmx optimized version, dumped out 
the raw yuv-frames to disk and did a binary compare. It's functional 
equivalent down to the bit-level. I used two different test-streams for 
this. It's highly unlikely that a bug survives this test.

AFAIK my changes for the gcc inline assembler functions are already in 
the trunk (slightly modified - Giles didn't liked the fact that I 
unrolled / wrote the loops in asm).

If you want to merge into the win32 baseline let me know I have adopted 
the filter and idct mmx functions to match more the gcc style but never 
submitted them. Also a little bug crept into the win32 mmx code you 
have. I accidently used the same code for idct10 and idct. Functional it 
works but I lost a little bit speed that way (barely measurable but 

I have a local version where this is fixed as well.

If you're interested I'll dig out the modified codes from my old 
harddisk and send it to you.


Andrew Chew schrieb:
> Hi!  I tested your assembly patches to libtheora a while back.
> How well have you validated that it works?  It works in my environment 
> pretty well.
> I'd just like to make sure this gets into mainline libtheora, and so 
> far it hasn't (they are waiting for some confirmation that those 
> patches are indeed good).  I guess they are short on WIN32 testers.  
> This was revealed to me at the last libtheora roadmap meeting that we 
> just had last week.
> I'd really like to make sure that your stuff gets into their mainline.

More information about the theora-dev mailing list