Commit 2485eb0a authored by audetto@tiscali.it's avatar audetto@tiscali.it Committed by Mauro Carvalho Chehab

V4L/DVB (4964): VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422 are the same palette

Consistent handling of VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422
Signed-off-by: default avatarAndrea A Odetti <audetto@tiscali.it>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent c6268461
...@@ -923,7 +923,7 @@ static int meye_do_ioctl(struct inode *inode, struct file *file, ...@@ -923,7 +923,7 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
struct video_picture *p = arg; struct video_picture *p = arg;
if (p->depth != 16) if (p->depth != 16)
return -EINVAL; return -EINVAL;
if (p->palette != VIDEO_PALETTE_YUV422) if (p->palette != VIDEO_PALETTE_YUV422 && p->palette != VIDEO_PALETTE_YUYV)
return -EINVAL; return -EINVAL;
mutex_lock(&meye.lock); mutex_lock(&meye.lock);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS, sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS,
...@@ -978,7 +978,7 @@ static int meye_do_ioctl(struct inode *inode, struct file *file, ...@@ -978,7 +978,7 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
if (vm->frame >= gbuffers || vm->frame < 0) if (vm->frame >= gbuffers || vm->frame < 0)
return -EINVAL; return -EINVAL;
if (vm->format != VIDEO_PALETTE_YUV422) if (vm->format != VIDEO_PALETTE_YUV422 && vm->format != VIDEO_PALETTE_YUYV)
return -EINVAL; return -EINVAL;
if (vm->height * vm->width * 2 > gbufsize) if (vm->height * vm->width * 2 > gbufsize)
return -EINVAL; return -EINVAL;
......
...@@ -789,7 +789,7 @@ static int w9966_v4l_do_ioctl(struct inode *inode, struct file *file, ...@@ -789,7 +789,7 @@ static int w9966_v4l_do_ioctl(struct inode *inode, struct file *file,
case VIDIOCSPICT: case VIDIOCSPICT:
{ {
struct video_picture *vpic = arg; struct video_picture *vpic = arg;
if (vpic->depth != 16 || vpic->palette != VIDEO_PALETTE_YUV422) if (vpic->depth != 16 || (vpic->palette != VIDEO_PALETTE_YUV422 && vpic->palette != VIDEO_PALETTE_YUYV))
return -EINVAL; return -EINVAL;
cam->brightness = vpic->brightness >> 8; cam->brightness = vpic->brightness >> 8;
......
...@@ -429,7 +429,7 @@ zr36057_set_vfe (struct zoran *zr, ...@@ -429,7 +429,7 @@ zr36057_set_vfe (struct zoran *zr,
reg |= (HorDcm << ZR36057_VFESPFR_HorDcm); reg |= (HorDcm << ZR36057_VFESPFR_HorDcm);
reg |= (VerDcm << ZR36057_VFESPFR_VerDcm); reg |= (VerDcm << ZR36057_VFESPFR_VerDcm);
reg |= (DispMode << ZR36057_VFESPFR_DispMode); reg |= (DispMode << ZR36057_VFESPFR_DispMode);
if (format->palette != VIDEO_PALETTE_YUV422) if (format->palette != VIDEO_PALETTE_YUV422 && format->palette != VIDEO_PALETTE_YUYV)
reg |= ZR36057_VFESPFR_LittleEndian; reg |= ZR36057_VFESPFR_LittleEndian;
/* RJ: I don't know, why the following has to be the opposite /* RJ: I don't know, why the following has to be the opposite
* of the corresponding ZR36060 setting, but only this way * of the corresponding ZR36060 setting, but only this way
...@@ -441,6 +441,7 @@ zr36057_set_vfe (struct zoran *zr, ...@@ -441,6 +441,7 @@ zr36057_set_vfe (struct zoran *zr,
reg |= ZR36057_VFESPFR_TopField; reg |= ZR36057_VFESPFR_TopField;
switch (format->palette) { switch (format->palette) {
case VIDEO_PALETTE_YUYV:
case VIDEO_PALETTE_YUV422: case VIDEO_PALETTE_YUV422:
reg |= ZR36057_VFESPFR_YUV422; reg |= ZR36057_VFESPFR_YUV422;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment