[jitter] fade to black in uyvy mode (in openGL) ?
Joshua Kit Clayton
jkc at musork.com
Tue Feb 5 11:48:50 MST 2008
- Previous message: [jitter] fade to black in uyvy mode (in openGL) ?
- Next message: [jitter] Re: fade to black in uyvy mode (in openGL) ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Feb 5, 2008, at 7:10 AM, karl-otto von oertzen wrote: > > sorry if this is obvious, i am tryin figure the best and less costy > method to achieve this : > i want to be able to fade movies to black when sending them into a > compositing slab; > [jit.op @op * @val 0.] will (obviously) give a green background > instead of black in uyvy mode, even after reconversion to rgba. > if i understand well how the operation shaders work they need two > textures ; a "@val" attribute or "param val" does not really > exist , which means in order to fade a movie to black i need to > multiply it with a second texture being a black matrix , which i d > like to avoid . > > i am aware of Vade's fader shader , which does the job perfectly , > i am just curious about an internal solution . > am i missing something ? First of all, don't overlook the fact that the cc.uyvy2rgba.jxs shader has a "scale" param which can be used precisely to this extent without another shader (it also has brightness/contrast/saturation params which are applied in the YUV space, scale and bias params are applied after the conversion to RGBA). So if you don't need to do this on the CPU, then that's the approach I'd take (will be much faster than doing on the CPU). If you *do* need to perform this operation on the CPU, essentially UYVY "black" is a zero value for the luminance channels and a 50% value for the chrominance channels (since they are conceptually signed values and 50% is their "zero" mark). This would be 127 0 127 0 (not considering "broadcast legal" stuff, where it would actually be something like 127 16 127 16). Anyway, the easiest and fastest thing to do is just use the built in parameters in the uyvy2rgba shader, but if you have to do UYVY color processing on the CPU, you'll need to spend some time learning about what UYVY data is. -Joshua
- Previous message: [jitter] fade to black in uyvy mode (in openGL) ?
- Next message: [jitter] Re: fade to black in uyvy mode (in openGL) ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
