On 10/14/2012 08:13 AM, Ronald S. Bultje wrote:
> Hi,
> 
> On Sat, Oct 13, 2012 at 11:06 PM, Luca Barbato <lu_z...@gentoo.org> wrote:
>> ---
>>
>> Here an initial patch to support many yuva, apparently either I botched
>> adding them (since I did lots of cut and paste) or they manage the expose 
>> some
>> flaws in swscale. valgrind manages to spot something and might be nice if
>> other people try this and see if the values for the fate-lavfi change after
>> each round.
> 
> If this is what I think it is, search for YUVA420P in swscale and
> replace it with a generic alpha check.

libswscale/swscale_unscaled.c:    if ((srcFormat == AV_PIX_FMT_YUV420P
|| srcFormat == AV_PIX_FMT_YUVA420P) &&
libswscale/swscale_unscaled.c:         srcFormat == AV_PIX_FMT_YUVA420P)
&& isAnyRGB(dstFormat) &&
libswscale/swscale_unscaled.c:        (dstFormat == AV_PIX_FMT_YUV420P
|| dstFormat == AV_PIX_FMT_YUVA420P) &&
libswscale/swscale_unscaled.c:        (dstFormat == AV_PIX_FMT_YUV420P
|| dstFormat == AV_PIX_FMT_YUVA420P) &&
libswscale/swscale_unscaled.c:        if (srcFormat ==
AV_PIX_FMT_YUV420P || srcFormat == AV_PIX_FMT_YUVA420P) {
libswscale/swscale_unscaled.c:       (dstFormat == AV_PIX_FMT_YUV420P ||
dstFormat == AV_PIX_FMT_YUVA420P))
libswscale/swscale_unscaled.c:       (dstFormat == AV_PIX_FMT_YUV420P ||
dstFormat == AV_PIX_FMT_YUVA420P))
libswscale/swscale_unscaled.c:        (srcFormat == AV_PIX_FMT_YUVA420P
&& dstFormat == AV_PIX_FMT_YUV420P) ||
libswscale/swscale_unscaled.c:        (srcFormat == AV_PIX_FMT_YUV420P
&& dstFormat == AV_PIX_FMT_YUVA420P) ||

All of those seem to just consider yuva420 as yuv420

libswscale/x86/yuv2rgb.c:        c->srcFormat != AV_PIX_FMT_YUVA420P)
libswscale/x86/yuv2rgb.c:                if (c->srcFormat ==
AV_PIX_FMT_YUVA420P) {
libswscale/x86/yuv2rgb.c:                if (c->srcFormat ==
AV_PIX_FMT_YUVA420P) {
libswscale/yuv2rgb.c:        if (CONFIG_SWSCALE_ALPHA && c->srcFormat ==
AV_PIX_FMT_YUVA420P)
libswscale/yuv2rgb.c:        if (CONFIG_SWSCALE_ALPHA && c->srcFormat ==
AV_PIX_FMT_YUVA420P)

And this is about yuva -> any not any -> yuva

What is strange is that building with clang+asan makes the problem
disappear...

lu

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to