On 09/15/2011 08:37 AM, Scott Jiang wrote: >> >>> + >>> +#define CAPTURE_DRV_NAME "bfin_capture" >>> +#define BCAP_MIN_NUM_BUF 2 >>> + >>> +struct bcap_format { >>> + u8 *desc; >>> + u32 pixelformat; >>> + enum v4l2_mbus_pixelcode mbus_code; >>> + int bpp; /* bytes per pixel */ >> >> Don't you think you might have to process 12 bpp formats at some point, >> like YUV 4:2:0, or NV12? Maybe better calculate in bits from the beginning? >> > I have a question here. How to calculate bytesperline for planar format? > According to v4l2 specification width, height and bytesperline apply > to largest plane. > Does it mean bytesperline equal to Y plane distance between two line? For planar formats - I think so. > And so you can't use bytesperline x height to calculate sizeimage? No, you can't. Please see this thread: http://www.mail-archive.com/linux-media@xxxxxxxxxxxxxxx/msg28957.html Regards, -- Sylwester Nawrocki Samsung Poland R&D Center -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html