[MPlayer-dev-eng] [PATCH] restructure fmt-conversion.h and use it in vd_ffmpeg.c

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Feb 19 13:24:01 CET 2009


On Wed, Feb 18, 2009 at 11:54:10PM +0100, Michael Niedermayer wrote:
> On Sat, Feb 14, 2009 at 04:28:57PM +0100, Reimar Döffinger wrote:
> > > I think a subdirectory would be a better location for files like this,
> > > though libmpcodecs/ is itself a bit too large.
> > 
> > The name itself is no good either. I think this should have been in
> > img_format all along, but for now lazyness wins and I'll leave it as it
> > is. If there is a huge outcry and everyone wants it moved that is done
> > in no time.
> 
> > Index: libmpcodecs/vd_ffmpeg.c
> > ===================================================================
> > --- libmpcodecs/vd_ffmpeg.c	(revision 28546)
> > +++ libmpcodecs/vd_ffmpeg.c	(working copy)
> > @@ -11,6 +11,7 @@
> >  #include "libavutil/common.h"
> >  #include "libavutil/intreadwrite.h"
> >  #include "mpbswap.h"
> > +#include "fmt-conversion.h"
> >  
> >  #include "vd_internal.h"
> >  
> > @@ -498,33 +499,7 @@
> >          sh->disp_w = width;
> >          sh->disp_h = height;
> >          ctx->pix_fmt = pix_fmt;
> > -        switch(pix_fmt){
> 
> > -        // YUVJ are YUV formats that use the full Y range and not just
> > -        // 16 - 235 (see colorspaces.txt).
> > -        // Currently they are all treated the same way.
> 
> are you intentionally discarding this?

No, re-added, though fmt-conversion is a bit of a hidden place...

> from what i remember YUVJ isnt handled correctly in mplayer and removing such
> hints might be bad.

Well, strictly speaking FFmpeg can't handle it correctly either since
there are more than just two methods to convert YUV->RGB (though the Y
range makes the largest difference), and also FFmpeg only knows that
MPEG-4 is _supposed_ to use the limited range but it doesn't
necessarily.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list