|
|
|
|
@@ -589,6 +589,9 @@ module_param(cur_skip_ratio, uint, 0444);
|
|
|
|
|
static unsigned int cur_vf_type;
|
|
|
|
|
MODULE_PARM_DESC(cur_vf_type, "cur_vf_type");
|
|
|
|
|
module_param(cur_vf_type, uint, 0444);
|
|
|
|
|
static unsigned int cur_freq_ratio;
|
|
|
|
|
MODULE_PARM_DESC(cur_freq_ratio, "cur_freq_ratio");
|
|
|
|
|
module_param(cur_freq_ratio, uint, 0444);
|
|
|
|
|
|
|
|
|
|
static unsigned int custom_ar;
|
|
|
|
|
MODULE_PARM_DESC(custom_ar, "custom_ar");
|
|
|
|
|
@@ -598,6 +601,10 @@ static unsigned int force_use_ext_ar;
|
|
|
|
|
MODULE_PARM_DESC(force_use_ext_ar, "force_use_ext_ar");
|
|
|
|
|
module_param(force_use_ext_ar, uint, 0664);
|
|
|
|
|
|
|
|
|
|
static unsigned int force_no_compress;
|
|
|
|
|
MODULE_PARM_DESC(force_no_compress, "force_no_compress");
|
|
|
|
|
module_param(force_no_compress, uint, 0664);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
*test on txlx:
|
|
|
|
|
*Time_out = (V_out/V_screen_total)/FPS_out;
|
|
|
|
|
@@ -629,6 +636,8 @@ static int vpp_process_speed_check(
|
|
|
|
|
{
|
|
|
|
|
u32 cur_ratio, bpp = 1;
|
|
|
|
|
int min_ratio_1000 = 0;
|
|
|
|
|
int freq_ratio = 1;
|
|
|
|
|
u32 sync_duration_den = 1;
|
|
|
|
|
u32 vtotal, htotal = 0, clk_in_pps = 0, clk_vpu = 0, clk_temp;
|
|
|
|
|
u32 input_time_us = 0, display_time_us = 0, dummy_time_us = 0;
|
|
|
|
|
u32 width_out = 0;
|
|
|
|
|
@@ -647,6 +656,9 @@ static int vpp_process_speed_check(
|
|
|
|
|
if (next_frame_par->vscale_skip_count < force_vskip_cnt)
|
|
|
|
|
return SPEED_CHECK_VSKIP;
|
|
|
|
|
|
|
|
|
|
if (vinfo->sync_duration_den > 0)
|
|
|
|
|
sync_duration_den = vinfo->sync_duration_den;
|
|
|
|
|
|
|
|
|
|
if (vf->type & VIDTYPE_PRE_INTERLACE) {
|
|
|
|
|
if (is_meson_txlx_cpu())
|
|
|
|
|
clk_in_pps = 250000000;
|
|
|
|
|
@@ -694,13 +706,22 @@ static int vpp_process_speed_check(
|
|
|
|
|
if (clk_temp)
|
|
|
|
|
dummy_time_us = (vtotal * htotal -
|
|
|
|
|
height_out * width_out) / clk_temp;
|
|
|
|
|
display_time_us = 1000000 * vinfo->sync_duration_den /
|
|
|
|
|
display_time_us = 1000000 * sync_duration_den /
|
|
|
|
|
vinfo->sync_duration_num;
|
|
|
|
|
if (display_time_us > dummy_time_us)
|
|
|
|
|
display_time_us = display_time_us - dummy_time_us;
|
|
|
|
|
if (input_time_us > display_time_us)
|
|
|
|
|
return SPEED_CHECK_VSKIP;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((vinfo->sync_duration_num / sync_duration_den) > 60)
|
|
|
|
|
freq_ratio = vinfo->sync_duration_num /
|
|
|
|
|
sync_duration_den / 60;
|
|
|
|
|
|
|
|
|
|
if (freq_ratio < 1)
|
|
|
|
|
freq_ratio = 1;
|
|
|
|
|
cur_freq_ratio = freq_ratio;
|
|
|
|
|
|
|
|
|
|
/* #if (MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON8) */
|
|
|
|
|
if ((get_cpu_type() >= MESON_CPU_MAJOR_ID_M8) && !is_meson_mtvd_cpu()) {
|
|
|
|
|
if ((width_in <= 0) || (height_in <= 0) || (height_out <= 0)
|
|
|
|
|
@@ -723,7 +744,7 @@ static int vpp_process_speed_check(
|
|
|
|
|
MESON_CPU_MAJOR_ID_GXBB) {
|
|
|
|
|
cur_ratio = div_u64((u64)height_in *
|
|
|
|
|
(u64)vinfo->height *
|
|
|
|
|
1000,
|
|
|
|
|
1000 * freq_ratio,
|
|
|
|
|
height_out * max_height);
|
|
|
|
|
/* di process first, need more a bit of ratio */
|
|
|
|
|
if (vf->type & VIDTYPE_PRE_INTERLACE)
|
|
|
|
|
@@ -752,7 +773,7 @@ static int vpp_process_speed_check(
|
|
|
|
|
(u64)vinfo->sync_duration_num *
|
|
|
|
|
(u64)vtotal,
|
|
|
|
|
height_out *
|
|
|
|
|
vinfo->sync_duration_den *
|
|
|
|
|
sync_duration_den *
|
|
|
|
|
bypass_ratio) > clk_in_pps)
|
|
|
|
|
return SPEED_CHECK_VSKIP;
|
|
|
|
|
else
|
|
|
|
|
@@ -766,7 +787,7 @@ static int vpp_process_speed_check(
|
|
|
|
|
(u64)vinfo->sync_duration_num *
|
|
|
|
|
(u64)vtotal,
|
|
|
|
|
height_out *
|
|
|
|
|
vinfo->sync_duration_den * 256)
|
|
|
|
|
sync_duration_den * 256)
|
|
|
|
|
> clk_in_pps)
|
|
|
|
|
return SPEED_CHECK_VSKIP;
|
|
|
|
|
/* 4K down scaling to non 4K > 30hz,*/
|
|
|
|
|
@@ -776,7 +797,7 @@ static int vpp_process_speed_check(
|
|
|
|
|
&& (height_in > 2048)
|
|
|
|
|
&& (height_out < 2048)
|
|
|
|
|
&& (vinfo->sync_duration_num >
|
|
|
|
|
(30 * vinfo->sync_duration_den))
|
|
|
|
|
(30 * sync_duration_den))
|
|
|
|
|
&& (get_cpu_type() !=
|
|
|
|
|
MESON_CPU_MAJOR_ID_GXTVBB)
|
|
|
|
|
&& (get_cpu_type() !=
|
|
|
|
|
@@ -789,7 +810,7 @@ static int vpp_process_speed_check(
|
|
|
|
|
/*TODO vpu */
|
|
|
|
|
if (div_u64(VPP_SPEED_FACTOR * width_in *
|
|
|
|
|
vinfo->sync_duration_num * height_screen,
|
|
|
|
|
vinfo->sync_duration_den * 256)
|
|
|
|
|
sync_duration_den * 256)
|
|
|
|
|
> get_vpu_clk())
|
|
|
|
|
return SPEED_CHECK_HSKIP;
|
|
|
|
|
else
|
|
|
|
|
@@ -871,8 +892,11 @@ static int vpp_set_filters_internal(
|
|
|
|
|
u32 vert_chroma_filter;
|
|
|
|
|
struct filter_info_s *cur_filter;
|
|
|
|
|
s32 vpp_zoom_center_x, vpp_zoom_center_y;
|
|
|
|
|
u32 crop_ratio = 1;
|
|
|
|
|
u32 crop_left, crop_right, crop_top, crop_bottom;
|
|
|
|
|
u32 sar_width = 0, sar_height = 0;
|
|
|
|
|
bool ext_sar = false;
|
|
|
|
|
bool no_compress = false;
|
|
|
|
|
|
|
|
|
|
if (!input)
|
|
|
|
|
return VppFilter_Fail;
|
|
|
|
|
@@ -896,7 +920,8 @@ static int vpp_set_filters_internal(
|
|
|
|
|
reverse = input->reverse;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if (vf->type & VIDTYPE_MVC) {
|
|
|
|
|
if ((vf->type & VIDTYPE_MVC) ||
|
|
|
|
|
(input->proc_3d_type & MODE_3D_ENABLE)) {
|
|
|
|
|
video_source_crop_left = 0;
|
|
|
|
|
video_source_crop_right = 0;
|
|
|
|
|
video_source_crop_top = 0;
|
|
|
|
|
@@ -908,20 +933,6 @@ static int vpp_set_filters_internal(
|
|
|
|
|
video_source_crop_bottom = input->crop_bottom;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (likely(w_in >
|
|
|
|
|
(video_source_crop_left + video_source_crop_right))) {
|
|
|
|
|
w_in -= video_source_crop_left;
|
|
|
|
|
w_in -= video_source_crop_right;
|
|
|
|
|
h_crop_enable = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (likely(h_in >
|
|
|
|
|
(video_source_crop_top + video_source_crop_bottom))) {
|
|
|
|
|
h_in -= video_source_crop_top;
|
|
|
|
|
h_in -= video_source_crop_bottom;
|
|
|
|
|
v_crop_enable = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifndef TV_3D_FUNCTION_OPEN
|
|
|
|
|
next_frame_par->vscale_skip_count = 0;
|
|
|
|
|
next_frame_par->hscale_skip_count = 0;
|
|
|
|
|
@@ -947,6 +958,25 @@ static int vpp_set_filters_internal(
|
|
|
|
|
pr_info("sar_width=%d, sar_height = %d, %d\n",
|
|
|
|
|
vf->sar_width, vf->sar_height,
|
|
|
|
|
force_use_ext_ar);
|
|
|
|
|
RESTART_ALL:
|
|
|
|
|
crop_left = video_source_crop_left / crop_ratio;
|
|
|
|
|
crop_right = video_source_crop_right / crop_ratio;
|
|
|
|
|
crop_top = video_source_crop_top / crop_ratio;
|
|
|
|
|
crop_bottom = video_source_crop_bottom / crop_ratio;
|
|
|
|
|
|
|
|
|
|
if (likely(w_in >
|
|
|
|
|
(crop_left + crop_right))) {
|
|
|
|
|
w_in -= crop_left;
|
|
|
|
|
w_in -= crop_right;
|
|
|
|
|
h_crop_enable = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (likely(h_in >
|
|
|
|
|
(crop_top + crop_bottom))) {
|
|
|
|
|
h_in -= crop_top;
|
|
|
|
|
h_in -= crop_bottom;
|
|
|
|
|
v_crop_enable = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RESTART:
|
|
|
|
|
aspect_factor = (vpp_flags & VPP_FLAG_AR_MASK) >> VPP_FLAG_AR_BITS;
|
|
|
|
|
@@ -1268,8 +1298,8 @@ RESTART:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (v_crop_enable) {
|
|
|
|
|
next_frame_par->VPP_vd_start_lines_ += video_source_crop_top;
|
|
|
|
|
next_frame_par->VPP_vd_end_lines_ += video_source_crop_top;
|
|
|
|
|
next_frame_par->VPP_vd_start_lines_ += crop_top;
|
|
|
|
|
next_frame_par->VPP_vd_end_lines_ += crop_top;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (vpp_flags & VPP_FLAG_INTERLACE_IN)
|
|
|
|
|
@@ -1386,8 +1416,8 @@ RESTART:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (h_crop_enable) {
|
|
|
|
|
next_frame_par->VPP_hd_start_lines_ += video_source_crop_left;
|
|
|
|
|
next_frame_par->VPP_hd_end_lines_ += video_source_crop_left;
|
|
|
|
|
next_frame_par->VPP_hd_start_lines_ += crop_left;
|
|
|
|
|
next_frame_par->VPP_hd_end_lines_ += crop_left;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
next_frame_par->VPP_line_in_length_ =
|
|
|
|
|
@@ -1467,10 +1497,21 @@ RESTART:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((vf->type & VIDTYPE_COMPRESS) &&
|
|
|
|
|
!(vf->type & VIDTYPE_NO_DW) &&
|
|
|
|
|
(vf->canvas0Addr != 0) &&
|
|
|
|
|
(next_frame_par->vscale_skip_count > 1) &&
|
|
|
|
|
(!next_frame_par->nocomp)) {
|
|
|
|
|
pr_info(
|
|
|
|
|
if ((vpp_flags & VPP_FLAG_FORCE_NO_COMPRESS)
|
|
|
|
|
|| (next_frame_par->vscale_skip_count > 1)
|
|
|
|
|
|| !input->afbc_support
|
|
|
|
|
|| force_no_compress)
|
|
|
|
|
no_compress = true;
|
|
|
|
|
} else
|
|
|
|
|
no_compress = false;
|
|
|
|
|
|
|
|
|
|
if (no_compress) {
|
|
|
|
|
if ((vpp_flags & VPP_FLAG_MORE_LOG)
|
|
|
|
|
&& input->afbc_support)
|
|
|
|
|
pr_info(
|
|
|
|
|
"layer%d: Try DW buffer for compressed frame scaling.\n",
|
|
|
|
|
input->layer_id);
|
|
|
|
|
|
|
|
|
|
@@ -1482,7 +1523,9 @@ RESTART:
|
|
|
|
|
h_in = height_in = vf->height;
|
|
|
|
|
next_frame_par->hscale_skip_count = 0;
|
|
|
|
|
next_frame_par->vscale_skip_count = 0;
|
|
|
|
|
goto RESTART;
|
|
|
|
|
if (vf->width && vf->compWidth)
|
|
|
|
|
crop_ratio = vf->compWidth / vf->width;
|
|
|
|
|
goto RESTART_ALL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((skip_policy & 0xf0) && (skip_policy_check == true)) {
|
|
|
|
|
@@ -1657,6 +1700,10 @@ RESTART:
|
|
|
|
|
next_frame_par->vscale_skip_count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((next_frame_par->vscale_skip_count > 1)
|
|
|
|
|
&& (vf->type & VIDTYPE_COMPRESS)
|
|
|
|
|
&& (vf->type & VIDTYPE_NO_DW))
|
|
|
|
|
ret = VppFilter_Changed_but_Hold;
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
@@ -1812,10 +1859,12 @@ int vpp_set_super_scaler_regs(
|
|
|
|
|
if (is_meson_txhd_cpu() ||
|
|
|
|
|
is_meson_g12a_cpu() ||
|
|
|
|
|
is_meson_g12b_cpu() ||
|
|
|
|
|
is_meson_sm1_cpu() ||
|
|
|
|
|
(is_meson_tl1_cpu() &&
|
|
|
|
|
is_meson_sm1_cpu())
|
|
|
|
|
tmp_data = ((reg_srscl0_hsize & 0x1fff) << 16) |
|
|
|
|
|
(reg_srscl0_vsize & 0x1fff);
|
|
|
|
|
else if ((is_meson_tl1_cpu() || is_meson_tm2_cpu()) &&
|
|
|
|
|
((scaler_path_sel == PPS_CORE0_CORE1) ||
|
|
|
|
|
(scaler_path_sel == PPS_CORE0_POSTBLEND_CORE1))))
|
|
|
|
|
(scaler_path_sel == PPS_CORE0_POSTBLEND_CORE1)))
|
|
|
|
|
tmp_data = ((reg_srscl0_hsize & 0x1fff) << 16) |
|
|
|
|
|
(reg_srscl0_vsize & 0x1fff);
|
|
|
|
|
else
|
|
|
|
|
@@ -2212,7 +2261,7 @@ static void vpp_set_super_scaler(
|
|
|
|
|
|
|
|
|
|
sr_path = next_frame_par->supscl_path;
|
|
|
|
|
/* path config */
|
|
|
|
|
if (is_meson_tl1_cpu()) {
|
|
|
|
|
if (is_meson_tl1_cpu() || is_meson_tm2_cpu()) {
|
|
|
|
|
if (sr_path == CORE0_PPS_CORE1) {
|
|
|
|
|
next_frame_par->sr0_position = 1;
|
|
|
|
|
next_frame_par->sr1_position = 1;
|
|
|
|
|
@@ -2325,7 +2374,15 @@ static void vpp_get_video_source_size(
|
|
|
|
|
u32 process_3d_type, struct vframe_s *vf,
|
|
|
|
|
struct vpp_frame_par_s *next_frame_par)
|
|
|
|
|
{
|
|
|
|
|
int frame_width, frame_height;
|
|
|
|
|
|
|
|
|
|
if (vf->type & VIDTYPE_COMPRESS) {
|
|
|
|
|
frame_width = vf->compWidth;
|
|
|
|
|
frame_height = vf->compHeight;
|
|
|
|
|
} else {
|
|
|
|
|
frame_width = vf->width;
|
|
|
|
|
frame_height = vf->height;
|
|
|
|
|
}
|
|
|
|
|
if ((process_3d_type & MODE_3D_AUTO) ||
|
|
|
|
|
(((process_3d_type & MODE_3D_TO_2D_R) ||
|
|
|
|
|
(process_3d_type & MODE_3D_TO_2D_L) ||
|
|
|
|
|
@@ -2369,8 +2426,8 @@ static void vpp_get_video_source_size(
|
|
|
|
|
break;
|
|
|
|
|
case TVIN_TFMT_3D_DET_CHESSBOARD:
|
|
|
|
|
default:
|
|
|
|
|
*src_width = vf->width;
|
|
|
|
|
*src_height = vf->height;
|
|
|
|
|
*src_width = frame_width;
|
|
|
|
|
*src_height = frame_height;
|
|
|
|
|
next_frame_par->vpp_3d_mode = VPP_3D_MODE_NULL;
|
|
|
|
|
next_frame_par->vpp_3d_scale = 0;
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 0;
|
|
|
|
|
@@ -2381,15 +2438,15 @@ static void vpp_get_video_source_size(
|
|
|
|
|
(process_3d_type & MODE_FORCE_3D_LR)) {
|
|
|
|
|
next_frame_par->vpp_3d_mode = VPP_3D_MODE_LR;
|
|
|
|
|
if (process_3d_type & MODE_3D_TO_2D_MASK) {
|
|
|
|
|
*src_width = vf->width >> 1;
|
|
|
|
|
*src_height = vf->height;
|
|
|
|
|
*src_width = frame_width >> 1;
|
|
|
|
|
*src_height = frame_height;
|
|
|
|
|
} else if (process_3d_type & MODE_3D_OUT_LR) {
|
|
|
|
|
*src_width = vf->width;
|
|
|
|
|
*src_height = vf->height;
|
|
|
|
|
*src_width = frame_width;
|
|
|
|
|
*src_height = frame_height;
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 1;
|
|
|
|
|
} else {
|
|
|
|
|
*src_width = vf->width >> 1;
|
|
|
|
|
*src_height = vf->height << 1;
|
|
|
|
|
*src_width = frame_width >> 1;
|
|
|
|
|
*src_height = frame_height << 1;
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2397,38 +2454,38 @@ static void vpp_get_video_source_size(
|
|
|
|
|
(process_3d_type & MODE_FORCE_3D_TB)) {
|
|
|
|
|
next_frame_par->vpp_3d_mode = VPP_3D_MODE_TB;
|
|
|
|
|
if (process_3d_type & MODE_3D_TO_2D_MASK) {
|
|
|
|
|
*src_width = vf->width;
|
|
|
|
|
*src_height = vf->height >> 1;
|
|
|
|
|
*src_width = frame_width;
|
|
|
|
|
*src_height = frame_height >> 1;
|
|
|
|
|
} else if (process_3d_type & MODE_3D_OUT_LR) {
|
|
|
|
|
*src_width = vf->width << 1;
|
|
|
|
|
*src_height = vf->height >> 1;
|
|
|
|
|
*src_width = frame_width << 1;
|
|
|
|
|
*src_height = frame_height >> 1;
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 1;
|
|
|
|
|
} else {
|
|
|
|
|
*src_width = vf->width;
|
|
|
|
|
*src_height = vf->height;
|
|
|
|
|
*src_width = frame_width;
|
|
|
|
|
*src_height = frame_height;
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 1;
|
|
|
|
|
}
|
|
|
|
|
if (process_3d_type & MODE_3D_MVC) {
|
|
|
|
|
*src_width = vf->width;
|
|
|
|
|
*src_height = vf->height << 1;
|
|
|
|
|
*src_width = frame_width;
|
|
|
|
|
*src_height = frame_height << 1;
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 2;
|
|
|
|
|
next_frame_par->vpp_3d_mode = VPP_3D_MODE_FA;
|
|
|
|
|
}
|
|
|
|
|
} else if (process_3d_type & MODE_3D_LA) {
|
|
|
|
|
next_frame_par->vpp_3d_mode = VPP_3D_MODE_LA;
|
|
|
|
|
*src_height = vf->height - 1;
|
|
|
|
|
*src_width = vf->width;
|
|
|
|
|
*src_height = frame_height - 1;
|
|
|
|
|
*src_width = frame_width;
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 0;
|
|
|
|
|
next_frame_par->vpp_3d_scale = 1;
|
|
|
|
|
if (process_3d_type & MODE_3D_TO_2D_MASK) {
|
|
|
|
|
next_frame_par->vscale_skip_count = 1;
|
|
|
|
|
next_frame_par->vpp_3d_scale = 0;
|
|
|
|
|
} else if (process_3d_type & MODE_3D_OUT_TB) {
|
|
|
|
|
*src_height = vf->height << 1;
|
|
|
|
|
*src_height = frame_height << 1;
|
|
|
|
|
next_frame_par->vscale_skip_count = 1;
|
|
|
|
|
next_frame_par->vpp_3d_scale = 0;
|
|
|
|
|
} else if (process_3d_type & MODE_3D_OUT_LR) {
|
|
|
|
|
*src_width = vf->width << 1;
|
|
|
|
|
*src_width = frame_width << 1;
|
|
|
|
|
next_frame_par->vscale_skip_count = 1;
|
|
|
|
|
next_frame_par->vpp_3d_scale = 0;
|
|
|
|
|
}
|
|
|
|
|
@@ -2440,37 +2497,37 @@ static void vpp_get_video_source_size(
|
|
|
|
|
if (process_3d_type & MODE_3D_TO_2D_MASK) {
|
|
|
|
|
if (process_3d_type & MODE_FORCE_3D_FA_TB) {
|
|
|
|
|
next_frame_par->vpp_3d_mode = VPP_3D_MODE_TB;
|
|
|
|
|
*src_width = vf->width;
|
|
|
|
|
*src_height = vf->height >> 1;
|
|
|
|
|
*src_width = frame_width;
|
|
|
|
|
*src_height = frame_height >> 1;
|
|
|
|
|
}
|
|
|
|
|
if (process_3d_type & MODE_FORCE_3D_FA_LR) {
|
|
|
|
|
next_frame_par->vpp_3d_mode = VPP_3D_MODE_LR;
|
|
|
|
|
*src_width = vf->width >> 1;
|
|
|
|
|
*src_height = vf->height;
|
|
|
|
|
*src_width = frame_width >> 1;
|
|
|
|
|
*src_height = frame_height;
|
|
|
|
|
}
|
|
|
|
|
if (process_3d_type & MODE_3D_MVC) {
|
|
|
|
|
*src_width = vf->width;
|
|
|
|
|
*src_height = vf->height;
|
|
|
|
|
*src_width = frame_width;
|
|
|
|
|
*src_height = frame_height;
|
|
|
|
|
next_frame_par->vpp_3d_mode = VPP_3D_MODE_FA;
|
|
|
|
|
}
|
|
|
|
|
if (vf->trans_fmt == TVIN_TFMT_3D_FP) {
|
|
|
|
|
next_frame_par->vpp_3d_mode = VPP_3D_MODE_TB;
|
|
|
|
|
*src_width = vf->width;
|
|
|
|
|
*src_width = frame_width;
|
|
|
|
|
*src_height = vf->left_eye.height;
|
|
|
|
|
}
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 0;
|
|
|
|
|
} else if (process_3d_type & MODE_3D_OUT_LR) {
|
|
|
|
|
*src_width = vf->width << 1;
|
|
|
|
|
*src_height = vf->height;
|
|
|
|
|
*src_width = frame_width << 1;
|
|
|
|
|
*src_height = frame_height;
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 2;
|
|
|
|
|
} else {
|
|
|
|
|
*src_width = vf->width;
|
|
|
|
|
*src_height = vf->height << 1;
|
|
|
|
|
*src_width = frame_width;
|
|
|
|
|
*src_height = frame_height << 1;
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 2;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
*src_width = vf->width;
|
|
|
|
|
*src_height = vf->height;
|
|
|
|
|
*src_width = frame_width;
|
|
|
|
|
*src_height = frame_height;
|
|
|
|
|
next_frame_par->vpp_3d_mode = VPP_3D_MODE_NULL;
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 0;
|
|
|
|
|
next_frame_par->vpp_3d_scale = 0;
|
|
|
|
|
@@ -2497,8 +2554,8 @@ static void vpp_get_video_source_size(
|
|
|
|
|
}
|
|
|
|
|
/*avoid dividing 0 error */
|
|
|
|
|
if (*src_width == 0 || *src_height == 0) {
|
|
|
|
|
*src_width = vf->width;
|
|
|
|
|
*src_height = vf->height;
|
|
|
|
|
*src_width = frame_width;
|
|
|
|
|
*src_height = frame_height;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
@@ -2538,6 +2595,9 @@ static int vpp_set_filters_no_scaler_internal(
|
|
|
|
|
bool reverse = false;
|
|
|
|
|
#endif
|
|
|
|
|
int ret = VppFilter_Success;
|
|
|
|
|
u32 crop_ratio = 1;
|
|
|
|
|
u32 crop_left, crop_right, crop_top, crop_bottom;
|
|
|
|
|
bool no_compress = false;
|
|
|
|
|
|
|
|
|
|
if (!input)
|
|
|
|
|
return VppFilter_Fail;
|
|
|
|
|
@@ -2553,7 +2613,8 @@ static int vpp_set_filters_no_scaler_internal(
|
|
|
|
|
reverse = input->reverse;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if (vf->type & VIDTYPE_MVC) {
|
|
|
|
|
if ((vf->type & VIDTYPE_MVC) ||
|
|
|
|
|
(input->proc_3d_type & MODE_3D_ENABLE)) {
|
|
|
|
|
video_source_crop_left = 0;
|
|
|
|
|
video_source_crop_right = 0;
|
|
|
|
|
video_source_crop_top = 0;
|
|
|
|
|
@@ -2565,20 +2626,6 @@ static int vpp_set_filters_no_scaler_internal(
|
|
|
|
|
video_source_crop_bottom = input->crop_bottom;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (likely(w_in >
|
|
|
|
|
(video_source_crop_left + video_source_crop_right))) {
|
|
|
|
|
w_in -= video_source_crop_left;
|
|
|
|
|
w_in -= video_source_crop_right;
|
|
|
|
|
h_crop_enable = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (likely(h_in >
|
|
|
|
|
(video_source_crop_top + video_source_crop_bottom))) {
|
|
|
|
|
h_in -= video_source_crop_top;
|
|
|
|
|
h_in -= video_source_crop_bottom;
|
|
|
|
|
v_crop_enable = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
next_frame_par->vscale_skip_count = 0;
|
|
|
|
|
next_frame_par->hscale_skip_count = 0;
|
|
|
|
|
next_frame_par->nocomp = false;
|
|
|
|
|
@@ -2592,6 +2639,26 @@ static int vpp_set_filters_no_scaler_internal(
|
|
|
|
|
else
|
|
|
|
|
vskip_step = 1;
|
|
|
|
|
|
|
|
|
|
RESTART_ALL:
|
|
|
|
|
crop_left = video_source_crop_left / crop_ratio;
|
|
|
|
|
crop_right = video_source_crop_right / crop_ratio;
|
|
|
|
|
crop_top = video_source_crop_top / crop_ratio;
|
|
|
|
|
crop_bottom = video_source_crop_bottom / crop_ratio;
|
|
|
|
|
|
|
|
|
|
if (likely(w_in >
|
|
|
|
|
(crop_left + crop_right))) {
|
|
|
|
|
w_in -= crop_left;
|
|
|
|
|
w_in -= crop_right;
|
|
|
|
|
h_crop_enable = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (likely(h_in >
|
|
|
|
|
(crop_top + crop_bottom))) {
|
|
|
|
|
h_in -= crop_top;
|
|
|
|
|
h_in -= crop_bottom;
|
|
|
|
|
v_crop_enable = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RESTART:
|
|
|
|
|
/* don't use input->wide_mode */
|
|
|
|
|
wide_mode = vpp_flags & VPP_FLAG_WIDEMODE_MASK;
|
|
|
|
|
@@ -2678,8 +2745,8 @@ RESTART:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (v_crop_enable) {
|
|
|
|
|
next_frame_par->VPP_vd_start_lines_ += video_source_crop_top;
|
|
|
|
|
next_frame_par->VPP_vd_end_lines_ += video_source_crop_top;
|
|
|
|
|
next_frame_par->VPP_vd_start_lines_ += crop_top;
|
|
|
|
|
next_frame_par->VPP_vd_end_lines_ += crop_top;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (vpp_flags & VPP_FLAG_INTERLACE_IN)
|
|
|
|
|
@@ -2791,8 +2858,8 @@ RESTART:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (h_crop_enable) {
|
|
|
|
|
next_frame_par->VPP_hd_start_lines_ += video_source_crop_left;
|
|
|
|
|
next_frame_par->VPP_hd_end_lines_ += video_source_crop_left;
|
|
|
|
|
next_frame_par->VPP_hd_start_lines_ += crop_left;
|
|
|
|
|
next_frame_par->VPP_hd_end_lines_ += crop_left;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
next_frame_par->VPP_line_in_length_ =
|
|
|
|
|
@@ -2846,10 +2913,21 @@ RESTART:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((vf->type & VIDTYPE_COMPRESS) &&
|
|
|
|
|
!(vf->type & VIDTYPE_NO_DW) &&
|
|
|
|
|
(vf->canvas0Addr != 0) &&
|
|
|
|
|
(next_frame_par->vscale_skip_count > 1) &&
|
|
|
|
|
(!next_frame_par->nocomp)) {
|
|
|
|
|
pr_info(
|
|
|
|
|
if ((vpp_flags & VPP_FLAG_FORCE_NO_COMPRESS)
|
|
|
|
|
|| (next_frame_par->vscale_skip_count > 1)
|
|
|
|
|
|| !input->afbc_support
|
|
|
|
|
|| force_no_compress)
|
|
|
|
|
no_compress = true;
|
|
|
|
|
} else
|
|
|
|
|
no_compress = false;
|
|
|
|
|
|
|
|
|
|
if (no_compress) {
|
|
|
|
|
if ((vpp_flags & VPP_FLAG_MORE_LOG)
|
|
|
|
|
&& input->afbc_support)
|
|
|
|
|
pr_info(
|
|
|
|
|
"layer%d: Try DW buffer for compressed frame scaling.\n",
|
|
|
|
|
input->layer_id);
|
|
|
|
|
|
|
|
|
|
@@ -2861,7 +2939,9 @@ RESTART:
|
|
|
|
|
h_in = height_in = vf->height;
|
|
|
|
|
next_frame_par->hscale_skip_count = 0;
|
|
|
|
|
next_frame_par->vscale_skip_count = 0;
|
|
|
|
|
goto RESTART;
|
|
|
|
|
if (vf->width && vf->compWidth)
|
|
|
|
|
crop_ratio = vf->compWidth / vf->width;
|
|
|
|
|
goto RESTART_ALL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((skip_policy & 0xf0) && (skip_policy_check == true)) {
|
|
|
|
|
@@ -2899,6 +2979,10 @@ RESTART:
|
|
|
|
|
next_frame_par->VPP_line_in_length_ >>= 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((next_frame_par->vscale_skip_count > 1)
|
|
|
|
|
&& (vf->type & VIDTYPE_COMPRESS)
|
|
|
|
|
&& (vf->type & VIDTYPE_NO_DW))
|
|
|
|
|
ret = VppFilter_Changed_but_Hold;
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2907,7 +2991,7 @@ int vpp_set_filters(
|
|
|
|
|
struct vframe_s *vf,
|
|
|
|
|
struct vpp_frame_par_s *next_frame_par,
|
|
|
|
|
const struct vinfo_s *vinfo,
|
|
|
|
|
bool bypass_sr)
|
|
|
|
|
bool bypass_sr, u32 op_flag)
|
|
|
|
|
{
|
|
|
|
|
u32 src_width = 0;
|
|
|
|
|
u32 src_height = 0;
|
|
|
|
|
@@ -2933,34 +3017,46 @@ int vpp_set_filters(
|
|
|
|
|
next_frame_par->VPP_post_blend_vd_h_start_ = 0;
|
|
|
|
|
|
|
|
|
|
next_frame_par->VPP_postproc_misc_ = 0x200;
|
|
|
|
|
#ifdef TV_3D_FUNCTION_OPEN
|
|
|
|
|
next_frame_par->vscale_skip_count = 0;
|
|
|
|
|
next_frame_par->hscale_skip_count = 0;
|
|
|
|
|
|
|
|
|
|
if (vf->type & VIDTYPE_COMPRESS) {
|
|
|
|
|
src_width = vf->compWidth;
|
|
|
|
|
src_height = vf->compHeight;
|
|
|
|
|
} else {
|
|
|
|
|
src_width = vf->width;
|
|
|
|
|
src_height = vf->height;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef TV_3D_FUNCTION_OPEN
|
|
|
|
|
/*
|
|
|
|
|
*check 3d mode change in display buffer or 3d type
|
|
|
|
|
*get the source size according to 3d mode
|
|
|
|
|
*/
|
|
|
|
|
if (process_3d_type & MODE_3D_ENABLE) {
|
|
|
|
|
vpp_get_video_source_size(&src_width, &src_height,
|
|
|
|
|
process_3d_type, vf, next_frame_par);
|
|
|
|
|
} else {
|
|
|
|
|
if (vf->type & VIDTYPE_COMPRESS) {
|
|
|
|
|
src_width = vf->compWidth;
|
|
|
|
|
src_height = vf->compHeight;
|
|
|
|
|
if (local_input.layer_id == 0) {
|
|
|
|
|
if (process_3d_type & MODE_3D_ENABLE) {
|
|
|
|
|
vpp_get_video_source_size(
|
|
|
|
|
&src_width, &src_height,
|
|
|
|
|
process_3d_type,
|
|
|
|
|
vf, next_frame_par);
|
|
|
|
|
} else {
|
|
|
|
|
src_width = vf->width;
|
|
|
|
|
src_height = vf->height;
|
|
|
|
|
next_frame_par->vpp_3d_mode =
|
|
|
|
|
VPP_3D_MODE_NULL;
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 0;
|
|
|
|
|
next_frame_par->vpp_3d_scale = 0;
|
|
|
|
|
}
|
|
|
|
|
next_frame_par->trans_fmt = vf->trans_fmt;
|
|
|
|
|
get_vpp_3d_mode(process_3d_type,
|
|
|
|
|
next_frame_par->trans_fmt,
|
|
|
|
|
&next_frame_par->vpp_3d_mode);
|
|
|
|
|
if (local_input.vpp_3d_scale)
|
|
|
|
|
next_frame_par->vpp_3d_scale = 1;
|
|
|
|
|
} else {
|
|
|
|
|
next_frame_par->vpp_3d_mode = VPP_3D_MODE_NULL;
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 0;
|
|
|
|
|
next_frame_par->vpp_3d_scale = 0;
|
|
|
|
|
next_frame_par->trans_fmt = vf->trans_fmt;
|
|
|
|
|
}
|
|
|
|
|
next_frame_par->trans_fmt = vf->trans_fmt;
|
|
|
|
|
get_vpp_3d_mode(process_3d_type,
|
|
|
|
|
next_frame_par->trans_fmt,
|
|
|
|
|
&next_frame_par->vpp_3d_mode);
|
|
|
|
|
if (local_input.vpp_3d_scale)
|
|
|
|
|
next_frame_par->vpp_3d_scale = 1;
|
|
|
|
|
amlog_mask(LOG_MASK_VPP, "%s: src_width %u,src_height %u.\n", __func__,
|
|
|
|
|
src_width, src_height);
|
|
|
|
|
#endif
|
|
|
|
|
@@ -2985,6 +3081,18 @@ int vpp_set_filters(
|
|
|
|
|
aspect_ratio = (vf->ratio_control & DISP_RATIO_ASPECT_RATIO_MASK)
|
|
|
|
|
>> DISP_RATIO_ASPECT_RATIO_BIT;
|
|
|
|
|
|
|
|
|
|
if (!aspect_ratio) {
|
|
|
|
|
u32 sar_width, sar_height;
|
|
|
|
|
|
|
|
|
|
if (vf->type & VIDTYPE_COMPRESS) {
|
|
|
|
|
sar_width = vf->compWidth;
|
|
|
|
|
sar_height = vf->compHeight;
|
|
|
|
|
} else {
|
|
|
|
|
sar_width = vf->width;
|
|
|
|
|
sar_height = vf->height;
|
|
|
|
|
}
|
|
|
|
|
aspect_ratio = (sar_height << 8) / sar_width;
|
|
|
|
|
}
|
|
|
|
|
/* the height from vdin afbc will be half */
|
|
|
|
|
/* so need no interlace in */
|
|
|
|
|
if ((vf->type & VIDTYPE_INTERLACE)
|
|
|
|
|
@@ -2996,15 +3104,6 @@ int vpp_set_filters(
|
|
|
|
|
|
|
|
|
|
if (vf->type & VIDTYPE_VSCALE_DISABLE)
|
|
|
|
|
vpp_flags |= VPP_FLAG_VSCALE_DISABLE;
|
|
|
|
|
#ifndef TV_3D_FUNCTION_OPEN
|
|
|
|
|
if (vf->type & VIDTYPE_COMPRESS) {
|
|
|
|
|
src_width = vf->compWidth;
|
|
|
|
|
src_height = vf->compHeight;
|
|
|
|
|
} else {
|
|
|
|
|
src_width = vf->width;
|
|
|
|
|
src_height = vf->height;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if ((vf->ratio_control & DISP_RATIO_ADAPTED_PICMODE)
|
|
|
|
|
&& !disable_adapted) {
|
|
|
|
|
@@ -3036,6 +3135,9 @@ int vpp_set_filters(
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!local_input.pps_support)
|
|
|
|
|
wide_mode = VIDEO_WIDEOPTION_NORMAL;
|
|
|
|
|
|
|
|
|
|
/* don't restore the wide mode */
|
|
|
|
|
/* input->wide_mode = wide_mode; */
|
|
|
|
|
vpp_flags |= wide_mode | (aspect_ratio << VPP_FLAG_AR_BITS);
|
|
|
|
|
@@ -3043,15 +3145,30 @@ int vpp_set_filters(
|
|
|
|
|
if (vinfo->field_height != vinfo->height)
|
|
|
|
|
vpp_flags |= VPP_FLAG_INTERLACE_OUT;
|
|
|
|
|
|
|
|
|
|
if (op_flag & 1)
|
|
|
|
|
vpp_flags |= VPP_FLAG_MORE_LOG;
|
|
|
|
|
|
|
|
|
|
if (local_input.need_no_compress)
|
|
|
|
|
vpp_flags |= VPP_FLAG_FORCE_NO_COMPRESS;
|
|
|
|
|
|
|
|
|
|
next_frame_par->VPP_post_blend_vd_v_end_ = vinfo->field_height - 1;
|
|
|
|
|
next_frame_par->VPP_post_blend_vd_h_end_ = vinfo->width - 1;
|
|
|
|
|
next_frame_par->VPP_post_blend_h_size_ = vinfo->width;
|
|
|
|
|
|
|
|
|
|
ret = vpp_set_filters_internal(
|
|
|
|
|
&local_input, src_width, src_height,
|
|
|
|
|
vinfo->width, vinfo->height,
|
|
|
|
|
vinfo, vpp_flags, next_frame_par, vf);
|
|
|
|
|
if (local_input.pps_support)
|
|
|
|
|
ret = vpp_set_filters_internal(
|
|
|
|
|
&local_input, src_width, src_height,
|
|
|
|
|
vinfo->width, vinfo->height,
|
|
|
|
|
vinfo, vpp_flags, next_frame_par, vf);
|
|
|
|
|
else
|
|
|
|
|
ret = vpp_set_filters_no_scaler_internal(
|
|
|
|
|
&local_input, src_width, src_height,
|
|
|
|
|
vinfo->width, vinfo->height,
|
|
|
|
|
vinfo, vpp_flags, next_frame_par, vf);
|
|
|
|
|
|
|
|
|
|
/* bypass sr since the input w/h may be wrong */
|
|
|
|
|
if (ret == VppFilter_Changed_but_Hold)
|
|
|
|
|
bypass_sr = true;
|
|
|
|
|
/*config super scaler after set next_frame_par is calc ok for pps*/
|
|
|
|
|
if (local_input.layer_id == 0)
|
|
|
|
|
vpp_set_super_scaler(
|
|
|
|
|
@@ -3062,90 +3179,6 @@ int vpp_set_filters(
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int vpp_set_filters_no_scaler(
|
|
|
|
|
struct disp_info_s *input,
|
|
|
|
|
struct vframe_s *vf,
|
|
|
|
|
struct vpp_frame_par_s *next_frame_par,
|
|
|
|
|
const struct vinfo_s *vinfo)
|
|
|
|
|
{
|
|
|
|
|
u32 src_width = 0;
|
|
|
|
|
u32 src_height = 0;
|
|
|
|
|
u32 vpp_flags = 0;
|
|
|
|
|
u32 aspect_ratio = 0;
|
|
|
|
|
u32 wide_mode;
|
|
|
|
|
int ret = VppFilter_Fail;
|
|
|
|
|
struct disp_info_s local_input;
|
|
|
|
|
|
|
|
|
|
if (!input)
|
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
|
|
WARN_ON(vinfo == NULL);
|
|
|
|
|
|
|
|
|
|
/* use local var to avoid the input data be overwriten */
|
|
|
|
|
memcpy(&local_input, input, sizeof(struct disp_info_s));
|
|
|
|
|
/* wide_mode = local_input.wide_mode; */
|
|
|
|
|
wide_mode = VIDEO_WIDEOPTION_NORMAL;
|
|
|
|
|
next_frame_par->VPP_post_blend_vd_v_start_ = 0;
|
|
|
|
|
next_frame_par->VPP_post_blend_vd_h_start_ = 0;
|
|
|
|
|
|
|
|
|
|
next_frame_par->VPP_postproc_misc_ = 0x200;
|
|
|
|
|
next_frame_par->vscale_skip_count = 0;
|
|
|
|
|
next_frame_par->hscale_skip_count = 0;
|
|
|
|
|
if (vf->type & VIDTYPE_COMPRESS) {
|
|
|
|
|
src_width = vf->compWidth;
|
|
|
|
|
src_height = vf->compHeight;
|
|
|
|
|
} else {
|
|
|
|
|
src_width = vf->width;
|
|
|
|
|
src_height = vf->height;
|
|
|
|
|
}
|
|
|
|
|
#ifdef TV_3D_FUNCTION_OPEN
|
|
|
|
|
next_frame_par->vpp_3d_mode = VPP_3D_MODE_NULL;
|
|
|
|
|
next_frame_par->vpp_2pic_mode = 0;
|
|
|
|
|
next_frame_par->vpp_3d_scale = 0;
|
|
|
|
|
next_frame_par->trans_fmt = vf->trans_fmt;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if (vf->type & VIDTYPE_INTERLACE)
|
|
|
|
|
vpp_flags = VPP_FLAG_INTERLACE_IN;
|
|
|
|
|
|
|
|
|
|
if ((vf->ratio_control & DISP_RATIO_ADAPTED_PICMODE)
|
|
|
|
|
&& !disable_adapted) {
|
|
|
|
|
if (vf->pic_mode.provider == PIC_MODE_PROVIDER_WSS) {
|
|
|
|
|
/* from wss, need add global setting */
|
|
|
|
|
local_input.crop_top += vf->pic_mode.vs;
|
|
|
|
|
local_input.crop_left += vf->pic_mode.hs;
|
|
|
|
|
local_input.crop_bottom += vf->pic_mode.ve;
|
|
|
|
|
local_input.crop_right += vf->pic_mode.he;
|
|
|
|
|
} else {
|
|
|
|
|
/* from PQ database, final setting */
|
|
|
|
|
local_input.crop_top = vf->pic_mode.vs;
|
|
|
|
|
local_input.crop_left = vf->pic_mode.hs;
|
|
|
|
|
local_input.crop_bottom = vf->pic_mode.ve;
|
|
|
|
|
local_input.crop_right = vf->pic_mode.he;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
aspect_ratio =
|
|
|
|
|
(vf->ratio_control & DISP_RATIO_ASPECT_RATIO_MASK)
|
|
|
|
|
>> DISP_RATIO_ASPECT_RATIO_BIT;
|
|
|
|
|
|
|
|
|
|
/* don't restore the wide mode */
|
|
|
|
|
/* input->wide_mode = wide_mode; */
|
|
|
|
|
vpp_flags |= wide_mode | (aspect_ratio << VPP_FLAG_AR_BITS);
|
|
|
|
|
|
|
|
|
|
if (vinfo->field_height != vinfo->height)
|
|
|
|
|
vpp_flags |= VPP_FLAG_INTERLACE_OUT;
|
|
|
|
|
|
|
|
|
|
next_frame_par->VPP_post_blend_vd_v_end_ = vinfo->field_height - 1;
|
|
|
|
|
next_frame_par->VPP_post_blend_vd_h_end_ = vinfo->width - 1;
|
|
|
|
|
next_frame_par->VPP_post_blend_h_size_ = vinfo->width;
|
|
|
|
|
|
|
|
|
|
ret = vpp_set_filters_no_scaler_internal(
|
|
|
|
|
&local_input, src_width, src_height,
|
|
|
|
|
vinfo->width, vinfo->height,
|
|
|
|
|
vinfo, vpp_flags, next_frame_par, vf);
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
s32 vpp_set_nonlinear_factor(
|
|
|
|
|
struct disp_info_s *info, u32 f)
|
|
|
|
|
{
|
|
|
|
|
@@ -3187,8 +3220,11 @@ void vpp_super_scaler_support(void)
|
|
|
|
|
is_meson_sm1_cpu()) {
|
|
|
|
|
sr_support |= SUPER_CORE0_SUPPORT;
|
|
|
|
|
sr_support &= ~SUPER_CORE1_SUPPORT;
|
|
|
|
|
} else if (is_meson_gxtvbb_cpu() || is_meson_txl_cpu() ||
|
|
|
|
|
is_meson_txlx_cpu() || is_meson_tl1_cpu()) {
|
|
|
|
|
} else if (is_meson_gxtvbb_cpu()
|
|
|
|
|
|| is_meson_txl_cpu()
|
|
|
|
|
|| is_meson_txlx_cpu()
|
|
|
|
|
|| is_meson_tl1_cpu()
|
|
|
|
|
|| is_meson_tm2_cpu()) {
|
|
|
|
|
sr_support |= SUPER_CORE0_SUPPORT;
|
|
|
|
|
sr_support |= SUPER_CORE1_SUPPORT;
|
|
|
|
|
} else {
|
|
|
|
|
@@ -3204,7 +3240,8 @@ void vpp_super_scaler_support(void)
|
|
|
|
|
is_meson_sm1_cpu()) {
|
|
|
|
|
sr_reg_offt = 0xc00;
|
|
|
|
|
sr_reg_offt2 = 0x00;
|
|
|
|
|
} else if (is_meson_tl1_cpu()) {
|
|
|
|
|
} else if (is_meson_tl1_cpu()
|
|
|
|
|
|| is_meson_tm2_cpu()) {
|
|
|
|
|
sr_reg_offt = 0xc00;
|
|
|
|
|
sr_reg_offt2 = 0xc80;
|
|
|
|
|
} else {
|
|
|
|
|
|