[Ffmpeg-devel] [patch] Snow - add_yblock x86 asm

Michael Niedermayer michaelni
Sun Apr 10 19:54:29 CEST 2005


Hi

On Sunday 10 April 2005 17:50, Aurelien Jacobs wrote:
> On Sun, 10 Apr 2005 00:58:46 -0400
>
> Yartrebo <yartrebo at earthlink.net> wrote:
> > On Sat, 2005-04-09 at 16:40 +0200, Michael Niedermayer wrote:
> > > On Saturday 09 April 2005 16:05, Yartrebo wrote:
> > >
> > > [...]
> > >
> > > > > > +#define add_yblock_bw_8_obmc_16_mmx \
> > > > > > +        pxor_r2r(mm7, mm7);\
> > > > > > +        pcmpeqd_r2r(mm4, mm4);\
> > > > > > +        pslld_i2r(31, mm4);\
> > > > >
> > > > > please dont mix mmx.h with asm() style
> > > > >
> > > > > > +             "movq (%%esi), %%xmm0;       \n\t"\
> > > > > > +             "movl 12(%%eax), %%edx;      \n\t"\
> > > > >
> > > > > i dont think this will work on x86-64
> > > >
> > > > Unfortunately, none of my pointer code will work on x86-64. To be
> > > > honest, I thought that mplayer assumed that int == * == int32_t ==
> > > > 4 in a lot of places and that mplayer would be forever 32 bit.
> > > >
> > > > Would you have any suggestions as to how to make code run in both
> > > > 32 bit and 64 bit modes without much or any loss of performance?
> > >
> > > please see the x86-64 patch, which should explain the problem better
> > > http://www1.mplayerhq.hu/cgi-bin/cvsweb.cgi/ffmpeg/libavcodec/i386/dspu
> > >til_mmx.c.diff?r1=1.87&r2=1.88&cvsroot=FFMpeg
> >
> > fixed, hopefully. I need someone with an AMD-64 machine to test it.
>
> Ok, I tested that patch on AMD64.
>
> But first I tested snow encoding with a fresh ffmpeg checkout.
> The result is that it simply crashes :-( (see the attached debug log)
> As the crash happened in an inline function, I tried to add a
> #define always_inline
> to ease the debugging. The result was no more crashes !! So I don't
> investigated further to find what causes this crash.
> So finally, with no inlines, I was able to do a snow encoding, but
> when playing the resulting file, every 12th frames, I get one solid
> grey frame ! (tested with several different input format)
> I have no idea what causes this.

-debug 2048 does

[...]
-- 
Michael

"nothing is evil in the beginning. Even Sauron was not so." -- Elrond





More information about the ffmpeg-devel mailing list