[Ffmpeg-devel] volunteer for patching pal8 in libswscale

Karl H. Beckers karl.h.beckers
Thu Mar 8 10:35:44 CET 2007


Hi all,

have recently submitted two patches:

1)


khb at ubuntu:~/Quellen/xvidcap/trunk/ffmpeg/libswscale$ diff -Naurw swscale.c.orig swscale.c
--- swscale.c.orig      2007-02-28 09:21:36.000000000 +0100
+++ swscale.c   2007-02-28 09:22:22.000000000 +0100
@@ -116,7 +116,7 @@
                        || (x)==PIX_FMT_NV12 || (x)==PIX_FMT_NV21\
                        || (x)==PIX_FMT_GRAY16BE || (x)==PIX_FMT_GRAY16LE\
                        || (x)==PIX_FMT_GRAY8 || (x)==PIX_FMT_YUV410P)
-#define isPacked(x)    ((x)==PIX_FMT_YUYV422 || (x)==PIX_FMT_UYVY422 ||isRGB(x) || isBGR(x))
+#define isPacked(x)    ((x)==PIX_FMT_PAL8 || (x)==PIX_FMT_YUYV422 || (x)==PIX_FMT_UYVY422 ||isRGB(x) || isBGR(x))
 
 #define RGB2YUV_SHIFT 16
 #define BY ((int)( 0.098*(1<<RGB2YUV_SHIFT)+0.5))


this one Michael approved and said I need to pester some of the folks he
delegated patching to (though he used not exactly the same words ;) ).

But who would that be?
It's not like I found a list of people to turn to anywhere. Is there a
volunteer?



2)

--- rgb2rgb.c.orig      2007-03-05 10:53:26.000000000 +0100
+++ rgb2rgb.c   2007-03-05 11:44:46.000000000 +0100
@@ -358,12 +358,13 @@
                        dst[3]= palette[ src[i]*4+2 ];
                        dst[2]= palette[ src[i]*4+1 ];
                        dst[1]= palette[ src[i]*4+0 ];
+                       dst[0]= 0;
                #else
                //FIXME slow?
                        dst[0]= palette[ src[i]*4+2 ];
                        dst[1]= palette[ src[i]*4+1 ];
                        dst[2]= palette[ src[i]*4+0 ];
-                       //dst[3]= 0; /* do we need this cleansing? */
+                       dst[3]= 0;
                #endif
                dst+= 4;
        }
@@ -378,12 +379,13 @@
                        dst[3]= palette[ src[i]*4+0 ];
                        dst[2]= palette[ src[i]*4+1 ];
                        dst[1]= palette[ src[i]*4+2 ];
+                       dst[0]= 0;
                #else
                        //FIXME slow?
                        dst[0]= palette[ src[i]*4+0 ];
                        dst[1]= palette[ src[i]*4+1 ];
                        dst[2]= palette[ src[i]*4+2 ];
-                       //dst[3]= 0; /* do we need this cleansing? */
+                       dst[3]= 0;
                #endif
                
                dst+= 4;


this one has gone quite unnoticed and has not been approved, yet.
But the major thing, as you can see, is that I can answer the question
in the comment with "yes". We need to make sure the alpha value is set
to a defined correct value, because I have found at least one case where
not doing so yields transparent images (when encoding to png, e.g.).

TIA,

Karl.






More information about the ffmpeg-devel mailing list