[FFmpeg-devel] [PATCH] remove disabled code part 4

Michael Niedermayer michaelni
Mon Aug 10 15:24:11 CEST 2009


On Mon, Aug 10, 2009 at 03:00:09PM +0200, Diego Biurrun wrote:
> On Fri, Aug 07, 2009 at 11:15:19AM +0200, Diego Biurrun wrote:
> > I started looking into disabled code, there is lots of it and probably
> > mostly cruft.  Here is a patch that removes it, starting at the top
> > level and the tests subdirectory.  More patches shall follow later.
> > 
> > I will commit approved hunks only.
> 
> .. libavutil ..
> 
> Diego

>  bswap.h |    6 ------
>  lls.c   |   10 ----------
>  tree.c  |    8 --------
>  3 files changed, 24 deletions(-)
> f5bad425df2906c3547b1f5082d42143f9f6cff8  if_zero_part4_libavutil.diff
> Index: libavutil/tree.c
> ===================================================================
> --- libavutil/tree.c	(revision 19614)
> +++ libavutil/tree.c	(working copy)
> @@ -135,14 +135,6 @@
>      }
>  }
>  
> -#if 0
> -void av_tree_enumerate(AVTreeNode *t, void *opaque, int (*f)(void *opaque, void *elem)){
> -    int v= f(opaque, t->elem);
> -    if(v>=0) av_tree_enumerate(t->child[0], opaque, f);
> -    if(v<=0) av_tree_enumerate(t->child[1], opaque, f);
> -}
> -#endif
> -
>  #ifdef TEST
>  
>  #include "lfg.h"

i like to keep that


> Index: libavutil/bswap.h
> ===================================================================
> --- libavutil/bswap.h	(revision 19614)
> +++ libavutil/bswap.h	(working copy)
> @@ -60,11 +60,6 @@
>  #ifndef bswap_64
>  static inline uint64_t av_const bswap_64(uint64_t x)
>  {
> -#if 0
> -    x= ((x<< 8)&0xFF00FF00FF00FF00ULL) | ((x>> 8)&0x00FF00FF00FF00FFULL);
> -    x= ((x<<16)&0xFFFF0000FFFF0000ULL) | ((x>>16)&0x0000FFFF0000FFFFULL);
> -    return (x>>32) | (x<<32);
> -#else
>      union {
>          uint64_t ll;
>          uint32_t l[2];
> @@ -73,7 +68,6 @@
>      r.l[0] = bswap_32 (w.l[1]);
>      r.l[1] = bswap_32 (w.l[0]);
>      return r.ll;
> -#endif
>  }
>  #endif
>  

can be removed if slower on all major archs


> Index: libavutil/lls.c
> ===================================================================
> --- libavutil/lls.c	(revision 19614)
> +++ libavutil/lls.c	(working copy)
> @@ -118,20 +118,10 @@
>      for(i=0; i<100; i++){
>          double var[4];
>          double eval;
> -#if 0
> -        var[1] = rand() / (double)RAND_MAX;
> -        var[2] = rand() / (double)RAND_MAX;
> -        var[3] = rand() / (double)RAND_MAX;
> -
> -        var[2]= var[1] + var[3]/2;
> -
> -        var[0] = var[1] + var[2] + var[3] +  var[1]*var[2]/100;
> -#else
>          var[0] = (rand() / (double)RAND_MAX - 0.5)*2;
>          var[1] = var[0] + rand() / (double)RAND_MAX - 0.5;
>          var[2] = var[1] + rand() / (double)RAND_MAX - 0.5;
>          var[3] = var[2] + rand() / (double)RAND_MAX - 0.5;
> -#endif
>          av_update_lls(&m, var, 0.99);
>          av_solve_lls(&m, 0.001, 0);
>          for(order=0; order<3; order++){

ok

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

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- 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/ffmpeg-devel/attachments/20090810/8be77bde/attachment.pgp>



More information about the ffmpeg-devel mailing list