aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-11-30 07:05:53 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-12-18 10:30:18 -0500
commit80954cbbe431bcc43af6d8c8d39a83fa016dffdf (patch)
treeb22c639c0992356d5e220c8375208cba2e6c2657
parente25cb2001307c1c4b7d79da0fcd2a7598cf8e647 (diff)
[media] ivtv/cx18: fix inverted pixel aspect ratio
These two drivers reported the pixel aspect ratio the wrong way around. This caused qv4l2 to scale the image incorrectly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/pci/cx18/cx18-ioctl.c4
-rw-r--r--drivers/media/pci/ivtv/ivtv-ioctl.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/pci/cx18/cx18-ioctl.c b/drivers/media/pci/cx18/cx18-ioctl.c
index 55525af1f482..eeb741c7db1b 100644
--- a/drivers/media/pci/cx18/cx18-ioctl.c
+++ b/drivers/media/pci/cx18/cx18-ioctl.c
@@ -453,8 +453,8 @@ static int cx18_cropcap(struct file *file, void *fh,
453 453
454 if (cropcap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 454 if (cropcap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
455 return -EINVAL; 455 return -EINVAL;
456 cropcap->pixelaspect.numerator = cx->is_50hz ? 59 : 10; 456 cropcap->pixelaspect.numerator = cx->is_50hz ? 54 : 11;
457 cropcap->pixelaspect.denominator = cx->is_50hz ? 54 : 11; 457 cropcap->pixelaspect.denominator = cx->is_50hz ? 59 : 10;
458 return 0; 458 return 0;
459} 459}
460 460
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c
index 2c54cb824b0b..2dc4b20f3ac0 100644
--- a/drivers/media/pci/ivtv/ivtv-ioctl.c
+++ b/drivers/media/pci/ivtv/ivtv-ioctl.c
@@ -831,11 +831,11 @@ static int ivtv_cropcap(struct file *file, void *fh, struct v4l2_cropcap *cropca
831 struct ivtv *itv = id->itv; 831 struct ivtv *itv = id->itv;
832 832
833 if (cropcap->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { 833 if (cropcap->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
834 cropcap->pixelaspect.numerator = itv->is_50hz ? 59 : 10; 834 cropcap->pixelaspect.numerator = itv->is_50hz ? 54 : 11;
835 cropcap->pixelaspect.denominator = itv->is_50hz ? 54 : 11; 835 cropcap->pixelaspect.denominator = itv->is_50hz ? 59 : 10;
836 } else if (cropcap->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) { 836 } else if (cropcap->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
837 cropcap->pixelaspect.numerator = itv->is_out_50hz ? 59 : 10; 837 cropcap->pixelaspect.numerator = itv->is_out_50hz ? 54 : 11;
838 cropcap->pixelaspect.denominator = itv->is_out_50hz ? 54 : 11; 838 cropcap->pixelaspect.denominator = itv->is_out_50hz ? 59 : 10;
839 } else { 839 } else {
840 return -EINVAL; 840 return -EINVAL;
841 } 841 }