From: Nick K. <nic...@ma...> - 2002-01-01 18:42:38
|
Hello! Gerd Knorr (from vid...@re...) said that ruby tree will be included into Linux-2.5.x. In this connexion, I have some question and feature request: Do you plan to expand possibility of subj? I mean that existing interface lacks some possibility for fully featured BES support: /* switch the __u8 frame in multibuffer mode */ #define FBIOPUT_SELECT_FRAME _IOW('F',0xF4, __u8) typedef struct fb_rect_s { __u32 x; __u32 y; __u32 w; __u32 h; __u32 pitch; /* bytes per line */ }fb_rect_t; typedef struct fb_slice_s { void* address; /* app -> driver */ __u32 size; /* app -> driver */ fb_rect_t slice; /* app -> driver */ }fb_slice_t; typedef struct fb_dma_s { fb_slice_t src; /* app -> driver */ fb_slice_t dest; /* app -> driver */ #define FB_DMA_NOSYNC 0 #define FB_DMA_SYNC 1 /* means: wait vsync or hsync */ __u32 flags; /* app -> driver */ }fb_dma_t; /* copies source frame to BES memory with using DMA */ #define FBIOPUT_COPY_FRAME _IOW('F',0xF5, fb_dma_t) For this it would be correctly to add some capability: FB_VIDOVERLAY_CAPABILITY_DMA /* means: can use dma */ FB_VIDOVERLAY_CAPABILITY_DMA_ANY_PITCH /* means: can use dma if src.pitch != dst.pitch */ After studying v4l2 project (http://www.thedirks.org/v4l2/videodev.txt) I've found that it is more advanced against of fbvid.h. What about to add some possibility into fbvid.h from this project and even more? For example: 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) */ }; I guess it would be better to add here also: +struct fb_vidoverlay_yuv { + __u32 y; + __u32 u; + __u32 v; +} + +#define MAX_FRAMES 32 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 */ + struct fb_vidoverlay_yuv pitch; __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_yuv offset[MAX_FRAMES]; /* <- offsets of y,u,v planes for each frame from begin of BES memory */ }; Lets driver tells to app which offsets of planes it wants to use for this fourcc. What about to have configurable color correction? typedef struct fb_video_eq_s { int brightness; /* -1000 : +1000 */ int contrast; /* -1000 : +1000 */ int saturation; /* -1000 : +1000 */ int hue; /* -1000 : +1000 */ int red_intense; /* -1000 : +1000 */ int green_intense; /* -1000 : +1000 */ int blue_intense; /* -1000 : +1000 */ }fb_video_eq_t; If driver/card don't support such feature it would be possible to notify about through FB_VIDOVERLAY_CAPABILITY_COLOR_CORRECTION constant. And what about HW support of DVD decoding? As I found v4l extension already have some code for that. And it could be extended too but fbvid != v4l althouhg BES and DVD are video multimedia extensions, imho. I have some ideas also but what about above extensions? Happy New Year! Best regards! Nick P.S.: Please CC me. |