[XviD-devel] 8bit greyscale
Michael Militzer
michael at xvid.org
Wed Mar 16 23:23:06 CET 2005
Hi,
Quoting Christoph Lampert <chl at math.uni-bonn.de>:
> On Tue, 15 Mar 2005, Michael Militzer wrote:
>
> > Hi,
> >
> > there's a greyscale encoding option in XVID already for a long time (and
> > such an option also exists in the VfW GUI). If the XVID_VOP_GREYSCALE flag
> > is set, chroma information is dropped in the encoder. That should be
> > sufficient I think - there's no need to set U and V to 128 in colorspace
> > conversion if the chroma information is later omitted anyway...
>
> Yes, I know about the GREYSCALE flag (wasn't it me who added it? I
> don't remember). But I didn't mean only encoding at greyscale (possibly
> from color input), but about using only planar 8bit greyscale as input
> colorspace. It seems that there is no possiblity to feed that directly
> into XviD without padding it with 128s, although it seems that some
> cameras can produce it.
>
> Internally, one can of course use XVID_CSP_USER and set U and V point to
> something constant, but it seems that the VfW-GUI doesn't accept 8bit
> input in that way.
Well, internally you could use XVID_CSP_USER, use the greyscale image as
y-plane and don't care about U/V values at all. Iirc, if you set the
XVID_VOP_GREYSCALE flag the chroma information is omitted anyway, so there's
no need to set the chroma planes to constant values.
So VfW support could be added without modifying xvidcore. I just wonder if
VfW supports 8-bit greyscale input at all. I only know of 8-bit indexed RGB
in VfW - but I'm no expert regarding the supported VfW colorspaces. So even
if a camera natively works in 8-bit greyscale mode, the VfW driver may
automatically convert the images to RGB...
Michael
More information about the XviD-devel
mailing list