diff options
Diffstat (limited to 'lib/mesa/src/gallium/state_trackers/xvmc/attributes.c')
-rw-r--r-- | lib/mesa/src/gallium/state_trackers/xvmc/attributes.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/mesa/src/gallium/state_trackers/xvmc/attributes.c b/lib/mesa/src/gallium/state_trackers/xvmc/attributes.c index 6e4d78a9a..2d8f00ba7 100644 --- a/lib/mesa/src/gallium/state_trackers/xvmc/attributes.c +++ b/lib/mesa/src/gallium/state_trackers/xvmc/attributes.c @@ -90,15 +90,15 @@ Status XvMCSetAttribute(Display *dpy, XvMCContext *context, Atom attribute, int if (!attr) return XvMCBadContext; - if (strcmp(attr, XV_BRIGHTNESS) == 0) + if (strcmp(attr, XV_BRIGHTNESS)) context_priv->procamp.brightness = value / 1000.0f; - else if (strcmp(attr, XV_CONTRAST) == 0) + else if (strcmp(attr, XV_CONTRAST)) context_priv->procamp.contrast = value / 1000.0f + 1.0f; - else if (strcmp(attr, XV_SATURATION) == 0) + else if (strcmp(attr, XV_SATURATION)) context_priv->procamp.saturation = value / 1000.0f + 1.0f; - else if (strcmp(attr, XV_HUE) == 0) + else if (strcmp(attr, XV_HUE)) context_priv->procamp.hue = value / 1000.0f; - else if (strcmp(attr, XV_COLORSPACE) == 0) + else if (strcmp(attr, XV_COLORSPACE)) context_priv->color_standard = value ? VL_CSC_COLOR_STANDARD_BT_601 : VL_CSC_COLOR_STANDARD_BT_709; @@ -110,7 +110,7 @@ Status XvMCSetAttribute(Display *dpy, XvMCContext *context, Atom attribute, int context_priv->color_standard, &context_priv->procamp, true, &csc ); - vl_compositor_set_csc_matrix(&context_priv->cstate, (const vl_csc_matrix *)&csc, 1.0f, 0.0f); + vl_compositor_set_csc_matrix(&context_priv->cstate, (const vl_csc_matrix *)&csc); XVMC_MSG(XVMC_TRACE, "[XvMC] Set attribute %s to value %d.\n", attr, value); @@ -134,15 +134,15 @@ Status XvMCGetAttribute(Display *dpy, XvMCContext *context, Atom attribute, int if (!attr) return XvMCBadContext; - if (strcmp(attr, XV_BRIGHTNESS) == 0) + if (strcmp(attr, XV_BRIGHTNESS)) *value = context_priv->procamp.brightness * 1000; - else if (strcmp(attr, XV_CONTRAST) == 0) + else if (strcmp(attr, XV_CONTRAST)) *value = context_priv->procamp.contrast * 1000 - 1000; - else if (strcmp(attr, XV_SATURATION) == 0) + else if (strcmp(attr, XV_SATURATION)) *value = context_priv->procamp.saturation * 1000 + 1000; - else if (strcmp(attr, XV_HUE) == 0) + else if (strcmp(attr, XV_HUE)) *value = context_priv->procamp.hue * 1000; - else if (strcmp(attr, XV_COLORSPACE) == 0) + else if (strcmp(attr, XV_COLORSPACE)) *value = context_priv->color_standard == VL_CSC_COLOR_STANDARD_BT_709; else return BadName; |