[FFmpeg-devel] [misc-filters PATCH 2/5] Add color source.
Michael Niedermayer
michaelni
Thu Jul 1 13:26:07 CEST 2010
On Wed, Jun 30, 2010 at 01:42:12AM +0200, Stefano Sabatini wrote:
[...]
> +static int color_config_props(AVFilterLink *inlink)
> +{
> + AVFilterContext *ctx = inlink->src;
> + ColorContext *priv = ctx->priv;
> + uint8_t rgba_color[4];
> + uint8_t rgba_map[4];
> + int i, is_packed_rgb = 1;
> + const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format];
> +
> + switch (inlink->format) {
> + case PIX_FMT_ARGB:
> + rgba_map[ALPHA] = 0; rgba_map[RED] = 1; rgba_map[GREEN] = 2; rgba_map[BLUE] = 3;
> + break;
> + case PIX_FMT_ABGR:
> + rgba_map[ALPHA] = 0; rgba_map[BLUE] = 1; rgba_map[GREEN] = 2; rgba_map[RED] = 3;
> + break;
> + case PIX_FMT_RGBA:
> + case PIX_FMT_RGB24:
> + rgba_map[RED] = 0; rgba_map[GREEN] = 1; rgba_map[BLUE] = 2; rgba_map[ALPHA] = 3;
> + break;
> + case PIX_FMT_BGRA:
> + case PIX_FMT_BGR24:
> + rgba_map[BLUE] = 0; rgba_map[GREEN] = 1; rgba_map[RED] = 2; rgba_map[ALPHA] = 3;
> + break;
> + default:
> + is_packed_rgb = 0;
> + }
looks like a duplicate
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100701/50e1107d/attachment.pgp>
More information about the ffmpeg-devel
mailing list