From: Keith W. <ke...@tu...> - 2003-06-02 21:49:26
|
Alex Deucher wrote: > I've been thinking of trying to implement an XV adapter using OpenGL > and MESA_ycbcr_texture for YUV or regular RGB textures for RGB video. > This would not only provide a default Xv adapter (in the event that the > hw didn't have one) or it would provide hw accelerated video playback > on hw that supports the appropriate OGL extensions. You would also not > be limited to a single window like most hardware that only provides a > single overlay. I mentioned this a while back, but I hadn't had much > time to think about it. I'm new to openGL so I'm still trying to > figure out what all would be involved. From what I've read traditional > openGL textures have to be a power of 2 and be RGB. MESA_ycbcr_texture > seems to handle the YUV colorspace, and it perhaps NV_texture_rectangle > allows you to get around the power of 2 issue. Am I even on the right > track here? Absolutely. > It would be written as an xfree86 modules like "v4l." The module would > then accept data from Xv clients but rather than writing the data to > the overlay hardware, it would act like an openGL client and write the > data to the screen using an RGB or YUV texture. > The question is, can an xfree86 module be an opengl/DRI client? Hmm - maybe... You'll probably run into some issues with the locking mechanism used by the DRI drivers - the X server currently holds the lock all the time it is active, so you'd have to release the lock before calling into any GL functions, which is loosing some of the cleanness you get by using GL. > Unfortunately, i'm more familiar with the 2D aspects of xfree86. I'm > still learning about opengl programming and the 3D side of the > hardware. > I need to decide how to best map the Xv functions to their OGL > implementation. An comments on the feasibility of this or how I would > best proceed are welcome. The GLX_NV_vertex_array_range allows GL clients to be allocated actual AGP memory, which will speed up texture uploads in the R200 driver if you do *everything* right. Note - this is only r200 at this stage. Keith |