From f24eb5a17830b8137045a626dbd55e75ed5e708d Mon Sep 17 00:00:00 2001 From: Nayan Deshmukh Date: Wed, 8 Jun 2016 14:52:48 +0530 Subject: vl: Apply luma key filter before CSC conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the luma key filter to the YCbCr values during the CSC conversion in video buffer shader. The initial values of max and min luma are set to opposite values to disable the filter initially and will be set when enabling it. Add extra parmeters min and max luma for the luma key filter in vl_compositor_set_csc_matrix in va, xvmc. Setting them to opposite value 1.f and 0.f respectively won't effect the CSC conversion v2: -Squash 1,2 and 3 into one patch to avoid breaking build of other components. (Christian) -use ureg_swizzle. (Christian) -change name of the variables. (Christian) v3: -Squash all patches in one to avoid breaking of build. (Emil) -wrap functions properly. (Emil) -use 0.0f and 1.0f instead of 0.f and 1.f respectively. (Emil) v4: -Divide it in two patches one which introduces the functionality and assigs dummy values to the changed functions and second which implements the lumakey filter. (Christian) -use ureg_scalar instead ureg_swizzle. (Christian) Signed-off-by: Nayan Deshmukh Reviewed-by: Christian König --- src/gallium/state_trackers/va/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/state_trackers/va') diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c index 51abd87cc4e..402fbb23497 100644 --- a/src/gallium/state_trackers/va/context.c +++ b/src/gallium/state_trackers/va/context.c @@ -159,7 +159,7 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx) vl_compositor_init_state(&drv->cstate, drv->pipe); vl_csc_get_matrix(VL_CSC_COLOR_STANDARD_BT_601, NULL, true, &drv->csc); - vl_compositor_set_csc_matrix(&drv->cstate, (const vl_csc_matrix *)&drv->csc); + vl_compositor_set_csc_matrix(&drv->cstate, (const vl_csc_matrix *)&drv->csc, 1.0f, 0.0f); pipe_mutex_init(drv->mutex); ctx->pDriverData = (void *)drv; -- cgit v1.2.3