Bracket the gamma reg values between 0 and 255 properly without causing
an inconsistent value shift when passing these min/max values.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>