[igt-dev] [PATCH i-g-t v2 3/4] lib/igt_color_encoding: Appease c90
Ville Syrjala
ville.syrjala at linux.intel.com
Thu Jun 7 11:43:01 UTC 2018
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
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 at chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
lib/igt_color_encoding.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/lib/igt_color_encoding.c b/lib/igt_color_encoding.c
index fc9edef1e331..f445dbbc0250 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,
--
2.16.4
More information about the igt-dev
mailing list