FiniteSingularity / obs-composite-blur

A comprehensive blur plugin for OBS that provides several different blur algorithms, and proper compositing.
GNU General Public License v2.0
382 stars 31 forks source link

Compile time `gaussian_kernel_size` #41

Closed illusion0001 closed 1 year ago

FiniteSingularity commented 1 year ago

Hi @illusion0001,

Thank you for the PR. However, for now I am going to leave the fixed gaussian kernel size, as I use it from time to time in development when testing specific parts of the gaussian kernel: e.g. if I only want to include the first N elements of the kernel. Eventually I'll move to a calculated table.

Additionally, the code in your PR would not return the proper value which is the number of elements in the kernel. In order to determine the number of elements (what I'm calling the kernel size), you'd need to do something like:

const size_t gaussian_kernel_size = sizeof(gaussian_kernel) / sizeof(gaussian_kernel[0]);

I do see how my naming convention could be a little confusing- data size vs array length.

All that said, I still appreciate the PR. Cheers!