[FFmpeg-devel] MJPG decoder picture quality

Michael Niedermayer michaelni
Tue Jun 8 22:04:27 CEST 2010

On Tue, Jun 08, 2010 at 03:46:16PM -0400, Pavel Pavlov wrote:
> I use libavcodec's jpeg decoder and I noticed that some pictures weren't looking good. Knowing that these pictures were meant to be very high quality, I decided to check out what was wrong.
> I couldn't find anything wrong, other that the fact that pictures that come out of libavcodec's MJPG decoder don't looks as good as they are supposed to.
> As a simple test I took a picture that comes from win7 install : 
> http://dev5.summit-tech.ca/pps/ffmpeg/Tulips.jpg
> Here's how this picture gets decoded by ffmpeg:
> http://dev5.summit-tech.ca/pps/ffmpeg/Tulips_yuv444.png

you need -sws_flags +accurate_rnd+full_chroma_int
the scalers defaults are tuned a bit toward realtime speed for video decoding.
This may arguably be something we should change for ffmpeg, iam not sure ...

> Here's doubled pixel compare image:
> http://dev5.summit-tech.ca/pps/ffmpeg/Tulips_compare_200.png (On the left, regular windows image viewer, on the right is MJPG from libavcodec)
> I also saved raw yuv444: http://dev5.summit-tech.ca/pps/ffmpeg/Tulips_1024x768.yuv.bin
> Seems that ffplay can't open raw images (would be useful for development purposes), so I use yay.exe that can view raw yuv images: http://dev5.summit-tech.ca/pps/ffmpeg/yay.exe

-f rawvideo -pix_fmt yuv444p -s 1024x768 or something like that

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- 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/20100608/634a1af0/attachment.pgp>

More information about the ffmpeg-devel mailing list