[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>
This commit is contained in:
Hans Verkuil 2015-11-30 10:05:53 -02:00 committed by Mauro Carvalho Chehab
parent e25cb20013
commit 80954cbbe4
2 changed files with 6 additions and 6 deletions

View File

@ -453,8 +453,8 @@ static int cx18_cropcap(struct file *file, void *fh,
if (cropcap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) if (cropcap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL; return -EINVAL;
cropcap->pixelaspect.numerator = cx->is_50hz ? 59 : 10; cropcap->pixelaspect.numerator = cx->is_50hz ? 54 : 11;
cropcap->pixelaspect.denominator = cx->is_50hz ? 54 : 11; cropcap->pixelaspect.denominator = cx->is_50hz ? 59 : 10;
return 0; return 0;
} }

View File

@ -831,11 +831,11 @@ static int ivtv_cropcap(struct file *file, void *fh, struct v4l2_cropcap *cropca
struct ivtv *itv = id->itv; struct ivtv *itv = id->itv;
if (cropcap->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { if (cropcap->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
cropcap->pixelaspect.numerator = itv->is_50hz ? 59 : 10; cropcap->pixelaspect.numerator = itv->is_50hz ? 54 : 11;
cropcap->pixelaspect.denominator = itv->is_50hz ? 54 : 11; cropcap->pixelaspect.denominator = itv->is_50hz ? 59 : 10;
} else if (cropcap->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) { } else if (cropcap->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
cropcap->pixelaspect.numerator = itv->is_out_50hz ? 59 : 10; cropcap->pixelaspect.numerator = itv->is_out_50hz ? 54 : 11;
cropcap->pixelaspect.denominator = itv->is_out_50hz ? 54 : 11; cropcap->pixelaspect.denominator = itv->is_out_50hz ? 59 : 10;
} else { } else {
return -EINVAL; return -EINVAL;
} }