Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2016 Advanced Micro Devices, Inc.
0003  *
0004  * Permission is hereby granted, free of charge, to any person obtaining a
0005  * copy of this software and associated documentation files (the "Software"),
0006  * to deal in the Software without restriction, including without limitation
0007  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
0008  * and/or sell copies of the Software, and to permit persons to whom the
0009  * Software is furnished to do so, subject to the following conditions:
0010  *
0011  * The above copyright notice and this permission notice shall be included in
0012  * all copies or substantial portions of the Software.
0013  *
0014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
0017  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
0018  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
0019  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0020  * OTHER DEALINGS IN THE SOFTWARE.
0021  *
0022  * Authors: AMD
0023  *
0024  */
0025 
0026 #ifndef MOD_SHARED_H_
0027 #define MOD_SHARED_H_
0028 
0029 enum color_transfer_func {
0030     TRANSFER_FUNC_UNKNOWN,
0031     TRANSFER_FUNC_SRGB,
0032     TRANSFER_FUNC_BT709,
0033     TRANSFER_FUNC_PQ2084,
0034     TRANSFER_FUNC_PQ2084_INTERIM,
0035     TRANSFER_FUNC_LINEAR_0_1,
0036     TRANSFER_FUNC_LINEAR_0_125,
0037     TRANSFER_FUNC_GAMMA_22,
0038     TRANSFER_FUNC_GAMMA_26
0039 };
0040 
0041 enum vrr_packet_type {
0042     PACKET_TYPE_VRR,
0043     PACKET_TYPE_FS_V1,
0044     PACKET_TYPE_FS_V2,
0045     PACKET_TYPE_FS_V3,
0046     PACKET_TYPE_VTEM
0047 };
0048 
0049 union lut3d_control_flags {
0050     unsigned int raw;
0051     struct {
0052         unsigned int do_chroma_scale                :1;
0053         unsigned int spec_version               :3;
0054         unsigned int use_zero_display_black         :1;
0055         unsigned int use_zero_source_black          :1;
0056         unsigned int force_display_black            :6;
0057         unsigned int apply_display_gamma            :1;
0058         unsigned int exp_shaper_max             :6;
0059         unsigned int unity_3dlut                :1;
0060         unsigned int bypass_3dlut               :1;
0061         unsigned int use_3dlut                  :1;
0062         unsigned int less_than_dcip3                :1;
0063         unsigned int override_lum               :1;
0064         unsigned int use_gamut_map_lib                  :1;
0065         unsigned int chromatic_adaptation_src               :1;
0066         unsigned int chromatic_adaptation_dst               :1;
0067         unsigned int do_blender_lut_degamma     :1;
0068         unsigned int reseved                    :4;
0069     } bits;
0070 };
0071 
0072 enum tm_show_option_internal {
0073     tm_show_option_internal_single_file     = 0,/*flags2 not in use*/
0074     tm_show_option_internal_duplicate_file,     /*use flags2*/
0075     tm_show_option_internal_duplicate_sidebyside/*use flags2*/
0076 };
0077 
0078 enum lut3d_control_gamut_map {
0079     lut3d_control_gamut_map_none = 0,
0080     lut3d_control_gamut_map_tonemap,
0081     lut3d_control_gamut_map_chto,
0082     lut3d_control_gamut_map_chso,
0083     lut3d_control_gamut_map_chci
0084 };
0085 
0086 enum lut3d_control_rotation_mode {
0087     lut3d_control_rotation_mode_none = 0,
0088     lut3d_control_rotation_mode_hue,
0089     lut3d_control_rotation_mode_cc,
0090     lut3d_control_rotation_mode_hue_cc
0091 };
0092 
0093 struct lut3d_settings {
0094     unsigned char version;
0095     union lut3d_control_flags flags;
0096     union lut3d_control_flags flags2;
0097     enum tm_show_option_internal option;
0098     unsigned int min_lum;/*multiplied by 100*/
0099     unsigned int max_lum;
0100     unsigned int min_lum2;
0101     unsigned int max_lum2;
0102     enum lut3d_control_gamut_map map;
0103     enum lut3d_control_rotation_mode rotation;
0104     enum lut3d_control_gamut_map map2;
0105     enum lut3d_control_rotation_mode rotation2;
0106 };
0107 
0108 #endif /* MOD_SHARED_H_ */