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

Yuriy Kaminskiy yumkam
Fri Dec 31 15:18:28 CET 2010


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.

> to in this function. I don't know which of the two is more correct.




More information about the ffmpeg-devel mailing list