[FFmpeg-devel] [PATCH] use MANGLE in cavsdsp_mmx.c

Måns Rullgård mans
Wed Sep 30 21:11:50 CEST 2009


Michael Niedermayer <michaelni at gmx.at> writes:

> On Wed, Sep 30, 2009 at 05:16:07PM +0100, M?ns Rullg?rd wrote:
>> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
>> 
>> > Hello,
>> > since OpenBSD uses PIC and EBP and EBX can't be used, it can't
>> > compile cavsdsp_mmx.c.  While those are "m" constraints, at least
>> > some still use up a register.  Attached is a patch that fixes
>> > compilation by using MANGLE on one of the variables that is only
>> > used in 2 places.  Personally I'd be in favour to be consistent with
>> > other parts of FFmpeg and just use MANGLE whereever possible, but
>> > that would be a more invasive change.
>> 
>> Here's a patch I had sitting around which changes some h264 asm to use
>> mangle.  IIRC it works on Linux with modern compilers.  It may or may
>> not fix some problem somewhere.
>> 
>> -- 
>> M?ns Rullg?rd
>> mans at mansr.com
>
>>  h264dsp_mmx.c |   19 +++++++++----------
>>  1 file changed, 9 insertions(+), 10 deletions(-)
>> 6c6cb8ff65ca5351ede786f522ad9e188b256ca3  h264_x86_mangle.patch
>
> ok if tested and its faster or fixes some problem

I haven't benchmarked it, and I don't know if it fixes any problem.
The crashes on openbsd were apparently caused by something else.  I
figured it was better to post the patch here than leave to rot on my
disk.  I don't even remember why I wrote it.  Maybe Reimar does, IIRC
he was watching as I wrote it.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list