[Ffmpeg-devel] swscale and 64 bit problem (mmx code)
Giancarlo Formicuccia
giancarlo.formicuccia
Thu Mar 1 15:49:46 CET 2007
Alle 12:17, gioved? 1 marzo 2007, Reimar D?ffinger ha scritto:
> Hello,
>
> On Thu, Mar 01, 2007 at 01:18:12PM +0000, Giancarlo Formicuccia wrote:
> > libswscale seems to be unsafe on 64 bit platforms. The problem is
> > the 32-bit chrMmxFilter array of SwsContext, because it stores
> > pointers to allocated memory (lumMmxFilter has probably the same
> > issue).
>
> [...]
>
> > Fixing the code is not trivial, due to the many hardcoded values in the
> > asm code... Ideas?
>
> Well, the non-SWS_ACCURATE_RND case is trivial to fix I think, see attached
> patch.
>
> Greetings,
> Reimar D?ffinger
Yes it works. Lukily, the [4*i+1] param is unused if !SWS_ACCURATE_RND.
Now that I look closer -- the SWS_ACCURATE_RND case crashes 100% anyway, no
matter where the memory gets from. Maybe it should be disabled for 64 bit
builds, until it's fixed...
Thanks,
Giancarlo
More information about the ffmpeg-devel
mailing list