PDA

View Full Version : filter request... luma only convolution?


Mug Funky
16th October 2003, 20:15
title says it all.

i do a load of playing around with generalconvolution(etc) and feel that it's a pain having to convert back and forth from yv12 to rgb32. seeing as most of the time the filter only really applies to the luma channel, it would be cool for a code guy (unfortunately not me) to port the rgb generalconvolution to yuy2 and yv12 colour spaces. implementing for luma only would be cool, and 3 times faster than the rgb generalconvolution by my reckoning.

reason i ask is i like to have my own vertical filter (similar to the one in tomsmocomp) that blends half pels up and down, rather than a full pel down. additionally, i tend to run another generalconvolution just after it sharpening it by the same degree. this is good for killing residual combing while preserving detail.

a luma only generalconvolution would handle this quite well, as the light combing left by some deinterlace techniques is usually negligible in the chroma channel.

anyone besides me think this is a good idea? :)

mf
17th October 2003, 12:08
A greyscale colorspace has been discussed here (http://forum.doom9.org/showthread.php?s=&threadid=58246&highlight=ytorgb).

Bidoche
17th October 2003, 18:20
About that, is there a generally accepted name for such a thing ? (like RGB24, YUY2...) or should I just pick one I like (propositions are welcome).

mf
17th October 2003, 21:31
Originally posted by Bidoche
About that, is there a generally accepted name for such a thing ? (like RGB24, YUY2...) or should I just pick one I like (propositions are welcome).
GRE8 (Greyscale 8 bits), or
LUM8 (Luminance 8 bits) ?

morsa
17th October 2003, 22:55
Does anybody think about what will happen with all this new video stuff coming with 10 bit log?
I mean DirectX9(and all the new video cards and displays that support it), digital betacam, HDcam SR, and many others to come.(Even a 10 bit DV has been proposed in a recent conference!!)
Is there any plan to support it?
And what about official support for YUV 4:4:4 ?

Bidoche
17th October 2003, 23:22
10bit ?
How do they store that ? on two bytes or do they overlap...

Is there any plan to support it?As it's the 1st time I heard of it, I had no plan to support it.

It can be done, but I'd rather jump to 16bit depth, would be easier to deal with.


In 3.0, ColorSpace is a polymorphic class too, and it has a method to convert the dimension of a frame to the dimension of a plane, which can then be used to setup a framebuffer.

So a new format is not much work, just defining a new ColorSpace subclass, some adaptation in the VideoFrame hierarchy and it's done.
Of course, that don't make filters support it.

Richard Berg
18th October 2003, 07:30
The plan is to use YV12 when I write the greyscale / alpha interfaces. No reason to require massive rewrites when the luma plane is already what we want. The half-planes could stay undefined at first, though some people have suggested potential uses like mip-mapped versions of the frames. A 16-bit colorspace is quite possible now that SSE2 has joined the AMD world (on the A64), but is not a priority at this time.

ETA: when my classes stop sucking

Bidoche
18th October 2003, 18:17
No reason to require massive rewrites when the luma plane is already what we want Which massive rewrites ? Having U and V unitialized is more work (and more troublesome) than introducing a straightforward superclass of YV12VideoFrame.
Besides through the magic of inheritance, those will automatically qualify as LumaFrame.

Mug Funky
24th October 2003, 16:43
heh. the new colourspaces sound cool, but for now a re-write of generalconvolution for yuy2 and yv12 would be pretty useful as well.