summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-08-30 19:52:14 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-08-30 19:52:14 -0300
commit9af8121508d81fa7c7979ee74c624cfa5f6fa227 (patch)
tree55100d417b9d8e6f30d7d3f469d85b701e93c674 /linux
parente142bc7e47bdfdd0dd466ebca5f3c7ec4c6352b9 (diff)
downloadmediapointer-dvb-s2-9af8121508d81fa7c7979ee74c624cfa5f6fa227.tar.gz
mediapointer-dvb-s2-9af8121508d81fa7c7979ee74c624cfa5f6fa227.tar.bz2
Fix scaling calculus
From: Mauro Carvalho Chehab <mchehab@infradead.org> Thanks-to: Hans Verkuil <hverkuil@xs4all.nl> for testing it on ivtv. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/saa7115.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c
index 2259d318a..54336578a 100644
--- a/linux/drivers/media/video/saa7115.c
+++ b/linux/drivers/media/video/saa7115.c
@@ -1093,22 +1093,22 @@ static int saa711x_set_size(struct i2c_client *client, int width, int height)
saa711x_write(client, R_CD_B_HORIZ_OUTPUT_WINDOW_LENGTH_MSB,
(u8) ((width >> 8) & 0xff));
+ /* Vertical Scaling uses height/2 */
+ res=height/2;
+
+ /*FIXME: This code seems weird, however, this is how it is
+ * working right now.
+ */
if (height == Vsrc) {
- /*FIXME: This code seems weird, however, this is how it is
- working right now.
- */
- res=height/2;
if (!is_50hz)
res+=8;
- } else
- res=height;
+ }
/* height */
saa711x_write(client, R_CE_B_VERT_OUTPUT_WINDOW_LENGTH,
(u8) (res & 0xff));
saa711x_write(client, R_CF_B_VERT_OUTPUT_WINDOW_LENGTH_MSB,
- (u8) (res & 0xff));
-
+ (u8) ((res >> 8) & 0xff));
/* Scaling settings */
/* Hprescaler is floor(inres/outres) */