Lines Matching defs:from
132 * v4l2_rect_scale() - scale rect r by to/from
134 * @from: from rectangle.
137 * This scales rectangle @r horizontally by @to->width / @from->width and
138 * vertically by @to->height / @from->height.
140 * Typically @r is a rectangle inside @from and you want the rectangle as
141 * it would appear after scaling @from to @to. So the resulting @r will
145 const struct v4l2_rect *from,
148 if (from->width == 0 || from->height == 0) {
152 r->left = (((r->left - from->left) * to->width) / from->width) & ~1;
153 r->width = ((r->width * to->width) / from->width) & ~1;
154 r->top = ((r->top - from->top) * to->height) / from->height;
155 r->height = (r->height * to->height) / from->height;