open-source cross-platform real-time video effects plugin system

ContrastPS

Freeframe ID: 
BCPS
Number of Inputs: 
1
Platform: 
Windows
Plugin Type: 
Effect
License: 
Open Source
Freeframe Version: 
FF 1.0x
Developer: 
Chris Korda

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.