[FFmpeg-devel] [RFC] Scalar color conversion utils (colorutils.[hc])?
Tue Apr 28 23:41:15 CEST 2009
On Tue, Apr 28, 2009 at 10:28:56PM +0200, Stefano Sabatini wrote:
> Hi all,
> the need for such a facility mainly arises for libavfilter filters.
> For example we may need something to work like this:
> and many other filters as well may need to take in input a textual
> representation of a color and convert it to a given colorspace.
> libavcodec/colorspace.h defines some useful macros for converting from
> RGB to YUV, but I think what we need here is a convenient API of the form:
> int av_parse_color(uint16_t color, enum PixelFormat dst_pix_fmt, const char *color_string, void *log_ctx)
> int av_convert_color_to(uint16_t *dst_color, enum PixelFormat dst_pix_fmt,
> (uint16_t *src_color, enum PixelFormat src_pix_fmt,
> void *log_ctx);
> Support for HSV colorspace could be provided defining an HSV pixel format.
> Some of the questions which need a response:
> * We may need a table containing all the colornames <-> color. In
> which colorspace should be specified the color? (An RGB32 variant
> could be the ideal solution.)
doesnt matter ...
> * Where it should be implemented? lavfi or lsws seem the better
> * How should be done the color-spec string? It may contains a simple
> name but also a color specifications. Variants which come to mind:
> rgb=RR:GG::BB, hsv=HH:SS:VV, yuv=YY:UU:VV.
html 0xRRGGBB must be supported
i see no need for further variants in the near future.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel