[FFmpeg-devel] [PATCH] fix for roundup issue 2127

Reimar Döffinger Reimar.Doeffinger
Fri Dec 31 16:55:11 CET 2010


On Fri, Dec 31, 2010 at 05:18:28PM +0300, Yuriy Kaminskiy wrote:
> Ronald S. Bultje wrote:
> > Hi,
> > 
> > On Thu, Dec 30, 2010 at 1:38 PM, Daniel Kang <daniel.d.kang at gmail.com> wrote:
> >> Sorry, I sent the wrong patch (the one I used for preliminary testing). Here
> >> is the real version.
> > [..]
> >> -        : "=m" (*(uint32_t*)(dst + 0*dst_stride)),
> >> -          "=m" (*(uint32_t*)(dst + 1*dst_stride)),
> >> -          "=m" (*(uint32_t*)(dst + 2*dst_stride)),
> >> -          "=m" (*(uint32_t*)(dst + 3*dst_stride))
> >> -        :  "m" (*(uint32_t*)(src + 0*src_stride)),
> >> -           "m" (*(uint32_t*)(src + 1*src_stride)),
> >> -           "m" (*(uint32_t*)(src + 2*src_stride)),
> >> -           "m" (*(uint32_t*)(src + 3*src_stride))
> > [..]
> >> +        :
> >> +        :  "r" (dst),
> >> +           "r" (src),
> >> +           "r" ((x86_reg)dst_stride),
> >> +           "r" ((x86_reg)src_stride),
> >> +           "r" ((x86_reg)dst_stride*3),
> >> +           "r" ((x86_reg)src_stride*3)
> > 
> > That is not correct, I think, "dst" is being written to, so dst needs
> > to be in the first set (so : "+r"(dst) : ... all the other arguments),
> 
> No, dst is not modified, only *memory* pointed by dst modified.
> So using "+r" is wrong.
> 
> > or you need : "memory" at the end to specify that memory was written
> 
> Yep.

And it all doesn't change that this code can only be used under
#if HAVE_6REGS
which I think makes this unacceptable, at least if we still have to
policy that fast code in as many cases as possible is more important
that compilation with options that are only useful for debugging.



More information about the ffmpeg-devel mailing list