Xgl and direct rendering
Roland Scheidegger
rscheidegger_lists at hispeed.ch
Wed Mar 1 09:01:16 PST 2006
Matthias Hopf wrote:
> Yes, that's what I actually meant. I'm currently unsure whether this
> is enough for the color conversion and resampling code (there are
> limitations with dependend texture lookups), but I guess it is. So
> ATI_fragment_shader might be supported in the future as well. Though
> there are more pressing issues ATM.
There are no dependant texture lookups in that code (as the parameters
for texture sampling are not dependant on the results of previously
sampled textures, only generic math). Definitely doable (though I don't
know if the chip is actually fast enough?)
>> but the tex instructions need some non-obvious translation, as
>> there are 3 of them but you can only access the same texture twice
>> with ATI_fs (thus you'd need to bind the "video texture" to more
>> than one texture unit).
>
> It should be possible by moving the texture coordinate calculation to
> the main program and let the interpolation unit do the rest.
> Additionally, we might have to bind the texture to two units. I don't
> remember 100% of ATI's fp programming interface right now.
Yes, exactly. Or maybe just use 3 textures, since basically this is
essentially what it is anyway.
>> Both R100 and R200 (and r300, i8/9xx,...) however support yuv
>> textures, and the code should probably be modified to take
>> advantage of them when available (not very well standardized
>> unfortunately, but GL_MESA_ycbcr_texture should fit the bill).
>> (Note that they are broken
>
> This is non-planar. Could work for YUY2, but not for YV12.
Certainly. planar yuv doesn't fit the description of a 3-component
texture really, it's 3 single-component textures, that you stuff them
together doesn't change that - in fact it might be slower depending on
how texture caches etc. are organized than using triple-texturing. I
think most software can deal with both planar and packed xvideo.
> I consider hardware overlay broken by design. It has already given me
> tons of nightmares.
I wouldn't call it "broken by design" since it predates 3d accelerators
(not to mention pixel shaders!) where the hw simply was too slow for a
better design.
Using pixel shaders really looks like a good idea in principle, I'm
pretty sure ATI does that too with their much hyped AVIVO thingy with
some other OS. I don't have any documentation on that but would expect
video overlay always works like that with Vista (Aero) (no idea about
Mac OS X), though it's not much of a problem there as Aero requires
pixel shaders anyway...
Roland
More information about the xorg
mailing list