[MPlayer-dev-eng] -vo mga quiestions
Nick Kurshev
nickols_k at mail.ru
Tue Nov 13 19:16:33 CET 2001
Hello, Nick!
On Tue, 13 Nov 2001 20:37:01 +0300 you wrote:
> Hello, Arpi!
>
> On Mon, 12 Nov 2001 21:05:38 +0200 (CEST) you wrote:
>
> > Hi,
> >
[snip]
> As I already wrote (2-3 month ago) Rubby works on XXX_vid interface for Linux-2.5
> (at sf.net/projects/linuxconsole)
> IMHO we should coordinate our extensions of vid_drivers with him.
>
Traditionally - forgot attach! sorry
[snip]
Best regards! Nick
/*
* linux/include/linux/fbvid.h -- linux Framenuffer Video Interface
*
* Copyright (C) 2001 Romain Dolbeau <dolbeau at irisa.fr>
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive for
* more details.
*
* $Header: /home/pm3fb/pm3fb/Attic/fbvid.h,v 1.1.2.13 2001/09/27 09:22:11 dolbeau Exp $
*
*/
#ifndef _LINUX_FBVID_H
#define LINUX_FBVID_H
#include <linux/fb.h>
#include <asm/types.h>
#include <asm/ioctl.h>
/* FOURCC #define, from the MPlayer list (see <http://mplayer.sourceforge.net/> */
/* RGB/BGR Formats */
#define FB_VIDOVERLAY_FOURCC_RGB (('R'<<24)|('G'<<16)|('B'<<8))
#define FB_VIDOVERLAY_FOURCC_BGR (('B'<<24)|('G'<<16)|('R'<<8))
/* Planar YUV Formats */
#define FB_VIDOVERLAY_FOURCC_YVU9 0x39555659
#define FB_VIDOVERLAY_FOURCC_IF09 0x39304649
#define FB_VIDOVERLAY_FOURCC_YV12 0x32315659
#define FB_VIDOVERLAY_FOURCC_I420 0x30323449
#define FB_VIDOVERLAY_FOURCC_IYUV 0x56555949
#define FB_VIDOVERLAY_FOURCC_CLPL 0x4C504C43
/* Packed YUV Formats */
#define FB_VIDOVERLAY_FOURCC_IYU1 0x31555949
#define FB_VIDOVERLAY_FOURCC_IYU2 0x32555949
#define FB_VIDOVERLAY_FOURCC_UYVY 0x59565955
#define FB_VIDOVERLAY_FOURCC_UYNV 0x564E5955
#define FB_VIDOVERLAY_FOURCC_cyuv 0x76757963
#define FB_VIDOVERLAY_FOURCC_YUY2 0x32595559
#define FB_VIDOVERLAY_FOURCC_YUNV 0x564E5559
#define FB_VIDOVERLAY_FOURCC_YVYU 0x55595659
#define FB_VIDOVERLAY_FOURCC_Y41P 0x50313459
#define FB_VIDOVERLAY_FOURCC_Y211 0x31313259
#define FB_VIDOVERLAY_FOURCC_Y41T 0x54313459
#define FB_VIDOVERLAY_FOURCC_Y42T 0x54323459
#define FB_VIDOVERLAY_FOURCC_V422 0x32323456
#define FB_VIDOVERLAY_FOURCC_V655 0x35353656
#define FB_VIDOVERLAY_FOURCC_CLJR 0x524A4C43
#define FB_VIDOVERLAY_FOURCC_YUVP 0x50565559
#define FB_VIDOVERLAY_FOURCC_UYVP 0x50565955
/* for depth_avail */
#define FB_VIDOVERLAY_DEPTH_1BPP 0x0001
#define FB_VIDOVERLAY_DEPTH_2BPP 0x0002
#define FB_VIDOVERLAY_DEPTH_4BPP 0x0004
#define FB_VIDOVERLAY_DEPTH_8BPP 0x0008
#define FB_VIDOVERLAY_DEPTH_12BPP 0x0010
#define FB_VIDOVERLAY_DEPTH_15BPP 0x0020
#define FB_VIDOVERLAY_DEPTH_16BPP 0x0040
#define FB_VIDOVERLAY_DEPTH_24BPP 0x0080
#define FB_VIDOVERLAY_DEPTH_32BPP 0x0100
/* for capability_avail */
#define FB_VIDOVERLAY_CAPABILITY_EXPAND 0x0001 /* if overlay can be bigger than source */
#define FB_VIDOVERLAY_CAPABILITY_SHRINK 0x0002 /* if overlay can be smaller than source */
#define FB_VIDOVERLAY_CAPABILITY_BLEND 0x0004 /* if overlay can be blended with framebuffer */
#define FB_VIDOVERLAY_CAPABILITY_COLORKEY 0x0008 /* if overlay can be restricted to a colorkey */
#define FB_VIDOVERLAY_CAPABILITY_ALPHAKEY 0x0010 /* if overlay can be restricted to an alpha channel */
#define FB_VIDOVERLAY_CAPABILITY_COLORKEY_ISRANGE 0x0020 /* if the colorkey can be a range */
#define FB_VIDOVERLAY_CAPABILITY_ALPHAKEY_ISRANGE 0x0040 /* if the alphakey can be a range */
#define FB_VIDOVERLAY_CAPABILITY_COLORKEY_ISMAIN 0x0080 /* colorkey is checked against framebuffer */
#define FB_VIDOVERLAY_CAPABILITY_COLORKEY_ISOVERLAY 0x0100 /* colorkey is checked against overlay */
#define FB_VIDOVERLAY_CAPABILITY_ALPHAKEY_ISMAIN 0x0200 /* alphakey is checked against framebuffer */
#define FB_VIDOVERLAY_CAPABILITY_ALPHAKEY_ISOVERLAY 0x0400 /* alphakey is checked against overlay */
/* below, for ioctl, <- is driver-to-app, -> is app-to-driver, <-> is bidirectional (*can* be changed by driver) */
struct fb_vidoverlay_avail {
__u32 max_buf_size; /* <- maximum size of buffer */
__u32 xmax; /* <- max width of a buffer in _pixels_ */
__u32 ymax; /* <- max height of a buffer in line */
__u8 xalign; /* <- required alignement of width of buffer in _byte_ */
__u8 yalign; /* <- required alignement of height of buffer in line */
__u8 min_n_buf; /* <- minimum number of available buffer */
__u8 num_fourcc; /* <- number of available FOURCC */
};
struct fb_vidoverlay_fourcc {
__u32 id; /* <- FOURCC id (see <http://www.webartz.com/fourcc/>) */
__u16 depth_avail; /* <- available depth(s) for this FOURCC */
__u16 capability_avail; /* <- available capability(s) for this FOURCC */
};
struct fb_vidoverlay_buf {
unsigned long omem_start; /* <- Start of overlay frame buffer mem (phys add) or 0 (failure) */
__u32 omem_len; /* <- length of overlay frame buffer mem or 0 (failure) */
__u32 xsize; /* <-> X size of buffer */
__u32 ysize; /* <-> Y size of buffer */
__u32 stride; /* <- line lenght in byte (can be longer than X*pixelsize due to hardware restriction */
__u32 fourcc_id; /* -> FOURCC that'll go in the buffer */
__u16 depth; /* -> depth that'll go in the buffer */
__u8 n_buf; /* <-> number of the buffer to use (or -1 for any) */
};
struct fb_vidoverlay_set {
__u32 oxsize; /* -> overlay size in pixels */
__u32 oysize;
__u32 dxbase; /* -> destination base in pixels */
__u32 dybase;
__u32 dxsize; /* -> destination size in pixels */
__u32 dysize;
__u32 fourcc_id; /* -> FOURCC to use */
__u16 depth; /* -> depth to use */
__u16 capability; /* -> what capability to use */
__u16 blend_factor; /* -> blending factor */
__u16 r_key[2]; /* -> red component of color key */
__u16 g_key[2]; /* -> green component of color key */
__u16 b_key[2]; /* -> blue component of color key */
/* note: alpha should be put in all component
alpha cannot be used if there's no alpha channel,
i.e. CI8 in 8Bpp or RGBA5650 in 16bpp
[0] is low-end of range
[1] is high-end of range
for single value, [0] shouldbe equal to [1] */
__u8 n_buf; /* -> number of the buffer to use, must have been allocated before */
};
/* get the hardware capability. get a 'struct fb_vidoverlay_avail' as output from the driver */
#define FBIOGET_VIDOVERLAY_CAP _IOR( 'F', 0xF0, struct fb_vidoverlay_avail)
/* get the list of available FOURCC. variable-length data, use FBIOGET_VIDOVERLAY_CAP before */
#define FBIOGET_VIDOVERLAY_FOURCC _IOR( 'F', 0xF1, struct fb_vidoverlay_fourcc)
/* get an offscreen memory buffer. 'struct fb_vidoverlay_buf' as input/output */
#define FBIOGET_VIDOVERLAY_ALLOCATEBUF _IOWR('F', 0xF2, struct fb_vidoverlay_buf)
/* free the memory buffer. '__u8' number of buffer to free */
#define FBIOGET_VIDOVERLAY_FREEBUF _IOW( 'F', 0xF3, __u8)
/* start the overlay. 'struct fb_vidoverlay_set' as input */
#define FBIOPUT_VIDOVERLAY_START _IOW( 'F', 0xFE, struct fb_vidoverlay_set)
/* stop the overlay */
#define FBIOPUT_VIDOVERLAY_STOP _IO( 'F', 0xFF)
#endif /* LINUX_FBVID_H */
More information about the MPlayer-dev-eng
mailing list