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

Gavin Kinsey gkinsey at ad-holdings.co.uk
Thu Sep 1 10:24:34 CEST 2011


On Thursday 01 September 2011 08:20:44 Gavin Kinsey wrote:
> On Wednesday 31 August 2011 21:13:01 Michael Niedermayer wrote:
> > On Wed, Aug 31, 2011 at 02:02:40PM +0100, Gavin Kinsey wrote:
> > > 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.
> > > > 
> > > > 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.
> > 
> > as you say "our servers" could you maybe check what they send and
> > elaborate on that a bit ?

Okay, I've talked with one of the server guys and got some details on what 
is being sent.  The server just passes through the colour space that is used 
by the camera, so it sends CCIR 601 format for both JPEG and MPEG.  It 
doesn't appear to set the "CS=ITU601" in the JPEG comment data that ffmpeg is 
looking for though, so as a result ffmpeg picks the wrong pixel format.

I'll have to adjust this in my application as ffmpeg is doing the right thing 
as far as it knows.

New patch attached that just sets color_range and leaves pixel format 
unchanged.

> I understand keeping YUVJ* in for application compatibility, but YUV420p
> + AVCOL_RANGE_JPEG should be functionally equivalent to YUVJ420p inside
> ffmpeg. If it isn't, then that's a bug surely?  Or am I misunderstanding
> something?

Still think this is an issue though.

-- 
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Set-color_space-in-addition-to-deprecated-YUVJ-pixel.patch
Type: text/x-patch
Size: 1495 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110901/4ebb5ccf/attachment.bin>


More information about the ffmpeg-devel mailing list