[FFmpeg-devel] [PATCH] use correct colorspace in Cinepak decoder
IN SERVICE OF 2013-02-10 ffmpeg mailing list
u-bo1b at 0w.se
Fri Feb 15 14:00:21 CET 2013
Carl Eugen wrote:
>> - avctx->pix_fmt = AV_PIX_FMT_YUV420P;
>> + avctx->pix_fmt = AV_PIX_FMT_RGB24;
>Is it impossible to patch the codebook so the
>decoder outputs yuv420p data that libswscale
>would convert into the expected rgb data?
This would introduce an extra error as it would imply upsampling
"Cinepak-yuv", applying a linear transformation and then downsampling
the chroma again to produce yuv420p. The last step is non-reversible.
>If not: Did you measure if there is a
>performance difference with your patch
>when encoding cinepak into png-in-mov?
>(and how big the difference is when
>transcoding to mpeg4?)
The non-conformant decoder produces data with a very visible color
distortion, do you mean to quantify this distortion? I wouldn't care,
just take a look at any vintage Cinepak clip with both decoders.
Or do you mean to compare the performance of a compliant Cinepak _encoder_
to a non-compliant one? The last comparison might be interesting
(measuring the supposed [in]efficiency of Cinepak color space) but I
did not measure this.
If you'd like to measure, the only trivial change is needed in the well
isolated color conversion portion in the encoder - and using the old
non-compliant decoder on the resulting stream.
(a more or less current encoder snapshot, based on Tomas Härdin's one
is available at http://www.aetey.se/dl/cinepak-encoder-ffmpeg.patch)
More information about the ffmpeg-devel