[FFmpeg-devel] pixel format convertion yuv422p->yuv420p->yuv411p->yuv422p degrade picture

Michael Niedermayer michaelni
Tue Jul 15 17:57:41 CEST 2008


On Tue, Jul 15, 2008 at 04:22:33PM +0100, M?ns Rullg?rd wrote:
> 
> Maksym Veremeyenko wrote:
> > Dear Developers!
> >
> > I was testing pixel format changing and found that convertions like:
> > yuv422p->yuv420p->yuv411p->yuv422p
> > degrade picture - it become greener.
> >
> > To prove this i did a shell script, see attached. On 50th iteration
> > picture is almost compleately green.
> >
> > Is it normal behaviour for pixel format converting or it is a bug?
> 
> Apparently, rounding errors in the chroma interpolation are accumulating.
> Without thinking a little harder, I don't know whether such a conversion
> sequence is possible without such drift.  It will always be lossy, as I'm
> sure you already realise.

Its possible in principle without the drift, one example that does not drift
would be nearest neighbor convertion.
I suspect that dithering could reduce the drift, for normal interpolation
based filters but running 50 converters in a row is a stupid thing to do.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- 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/20080715/6e0ac8e8/attachment.pgp>



More information about the ffmpeg-devel mailing list