[MPlayer-dev-eng] Improved remove-logo filter

Trent Piepho xyzzy at speakeasy.org
Wed Nov 1 12:42:30 CET 2006


On Wed, 1 Nov 2006, Michael Niedermayer wrote:
> On Tue, Oct 31, 2006 at 01:13:29PM -0800, Trent Piepho wrote:
> > On Tue, 31 Oct 2006, Guillaume POIRIER wrote:
> >
> > > Hi Trent,
> > >
> > > Were you able to work on improving your patch?
> >
> > What was there to do?  Change the asm to use "+" constraints
> > even though it doesn't always work with gcc 2.7.2?
>
> does gcc 2.7.2 compile mplayer at all?

Sorry, I meant 2.95, but I'm not sure if that's the case.  Some older gcc
docs explictly say you can't use "+", newer ones say you can, but with
various conditions (which change from version to version).

You might also want to look at these threads:
http://marc.theaimsgroup.com/?l=linux-kernel&m=107475162200773&w=2
http://lkml.org/lkml/2006/7/8/251

Using "+m" vs "=m"/"m" is a complex issue.

>
> and if you use "=something" then you should also be aware of that for example
>  "=r"(a)
> :"r"(b)
>
> does not prevent %0 == %1 if you want an output to not be able to use the
> same register or memory location as an random input then you must use "=&..."
> iam not sure if that could cause any problems with your code as i didnt look
> at it, just the constraints quoted above in which "=m" (accumulator) and
> "m" (accumulator) could be in the same memory location or a different one
> or "=m" (accumulator) and "g" (stride) could be in the same memory location

How could accumulator be in two different memory locations?

How could two variables (accumulator and stride) share the same memory
location?

Before you say gcc could allot some new memory and copy the variables in
and out, please read the message from Richard Henderson that I linked to
that explains why this can't be done.

Anyway, accumulator isn't written to before all the inputs are consumed, so
it's not an "early-clobber" output and wouldn't need an '&' if it was "=r"
instead of "=m" (a memory output can't overlap an unrelated input.  A
register output can overlap a memory input, but not the other way around).



More information about the MPlayer-dev-eng mailing list