[MPlayer-dev-eng] [PATCH] [RESEND] -aspect-tolerenace option

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Apr 12 11:03:59 CEST 2008


On Sat, Apr 12, 2008 at 10:40:45AM +0200, Reimar Döffinger wrote:
> In that case something like this:
> > Index: libvo/aspect.c
> > ===================================================================
> > --- libvo/aspect.c      (revision 26401)
> > +++ libvo/aspect.c      (working copy)
> > @@ -96,6 +96,8 @@
> >  #endif
> >      }
> >    }
> > +  if (FFABS(*srch, aspdat.orgh) < 10) *srch = aspdat.orgh;
> > +  if (FFABS(*srcw, aspdat.orgw) < 10) *srcw = aspdat.orgw;
> >    aspdat.asp=*srcw / (float)*srch;
> >  #ifdef ASPECT_DEBUG
> >    printf("aspect(3) wh: %dx%d (org: %dx%d)\n",*srcw,*srch,aspdat.prew,aspdat.preh);
> 
> Seems to me more like what you want.

Attached patch actually works.

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libvo/aspect.c
===================================================================
--- libvo/aspect.c	(revision 26401)
+++ libvo/aspect.c	(working copy)
@@ -5,6 +5,7 @@
 #include "mp_msg.h"
 #include "help_mp.h"
 //#endif
+#include "libavutil/common.h"
 
 //#define ASPECT_DEBUG
 
@@ -96,6 +97,8 @@
 #endif
     }
   }
+  if (FFABS(*srch - aspdat.orgh) < 10) *srch = aspdat.orgh;
+  if (FFABS(*srcw - aspdat.orgw) < 10) *srcw = aspdat.orgw;
   aspdat.asp=*srcw / (float)*srch;
 #ifdef ASPECT_DEBUG
   printf("aspect(3) wh: %dx%d (org: %dx%d)\n",*srcw,*srch,aspdat.prew,aspdat.preh);


More information about the MPlayer-dev-eng mailing list