On Friday 09 October 2009 07:07:32 Jun Nie wrote: > 2009/9/23 Jun Nie <niej0001@xxxxxxxxx>: > > Hi, > > I re-send this email for the last one is rejected by system. I am > > sorry if you guys received both. > > > > I am optimizing video playback with overlay with V4L2 driver. The > > video content is a sub-region of codec output. Thus a memory copy is > > necessary. > > Is there plan to support for stride and discrete YUV planer in > > kernel? Such as below changes can help much for my usage case. > > > > --- a/include/linux/videodev2.h > > +++ b/include/linux/videodev2.h > > @@ -529,7 +529,20 @@ struct v4l2_buffer { > > __u32 offset; > > unsigned long userptr; > > } m; > > + /* UV/GB location is valid only in planer case */ > > + union { > > + __u32 offset_ug; > > + unsigned long userptr_ug; > > + } m_ug; > > + union { > > + __u32 offset_vb; > > + unsigned long userptr_vb; > > + } m_vb; > > __u32 length; > > + /* stride of YUV or RGB */ > > + __u32 stride_yr; > > + __u32 stride_ug; > > + __u32 stride_vb; > > __u32 input; > > __u32 reserved; > > }; > > > > If such change is acceptable for everyone, I may help on the implementation. > > Any comments are welcome. > > > > Jun > > > > Hi, Hans/Guennadi > > What do you think of supporting this feature? > > Jun > > Well, it is definitely not possible to do it in this manner since changing the size of struct v4l2_buffer will break the API. Furthermore, something like this will only work if the DMA engine can handle strides. Is that the case for your hardware? I don't think you mentioned what the hardware is you use. Regards, Hans -- Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom ÿôèº{.nÇ+?·?®??+%?Ëÿ±éݶ¥?wÿº{.nÇ+?·¥?{±þg??¯â?Ø^n?r¡ö¦zË?ëh?¨èÚ&£ûàz¿äz¹Þ?ú+?Ê+zf£¢·h??§~??Ûiÿÿï?êÿ?êçz_è®æj:+v?¨þ)ߣøm