Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Andrea A Odetti <audetto@tiscali.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>

authored by

audetto@tiscali.it and committed by
Mauro Carvalho Chehab
2485eb0a c6268461

+5 -4
+2 -2
drivers/media/video/meye.c
··· 923 923 struct video_picture *p = arg; 924 924 if (p->depth != 16) 925 925 return -EINVAL; 926 - if (p->palette != VIDEO_PALETTE_YUV422) 926 + if (p->palette != VIDEO_PALETTE_YUV422 && p->palette != VIDEO_PALETTE_YUYV) 927 927 return -EINVAL; 928 928 mutex_lock(&meye.lock); 929 929 sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS, ··· 978 978 979 979 if (vm->frame >= gbuffers || vm->frame < 0) 980 980 return -EINVAL; 981 - if (vm->format != VIDEO_PALETTE_YUV422) 981 + if (vm->format != VIDEO_PALETTE_YUV422 && vm->format != VIDEO_PALETTE_YUYV) 982 982 return -EINVAL; 983 983 if (vm->height * vm->width * 2 > gbufsize) 984 984 return -EINVAL;
+1 -1
drivers/media/video/w9966.c
··· 789 789 case VIDIOCSPICT: 790 790 { 791 791 struct video_picture *vpic = arg; 792 - if (vpic->depth != 16 || vpic->palette != VIDEO_PALETTE_YUV422) 792 + if (vpic->depth != 16 || (vpic->palette != VIDEO_PALETTE_YUV422 && vpic->palette != VIDEO_PALETTE_YUYV)) 793 793 return -EINVAL; 794 794 795 795 cam->brightness = vpic->brightness >> 8;
+2 -1
drivers/media/video/zoran_device.c
··· 429 429 reg |= (HorDcm << ZR36057_VFESPFR_HorDcm); 430 430 reg |= (VerDcm << ZR36057_VFESPFR_VerDcm); 431 431 reg |= (DispMode << ZR36057_VFESPFR_DispMode); 432 - if (format->palette != VIDEO_PALETTE_YUV422) 432 + if (format->palette != VIDEO_PALETTE_YUV422 && format->palette != VIDEO_PALETTE_YUYV) 433 433 reg |= ZR36057_VFESPFR_LittleEndian; 434 434 /* RJ: I don't know, why the following has to be the opposite 435 435 * of the corresponding ZR36060 setting, but only this way ··· 441 441 reg |= ZR36057_VFESPFR_TopField; 442 442 switch (format->palette) { 443 443 444 + case VIDEO_PALETTE_YUYV: 444 445 case VIDEO_PALETTE_YUV422: 445 446 reg |= ZR36057_VFESPFR_YUV422; 446 447 break;