Lines Matching +full:output +full:- +full:only

1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
13 VIDIOC_G_FBUF - VIDIOC_S_FBUF - Get or set frame buffer overlay parameters
40 :ref:`Video Overlay <overlay>` or :ref:`Video Output Overlay <osd>`
42 output device) and can be determined with the
46 The V4L2 API distinguishes destructive and non-destructive overlays. A
48 of a graphics card. A non-destructive overlay blends video images into a
49 VGA signal or graphics into a video signal. *Video Output Overlays* are
50 always non-destructive.
60 To set the parameters for a *Video Output Overlay*, applications must
81 .. flat-table:: struct v4l2_framebuffer
82 :header-rows: 0
83 :stub-columns: 0
86 * - __u32
87 - ``capability``
88 -
89 - Overlay capability flags set by the driver, see
90 :ref:`framebuffer-cap`.
91 * - __u32
92 - ``flags``
93 -
94 - Overlay control flags set by application and driver, see
95 :ref:`framebuffer-flags`
96 * - void *
97 - ``base``
98 -
99 - Physical base address of the framebuffer, that is the address of
103 For *Video Output Overlays*
108 * - struct
109 - ``fmt``
110 -
111 - Layout of the frame buffer.
112 * -
113 - __u32
114 - ``width``
115 - Width of the frame buffer in pixels.
116 * -
117 - __u32
118 - ``height``
119 - Height of the frame buffer in pixels.
120 * -
121 - __u32
122 - ``pixelformat``
123 - The pixel format of the framebuffer.
124 * -
125 -
126 -
127 - For *non-destructive Video Overlays* this field only defines a
130 * -
131 -
132 -
133 - For *Video Output Overlays* the driver must return a valid
135 * -
136 -
137 -
138 - Usually this is an RGB format (for example
139 :ref:`V4L2_PIX_FMT_RGB565 <V4L2-PIX-FMT-RGB565>`) but YUV
140 formats (only packed YUV formats when chroma keying is used, not
145 * -
146 - enum :c:type:`v4l2_field`
147 - ``field``
148 - Drivers and applications shall ignore this field. If applicable,
152 * -
153 - __u32
154 - ``bytesperline``
155 - Distance in bytes between the leftmost pixels in two adjacent
157 * - :cspan:`3`
159 This field is irrelevant to *non-destructive Video Overlays*.
161 For *Video Output Overlays* the driver must return a valid value.
167 undefined. Output devices ignore the contents of padding bytes.
176 * -
177 - __u32
178 - ``sizeimage``
179 - This field is irrelevant to *non-destructive Video Overlays*.
180 For *Video Output Overlays* the driver must return a valid
185 * -
186 - enum :c:type:`v4l2_colorspace`
187 - ``colorspace``
188 - This information supplements the ``pixelformat`` and must be set
190 * -
191 - __u32
192 - ``priv``
193 - Reserved. Drivers and applications must set this field to zero.
197 .. _framebuffer-cap:
199 .. flat-table:: Frame Buffer Capability Flags
200 :header-rows: 0
201 :stub-columns: 0
204 * - ``V4L2_FBUF_CAP_EXTERNOVERLAY``
205 - 0x0001
206 - The device is capable of non-destructive overlays. When the driver
207 clears this flag, only destructive overlays are supported. There
209 non-destructive overlays. Video Output Overlays are in practice
210 always non-destructive.
211 * - ``V4L2_FBUF_CAP_CHROMAKEY``
212 - 0x0002
213 - The device supports clipping by chroma-keying the images. That is,
214 image pixels replace pixels in the VGA or video signal only where
215 the latter assume a certain color. Chroma-keying makes no sense
217 * - ``V4L2_FBUF_CAP_LIST_CLIPPING``
218 - 0x0004
219 - The device supports clipping using a list of clip rectangles.
221 * - ``V4L2_FBUF_CAP_BITMAP_CLIPPING``
222 - 0x0008
223 - The device supports clipping using a bit mask.
225 * - ``V4L2_FBUF_CAP_LOCAL_ALPHA``
226 - 0x0010
227 - The device supports clipping/blending using the alpha channel of
230 * - ``V4L2_FBUF_CAP_GLOBAL_ALPHA``
231 - 0x0020
232 - The device supports alpha blending using a global alpha value.
234 * - ``V4L2_FBUF_CAP_LOCAL_INV_ALPHA``
235 - 0x0040
236 - The device supports clipping/blending using the inverted alpha
239 * - ``V4L2_FBUF_CAP_SRC_CHROMAKEY``
240 - 0x0080
241 - The device supports Source Chroma-keying. Video pixels with the
242 chroma-key colors are replaced by framebuffer pixels, which is
247 .. _framebuffer-flags:
251 .. flat-table:: Frame Buffer Flags
252 :header-rows: 0
253 :stub-columns: 0
256 * - ``V4L2_FBUF_FLAG_PRIMARY``
257 - 0x0001
258 - The framebuffer is the primary graphics surface. In other words,
262 * - ``V4L2_FBUF_FLAG_OVERLAY``
263 - 0x0002
264 - If this flag is set for a video capture device, then the driver
267 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) will be used. Only one
270 which drivers support this flag, so the only reliable method of
273 video output device, then the video output overlay window is
274 relative to the top-left corner of the framebuffer and restricted
276 output overlay window is relative to the video output display.
277 * - ``V4L2_FBUF_FLAG_CHROMAKEY``
278 - 0x0004
279 - Use chroma-keying. The chroma-key color is determined by the
283 * - :cspan:`2` There are no flags to enable clipping using a list of
287 * - ``V4L2_FBUF_FLAG_LOCAL_ALPHA``
288 - 0x0008
289 - Use the alpha channel of the framebuffer to clip or blend
291 output = framebuffer pixel * alpha + video pixel * (1 - alpha).
293 * - ``V4L2_FBUF_FLAG_GLOBAL_ALPHA``
294 - 0x0010
295 - Use a global alpha value to blend the framebuffer with video
296 images. The blend function is: output = (framebuffer pixel * alpha
297 + video pixel * (255 - alpha)) / 255. The alpha value is
302 * - ``V4L2_FBUF_FLAG_LOCAL_INV_ALPHA``
303 - 0x0020
304 - Like ``V4L2_FBUF_FLAG_LOCAL_ALPHA``, use the alpha channel of the
306 but with an inverted alpha value. The blend function is: output =
307 framebuffer pixel * (1 - alpha) + video pixel * alpha. The actual
309 * - ``V4L2_FBUF_FLAG_SRC_CHROMAKEY``
310 - 0x0040
311 - Use source chroma-keying. The source chroma-key color is
315 and :ref:`osd`. Both chroma-keying are mutual exclusive to each
322 On success 0 is returned, on error -1 and the ``errno`` variable is set
324 :ref:`Generic Error Codes <gen-errors>` chapter.
327 :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` can only be called by a privileged user to