mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
[media] V4L: Remove "_ACTIVE" from the selection target name definitions
This patch drops the _ACTIVE part from the selection target names as a prerequisite to unify the selection target names across the subdev and regular video node API. The meaning of V4L2_SEL_TGT_*_ACTIVE and V4L2_SUBDEV_SEL_TGT_*_ACTUAL selection targets is logically the same. Different names add to confusion where both APIs are used in a single driver or an application. For some system configurations different names may lead to interoperability issues. For backwards compatibility V4L2_SEL_TGT_CROP_ACTIVE and V4L2_SEL_TGT_COMPOSE_ACTIVE are defined as aliases to V4L2_SEL_TGT_CROP and V4L2_SEL_TGT_COMPOSE. These aliases will be removed after deprecation period, according to Documentation/feature-removal-schedule.txt. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
936148a71e
commit
c133482300
7 changed files with 41 additions and 36 deletions
|
@ -91,7 +91,7 @@ top/left corner at position <constant> (0,0) </constant>. The rectangle's
|
||||||
coordinates are expressed in pixels.</para>
|
coordinates are expressed in pixels.</para>
|
||||||
|
|
||||||
<para>The top left corner, width and height of the source rectangle, that is
|
<para>The top left corner, width and height of the source rectangle, that is
|
||||||
the area actually sampled, is given by the <constant> V4L2_SEL_TGT_CROP_ACTIVE
|
the area actually sampled, is given by the <constant> V4L2_SEL_TGT_CROP
|
||||||
</constant> target. It uses the same coordinate system as <constant>
|
</constant> target. It uses the same coordinate system as <constant>
|
||||||
V4L2_SEL_TGT_CROP_BOUNDS </constant>. The active cropping area must lie
|
V4L2_SEL_TGT_CROP_BOUNDS </constant>. The active cropping area must lie
|
||||||
completely inside the capture boundaries. The driver may further adjust the
|
completely inside the capture boundaries. The driver may further adjust the
|
||||||
|
@ -111,7 +111,7 @@ height are equal to the image size set by <constant> VIDIOC_S_FMT </constant>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>The part of a buffer into which the image is inserted by the hardware is
|
<para>The part of a buffer into which the image is inserted by the hardware is
|
||||||
controlled by the <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.
|
controlled by the <constant> V4L2_SEL_TGT_COMPOSE </constant> target.
|
||||||
The rectangle's coordinates are also expressed in the same coordinate system as
|
The rectangle's coordinates are also expressed in the same coordinate system as
|
||||||
the bounds rectangle. The composing rectangle must lie completely inside bounds
|
the bounds rectangle. The composing rectangle must lie completely inside bounds
|
||||||
rectangle. The driver must adjust the composing rectangle to fit to the
|
rectangle. The driver must adjust the composing rectangle to fit to the
|
||||||
|
@ -125,7 +125,7 @@ bounding rectangle.</para>
|
||||||
|
|
||||||
<para>The part of a buffer that is modified by the hardware is given by
|
<para>The part of a buffer that is modified by the hardware is given by
|
||||||
<constant> V4L2_SEL_TGT_COMPOSE_PADDED </constant>. It contains all pixels
|
<constant> V4L2_SEL_TGT_COMPOSE_PADDED </constant>. It contains all pixels
|
||||||
defined using <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> plus all
|
defined using <constant> V4L2_SEL_TGT_COMPOSE </constant> plus all
|
||||||
padding data modified by hardware during insertion process. All pixels outside
|
padding data modified by hardware during insertion process. All pixels outside
|
||||||
this rectangle <emphasis>must not</emphasis> be changed by the hardware. The
|
this rectangle <emphasis>must not</emphasis> be changed by the hardware. The
|
||||||
content of pixels that lie inside the padded area but outside active area is
|
content of pixels that lie inside the padded area but outside active area is
|
||||||
|
@ -153,7 +153,7 @@ specified using <constant> VIDIOC_S_FMT </constant> ioctl.</para>
|
||||||
|
|
||||||
<para>The top left corner, width and height of the source rectangle, that is
|
<para>The top left corner, width and height of the source rectangle, that is
|
||||||
the area from which image date are processed by the hardware, is given by the
|
the area from which image date are processed by the hardware, is given by the
|
||||||
<constant> V4L2_SEL_TGT_CROP_ACTIVE </constant>. Its coordinates are expressed
|
<constant> V4L2_SEL_TGT_CROP </constant>. Its coordinates are expressed
|
||||||
in in the same coordinate system as the bounds rectangle. The active cropping
|
in in the same coordinate system as the bounds rectangle. The active cropping
|
||||||
area must lie completely inside the crop boundaries and the driver may further
|
area must lie completely inside the crop boundaries and the driver may further
|
||||||
adjust the requested size and/or position according to hardware
|
adjust the requested size and/or position according to hardware
|
||||||
|
@ -165,7 +165,7 @@ bounding rectangle.</para>
|
||||||
|
|
||||||
<para>The part of a video signal or graphics display where the image is
|
<para>The part of a video signal or graphics display where the image is
|
||||||
inserted by the hardware is controlled by <constant>
|
inserted by the hardware is controlled by <constant>
|
||||||
V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target. The rectangle's coordinates
|
V4L2_SEL_TGT_COMPOSE </constant> target. The rectangle's coordinates
|
||||||
are expressed in pixels. The composing rectangle must lie completely inside the
|
are expressed in pixels. The composing rectangle must lie completely inside the
|
||||||
bounds rectangle. The driver must adjust the area to fit to the bounding
|
bounds rectangle. The driver must adjust the area to fit to the bounding
|
||||||
limits. Moreover, the driver can perform other adjustments according to
|
limits. Moreover, the driver can perform other adjustments according to
|
||||||
|
@ -184,7 +184,7 @@ such a padded area is driver-dependent feature not covered by this document.
|
||||||
Driver developers are encouraged to keep padded rectangle equal to active one.
|
Driver developers are encouraged to keep padded rectangle equal to active one.
|
||||||
The padded target is accessed by the <constant> V4L2_SEL_TGT_COMPOSE_PADDED
|
The padded target is accessed by the <constant> V4L2_SEL_TGT_COMPOSE_PADDED
|
||||||
</constant> identifier. It must contain all pixels from the <constant>
|
</constant> identifier. It must contain all pixels from the <constant>
|
||||||
V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.</para>
|
V4L2_SEL_TGT_COMPOSE </constant> target.</para>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -193,8 +193,8 @@ V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.</para>
|
||||||
<title>Scaling control</title>
|
<title>Scaling control</title>
|
||||||
|
|
||||||
<para>An application can detect if scaling is performed by comparing the width
|
<para>An application can detect if scaling is performed by comparing the width
|
||||||
and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP_ACTIVE
|
and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP
|
||||||
</constant> and <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> targets. If
|
</constant> and <constant> V4L2_SEL_TGT_COMPOSE </constant> targets. If
|
||||||
these are not equal then the scaling is applied. The application can compute
|
these are not equal then the scaling is applied. The application can compute
|
||||||
the scaling ratios using these values.</para>
|
the scaling ratios using these values.</para>
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ area)</para>
|
||||||
ret = ioctl(fd, &VIDIOC-G-SELECTION;, &sel);
|
ret = ioctl(fd, &VIDIOC-G-SELECTION;, &sel);
|
||||||
if (ret)
|
if (ret)
|
||||||
exit(-1);
|
exit(-1);
|
||||||
sel.target = V4L2_SEL_TGT_CROP_ACTIVE;
|
sel.target = V4L2_SEL_TGT_CROP;
|
||||||
ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel);
|
ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel);
|
||||||
if (ret)
|
if (ret)
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
@ -281,7 +281,7 @@ area)</para>
|
||||||
r.left = sel.r.width / 4;
|
r.left = sel.r.width / 4;
|
||||||
r.top = sel.r.height / 4;
|
r.top = sel.r.height / 4;
|
||||||
sel.r = r;
|
sel.r = r;
|
||||||
sel.target = V4L2_SEL_TGT_COMPOSE_ACTIVE;
|
sel.target = V4L2_SEL_TGT_COMPOSE;
|
||||||
sel.flags = V4L2_SEL_FLAG_LE;
|
sel.flags = V4L2_SEL_FLAG_LE;
|
||||||
ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel);
|
ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -298,11 +298,11 @@ V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> for other devices</para>
|
||||||
|
|
||||||
&v4l2-selection; compose = {
|
&v4l2-selection; compose = {
|
||||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
|
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
|
||||||
.target = V4L2_SEL_TGT_COMPOSE_ACTIVE,
|
.target = V4L2_SEL_TGT_COMPOSE,
|
||||||
};
|
};
|
||||||
&v4l2-selection; crop = {
|
&v4l2-selection; crop = {
|
||||||
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
|
.type = V4L2_BUF_TYPE_VIDEO_OUTPUT,
|
||||||
.target = V4L2_SEL_TGT_CROP_ACTIVE,
|
.target = V4L2_SEL_TGT_CROP,
|
||||||
};
|
};
|
||||||
double hscale, vscale;
|
double hscale, vscale;
|
||||||
|
|
||||||
|
|
|
@ -65,8 +65,8 @@ Do not use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE
|
||||||
</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of
|
</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of
|
||||||
<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is
|
<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is
|
||||||
setting the value of &v4l2-selection; <structfield>target</structfield> field
|
setting the value of &v4l2-selection; <structfield>target</structfield> field
|
||||||
to <constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant>
|
to <constant> V4L2_SEL_TGT_CROP </constant> (<constant>
|
||||||
V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref
|
V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref
|
||||||
linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional
|
linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional
|
||||||
targets. The <structfield>flags</structfield> and <structfield>reserved
|
targets. The <structfield>flags</structfield> and <structfield>reserved
|
||||||
</structfield> fields of &v4l2-selection; are ignored and they must be filled
|
</structfield> fields of &v4l2-selection; are ignored and they must be filled
|
||||||
|
@ -86,8 +86,8 @@ use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE
|
||||||
</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of
|
</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of
|
||||||
<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is
|
<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is
|
||||||
setting the value of &v4l2-selection; <structfield>target</structfield> to
|
setting the value of &v4l2-selection; <structfield>target</structfield> to
|
||||||
<constant>V4L2_SEL_TGT_CROP_ACTIVE</constant> (<constant>
|
<constant>V4L2_SEL_TGT_CROP</constant> (<constant>
|
||||||
V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref
|
V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref
|
||||||
linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional
|
linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional
|
||||||
targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be
|
targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be
|
||||||
set to the desired active area. Field &v4l2-selection; <structfield> reserved
|
set to the desired active area. Field &v4l2-selection; <structfield> reserved
|
||||||
|
@ -161,7 +161,7 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
|
||||||
&cs-def;
|
&cs-def;
|
||||||
<tbody valign="top">
|
<tbody valign="top">
|
||||||
<row>
|
<row>
|
||||||
<entry><constant>V4L2_SEL_TGT_CROP_ACTIVE</constant></entry>
|
<entry><constant>V4L2_SEL_TGT_CROP</constant></entry>
|
||||||
<entry>0x0000</entry>
|
<entry>0x0000</entry>
|
||||||
<entry>The area that is currently cropped by hardware.</entry>
|
<entry>The area that is currently cropped by hardware.</entry>
|
||||||
</row>
|
</row>
|
||||||
|
@ -176,7 +176,7 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
|
||||||
<entry>Limits for the cropping rectangle.</entry>
|
<entry>Limits for the cropping rectangle.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><constant>V4L2_SEL_TGT_COMPOSE_ACTIVE</constant></entry>
|
<entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry>
|
||||||
<entry>0x0100</entry>
|
<entry>0x0100</entry>
|
||||||
<entry>The area to which data is composed by hardware.</entry>
|
<entry>The area to which data is composed by hardware.</entry>
|
||||||
</row>
|
</row>
|
||||||
|
@ -193,7 +193,8 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
|
||||||
<row>
|
<row>
|
||||||
<entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry>
|
<entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry>
|
||||||
<entry>0x0103</entry>
|
<entry>0x0103</entry>
|
||||||
<entry>The active area and all padding pixels that are inserted or modified by hardware.</entry>
|
<entry>The active area and all padding pixels that are inserted or
|
||||||
|
modified by hardware.</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
|
|
|
@ -655,7 +655,7 @@ static void fimc_capture_try_selection(struct fimc_ctx *ctx,
|
||||||
r->left = r->top = 0;
|
r->left = r->top = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (target == V4L2_SEL_TGT_COMPOSE_ACTIVE) {
|
if (target == V4L2_SEL_TGT_COMPOSE) {
|
||||||
if (ctx->rotation != 90 && ctx->rotation != 270)
|
if (ctx->rotation != 90 && ctx->rotation != 270)
|
||||||
align_h = 1;
|
align_h = 1;
|
||||||
max_sc_h = min(SCALER_MAX_HRATIO, 1 << (ffs(sink->width) - 3));
|
max_sc_h = min(SCALER_MAX_HRATIO, 1 << (ffs(sink->width) - 3));
|
||||||
|
@ -682,7 +682,7 @@ static void fimc_capture_try_selection(struct fimc_ctx *ctx,
|
||||||
rotate ? sink->f_height : sink->f_width);
|
rotate ? sink->f_height : sink->f_width);
|
||||||
max_h = min_t(u32, FIMC_CAMIF_MAX_HEIGHT, sink->f_height);
|
max_h = min_t(u32, FIMC_CAMIF_MAX_HEIGHT, sink->f_height);
|
||||||
|
|
||||||
if (target == V4L2_SEL_TGT_COMPOSE_ACTIVE) {
|
if (target == V4L2_SEL_TGT_COMPOSE) {
|
||||||
min_w = min_t(u32, max_w, sink->f_width / max_sc_h);
|
min_w = min_t(u32, max_w, sink->f_width / max_sc_h);
|
||||||
min_h = min_t(u32, max_h, sink->f_height / max_sc_v);
|
min_h = min_t(u32, max_h, sink->f_height / max_sc_v);
|
||||||
if (rotate) {
|
if (rotate) {
|
||||||
|
@ -1147,9 +1147,9 @@ static int fimc_cap_g_selection(struct file *file, void *fh,
|
||||||
s->r.height = f->o_height;
|
s->r.height = f->o_height;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case V4L2_SEL_TGT_COMPOSE_ACTIVE:
|
case V4L2_SEL_TGT_COMPOSE:
|
||||||
f = &ctx->d_frame;
|
f = &ctx->d_frame;
|
||||||
case V4L2_SEL_TGT_CROP_ACTIVE:
|
case V4L2_SEL_TGT_CROP:
|
||||||
s->r.left = f->offs_h;
|
s->r.left = f->offs_h;
|
||||||
s->r.top = f->offs_v;
|
s->r.top = f->offs_v;
|
||||||
s->r.width = f->width;
|
s->r.width = f->width;
|
||||||
|
@ -1185,9 +1185,9 @@ static int fimc_cap_s_selection(struct file *file, void *fh,
|
||||||
if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
|
if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (s->target == V4L2_SEL_TGT_COMPOSE_ACTIVE)
|
if (s->target == V4L2_SEL_TGT_COMPOSE)
|
||||||
f = &ctx->d_frame;
|
f = &ctx->d_frame;
|
||||||
else if (s->target == V4L2_SEL_TGT_CROP_ACTIVE)
|
else if (s->target == V4L2_SEL_TGT_CROP)
|
||||||
f = &ctx->s_frame;
|
f = &ctx->s_frame;
|
||||||
else
|
else
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -1483,7 +1483,7 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
mutex_lock(&fimc->lock);
|
mutex_lock(&fimc->lock);
|
||||||
fimc_capture_try_selection(ctx, r, V4L2_SEL_TGT_CROP_ACTIVE);
|
fimc_capture_try_selection(ctx, r, V4L2_SEL_TGT_CROP);
|
||||||
|
|
||||||
switch (sel->target) {
|
switch (sel->target) {
|
||||||
case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS:
|
case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS:
|
||||||
|
|
|
@ -871,7 +871,7 @@ static int fimc_lite_g_selection(struct file *file, void *fh,
|
||||||
sel->r.height = f->f_height;
|
sel->r.height = f->f_height;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case V4L2_SEL_TGT_COMPOSE_ACTIVE:
|
case V4L2_SEL_TGT_COMPOSE:
|
||||||
sel->r = f->rect;
|
sel->r = f->rect;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -888,7 +888,7 @@ static int fimc_lite_s_selection(struct file *file, void *fh,
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (sel->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE ||
|
if (sel->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE ||
|
||||||
sel->target != V4L2_SEL_TGT_COMPOSE_ACTIVE)
|
sel->target != V4L2_SEL_TGT_COMPOSE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
fimc_lite_try_compose(fimc, &rect);
|
fimc_lite_try_compose(fimc, &rect);
|
||||||
|
|
|
@ -824,10 +824,10 @@ static int s5p_jpeg_g_selection(struct file *file, void *priv,
|
||||||
|
|
||||||
/* For JPEG blob active == default == bounds */
|
/* For JPEG blob active == default == bounds */
|
||||||
switch (s->target) {
|
switch (s->target) {
|
||||||
case V4L2_SEL_TGT_CROP_ACTIVE:
|
case V4L2_SEL_TGT_CROP:
|
||||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||||
case V4L2_SEL_TGT_COMPOSE_ACTIVE:
|
case V4L2_SEL_TGT_COMPOSE:
|
||||||
case V4L2_SEL_TGT_COMPOSE_DEFAULT:
|
case V4L2_SEL_TGT_COMPOSE_DEFAULT:
|
||||||
s->r.width = ctx->out_q.w;
|
s->r.width = ctx->out_q.w;
|
||||||
s->r.height = ctx->out_q.h;
|
s->r.height = ctx->out_q.h;
|
||||||
|
|
|
@ -367,7 +367,7 @@ static int mxr_g_selection(struct file *file, void *fh,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
switch (s->target) {
|
switch (s->target) {
|
||||||
case V4L2_SEL_TGT_CROP_ACTIVE:
|
case V4L2_SEL_TGT_CROP:
|
||||||
s->r.left = geo->src.x_offset;
|
s->r.left = geo->src.x_offset;
|
||||||
s->r.top = geo->src.y_offset;
|
s->r.top = geo->src.y_offset;
|
||||||
s->r.width = geo->src.width;
|
s->r.width = geo->src.width;
|
||||||
|
@ -380,7 +380,7 @@ static int mxr_g_selection(struct file *file, void *fh,
|
||||||
s->r.width = geo->src.full_width;
|
s->r.width = geo->src.full_width;
|
||||||
s->r.height = geo->src.full_height;
|
s->r.height = geo->src.full_height;
|
||||||
break;
|
break;
|
||||||
case V4L2_SEL_TGT_COMPOSE_ACTIVE:
|
case V4L2_SEL_TGT_COMPOSE:
|
||||||
case V4L2_SEL_TGT_COMPOSE_PADDED:
|
case V4L2_SEL_TGT_COMPOSE_PADDED:
|
||||||
s->r.left = geo->dst.x_offset;
|
s->r.left = geo->dst.x_offset;
|
||||||
s->r.top = geo->dst.y_offset;
|
s->r.top = geo->dst.y_offset;
|
||||||
|
@ -449,11 +449,11 @@ static int mxr_s_selection(struct file *file, void *fh,
|
||||||
res.height = geo->dst.full_height;
|
res.height = geo->dst.full_height;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case V4L2_SEL_TGT_CROP_ACTIVE:
|
case V4L2_SEL_TGT_CROP:
|
||||||
target = &geo->src;
|
target = &geo->src;
|
||||||
stage = MXR_GEOMETRY_CROP;
|
stage = MXR_GEOMETRY_CROP;
|
||||||
break;
|
break;
|
||||||
case V4L2_SEL_TGT_COMPOSE_ACTIVE:
|
case V4L2_SEL_TGT_COMPOSE:
|
||||||
case V4L2_SEL_TGT_COMPOSE_PADDED:
|
case V4L2_SEL_TGT_COMPOSE_PADDED:
|
||||||
target = &geo->dst;
|
target = &geo->dst;
|
||||||
stage = MXR_GEOMETRY_COMPOSE;
|
stage = MXR_GEOMETRY_COMPOSE;
|
||||||
|
|
|
@ -767,13 +767,13 @@ struct v4l2_crop {
|
||||||
/* Selection targets */
|
/* Selection targets */
|
||||||
|
|
||||||
/* Current cropping area */
|
/* Current cropping area */
|
||||||
#define V4L2_SEL_TGT_CROP_ACTIVE 0x0000
|
#define V4L2_SEL_TGT_CROP 0x0000
|
||||||
/* Default cropping area */
|
/* Default cropping area */
|
||||||
#define V4L2_SEL_TGT_CROP_DEFAULT 0x0001
|
#define V4L2_SEL_TGT_CROP_DEFAULT 0x0001
|
||||||
/* Cropping bounds */
|
/* Cropping bounds */
|
||||||
#define V4L2_SEL_TGT_CROP_BOUNDS 0x0002
|
#define V4L2_SEL_TGT_CROP_BOUNDS 0x0002
|
||||||
/* Current composing area */
|
/* Current composing area */
|
||||||
#define V4L2_SEL_TGT_COMPOSE_ACTIVE 0x0100
|
#define V4L2_SEL_TGT_COMPOSE 0x0100
|
||||||
/* Default composing area */
|
/* Default composing area */
|
||||||
#define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101
|
#define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101
|
||||||
/* Composing bounds */
|
/* Composing bounds */
|
||||||
|
@ -781,6 +781,10 @@ struct v4l2_crop {
|
||||||
/* Current composing area plus all padding pixels */
|
/* Current composing area plus all padding pixels */
|
||||||
#define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103
|
#define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103
|
||||||
|
|
||||||
|
/* Backward compatibility definitions */
|
||||||
|
#define V4L2_SEL_TGT_CROP_ACTIVE V4L2_SEL_TGT_CROP
|
||||||
|
#define V4L2_SEL_TGT_COMPOSE_ACTIVE V4L2_SEL_TGT_COMPOSE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct v4l2_selection - selection info
|
* struct v4l2_selection - selection info
|
||||||
* @type: buffer type (do not use *_MPLANE types)
|
* @type: buffer type (do not use *_MPLANE types)
|
||||||
|
|
Loading…
Reference in a new issue