[FFmpeg-devel] [PATCH] swscale alpha channel support
Sat Mar 7 20:48:53 CET 2009
On Sat, Mar 07, 2009 at 10:53:28AM +0100, C?dric Schieli wrote:
> 2009/3/5 Michael Niedermayer <michaelni at gmx.at>:
> > On Thu, Mar 05, 2009 at 03:09:26PM +0100, C?dric Schieli wrote:
> >> 2009/3/2 Michael Niedermayer <michaelni at gmx.at>:
> >> > On Fri, Feb 27, 2009 at 11:30:25PM +0100, C?dric Schieli wrote:
> >> Here is the updated patch set :
> >> #1 : sws_yuva420p_isPlanarYUV.patch
> >> YUVA420P is a planar YUV format, isn't it ?
> > yes, patch ok
> >> #2 : sws_scale_use_4_planes.patch
> >> don't ignore 4th plane
> > ok
> >> #9 : swscale-example_use_alpha.patch
> >> updated
> >> the second hunk in this one needs some explanations :
> >> without it, swscale-example will segfault
> >> even without any of my patches, simply adding a uint16_t** field to
> >> struct SwsContext and av_malloc'ing between 13 and 236 bytes (or 26
> >> and 408 on x86_64) will make swscale-example to segfault (see
> >> bug.diff)
> >> after some debugging, I found that my alpPixBuf data get corrupted somehow
> >> disabling MMX code with --disable-mmx prevent this from happening
> >> running swscale-example under valgrind (even without bug.diff) will segfault
> >> can someone can help on this ?
> > in swscale_internal.h there are #defines that define the offsets of
> > various fields in the struct so the asm can access them, you dont maybe
> > mess that up by adding a field?
> > and if valgrind itself segfaults, that should be reported to the valgrind
> > devs ...
> I finally found out what's going on here.
> In initMMX2HScaler, when chrDstW is not divisible by 4, the last
> filterPos element is initialized on the wrong index (not evenly
> Attached patch fixes it, and gives a nice decrease of ssdU/ssdV in
> swscale-example (see attached swscale-example.log.diff.gz)
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel