<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">вс, 2 окт. 2022 г., 04:27 Phyllis Smith <<a href="mailto:phylsmith2017@gmail.com">phylsmith2017@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto">more documentation, it seems Adobe products use shared code for this ....</div><div dir="auto"><br></div><div dir="auto"><a href="https://www.rippletraining.com/blog/final-cut-pro-x/understanding-blend-modes-final-cut-pro/" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://www.rippletraining.com/blog/final-cut-pro-x/understanding-blend-modes-final-cut-pro/</a></div></div></blockquote><div><span class="gmail_default" style="font-size:small">Using the above URL for comparison, I used it on current CinGG and HV 4.6.1 for subtract. HV matches and GG does not. So tomorrow I will look at the code that Andrew quoted below to see if </span><span class="gmail_default" style="font-size:small">adding the specific guard corrects the issue. In the attached, top left is HV 4.6.1 and bottom left is GG current with right side the URL.</span></div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">you forgot attach?</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">--quote---</div><div dir="auto"><br></div><div dir="auto"><div dir="auto"><h3 style="line-height:1.04">Subtract</h3>
</div><div dir="auto"><p>Subtract
does what it advertises; the color values of one layer are subtracted
from the other layer. This tends to have a net darkening effect. Pixel
values can’t fall below zero, so negative numbers are rendered to black.</p><p><br></p><p>---end quote---</p><p><br></p><p>in older cingg code (from 4.6.mod era - earliest public code on Google code) I see such construct :</p><p><br></p><p>/data/data/com.termux/files/home/cingg-g~nelerra-4.6.mod/cinelerra/overlayframe.C 4762/69317 UTF-8 6%</p><p> break; \</p><p> case TRANSFER_SUBTRACT: \</p><p> r = (temp_type)output[0] - (temp_type)input1; \</p><p> g = ((temp_type)output[1] - (temp_type)chroma_offset) - \</p><p> ((temp_type)input2 - (temp_type)chroma_offset) + \</p><p> (temp_type)chroma_offset; \</p><p> b = ((temp_type)output[2] - (temp_type)chroma_offset) - \</p><p> ((temp_type)input3 - (temp_type)chroma_offset) + \</p><p> (temp_type)chroma_offset; \</p><p> if(r < 0) r = 0; \</p><p> if(g < 0) g = 0; \</p><p> if(b < 0) b = 0; \</p><p> r = (r * opacity + output[0] * transparency) / max; \</p><p> g = (g * opacity + output[1] * transparency) / max; \</p><p> b = (b * opacity + output[2] * transparency) / max; \ break; \</p><p><br></p><p>---</p><p><br></p><p>so it basically had specific guard against going negative. Not sure if our implementation does the same just in different place?</p><p><br></p><p>I see no specific handling of it in macros ...</p><p><br></p><p><br></p><p>overlayframe.h [----] 38 L:[ 53+ 0 53/615] *(1572/17155b) 001[*][X]</p><p>// ADDITION<--->[(Sa + Da), (Sc + Dc)]</p><p>#define ALPHA_ADDITION(mx, Sa, Da) (Sa + Da)</p><p>#define COLOR_ADDITION(mx, Sc, Sa, Dc, Da) (Sc + Dc)</p><p>#define CHROMA_ADDITION COLOR_ADDITION</p><p><br></p><p>// SUBTRACT<--->[(Sa - Da), (Sc - Dc)]</p><p>#define ALPHA_SUBTRACT(mx, Sa, Da) (Sa - Da)</p><p>#define COLOR_SUBTRACT(mx, Sc, Sa, Dc, Da) (Sc - Dc)</p><p>#define CHROMA_SUBTRACT COLOR_SUBTRACT</p><p><br></p><p>but apparently you can add some comparing here ...just .. it went from two-stage process to single stage for untrained eye and I am not sure where to put those ifs?</p><p><br></p><p><br></p><p><br></p><p><br></p></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">вс, 25 сент. 2022 г., 11:06 Andrew Randrianasulu <<a href="mailto:randrianasulu@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">randrianasulu@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I found Graphics-softlight mode behaving visually close...but not sure how close to CinHV/CV subtract mode ...<div dir="auto"><br></div><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">вс, 25 сент. 2022 г., 10:24 Andrew Randrianasulu <<a href="mailto:randrianasulu@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">randrianasulu@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I was trying to repeat tuto at<div dir="auto"><a href="https://linuxvideoediting.blogspot.com/2022/01/transparent-text-effect-in-Cinelerra-part1.html?m=1" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://linuxvideoediting.blogspot.com/2022/01/transparent-text-effect-in-Cinelerra-part1.html?m=1</a><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">so I loaded video, created empty new vid track, applied 'titles', 'blur' and 'invert video' to _empty track_, then set track's mode to subtract .... result was color inversion of original video on second vid track (</div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div></div>
</blockquote></div></div>
</blockquote></div></div></div>