"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "drivers/media/i2c/tvp5150.c" between
linux-3.16.62.tar.xz and linux-3.16.63.tar.xz

About: The full source of the Linux kernel 3.16.x (longterm stable)

tvp5150.c  (linux-3.16.62.tar.xz):tvp5150.c  (linux-3.16.63.tar.xz)
skipping to change at line 874 skipping to change at line 874
unsigned int hmax; unsigned int hmax;
v4l2_dbg(1, debug, sd, "%s left=%d, top=%d, width=%d, height=%d\n", v4l2_dbg(1, debug, sd, "%s left=%d, top=%d, width=%d, height=%d\n",
__func__, rect.left, rect.top, rect.width, rect.height); __func__, rect.left, rect.top, rect.width, rect.height);
if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL; return -EINVAL;
/* tvp5150 has some special limits */ /* tvp5150 has some special limits */
rect.left = clamp(rect.left, 0, TVP5150_MAX_CROP_LEFT); rect.left = clamp(rect.left, 0, TVP5150_MAX_CROP_LEFT);
rect.width = clamp_t(unsigned int, rect.width,
TVP5150_H_MAX - TVP5150_MAX_CROP_LEFT - rect.left,
TVP5150_H_MAX - rect.left);
rect.top = clamp(rect.top, 0, TVP5150_MAX_CROP_TOP); rect.top = clamp(rect.top, 0, TVP5150_MAX_CROP_TOP);
/* Calculate height based on current standard */ /* Calculate height based on current standard */
if (decoder->norm == V4L2_STD_ALL) if (decoder->norm == V4L2_STD_ALL)
std = tvp5150_read_std(sd); std = tvp5150_read_std(sd);
else else
std = decoder->norm; std = decoder->norm;
if (std & V4L2_STD_525_60) if (std & V4L2_STD_525_60)
hmax = TVP5150_V_MAX_525_60; hmax = TVP5150_V_MAX_525_60;
else else
hmax = TVP5150_V_MAX_OTHERS; hmax = TVP5150_V_MAX_OTHERS;
rect.height = clamp_t(unsigned int, rect.height, /*
* alignments:
* - width = 2 due to UYVY colorspace
* - height, image = no special alignment
*/
v4l_bound_align_image(&rect.width,
TVP5150_H_MAX - TVP5150_MAX_CROP_LEFT - rect.left,
TVP5150_H_MAX - rect.left, 1, &rect.height,
hmax - TVP5150_MAX_CROP_TOP - rect.top, hmax - TVP5150_MAX_CROP_TOP - rect.top,
hmax - rect.top); hmax - rect.top, 0, 0);
tvp5150_write(sd, TVP5150_VERT_BLANKING_START, rect.top); tvp5150_write(sd, TVP5150_VERT_BLANKING_START, rect.top);
tvp5150_write(sd, TVP5150_VERT_BLANKING_STOP, tvp5150_write(sd, TVP5150_VERT_BLANKING_STOP,
rect.top + rect.height - hmax); rect.top + rect.height - hmax);
tvp5150_write(sd, TVP5150_ACT_VD_CROP_ST_MSB, tvp5150_write(sd, TVP5150_ACT_VD_CROP_ST_MSB,
rect.left >> TVP5150_CROP_SHIFT); rect.left >> TVP5150_CROP_SHIFT);
tvp5150_write(sd, TVP5150_ACT_VD_CROP_ST_LSB, tvp5150_write(sd, TVP5150_ACT_VD_CROP_ST_LSB,
rect.left | (1 << TVP5150_CROP_SHIFT)); rect.left | (1 << TVP5150_CROP_SHIFT));
tvp5150_write(sd, TVP5150_ACT_VD_CROP_STP_MSB, tvp5150_write(sd, TVP5150_ACT_VD_CROP_STP_MSB,
(rect.left + rect.width - TVP5150_MAX_CROP_LEFT) >> (rect.left + rect.width - TVP5150_MAX_CROP_LEFT) >>
 End of changes. 3 change blocks. 
5 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)