Lines Matching refs:rect
868 struct v4l2_rect *rect; in vfe_try_format() local
870 rect = __vfe_get_crop(line, sd_state, which); in vfe_try_format()
872 fmt->width = rect->width; in vfe_try_format()
873 fmt->height = rect->height; in vfe_try_format()
891 struct v4l2_rect *rect, in vfe_try_compose() argument
898 if (rect->width > fmt->width) in vfe_try_compose()
899 rect->width = fmt->width; in vfe_try_compose()
901 if (rect->height > fmt->height) in vfe_try_compose()
902 rect->height = fmt->height; in vfe_try_compose()
904 if (fmt->width > rect->width * SCALER_RATIO_MAX) in vfe_try_compose()
905 rect->width = (fmt->width + SCALER_RATIO_MAX - 1) / in vfe_try_compose()
908 rect->width &= ~0x1; in vfe_try_compose()
910 if (fmt->height > rect->height * SCALER_RATIO_MAX) in vfe_try_compose()
911 rect->height = (fmt->height + SCALER_RATIO_MAX - 1) / in vfe_try_compose()
914 if (rect->width < 16) in vfe_try_compose()
915 rect->width = 16; in vfe_try_compose()
917 if (rect->height < 4) in vfe_try_compose()
918 rect->height = 4; in vfe_try_compose()
930 struct v4l2_rect *rect, in vfe_try_crop() argument
937 if (rect->width > compose->width) in vfe_try_crop()
938 rect->width = compose->width; in vfe_try_crop()
940 if (rect->width + rect->left > compose->width) in vfe_try_crop()
941 rect->left = compose->width - rect->width; in vfe_try_crop()
943 if (rect->height > compose->height) in vfe_try_crop()
944 rect->height = compose->height; in vfe_try_crop()
946 if (rect->height + rect->top > compose->height) in vfe_try_crop()
947 rect->top = compose->height - rect->height; in vfe_try_crop()
950 rect->left += (rect->width & 0xf) >> 1; in vfe_try_crop()
951 rect->width &= ~0xf; in vfe_try_crop()
953 if (rect->width < 16) { in vfe_try_crop()
954 rect->left = 0; in vfe_try_crop()
955 rect->width = 16; in vfe_try_crop()
958 if (rect->height < 4) { in vfe_try_crop()
959 rect->top = 0; in vfe_try_crop()
960 rect->height = 4; in vfe_try_crop()
1129 struct v4l2_rect *rect; in vfe_get_selection() local
1150 rect = __vfe_get_compose(line, sd_state, sel->which); in vfe_get_selection()
1151 if (rect == NULL) in vfe_get_selection()
1154 sel->r = *rect; in vfe_get_selection()
1162 rect = __vfe_get_compose(line, sd_state, sel->which); in vfe_get_selection()
1163 if (rect == NULL) in vfe_get_selection()
1166 sel->r.left = rect->left; in vfe_get_selection()
1167 sel->r.top = rect->top; in vfe_get_selection()
1168 sel->r.width = rect->width; in vfe_get_selection()
1169 sel->r.height = rect->height; in vfe_get_selection()
1172 rect = __vfe_get_crop(line, sd_state, sel->which); in vfe_get_selection()
1173 if (rect == NULL) in vfe_get_selection()
1176 sel->r = *rect; in vfe_get_selection()
1198 struct v4l2_rect *rect; in vfe_set_selection() local
1208 rect = __vfe_get_compose(line, sd_state, sel->which); in vfe_set_selection()
1209 if (rect == NULL) in vfe_set_selection()
1213 *rect = sel->r; in vfe_set_selection()
1219 crop.r = *rect; in vfe_set_selection()
1225 rect = __vfe_get_crop(line, sd_state, sel->which); in vfe_set_selection()
1226 if (rect == NULL) in vfe_set_selection()
1230 *rect = sel->r; in vfe_set_selection()
1239 fmt.format.width = rect->width; in vfe_set_selection()
1240 fmt.format.height = rect->height; in vfe_set_selection()