It came to pass while upgrading swap channels that the ordering of the output layers in OpenGL mode was now non deterministic or reversed.  The same problem began affecting Overlay. Overlay no longer worked at all.

The latest hackathon was so dependent on the gradient plugin, another wish was making the color pickers draw checkers to indicate the alpha level.  A general RGBA filled box is required since every color picker instance draws its own widgets.  The gradient also needs to draw min & max guides. Helas, the circular gradient doesn't work in opengl either.

It would be best to not try to optimize the opengl routines but keep them as analogous to the C versions as possible.  There's no speed penalty.  The gradient was 1 effect where the opengl routines were optimized to a pinhead & particularly intractable.

The checker size needs to be a theme setting, but it's made a lot of progress.

----------------------------------------------------------------------------------------------------------------

The only multichannel video effects are now difference key, overlay, & swap channels.

The trick with overlay is it was never used except for star stacking. It subtracted a dark frame before a time average, sharpen, histogram, white balance.  It's not used in any of the rendering jobs now commonly requiring opengl.  It potentially could be justified in any application using dark frame subtraction & those large floating point frames benefited from opengl.  It's also useful for toggling the ordering of layers without rearranging the timeline.  Divide is 1 which needs a quick toggle.

In hindsight, overlay was abandoned in favor of rendering temporary files with dark frames subtracted.  It was just faster to not have to perform dark frame subtraction while tweeking later stages.

With these factors, it's not worth manetaneing an opengl overlay, but problems still remane with multichannel plugins in general.

-----------------------------------------------------------------------------------------------------------------

Upon a dumping of the states of all the output buffers, it seems the plugins now have to initialize the pbuffers of all their output buffers & clear the unused ones.  If only 1 of them is drawn to using opengl, the results are undefined.  Cinelerra assumes multichannel plugins have blitted to all their outputs.

It was a minor bit to add to the handle_opengl functions.  It quickly fixed overlay & swap channels. If cinelerra initialized the outputs on its own, it could be slower by unnecessarily erasing areas the plugins would erase.  It was all about getting those 4k processing chains to go faster.

The overlay & swap channels only read into 1 buffer at most or a temporary so their outputs were uninitialized.  diffkey read into its maximum of 2 inputs but it's never ever been used.  Finding test footage for diffkey is another matter.  Diffkey was another experiment which just doesn't work.







Comments

Popular posts from this blog