[FFmpeg-devel] [WIP] add sse4 flac lpc encoder

James Darnley james.darnley at gmail.com
Thu Feb 6 22:30:41 CET 2014

On 2014-02-04 06:48, James Almer wrote:
> I tested just now, and the code is crashing for me.

That's probably because I made assumptions about the calling convention.
 One problem this caused was:
cmp R9, R9
jne ...

>> +INIT_XMM sse4
>> +cglobal flac_enc_lpc_16, 3, 5, 4, 0, res, smp, coefs ; len, order, shift
> You're calling the function with six arguments but this is only expecting 
> three. You're also reserving five general purpose registers instead of six.

As I saw it, I was asking x86inc.asm to load 3 with the others on the
stack.  I was only using the Nm define for them.  That is a problem when
args are passed in registers.  This should not be fixed.  It works4me on
cygwin and cygwin64 by having different setup for the two arches,
somewhat similar to yadif.

> After changing what i mentioned above the code worked for me, though the speed 
> gains weren't as good in my tests compared to what you reported. (I however 
> used the default compression level).

I couldn't quite recreate the same level of gains once I had it working.

Patch set to come, hopefully tonight, when I finally get git-send-email
working.  Otherwise I'll just attach again.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 683 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140206/495b3595/attachment.asc>

More information about the ffmpeg-devel mailing list