Hi Glen Fine,
I write our partner's test conditions of VIDIOC_QBUF -> VIDIOC_QUERYBUF and the results as following.
* Input buffer is the buffer size set to VIDIOC_QBUF
* Output buffer is the parameter setting of VIDIOC_S_FMT (v4l2_format.fmt.pix.width/fmt.pix.height)
* Projection field is the field size set by parameter of VIDIOC_S_CROP.
=====
(1) Input buffer < Output buffer (Projection field == Input buffer size)
VIDIOC_QBUF return flags = 0
* Failed at VDDIOC_QBUF : errno=Invalid argument
(2) Input buffer < Output buffer (Projection field == Output buffer size)
VIDIOC_QBUF return flags = 0
* Failed at VDDIOC_QBUF : errno=Invalid argument
(3) Input buffer > Output buffer (Projection field == Input buffer size)
VIDIOC_QBUF returns flags=0
VIDIOC_QUERYBUF return flags=4 (V4L2_BUF_FLAG_DONE)
* Projection continue even though image is jumble.
(4) Input buffer > Output buffer (Projection field == Output buffer size)
VIDIOC_QBUF returns flags=0
VIDIOC_QUERYBUF return flags=2 (V4L2_BUF_FLAG_DONE)
* VIDIOC_QUERYBUF remains flag=2, and projection cannot continue
(5) Input buffer size == Output Buffer size == Projection filed
VIDIOC_QBUF returns flags=0
VIDIOC_QUERYBUF return flags=2 (V4L2_BUF_FLAG_DONE)
* VIDIOC_QUERYBUF remains flag=2, and projection cannot continue
(6) Input buffer size == Output Buffer size > Projection filed
VIDIOC_QBUF returns flags=0
VIDIOC_QUERYBUF return flags=4 (V4L2_BUF_FLAG_DONE)
* Projection continue with scale down
=====
According to these results, VDDIOC_QBUF was failed if input buffer size < output buffer size.
Best Regards,
Satoshi Shimoda