Lines Matching refs:rect
198 struct v4l2_rect rect; /* sensor cropping window */ member
455 sel->r = priv->rect; in ov6650_get_selection()
468 struct v4l2_rect rect = sel->r; in ov6650_set_selection() local
475 v4l_bound_align_image(&rect.width, 2, W_CIF, 1, in ov6650_set_selection()
476 &rect.height, 2, H_CIF, 1, 0); in ov6650_set_selection()
477 v4l_bound_align_image(&rect.left, DEF_HSTRT << 1, in ov6650_set_selection()
478 (DEF_HSTRT << 1) + W_CIF - (__s32)rect.width, 1, in ov6650_set_selection()
479 &rect.top, DEF_VSTRT << 1, in ov6650_set_selection()
480 (DEF_VSTRT << 1) + H_CIF - (__s32)rect.height, 1, in ov6650_set_selection()
483 ret = ov6650_reg_write(client, REG_HSTRT, rect.left >> 1); in ov6650_set_selection()
485 priv->rect.left = rect.left; in ov6650_set_selection()
487 (rect.left + rect.width) >> 1); in ov6650_set_selection()
490 priv->rect.width = rect.width; in ov6650_set_selection()
491 ret = ov6650_reg_write(client, REG_VSTRT, rect.top >> 1); in ov6650_set_selection()
494 priv->rect.top = rect.top; in ov6650_set_selection()
496 (rect.top + rect.height) >> 1); in ov6650_set_selection()
499 priv->rect.height = rect.height; in ov6650_set_selection()
515 mf->width = priv->rect.width >> priv->half_scale; in ov6650_get_fmt()
516 mf->height = priv->rect.height >> priv->half_scale; in ov6650_get_fmt()
524 static bool is_unscaled_ok(int width, int height, struct v4l2_rect *rect) in is_unscaled_ok() argument
526 return width > rect->width >> 1 || height > rect->height >> 1; in is_unscaled_ok()
551 bool half_scale = !is_unscaled_ok(mf->width, mf->height, &priv->rect); in ov6650_s_fmt()
555 .r.left = priv->rect.left + (priv->rect.width >> 1) - in ov6650_s_fmt()
557 .r.top = priv->rect.top + (priv->rect.height >> 1) - in ov6650_s_fmt()
662 mf->width = priv->rect.width >> half_scale; in ov6650_s_fmt()
663 mf->height = priv->rect.height >> half_scale; in ov6650_s_fmt()
679 if (is_unscaled_ok(mf->width, mf->height, &priv->rect)) in ov6650_set_fmt()
1000 priv->rect.left = DEF_HSTRT << 1; in ov6650_probe()
1001 priv->rect.top = DEF_VSTRT << 1; in ov6650_probe()
1002 priv->rect.width = W_CIF; in ov6650_probe()
1003 priv->rect.height = H_CIF; in ov6650_probe()