Path: blob/21.2-virgl/src/gallium/auxiliary/vl/vl_csc.h
4565 views
/**************************************************************************1*2* Copyright 2009 Younes Manton.3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sub license, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial portions15* of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS18* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.20* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR21* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,22* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE23* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.24*25**************************************************************************/2627#ifndef vl_csc_h28#define vl_csc_h2930#include "pipe/p_compiler.h"3132typedef float vl_csc_matrix[3][4];3334struct vl_procamp35{36float brightness;37float contrast;38float saturation;39float hue;40};4142enum VL_CSC_COLOR_STANDARD43{44VL_CSC_COLOR_STANDARD_IDENTITY,45VL_CSC_COLOR_STANDARD_BT_601,46VL_CSC_COLOR_STANDARD_BT_709,47VL_CSC_COLOR_STANDARD_SMPTE_240M,48VL_CSC_COLOR_STANDARD_BT_709_REV49};5051extern const struct vl_procamp vl_default_procamp;5253void vl_csc_get_matrix(enum VL_CSC_COLOR_STANDARD cs,54struct vl_procamp *procamp,55bool full_range,56vl_csc_matrix *matrix);5758#endif /* vl_csc_h */596061