open-source cross-platform real-time video effects plugin system
open-source cross-platform real-time video effects plugin system
Photoshop-style brightness/contrast filter.
PARAMETERS
1. Brightness: 0 = minimum, .5 = normal, 1 = maximum
2. Contrast: 0 = all gray, .5 = normal, 1 = thresholding
MMX optimized. Supports 32-bit color only.
To exactly emulate Photoshop's behavior, the brightness parameter is scaled by 40%, and therefore does not saturate to black/white. Note that when reducing Contrast, Brightness is applied first, whereas when increasing Contrast, Brightness is applied afterwards. Also note that maximum Contrast (thresholding) is handled as a special case, since it would otherwise cause a divide by zero.