PeterBee97 commented on code in PR #7687: URL: https://github.com/apache/nuttx/pull/7687#discussion_r1033064848
########## drivers/video/video.c: ########## @@ -1468,6 +1631,22 @@ static int validate_frame_setting(enum v4l2_buf_type type, return g_video_data_ops->validate_frame_setting(nr_fmt, df, &di); } +static size_t video_fmt_buf_size(video_format_t *vf) +{ + size_t ret = vf->width * vf->height; + switch (vf->pixelformat) + { + case V4L2_PIX_FMT_YUV420 : + return ret * 3 / 2; + case V4L2_PIX_FMT_YUYV : + case V4L2_PIX_FMT_UYVY : + case V4L2_PIX_FMT_RGB565 : + case V4L2_PIX_FMT_JPEG : Review Comment: fixed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org