<div dir="ltr"><div class="gmail_default" style="font-size:small">Checked into source GIT, the tone mapping SYSLIB blend program plugin addition from Andrea.</div><div class="gmail_default" style="font-size:small">Checked into manual GIT, the attached tex file changes for HDR/clipping stuff exactly as provided by Andrea.</div><div class="gmail_default" style="font-size:small">Appended Examples.txt to add Example 6 tone mapping description exactly as provided by Andrea.</div><div class="gmail_default" style="font-size:small">(Andrea, please verify correctness in case I made a mistake). Thank you.<br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Apr 2, 2025 at 2:32 AM Andrea paz <<a href="mailto:gamberucci.andrea@gmail.com">gamberucci.andrea@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have included some small adds in the manual that deal with HDR. See<br>
if they fit. There would also be to change the Blend Algebra examples<br>
file written by Georgy.<br>
<br>
[Part to append to the file<br>
<a href="https://cinelerra-gg.org/download/testing/BlendPluginExamples/Examples.txt" rel="noreferrer" target="_blank">https://cinelerra-gg.org/download/testing/BlendPluginExamples/Examples.txt</a>]:<br>
<br>
<br>
Example 6.<br>
----------<br>
<br>
To tonemapping an HDR media and report its values within the range (0, 1.0):<br>
<br>
BLEND_PROGRAM_INIT<br>
<br>
COLORSPACE_RGB<br>
PARALLEL_SAFE<br>
<br>
BLEND_PROGRAM_PROC<br>
<br>
float mult;<br>
<br>
mult = KEY_A-0.5;<br>
if (mult >= 0) mult = 1+mult*10;<br>
else mult = 1/(1-mult*10);<br>
<br>
R(0) = R(0)*mult;<br>
G(0) = G(0)*mult;<br>
B(0) = B(0)*mult;<br>
<br>
BLEND_PROGRAM_END<br>
<br>
<br>
First attach this blend program to your track above the other plugin<br>
which you want to make not to clip. Switch clipping off in the blend<br>
program dialog. This blend program will use the alpha slider (which<br>
can have the value between 0.0 and 1.0) in the following manner:<br>
<br>
0.5 (exactly in the middle): no RGB change<br>
0.6: R,G,B are multiplied by 2<br>
0.7: multiplied by 3<br>
...<br>
1.0: multiplied by 6<br>
0.4: multiplied by 1/2 (i.e. divided by 2)<br>
0.3: multiplied by 1/3<br>
...<br>
0.0: multiplied by 1/6 (divided by 6)<br>
<br>
If you set it, for example, to 0.4 here, your R,G,B values will be<br>
divided by 2, so that the color values up to 2.0 will be scaled down<br>
into the clip range. If you can have values up to, let's say, 5.0,<br>
then set the alpha slider to 0.1 to scale down by 5, etc.<br>
<br>
Then attach the plugin you need to work unclipped, your histogram or<br>
whatever. Pay attention that all the color values your plugin gets<br>
now, are scaled down uniformly.<br>
<br>
Then attach the same blend program once more, under your needed<br>
plugin. This time set the alpha slider to 0.6 (if it is 0.4 in the<br>
upper one), or to 0.9 (if the upper one is 0.1), i.e. displace it from<br>
the middle in the opposite direction. The unclipped values coming from<br>
your working plugin will be scaled back by the same amount.<br>
</blockquote></div>