diff --git a/cinelerra-5.1/cinelerra/overlayframe.h b/cinelerra-5.1/cinelerra/overlayframe.h
index 13c2e4b..4f0f686 100644
--- a/cinelerra-5.1/cinelerra/overlayframe.h
+++ b/cinelerra-5.1/cinelerra/overlayframe.h
@@ -321,6 +321,19 @@ 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); \
+    double alpha_in = 1.0*a*opcty/mx, alpha_out = 1.0*out3*trnsp/mx, total = alpha_in + (1 - alpha_in) * alpha_out; \
+    r = (r * alpha_in + out0 * (1 - alpha_in) * alpha_out) / total; r = aclip(r, mx); \
+    g = (g * alpha_in + out1 * (1 - alpha_in) * alpha_out) / total; g = ofs ? cclip(g, mx) : aclip(g, mx); \
+    b = (b * alpha_in + out2 * (1 - alpha_in) * alpha_out) / total; b = ofs ? cclip(b, mx) : aclip(b, mx); \
+    a = total; \
+  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 +346,7 @@ ZTYP(float);	ZTYP(double);
   } \
   ALPHA_STORE(out, ofs, mx); \
   out[3] = aclip(a, mx)
+*/
 
 #define BLEND_SWITCH(FN) \
 	switch( mode ) { \
