aboutsummaryrefslogtreecommitdiffstats
path: root/gamma.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-09-16 16:23:23 +0200
committerMattias Andrée <maandree@kth.se>2021-09-16 16:23:23 +0200
commit0ae720729039b317276c5c8083a5864d8f99a6cb (patch)
treec307e2295d76cf70e6927db5254f0a0c26ba8bec /gamma.c
parentmisc + change license + remove info manual (diff)
downloadcrt-calibrator-0ae720729039b317276c5c8083a5864d8f99a6cb.tar.gz
crt-calibrator-0ae720729039b317276c5c8083a5864d8f99a6cb.tar.bz2
crt-calibrator-0ae720729039b317276c5c8083a5864d8f99a6cb.tar.xz
Improve makefile, fix uninstall rule, and fix style erros1.3.3
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--gamma.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gamma.c b/gamma.c
index d15f3b6..6cee36a 100644
--- a/gamma.c
+++ b/gamma.c
@@ -11,8 +11,9 @@
* @param contrast Output parameter for the contrast
* @param brightness Output parameter for the brightness
*/
-void gamma_analyse(size_t stops, const uint16_t *restrict ramp, double *restrict gamma,
- double *restrict contrast, double *restrict brightness)
+void
+gamma_analyse(size_t stops, const uint16_t *restrict ramp, double *restrict gamma,
+ double *restrict contrast, double *restrict brightness)
{
double min, middle, max;
*brightness = min = (double)(ramp[0]) / (double)0xFFFF;
@@ -38,7 +39,8 @@ void gamma_analyse(size_t stops, const uint16_t *restrict ramp, double *restrict
* @param contrast The contrast
* @param brightness The brightness
*/
-void gamma_generate(size_t stops, uint16_t *restrict ramp, double gamma, double contrast, double brightness)
+void
+gamma_generate(size_t stops, uint16_t *restrict ramp, double gamma, double contrast, double brightness)
{
double diff = contrast - brightness;
double gamma_ = (double)1 / gamma;