v4l2-linux: Fix nv12 linesize
unlike other YUV based formats nv12 chroma plane has the same padding as the luma plane. ref: https://01.org/linuxgraphics/gfx-docs/drm/media/uapi/v4l/pixfmt-nv12.html
This commit is contained in:
parent
e5d8f345fc
commit
0cad2abbbe
@ -123,7 +123,7 @@ static void v4l2_prep_obs_frame(struct v4l2_data *data,
|
||||
switch (data->pixfmt) {
|
||||
case V4L2_PIX_FMT_NV12:
|
||||
frame->linesize[0] = data->linesize;
|
||||
frame->linesize[1] = data->linesize / 2;
|
||||
frame->linesize[1] = data->linesize;
|
||||
plane_offsets[1] = data->linesize * data->height;
|
||||
break;
|
||||
case V4L2_PIX_FMT_YVU420:
|
||||
|
Loading…
x
Reference in New Issue
Block a user