{
unsigned int width, height;
- if (vinfo->viu_color_fmt == COLOR_FMT_RGB444)
+ if (vinfo_lcd_support())
return 0;
width = (vf->type & VIDTYPE_COMPRESS) ?
{
if (lut_sel == VPP_LUT_EOTF) {
/* eotf lut 2048 */
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444) {
+ if (!vinfo_lcd_support()) {
if (video_lut_swtich == 1)
/*350nit alpha_low = 0.12; */
set_vpp_lut(VPP_LUT_EOTF,
CSC_ON);
} else if (lut_sel == VPP_LUT_OETF) {
/* oetf lut bypass */
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444) {
+ if (!vinfo_lcd_support()) {
if (video_lut_swtich == 1)
set_vpp_lut(VPP_LUT_OETF,
oetf_289_gamma22_mapping_level1_box,
vpp_lut_curve_set(VPP_LUT_OETF, vinfo);
/* xvyccc matrix3: bypass */
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444)
+ if (!vinfo_lcd_support())
set_vpp_matrix(VPP_MATRIX_XVYCC,
RGB709_to_YUV709l_coeff,
CSC_ON);
/* xvyccc matrix3: RGB to YUV */
/* other cases */
/* xvyccc matrix3: bypass */
- if ((vinfo->viu_color_fmt != COLOR_FMT_RGB444) &&
+ if ((!vinfo_lcd_support()) &&
(get_cpu_type() == MESON_CPU_MAJOR_ID_GXTVBB))
vpp_set_matrix3(CSC_ON, VPP_MATRIX_RGB_YUV709);
else
CSC_ON);
/* xvyccc matrix3: bypass */
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444)
+ if (!vinfo_lcd_support())
set_vpp_matrix(VPP_MATRIX_XVYCC,
RGB709_to_YUV709l_coeff,
CSC_ON);
/* xvyccc matrix3: RGB to YUV */
/* other cases */
/* xvyccc matrix3: bypass */
- if ((vinfo->viu_color_fmt != COLOR_FMT_RGB444) &&
+ if ((!vinfo_lcd_support()) &&
(get_cpu_type() == MESON_CPU_MAJOR_ID_GXTVBB))
vpp_set_matrix3(CSC_ON, VPP_MATRIX_RGB_YUV709);
else
if ((csc_type == VPP_MATRIX_BT2020YUV_BT2020RGB) &&
((sink_hdr_support(vinfo) &
(HDR_SUPPORT | HLG_SUPPORT)) &&
- (vinfo->viu_color_fmt != COLOR_FMT_RGB444))) {
+ (!vinfo_lcd_support()))) {
if (get_hdr_type() & HLG_FLAG)
hdr_func(OSD1_HDR,
SDR_HLG | hdr_ex, vinfo, NULL);
/*(VIU_OSD1_BLK0_CFG_W0,0, 7, 1);*/
if ((csc_type == VPP_MATRIX_BT2020YUV_BT2020RGB) &&
((sink_hdr_support(vinfo) & HDR_SUPPORT) &&
- (vinfo->viu_color_fmt != COLOR_FMT_RGB444))) {
+ (!vinfo_lcd_support()))) {
/* OSD convert to HDR to match HDR video */
/* osd eotf lut 709 */
if (get_hdr_type() & HLG_FLAG) {
bypass_coeff,
CSC_OFF); /* limit->limit range */
else {
- if (vinfo->viu_color_fmt == COLOR_FMT_RGB444) {
+ if (vinfo_lcd_support()) {
if (signal_range == 0) {/* limit range */
if (csc_type == VPP_MATRIX_YUV601_RGB)
set_vpp_matrix(VPP_MATRIX_VD1,
}
/* post matrix bypass */
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444)
+ if (!vinfo_lcd_support())
/* yuv2rgb for eye protect mode */
set_vpp_matrix(VPP_MATRIX_POST,
bypass_coeff,
CSC_OFF);
/* xvycc matrix full2limit or bypass */
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444) {
+ if (!vinfo_lcd_support()) {
if (csc_type == VPP_MATRIX_BT2020YUV_BT2020RGB)
set_vpp_matrix(VPP_MATRIX_XVYCC,
bypass_coeff,
/* xvyccc matrix3: RGB to YUV */
/* other cases */
/* xvyccc matrix3: bypass */
- if ((vinfo->viu_color_fmt != COLOR_FMT_RGB444) &&
+ if ((!vinfo_lcd_support()) &&
(get_cpu_type() == MESON_CPU_MAJOR_ID_GXTVBB))
vpp_set_matrix3(CSC_ON, VPP_MATRIX_RGB_YUV709);
else
/*(VIU_OSD1_BLK0_CFG_W0,0, 7, 1);*/
if ((csc_type == VPP_MATRIX_BT2020YUV_BT2020RGB) &&
((sink_hdr_support(vinfo) & HDR_SUPPORT) &&
- (vinfo->viu_color_fmt != COLOR_FMT_RGB444))) {
+ (!vinfo_lcd_support()))) {
/* OSD convert to HDR to match HDR video */
/* osd eotf lut 709 */
if (get_hdr_type() & HLG_FLAG)
bypass_coeff,
CSC_OFF); /* limit->limit range */
else {
- if (vinfo->viu_color_fmt == COLOR_FMT_RGB444) {
+ if (vinfo_lcd_support()) {
if (signal_range == 0) {/* limit range */
if (csc_type == VPP_MATRIX_YUV601_RGB)
set_vpp_matrix(VPP_MATRIX_VD1,
}
/* post matrix bypass */
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444)
+ if (!vinfo_lcd_support())
/* yuv2rgb for eye protect mode */
set_vpp_matrix(VPP_MATRIX_POST,
YUV709l_to_YUV2020_coeff,
CSC_OFF);
/* xvycc matrix full2limit or bypass */
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444) {
+ if (!vinfo_lcd_support()) {
if (csc_type == VPP_MATRIX_BT2020YUV_BT2020RGB)
set_vpp_matrix(VPP_MATRIX_XVYCC,
bypass_coeff,
/* xvyccc matrix3: RGB to YUV */
/* other cases */
/* xvyccc matrix3: bypass */
- if ((vinfo->viu_color_fmt != COLOR_FMT_RGB444) &&
+ if ((!vinfo_lcd_support()) &&
(get_cpu_type() == MESON_CPU_MAJOR_ID_GXTVBB))
vpp_set_matrix3(CSC_ON, VPP_MATRIX_RGB_YUV709);
else
/* 0, 7, 1); */
if ((csc_type == VPP_MATRIX_BT2020YUV_BT2020RGB) &&
((sink_hdr_support(vinfo) & HDR_SUPPORT) &&
- (vinfo->viu_color_fmt != COLOR_FMT_RGB444))) {
+ (!vinfo_lcd_support()))) {
/* OSD convert to HDR to match HDR video */
/* osd eotf lut 709 */
if (get_hdr_type() & HLG_FLAG)
CSC_ON);
/* post matrix bypass */
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444)
+ if (!vinfo_lcd_support())
/* yuv2rgb for eye protect mode */
set_vpp_matrix(VPP_MATRIX_POST,
YUV2020l_to_RGB2020_coeff,
CSC_ON);
/* xvycc matrix full2limit or bypass */
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444) {
+ if (!vinfo_lcd_support()) {
if (csc_type == VPP_MATRIX_BT2020YUV_BT2020RGB)
set_vpp_matrix(VPP_MATRIX_XVYCC,
RGB2020_to_YUV2020l_coeff,
/* xvyccc matrix3: RGB to YUV */
/* other cases */
/* xvyccc matrix3: bypass */
- if ((vinfo->viu_color_fmt != COLOR_FMT_RGB444) &&
+ if ((!vinfo_lcd_support()) &&
(get_cpu_type() == MESON_CPU_MAJOR_ID_GXTVBB))
vpp_set_matrix3(CSC_ON, VPP_MATRIX_RGB_YUV709);
else
enum vd_path_e vd_path,
enum hdr_type_e *source_type)
{
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444) {
+ if (!vinfo_lcd_support()) {
if (get_cpu_type() >= MESON_CPU_MAJOR_ID_G12A) {
if (vd_path == VD1_PATH)
hdr_func(VD1_HDR,
sdr_process_mode[vd_path])
return 0;
- if (vinfo->viu_color_fmt == COLOR_FMT_RGB444)
+ if (vinfo_lcd_support())
return 0;
/* post matrix bypass */
if (sdr_mode == 2) { /* auto */
if ((sink_hdr_support(vinfo) & HDR_SUPPORT) &&
((cpu_after_eq(MESON_CPU_MAJOR_ID_GXL)) &&
- (vinfo->viu_color_fmt != COLOR_FMT_RGB444)))
+ (!vinfo_lcd_support())))
/*box sdr->hdr*/
sdr_process_mode[vd_path] = PROC_SDR_TO_HDR;
- else if ((vinfo->viu_color_fmt == COLOR_FMT_RGB444) &&
+ else if ((vinfo_lcd_support()) &&
((get_cpu_type() == MESON_CPU_MAJOR_ID_GXTVBB) ||
(get_cpu_type() == MESON_CPU_MAJOR_ID_TXL)))
/*tv sdr->hdr*/
static int sink_support_hdr10_plus(const struct vinfo_s *vinfo)
{
/* panel output and TL1 and TM2 */
- if ((vinfo->viu_color_fmt == COLOR_FMT_RGB444) &&
+ if ((vinfo_lcd_support()) &&
((get_cpu_type() == MESON_CPU_MAJOR_ID_TL1) ||
(get_cpu_type() == MESON_CPU_MAJOR_ID_TM2)))
return 1;
if (vinfo->vout_device)
vdev = vinfo->vout_device;
- if ((vinfo->viu_color_fmt != COLOR_FMT_RGB444) &&
+ if ((!vinfo_lcd_support()) &&
((sink_hdr_support(vinfo) &
(HDR_SUPPORT | HLG_SUPPORT)) ||
(signal_change_flag & SIG_HDR_SUPPORT) ||
}
if (get_cpu_type() >= MESON_CPU_MAJOR_ID_G12A) {
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444)
+ if (!vinfo_lcd_support())
mtx_setting(POST2_MTX, MATRIX_NULL, MTX_OFF);
else {
if (vf && vf->type & VIDTYPE_RGB_444 &&
/* gxl handle sdr_mode change bug fix. */
if ((sink_hdr_support(vinfo) & HDR_SUPPORT) &&
!cpu_after_eq(MESON_CPU_MAJOR_ID_G12A) &&
- vinfo->viu_color_fmt != COLOR_FMT_RGB444) {
+ !vinfo_lcd_support()) {
if (sdr_mode != cur_sdr_mode) {
force_fake = true;
cur_sdr_mode = sdr_mode;
if (is_video_layer_on(vd_path) &&
(sink_hdr_support(vinfo) & HDR_SUPPORT) &&
((cpu_after_eq(MESON_CPU_MAJOR_ID_GXL)) &&
- (vinfo->viu_color_fmt != COLOR_FMT_RGB444))) {
+ (!vinfo_lcd_support()))) {
if (cpu_after_eq(MESON_CPU_MAJOR_ID_G12A)) {
if (sdr_mode != cur_sdr_mode) {
null_vf_cnt[vd_path] = 0;
int i;
int offset = 0;
int dnlp_reg = 0;
- struct vinfo_s *vinfo = get_current_vinfo();
if (cpu_after_eq(MESON_CPU_MAJOR_ID_TM2)) {
if (is_meson_rev_a() && is_meson_tm2_cpu())
WRITE_VPP_REG(SRSHARP1_DNLP_00 + i,
ve_dnlp_reg[i]);
} else if (cpu_after_eq(MESON_CPU_MAJOR_ID_TL1)) {
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444)
+ if (!vinfo_lcd_support())
dnlp_reg = SHARP0_DNLP_00 + offset;
else
dnlp_reg = SHARP1_DNLP_00 + offset;
int i;
int offset = 0;
int dnlp_reg = 0;
- struct vinfo_s *vinfo = get_current_vinfo();
if (cpu_after_eq(MESON_CPU_MAJOR_ID_TM2)) {
if (is_meson_rev_a() && is_meson_tm2_cpu())
WRITE_VPP_REG(SRSHARP1_DNLP_00 + i,
ve_dnlp_reg[i]);
} else if (cpu_after_eq(MESON_CPU_MAJOR_ID_TL1)) {
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444)
+ if (!vinfo_lcd_support())
dnlp_reg = SHARP0_DNLP_00 + offset;
else
dnlp_reg = SHARP1_DNLP_00 + offset;
{
int m[24];
int i;
- struct vinfo_s *vinfo = get_current_vinfo();
+
/* write to registers */
if (video_rgb_ogo_xvy_mtx) {
if (video_rgb_ogo_xvy_mtx_latch & MTX_BYPASS_RGB_OGO) {
m[10] = p->g_gain * m[10] / COEFF_NORM(1.0);
m[11] = p->b_gain * m[11] / COEFF_NORM(1.0);
- if (vinfo->viu_color_fmt == COLOR_FMT_RGB444) {
+ if (vinfo_lcd_support()) {
m[18] = (p->r_pre_offset + m[18] + 1024)
* p->r_gain / COEFF_NORM(1.0)
- p->r_gain + p->r_post_offset;
void ve_enable_dnlp(void)
{
- struct vinfo_s *vinfo = get_current_vinfo();
ve_en = 1;
if (dnlp_sel == NEW_DNLP_IN_SHARPNESS) {
if (is_meson_gxlx_cpu() || is_meson_txlx_cpu()) {
WRITE_VPP_REG_BITS(SRSHARP1_DNLP_EN, 1, 0, 1);
} else if (cpu_after_eq(MESON_CPU_MAJOR_ID_TL1)) {
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444)
+ if (!vinfo_lcd_support())
WRITE_VPP_REG_BITS(
SRSHARP0_DNLP_EN + sr_offset[0],
1, 0, 1);
void ve_disable_dnlp(void)
{
- struct vinfo_s *vinfo = get_current_vinfo();
ve_en = 0;
if (dnlp_sel == NEW_DNLP_IN_SHARPNESS) {
if (is_meson_gxlx_cpu() || is_meson_txlx_cpu()) {
WRITE_VPP_REG_BITS(SRSHARP1_DNLP_EN, 0, 0, 1);
} else if (cpu_after_eq(MESON_CPU_MAJOR_ID_TL1)) {
- if (vinfo->viu_color_fmt != COLOR_FMT_RGB444)
+ if (!vinfo_lcd_support())
WRITE_VPP_REG_BITS(
SRSHARP0_DNLP_EN + sr_offset[0],
0, 0, 1);