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

Michael Niedermayer michaelni at gmx.at
Wed Feb 18 23:54:10 CET 2009


On Sat, Feb 14, 2009 at 04:28:57PM +0100, Reimar Döffinger wrote:
> On Sat, Feb 14, 2009 at 04:42:03PM +0200, Uoti Urpala wrote:
> > I didn't look carefully at the patch, but happened to notice this
> > obviously broken part:
> > > +enum PixelFormat imgfmt2pixfmt(int fmt);
> > > +int imgfmt2pixfmt(enum PixelFormat pix_fmt);
> > Looking at the .c file part I guess the second should be pixfmt2imgfmt.
> > Also the .c file should include the corresponding .h.
> 
> Amazing how considering something trivial invites (trivial) bugs.
> 
> > 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?
from what i remember YUVJ isnt handled correctly in mplayer and removing such
hints might be bad.

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

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090218/6e1bd89e/attachment.pgp>


More information about the MPlayer-dev-eng mailing list