[FFmpeg-devel] the proper way to handle a special colorspace?

u-bo1b at 0w.se u-bo1b at 0w.se
Sun Feb 10 17:46:00 CET 2013


Thanks Michael,

On Sun, Feb 10, 2013 at 05:29:00PM +0100, Michael Niedermayer wrote:
> > The pixel format is declared as YUP420P which is almost true, but the
> > conversion matrix which for the format is defined from/to BGR24 must
> > be different.
> > 
> > Where in FFmpeg source should the fix belong to possibly reuse the
> > existing conversion code (which code?)?
> 
> see swscale sws_setColorspaceDetails(), ff_yuv2rgb_coeffs and related
> code
> 
> also see AVColorSpace and structs close by
> 
> Note, theres some code still missing to connect these so sws
> automatically is setup correctly for the actual decoder output

I'll try to figure this out.

(Is there any other codec suitable to look at as an example for
colorspace conversion?)

Otherwise, I am playing with Cinepak encoder too (not my code but I
am adding optimizations), the same issue is present there.
I'd like it to produce a compliant stream, not the current one
corresponding to yup420p.

Regards,
Rl



More information about the ffmpeg-devel mailing list