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;
if (!input)
return VppFilter_Fail;
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;
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:
aspect_factor = (vpp_flags & VPP_FLAG_AR_MASK) >> VPP_FLAG_AR_BITS;
/* don't use input->wide_mode */
}
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)
}
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_ =
h_in = height_in = vf->height;
next_frame_par->hscale_skip_count = 0;
next_frame_par->vscale_skip_count = 0;
- goto RESTART;
+ crop_ratio = vf->compWidth / vf->width;
+ goto RESTART_ALL;
}
if ((skip_policy & 0xf0) && (skip_policy_check == true)) {
bool reverse = false;
#endif
int ret = VppFilter_Success;
+ u32 crop_ratio = 1;
+ u32 crop_left, crop_right, crop_top, crop_bottom;
if (!input)
return VppFilter_Fail;
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;
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;
}
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)
}
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_ =
h_in = height_in = vf->height;
next_frame_par->hscale_skip_count = 0;
next_frame_par->vscale_skip_count = 0;
- goto RESTART;
+ crop_ratio = vf->compWidth / vf->width;
+ goto RESTART_ALL;
}
if ((skip_policy & 0xf0) && (skip_policy_check == true)) {