case V4L2_PIX_FMT_RGB24:
switch (dest_pix_fmt) {
+ case V4L2_PIX_FMT_RGB24:
+ memcpy(dest, src, width * height * 3);
+ break;
case V4L2_PIX_FMT_BGR24:
v4lconvert_swap_rgb(src, dest, width, height);
break;
case V4L2_PIX_FMT_RGB24:
v4lconvert_swap_rgb(src, dest, width, height);
break;
+ case V4L2_PIX_FMT_BGR24:
+ memcpy(dest, src, width * height * 3);
+ break;
case V4L2_PIX_FMT_YUV420:
v4lconvert_rgb24_to_yuv420(src, dest, fmt, 1, 0);
break;
v4lconvert_yuv420_to_bgr24(src, dest, width,
height, 0);
break;
+ case V4L2_PIX_FMT_YUV420:
+ memcpy(dest, src, width * height * 3 / 2);
+ break;
case V4L2_PIX_FMT_YVU420:
v4lconvert_swap_uv(src, dest, fmt);
break;
case V4L2_PIX_FMT_YUV420:
v4lconvert_swap_uv(src, dest, fmt);
break;
+ case V4L2_PIX_FMT_YVU420:
+ memcpy(dest, src, width * height * 3 / 2);
+ break;
}
if (src_size < (width * height * 3 / 2)) {
V4LCONVERT_ERR("short yvu420 data frame\n");
my_src_fmt.fmt.pix.pixelformat,
my_dest_fmt.fmt.pix.pixelformat))
convert = 2;
- else if (my_dest_fmt.fmt.pix.pixelformat != my_src_fmt.fmt.pix.pixelformat)
+ else if (my_dest_fmt.fmt.pix.pixelformat !=
+ my_src_fmt.fmt.pix.pixelformat ||
+ /* Special case if we do not need to do conversion, but we
+ are not doing any other step involving copying either,
+ force going through convert_pixfmt to copy the data from
+ source to dest */
+ (!rotate90 && !hflip && !vflip && !crop))
convert = 1;
/* convert_pixfmt (only if convert == 2) -> processing -> convert_pixfmt ->