[FFmpeg-devel] [PATCH] use correct colorspace in Cinepak decoder

Tomas Härdin tomas.hardin at codemill.se
Fri Feb 15 10:30:45 CET 2013


On Tue, 2013-02-12 at 22:41 +0000, Carl Eugen Hoyos wrote:
> <u-bo1b <at> 0w.se> writes:
> 
> > -        avctx->pix_fmt = AV_PIX_FMT_YUV420P;
> > +        avctx->pix_fmt = AV_PIX_FMT_RGB24;
> 
> Sorry if this is a stupid question:
> Is it impossible to patch the codebook so the 
> decoder outputs yuv420p data that libswscale 
> would convert into the expected rgb data?

I don't think that'll turn out right. To see why, consider a more
extreme case: GRB420P (planar RGB, but R and B are subsampled). While
you could turn that into something YUV420P-ish with linear math it won't
look the same as if you upsampled the R and B channels, forming planar
RGB which is then converted that to YUV420P. I think.

..

Actually, the more I think about it the more it seems it *is* possible.
Just work out the math for the combination of upsampling and YUV
conversion. It should all be linear.

/Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130215/47b092dc/attachment.asc>


More information about the ffmpeg-devel mailing list