[FFmpeg-devel] [PATCH] use x86_reg in libswscale

Reimar Döffinger Reimar.Doeffinger
Mon Nov 3 21:25:39 CET 2008


On Sun, Nov 02, 2008 at 11:12:41PM +0100, Michael Niedermayer wrote:
> On Sun, Nov 02, 2008 at 08:40:40PM +0100, Reimar D?ffinger wrote:
> > Hello,
> > I thought libpostprocess was the last one, but it seems libswscale did
> > not compile on mingw64 either.
> > Attached is a proposed patch. It changes the types in the functions
> > where it seems easily possible (no prototypes for those functions
> > anywhere) and otherwise casts them (hm, actually seems like none of
> > those cases remain).
> > 
> > Greetings,
> > Reimar D?ffinger
> 
> [...]
> > @@ -2211,7 +2211,7 @@
> >              MOVNTQ"                  %%mm0, (%1, %%"REG_a") \n\t"
> >              "add                        $8,      %%"REG_a"  \n\t"
> >              " js                        1b                  \n\t"
> > -            : : "r" (src+width*3), "r" (ydst+width), "g" (-width)
> > +            : : "r" (src+width*3), "r" (ydst+width), "g" ((x86_reg)-width)
> >              : "%"REG_a, "%"REG_d
> >              );
> >              ydst += lumStride;
> 
> did you mean that no casts remain?

I was confused, I was only thinking of swscale_template where I removed
the huge number of casts I had originally.

> also you could try swscale-example and the regression tests to make sure
> the code is working on mingw64 and did not change on something else

Well, I can't test for mingw64:
swscale-example does not work because
1) make generates a broken commandline, trying to link with lib.a ?!?
2) after removing that, it does not link because "random" is missing on
mingw64 it seems

As for the regression tests on mingw64:
0) ffmpeg is hacked because mingw64 misses usleep (I just removed those
2 lines)
1) snow, svq1 and pcm tests crash
2) flashsv test can not work because zlib is missing

Most of the other tests have wrong results. I doubt that is related to
swscale though, more likely that gcc 4.4.0 snapshot from end of september
is not working that well, or the VirtualBox 64 bit emulation is working worse
than I thought...

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list