[FFmpeg-devel] [PATCH] ff_scalarproduct_float_sse

Michael Niedermayer michaelni
Wed Jan 20 22:11:50 CET 2010

On Wed, Jan 20, 2010 at 02:48:57PM +0000, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> > On Tue, Jan 19, 2010 at 11:42:40PM -0500, Alex Converse wrote:
> >> This cause a >50% decrease in SBR decode time.
> >> 
> >> For the time being it can help in the other places where
> >> scalarproduct_float() is used.
> >> 
> >> Regards,
> >> Alex Converse
> >
> >>  dsputil_mmx.c    |    5 +++++
> >>  dsputil_yasm.asm |   25 +++++++++++++++++++++++++
> >
> > Would you mind to avoid yasm and use gcc asm instead ?
> >
> > I have no problem with yasm as such but gcc asm is more portable and
> > can be integrated with C code if we ever want that.
> I have to disagree.  Just look at how many FATE targets broke with
> your change to h264_loop_filter_strength_mmx2 yesterday.  Several
> compilers are still failing to build it.

what we had is called a syntax error, yasm wont do any better
if you make such errors, though yasm would more consistently fail i guess

what we had before was too many complex memory operands, yasm does not
support that in the first place.

Summary, h264_loop_filter_strength_mmx2() is poorly implemented by having
loops in C and mixed with asm that expects the compiler to figure out how
to address complex pointers + - several indexes. Thats not how gcc asm
should be written IMHO. I dont think i wrote the original function, i just
fixed a bug in it related to B frames, ideally one should rewrite it with
all the loops being integrated into asm, this likely would also make it
faster and closer to how it would look in yasm

anyway it should be fixed now


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100120/4dabbaf4/attachment.pgp>

More information about the ffmpeg-devel mailing list