diff --git a/cinelerra-5.1/cinelerra/overlayframe.h b/cinelerra-5.1/cinelerra/overlayframe.h
index 13c2e4b..f72e518 100644
--- a/cinelerra-5.1/cinelerra/overlayframe.h
+++ b/cinelerra-5.1/cinelerra/overlayframe.h
@@ -321,6 +321,21 @@ ZTYP(float);	ZTYP(double);
   } \
   ALPHA_STORE(out, ofs, mx)
 
+#define ALPHA4_STORE(out, ofs, mx) \
+  r = aclip(r, mx); \
+  g = ofs ? cclip(g, mx) : aclip(g, mx); \
+  b = ofs ? cclip(b, mx) : aclip(b, mx); \
+  if( trnsp ) { \
+    double alpha_in = 1.0*a*opcty/mx, alpha_out = 1.0*out3*trnsp/mx, total = alpha_in + alpha_out; \
+    r = (r * alpha_in + out0 * alpha_out) / total; \
+    g = (g * alpha_in + out1 * alpha_out) / total; \
+    b = (b * alpha_in + out2 * alpha_out) / total; \
+    a = (a * opcty + out3 * trnsp) / mx; \
+  } \
+  ALPHA_STORE(out, ofs, mx); \
+  out[3] = aclip(a, mx)
+
+/*
 #define ALPHA4_STORE(out, ofs, mx) \
   r = aclip(r, mx); \
   g = ofs ? cclip(g, mx) : aclip(g, mx); \
@@ -333,6 +348,7 @@ ZTYP(float);	ZTYP(double);
   } \
   ALPHA_STORE(out, ofs, mx); \
   out[3] = aclip(a, mx)
+*/
 
 #define BLEND_SWITCH(FN) \
 	switch( mode ) { \
