[FFmpeg-devel] [PATCH]Support cmyk in tiff

compn tempn at twmi.rr.com
Mon May 5 14:56:45 CEST 2014


On Mon, 05 May 2014 13:34:42 +0100
Derek Buitenhuis <derek.buitenhuis at gmail.com> wrote:

> On 5/4/2014 9:00 PM, Carl Eugen Hoyos wrote:
> > +        for (i = 0; i < s->height; i++) {
> > +            for (j = 0; j < s->width; j++) {
> > +                int k =  255 - dst[4 * j + 3];
> > +                int r = (255 - dst[4 * j    ]) * k;
> > +                int g = (255 - dst[4 * j + 1]) * k;
> > +                int b = (255 - dst[4 * j + 2]) * k;
> > +                dst[4 * j    ] = r * 257 >> 16;
> > +                dst[4 * j + 1] = g * 257 >> 16;
> > +                dst[4 * j + 2] = b * 257 >> 16;
> > +                dst[4 * j + 3] = 255;
> > +            }
> 
> I'm not keen on duplicating CMYK colorspace conversion code in a
> bunch of places.

michaels commit message from cmyk jpeg:
"This should be moved into swscale once we have a CMYK pixel format"

-compn


More information about the ffmpeg-devel mailing list