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

Ronald S. Bultje rsbultje
Fri Dec 31 15:04:37 CET 2010


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),
or you need : "memory" at the end to specify that memory was written
to in this function. I don't know which of the two is more correct.

Ronald



More information about the ffmpeg-devel mailing list