summaryrefslogtreecommitdiff
path: root/lib/igt_color_encoding.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-06-06 17:56:59 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-06-07 15:05:05 +0300
commit170195b5e744629c334bc8da8d52ee25e4d4cbe4 (patch)
treece8cb0797cbd9577d68c818c97c764fc89c60443 /lib/igt_color_encoding.c
parentd4678419d8c3d7a293fe3d447ca4085bf867e857 (diff)
lib/igt_color_encoding: Appease c90
Apparently we stil build in c90 mode or something with autotools. It doesn't like mixed code and declarations. v2: Do it the sane way (Chris) Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/igt_color_encoding.c')
-rw-r--r--lib/igt_color_encoding.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/igt_color_encoding.c b/lib/igt_color_encoding.c
index fc9edef1..f445dbbc 100644
--- a/lib/igt_color_encoding.c
+++ b/lib/igt_color_encoding.c
@@ -36,11 +36,9 @@ static const struct color_encoding color_encodings[IGT_NUM_COLOR_ENCODINGS] = {
static struct igt_mat4 rgb_to_ycbcr_matrix(const struct color_encoding *e)
{
- float kr, kg, kb;
-
- kr = e->kr;
- kb = e->kb;
- kg = 1.0f - kr - kb;
+ float kr = e->kr;
+ float kb = e->kb;
+ float kg = 1.0f - kr - kb;
struct igt_mat4 ret = {
.d[m(0, 0)] = kr,
@@ -63,11 +61,9 @@ static struct igt_mat4 rgb_to_ycbcr_matrix(const struct color_encoding *e)
static struct igt_mat4 ycbcr_to_rgb_matrix(const struct color_encoding *e)
{
- float kr, kg, kb;
-
- kr = e->kr;
- kb = e->kb;
- kg = 1.0f - kr - kb;
+ float kr = e->kr;
+ float kb = e->kb;
+ float kg = 1.0f - kr - kb;
struct igt_mat4 ret = {
.d[m(0, 0)] = 1.0f,