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

Michael Niedermayer michaelni at gmx.at
Wed Aug 31 22:13:01 CEST 2011


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.
> > 
> > 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.

as you say "our servers" could you maybe check what they send and
elaborate on that a bit ?
I see various possibilities
1. the mjpeg stream in some container is always supposed to use YUV
   instead of YUVJ, this could be confirmed if you could find some
   official stream and a official decoder
2. the server if it uses ffmpeg uses the wrong pixel format
3. something else

but simply setting yuv instead of yuvj for all *jpeg isnt the solution
that will definitly be wrong for normal jpegs

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

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110831/146f038d/attachment.asc>


More information about the ffmpeg-devel mailing list