1 // SPDX-License-Identifier: MIT 2 // 3 // Copyright 2024 Advanced Micro Devices, Inc. 4 5 #ifndef __DC_SPL_ISHARP_FILTERS_H__ 6 #define __DC_SPL_ISHARP_FILTERS_H__ 7 8 #include "dc_spl_types.h" 9 10 const uint32_t *spl_get_filter_isharp_1D_lut_0(void); 11 const uint32_t *spl_get_filter_isharp_1D_lut_0p5x(void); 12 const uint32_t *spl_get_filter_isharp_1D_lut_1p0x(void); 13 const uint32_t *spl_get_filter_isharp_1D_lut_1p5x(void); 14 const uint32_t *spl_get_filter_isharp_1D_lut_2p0x(void); 15 const uint32_t *spl_get_filter_isharp_1D_lut_3p0x(void); 16 uint16_t *spl_get_filter_isharp_bs_4tap_in_6_64p(void); 17 uint16_t *spl_get_filter_isharp_bs_4tap_64p(void); 18 uint16_t *spl_get_filter_isharp_bs_3tap_64p(void); 19 const uint16_t *spl_get_filter_isharp_wide_6tap_64p(void); 20 uint16_t *spl_dscl_get_blur_scale_coeffs_64p(int taps); 21 22 #define NUM_SHARPNESS_ADJ_LEVELS 6 23 struct scale_ratio_to_sharpness_level_adj { 24 unsigned int ratio_numer; 25 unsigned int ratio_denom; 26 unsigned int level_down_adj; /* adjust sharpness level down */ 27 }; 28 29 struct isharp_1D_lut_pregen { 30 unsigned int sharpness_numer; 31 unsigned int sharpness_denom; 32 uint32_t value[ISHARP_LUT_TABLE_SIZE]; 33 }; 34 35 enum system_setup { 36 SDR_NL = 0, 37 SDR_L, 38 HDR_NL, 39 HDR_L, 40 NUM_SHARPNESS_SETUPS 41 }; 42 43 void spl_init_blur_scale_coeffs(void); 44 void spl_set_blur_scale_data(struct dscl_prog_data *dscl_prog_data, 45 const struct spl_scaler_data *data); 46 47 void spl_build_isharp_1dlut_from_reference_curve(struct spl_fixed31_32 ratio, enum system_setup setup, 48 struct adaptive_sharpness sharpness, enum scale_to_sharpness_policy scale_to_sharpness_policy); 49 uint32_t *spl_get_pregen_filter_isharp_1D_lut(enum system_setup setup); 50 #endif /* __DC_SPL_ISHARP_FILTERS_H__ */ 51