[FFmpeg-devel] [PATCH] Set color_space instead of deprecated YUVJ* pixel formats

Gavin Kinsey gkinsey at ad-holdings.co.uk
Wed Aug 31 15:02:40 CEST 2011


On Wednesday 31 August 2011 13:52:35 Gavin Kinsey wrote:
> On Wednesday 31 August 2011 13:27:56 Michael Niedermayer wrote:
> > On Wed, Aug 31, 2011 at 08:20:47AM +0100, Gavin Kinsey wrote:
> > > Set color_space instead of deprecated YUVJ* pixel formats in MJPEG
> > > decoder.
> > 
> > i think the pixel format should be left for compatibility for now,
> > just setting color_range in addition seems better
> 
> The colour conversion is different in that case.  Something different
> happens in swscale if the pixel format is YUVJ*, with or without
> color_range.
> 
> I have a server that can send MJPEG or MPEG4 streams.  With my original
> patch the colours look the same in the two versions when played with
> ffplay. Without the patch, or setting color_range while leaving the
> pixel format at YUVJ* alters the colours in the MJPEG compared to the
> MPEG4.
> 
> Now perhaps this altered colour palette is correct, it wouldn't be the
> first time our servers send the wrong data, but it just looks washed-out
> to me.

Here is an example of what I mean.  These two videos were captured a few 
seconds apart so should look the same (I believe) but they don't.  This is 
with the code patched as you suggested, both YUVJ pixel format and 
color_range set.

http://www.4shared.com/video/l-9rBlUR/out_115_mpeg4.html
http://www.4shared.com/video/z9iRkEux/out_115_mjpeg.html

Ignore the broken aspect ratio on the MJPEG, vf setsar="1:1".

-- 
Gavin Kinsey
AD Holdings Plc


Closed IPTV, the new safe and secure deterministic IP Video solution from Dedicated Micros, is now shipping through selected distributors.
- Come and see this award winning plug and play, IP Video innovation at one of our Roadshows around the UK visit: https://www.dedicatedmicros.com/europe/ClosedIPTVRoadshow2011
- Contact our Customer Services Team for more information regarding how to enter the world of safe and secure hybrid IP and analogue video surveillance systems.


More information about the ffmpeg-devel mailing list