14a49301eSmrg/**************************************************************************
24a49301eSmrg *
3b167d5e7Smrg * Copyright 2009 Younes Manton.
44a49301eSmrg * All Rights Reserved.
54a49301eSmrg *
64a49301eSmrg * Permission is hereby granted, free of charge, to any person obtaining a
74a49301eSmrg * copy of this software and associated documentation files (the
84a49301eSmrg * "Software"), to deal in the Software without restriction, including
94a49301eSmrg * without limitation the rights to use, copy, modify, merge, publish,
104a49301eSmrg * distribute, sub license, and/or sell copies of the Software, and to
114a49301eSmrg * permit persons to whom the Software is furnished to do so, subject to
124a49301eSmrg * the following conditions:
134a49301eSmrg *
144a49301eSmrg * The above copyright notice and this permission notice (including the
154a49301eSmrg * next paragraph) shall be included in all copies or substantial portions
164a49301eSmrg * of the Software.
174a49301eSmrg *
184a49301eSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
194a49301eSmrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
204a49301eSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
214a49301eSmrg * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
224a49301eSmrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
234a49301eSmrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
244a49301eSmrg * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
254a49301eSmrg *
264a49301eSmrg **************************************************************************/
274a49301eSmrg
28b167d5e7Smrg#ifndef vl_csc_h
29b167d5e7Smrg#define vl_csc_h
304a49301eSmrg
31b167d5e7Smrg#include "pipe/p_compiler.h"
324a49301eSmrg
33b167d5e7Smrgtypedef float vl_csc_matrix[3][4];
344a49301eSmrg
35b167d5e7Smrgstruct vl_procamp
36b167d5e7Smrg{
37b167d5e7Smrg   float brightness;
38b167d5e7Smrg   float contrast;
39b167d5e7Smrg   float saturation;
40b167d5e7Smrg   float hue;
41b167d5e7Smrg};
424a49301eSmrg
43b167d5e7Smrgenum VL_CSC_COLOR_STANDARD
44b167d5e7Smrg{
45b167d5e7Smrg   VL_CSC_COLOR_STANDARD_IDENTITY,
46b167d5e7Smrg   VL_CSC_COLOR_STANDARD_BT_601,
47b167d5e7Smrg   VL_CSC_COLOR_STANDARD_BT_709,
487e995a2eSmrg   VL_CSC_COLOR_STANDARD_SMPTE_240M,
497e995a2eSmrg   VL_CSC_COLOR_STANDARD_BT_709_REV
50b167d5e7Smrg};
514a49301eSmrg
52b167d5e7Smrgextern const struct vl_procamp vl_default_procamp;
534a49301eSmrg
54b167d5e7Smrgvoid vl_csc_get_matrix(enum VL_CSC_COLOR_STANDARD cs,
55b167d5e7Smrg                       struct vl_procamp *procamp,
56b167d5e7Smrg                       bool full_range,
57b167d5e7Smrg                       vl_csc_matrix *matrix);
584a49301eSmrg
59b167d5e7Smrg#endif /* vl_csc_h */
60