[MPlayer-cvslog] CVS: main/libmpcodecs ve_lavc.c,1.113,1.114

Rich Felker dalias at aerifal.cx
Mon May 9 02:24:03 CEST 2005


On Sun, May 08, 2005 at 10:19:04PM +0200, Michael Niedermayer wrote:
> Hi
> 
> On Sunday 08 May 2005 20:41, Reimar Döffinger wrote:
> > Hi,
> >
> > On Sun, May 08, 2005 at 02:56:49PM +0200, Michael Niedermayer wrote:
> > > On Sunday 08 May 2005 12:31, Reimar Döffinger CVS wrote:
> > > > @@ -614,7 +614,8 @@
> > > >      {
> > > >  	case IMGFMT_YV12:
> > > >  	    // HACK, mjpeg accepts PIX_FMT_YUV420P only with vstrict=-1
> > > > -	    if (strcasecmp(lavc_param_vcodec, "mjpeg") == 0)
> > > > +	    if (strcasecmp(lavc_param_vcodec, "mjpeg") == 0 ||
> > > > +	        strcasecmp(lavc_param_vcodec, "ljpeg") == 0)
> > > >  	      lavc_venc_context->pix_fmt = PIX_FMT_YUVJ420P;
> > >
> > > reverse this! and the 1.108 -> 1.109 change too
> > > the correct way to store IMGFMT_YV12 in jpeg is to set strict=-1
> > > the difference is that your (stupid) hack leads to wrong colors on all
> > > encoded mjpeg&ljpeg as libavcodec wont know the correct colorspace and so
> > > cant store the correct colorspace in the jpeg
> >
> > Well, but the problem I see is that strict=-1 might also mean that the
> > encoded file might not be playable in later versions. I found it
> > unacceptable to set that automatically (actually I'd prefer people to
> > have an alternative to specifying that anyway).
> 
> ok, done

??

> > Also colors didn't really look wrong to me (though my eyes (and esp. LCD)
> > aren't that good).
> 
> well, tell this to the first user who notices that his lossless jpeg encodings 
> look the same but arent

They're lossless if you decode them with MPlayer/MEncoder, which also
assumes standard YUV colorspace when decoding jpeg..

> > Feel free to reverse it, but I can't see any solution that would be much
> > better - except actually supporting YUVJ (for which I don't even know
> > the exact specification).
> 
> as rich already said supporting YUVJ wont help at all especially not with 
> lossess jpeg

Why is it "especially" for lossless? I'm confused..

> anyway, ill reverse this if you dont

Just don't use cvs admin -o...
Maybe MEncoder should just make vstrict=-1 the default..

Rich




More information about the MPlayer-cvslog mailing list