While the V4L2 selection API and V4L2 subdev selection APIs are very similar, there's one fundamental difference between the two. On sub-device API, the selection rectangle refers to the media bus format, and is bound to a sub-device's pad. On the V4L2 interface the selection rectangles refer to the in-memory pixel format.
This section defines the common definitions of the selection interfaces on the two APIs.
The precise meaning of the selection targets may be dependent on which of the two interfaces they are used.
Table B.1. Selection target definitions
|Target name||id||Definition||Valid for V4L2||Valid for V4L2 subdev|
|0x0000||Crop rectangle. Defines the cropped area.||Yes||Yes|
|0x0001||Suggested cropping rectangle that covers the "whole picture".||Yes||No|
|0x0002||Bounds of the crop rectangle. All valid crop rectangles fit inside the crop bounds rectangle.||Yes||Yes|
|0x0003||The native size of the device, e.g. a sensor's
pixel array. ||Yes||Yes|
|0x0100||Compose rectangle. Used to configure scaling and composition.||Yes||Yes|
|0x0101||Suggested composition rectangle that covers the "whole picture".||Yes||No|
|0x0102||Bounds of the compose rectangle. All valid compose rectangles fit inside the compose bounds rectangle.||Yes||Yes|
|0x0103||The active area and all padding pixels that are inserted or modified by hardware.||Yes||No|
Table B.2. Selection flag definitions
|Flag name||id||Definition||Valid for V4L2||Valid for V4L2 subdev|
|(1 << 0)||Suggest the driver it should choose greater or
equal rectangle (in size) than was requested. Albeit the
driver may choose a lesser size, it will only do so due to
hardware limitations. Without this flag (and
|(1 << 1)||Suggest the driver it should choose lesser or equal rectangle (in size) than was requested. Albeit the driver may choose a greater size, it will only do so due to hardware limitations.||Yes||Yes|
|(1 << 2)||The configuration must not be propagated to any further processing steps. If this flag is not given, the configuration is propagated inside the subdevice to all further processing steps.||No||Yes|