Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 1 | .. -*- coding: utf-8; mode: rst -*- |
| 2 | |
| 3 | .. _v4l2-selection-targets: |
| 4 | |
| 5 | ***************** |
| 6 | Selection targets |
| 7 | ***************** |
| 8 | |
| 9 | The precise meaning of the selection targets may be dependent on which |
| 10 | of the two interfaces they are used. |
| 11 | |
| 12 | |
| 13 | .. _v4l2-selection-targets-table: |
| 14 | |
| 15 | .. flat-table:: Selection target definitions |
| 16 | :header-rows: 1 |
| 17 | :stub-columns: 0 |
| 18 | |
| 19 | |
| 20 | - .. row 1 |
| 21 | |
| 22 | - Target name |
| 23 | |
| 24 | - id |
| 25 | |
| 26 | - Definition |
| 27 | |
| 28 | - Valid for V4L2 |
| 29 | |
| 30 | - Valid for V4L2 subdev |
| 31 | |
| 32 | - .. row 2 |
| 33 | |
| 34 | - ``V4L2_SEL_TGT_CROP`` |
| 35 | |
| 36 | - 0x0000 |
| 37 | |
| 38 | - Crop rectangle. Defines the cropped area. |
| 39 | |
| 40 | - Yes |
| 41 | |
| 42 | - Yes |
| 43 | |
| 44 | - .. row 3 |
| 45 | |
| 46 | - ``V4L2_SEL_TGT_CROP_DEFAULT`` |
| 47 | |
| 48 | - 0x0001 |
| 49 | |
| 50 | - Suggested cropping rectangle that covers the "whole picture". |
| 51 | |
| 52 | - Yes |
| 53 | |
| 54 | - No |
| 55 | |
| 56 | - .. row 4 |
| 57 | |
| 58 | - ``V4L2_SEL_TGT_CROP_BOUNDS`` |
| 59 | |
| 60 | - 0x0002 |
| 61 | |
| 62 | - Bounds of the crop rectangle. All valid crop rectangles fit inside |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame] | 63 | the crop bounds rectangle. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 64 | |
| 65 | - Yes |
| 66 | |
| 67 | - Yes |
| 68 | |
| 69 | - .. row 5 |
| 70 | |
| 71 | - ``V4L2_SEL_TGT_NATIVE_SIZE`` |
| 72 | |
| 73 | - 0x0003 |
| 74 | |
| 75 | - The native size of the device, e.g. a sensor's pixel array. |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame] | 76 | ``left`` and ``top`` fields are zero for this target. Setting the |
| 77 | native size will generally only make sense for memory to memory |
| 78 | devices where the software can create a canvas of a given size in |
| 79 | which for example a video frame can be composed. In that case |
| 80 | V4L2_SEL_TGT_NATIVE_SIZE can be used to configure the size of |
| 81 | that canvas. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 82 | |
| 83 | - Yes |
| 84 | |
| 85 | - Yes |
| 86 | |
| 87 | - .. row 6 |
| 88 | |
| 89 | - ``V4L2_SEL_TGT_COMPOSE`` |
| 90 | |
| 91 | - 0x0100 |
| 92 | |
| 93 | - Compose rectangle. Used to configure scaling and composition. |
| 94 | |
| 95 | - Yes |
| 96 | |
| 97 | - Yes |
| 98 | |
| 99 | - .. row 7 |
| 100 | |
| 101 | - ``V4L2_SEL_TGT_COMPOSE_DEFAULT`` |
| 102 | |
| 103 | - 0x0101 |
| 104 | |
| 105 | - Suggested composition rectangle that covers the "whole picture". |
| 106 | |
| 107 | - Yes |
| 108 | |
| 109 | - No |
| 110 | |
| 111 | - .. row 8 |
| 112 | |
| 113 | - ``V4L2_SEL_TGT_COMPOSE_BOUNDS`` |
| 114 | |
| 115 | - 0x0102 |
| 116 | |
| 117 | - Bounds of the compose rectangle. All valid compose rectangles fit |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame] | 118 | inside the compose bounds rectangle. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 119 | |
| 120 | - Yes |
| 121 | |
| 122 | - Yes |
| 123 | |
| 124 | - .. row 9 |
| 125 | |
| 126 | - ``V4L2_SEL_TGT_COMPOSE_PADDED`` |
| 127 | |
| 128 | - 0x0103 |
| 129 | |
| 130 | - The active area and all padding pixels that are inserted or |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame] | 131 | modified by hardware. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 132 | |
| 133 | - Yes |
| 134 | |
| 135 | - No |