[FFmpeg-devel] [PATCH] replace hardcoded offset of CABACContext.bytestream with "m" operand

Uoti Urpala uoti.urpala
Mon Mar 17 22:57:46 CET 2008


On Mon, 2008-03-17 at 21:43 +0000, M?ns Rullg?rd wrote:
> Uoti Urpala <uoti.urpala at pp1.inet.fi> writes:
> 
> > On Mon, 2008-03-17 at 21:01 +0000, Mans Rullgard wrote:
> >> -        :"r"(state), "r"(c)
> >> +        :"r"(state), "r"(c), "m"(c->bytestream)
> >
> > Why replace one of the hardcoded offsets while leaving all the others?
> 
> Because I'm lazy and they don't depend on #ifdefs.

Would eliminating those #ifdefs be particularly important? I mean there
was discussion about the necessity of detecting various aspects of 32/64
bit, but for the asm in this file it seems still necessary to
distinguish x86_32 and AMD64 anyway.

> > Replacing them all (or using "+m"(*c) as I did earlier) also has the
> > performance benefit that for inlined versions gcc can calculate the
> > offsets based directly on H264Context. Leaving the "r"(c) requires it to
> > place &h->cabac in a register.
> 
> I don't recall seeing that patch (which isn't saying much).  Was it
> rejected?  Ignored?

3-cleanup_cabac_asm.diff in
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-October/036661.html

Michael didn't like it because gcc-2.95 fails to compile the cleaned-up
version.





More information about the ffmpeg-devel mailing list