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

Uoti Urpala uoti.urpala
Mon Mar 17 22:38:49 CET 2008

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?

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.

More information about the ffmpeg-devel mailing list