mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
media: imx219: Rename "binning" as "bin_hv" in imx219_set_pad_format
Rename "binning" as "bin_hv" in anticipation of having a variable called "binning" for another purpose. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
parent
47576c541e
commit
c4b1944b56
|
|
@ -853,7 +853,7 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
|
|||
const struct imx219_mode *mode;
|
||||
struct v4l2_mbus_framefmt *format;
|
||||
struct v4l2_rect *crop;
|
||||
u8 bin_h, bin_v, binning;
|
||||
u8 bin_h, bin_v, bin_hv;
|
||||
int ret;
|
||||
|
||||
format = v4l2_subdev_state_get_format(state, 0);
|
||||
|
|
@ -886,11 +886,11 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
|
|||
bin_v = min(IMX219_ACTIVE_AREA_HEIGHT / format->height, 2U);
|
||||
|
||||
/* Ensure bin_h and bin_v are same to avoid 1:2 or 2:1 stretching */
|
||||
binning = min(bin_h, bin_v);
|
||||
bin_hv = min(bin_h, bin_v);
|
||||
|
||||
crop = v4l2_subdev_state_get_crop(state, 0);
|
||||
crop->width = format->width * binning;
|
||||
crop->height = format->height * binning;
|
||||
crop->width = format->width * bin_hv;
|
||||
crop->height = format->height * bin_hv;
|
||||
crop->left = (IMX219_NATIVE_WIDTH - crop->width) / 2;
|
||||
crop->top = (IMX219_NATIVE_HEIGHT - crop->height) / 2;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user