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.
57 To set the parameters for a *Video Output Overlay*, applications must
66 To set the parameters for a *non-destructive Video Overlay*,
75 hardware, therefore only the superuser can set the parameters for a
84 .. flat-table:: struct v4l2_framebuffer
85 :header-rows: 0
86 :stub-columns: 0
89 * - __u32
90 - ``capability``
91 -
92 - Overlay capability flags set by the driver, see
93 :ref:`framebuffer-cap`.
94 * - __u32
95 - ``flags``
96 -
97 - Overlay control flags set by application and driver, see
98 :ref:`framebuffer-flags`
99 * - void *
100 - ``base``
101 -
102 - Physical base address of the framebuffer, that is the address of
104 * -
105 -
106 -
107 - This field is irrelevant to *non-destructive Video Overlays*. For
109 address. The driver may accept only base addresses which are a
110 multiple of two, four or eight bytes. For *Video Output Overlays*
114 * - struct
115 - ``fmt``
116 -
117 - Layout of the frame buffer.
118 * -
119 - __u32
120 - ``width``
121 - Width of the frame buffer in pixels.
122 * -
123 - __u32
124 - ``height``
125 - Height of the frame buffer in pixels.
126 * -
127 - __u32
128 - ``pixelformat``
129 - The pixel format of the framebuffer.
130 * -
131 -
132 -
133 - For *non-destructive Video Overlays* this field only defines a
136 * -
137 -
138 -
139 - For *destructive Video Overlays* applications must initialize this
140 field. For *Video Output Overlays* the driver must return a valid
142 * -
143 -
144 -
145 - Usually this is an RGB format (for example
146 :ref:`V4L2_PIX_FMT_RGB565 <V4L2-PIX-FMT-RGB565>`) but YUV
147 formats (only packed YUV formats when chroma keying is used, not
152 * -
153 - enum :c:type:`v4l2_field`
154 - ``field``
155 - Drivers and applications shall ignore this field. If applicable,
159 * -
160 - __u32
161 - ``bytesperline``
162 - Distance in bytes between the leftmost pixels in two adjacent
164 * - :cspan:`3`
166 This field is irrelevant to *non-destructive Video Overlays*.
171 ``width`` times bytes-per-pixel or a larger value required by the
175 For *Video Output Overlays* the driver must return a valid value.
181 undefined. Output devices ignore the contents of padding bytes.
190 * -
191 - __u32
192 - ``sizeimage``
193 - This field is irrelevant to *non-destructive Video Overlays*. For
195 field. For *Video Output Overlays* the driver must return a valid
200 * -
201 - enum :c:type:`v4l2_colorspace`
202 - ``colorspace``
203 - This information supplements the ``pixelformat`` and must be set
205 * -
206 - __u32
207 - ``priv``
208 - Reserved. Drivers and applications must set this field to zero.
212 .. _framebuffer-cap:
214 .. flat-table:: Frame Buffer Capability Flags
215 :header-rows: 0
216 :stub-columns: 0
219 * - ``V4L2_FBUF_CAP_EXTERNOVERLAY``
220 - 0x0001
221 - The device is capable of non-destructive overlays. When the driver
222 clears this flag, only destructive overlays are supported. There
224 non-destructive overlays. Video Output Overlays are in practice
225 always non-destructive.
226 * - ``V4L2_FBUF_CAP_CHROMAKEY``
227 - 0x0002
228 - The device supports clipping by chroma-keying the images. That is,
229 image pixels replace pixels in the VGA or video signal only where
230 the latter assume a certain color. Chroma-keying makes no sense
232 * - ``V4L2_FBUF_CAP_LIST_CLIPPING``
233 - 0x0004
234 - The device supports clipping using a list of clip rectangles.
235 * - ``V4L2_FBUF_CAP_BITMAP_CLIPPING``
236 - 0x0008
237 - The device supports clipping using a bit mask.
238 * - ``V4L2_FBUF_CAP_LOCAL_ALPHA``
239 - 0x0010
240 - The device supports clipping/blending using the alpha channel of
243 * - ``V4L2_FBUF_CAP_GLOBAL_ALPHA``
244 - 0x0020
245 - The device supports alpha blending using a global alpha value.
247 * - ``V4L2_FBUF_CAP_LOCAL_INV_ALPHA``
248 - 0x0040
249 - The device supports clipping/blending using the inverted alpha
252 * - ``V4L2_FBUF_CAP_SRC_CHROMAKEY``
253 - 0x0080
254 - The device supports Source Chroma-keying. Video pixels with the
255 chroma-key colors are replaced by framebuffer pixels, which is
260 .. _framebuffer-flags:
264 .. flat-table:: Frame Buffer Flags
265 :header-rows: 0
266 :stub-columns: 0
269 * - ``V4L2_FBUF_FLAG_PRIMARY``
270 - 0x0001
271 - The framebuffer is the primary graphics surface. In other words,
275 * - ``V4L2_FBUF_FLAG_OVERLAY``
276 - 0x0002
277 - If this flag is set for a video capture device, then the driver
280 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) will be used. Only one
283 which drivers support this flag, so the only reliable method of
286 video output device, then the video output overlay window is
287 relative to the top-left corner of the framebuffer and restricted
289 output overlay window is relative to the video output display.
290 * - ``V4L2_FBUF_FLAG_CHROMAKEY``
291 - 0x0004
292 - Use chroma-keying. The chroma-key color is determined by the
296 * - :cspan:`2` There are no flags to enable clipping using a list of
300 * - ``V4L2_FBUF_FLAG_LOCAL_ALPHA``
301 - 0x0008
302 - Use the alpha channel of the framebuffer to clip or blend
304 output = framebuffer pixel * alpha + video pixel * (1 - alpha).
306 * - ``V4L2_FBUF_FLAG_GLOBAL_ALPHA``
307 - 0x0010
308 - Use a global alpha value to blend the framebuffer with video
309 images. The blend function is: output = (framebuffer pixel * alpha
310 + video pixel * (255 - alpha)) / 255. The alpha value is
315 * - ``V4L2_FBUF_FLAG_LOCAL_INV_ALPHA``
316 - 0x0020
317 - Like ``V4L2_FBUF_FLAG_LOCAL_ALPHA``, use the alpha channel of the
319 but with an inverted alpha value. The blend function is: output =
320 framebuffer pixel * (1 - alpha) + video pixel * alpha. The actual
322 * - ``V4L2_FBUF_FLAG_SRC_CHROMAKEY``
323 - 0x0040
324 - Use source chroma-keying. The source chroma-key color is
328 and :ref:`osd`. Both chroma-keying are mutual exclusive to each
335 On success 0 is returned, on error -1 and the ``errno`` variable is set
337 :ref:`Generic Error Codes <gen-errors>` chapter.
340 :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` can only be called by a privileged user to
350 linux-media mailing list: