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

Michael Niedermayer michaelni
Sat Aug 8 13:54:50 CEST 2009


On Sat, Aug 08, 2009 at 11:53:14AM +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.
> 
> Here is the same thing for libswscale.
> 
> Diego

>  ppc/yuv2rgb_altivec.c |    9 ---------
>  rgb2rgb_template.c    |    6 ------
>  swscale.c             |   26 --------------------------
>  swscale_template.c    |   10 ----------
>  4 files changed, 51 deletions(-)
> d08912a4c8c651c865a74744e16fcf5319d0c828  if_zero_part2_libswscale.diff
> Index: libswscale/swscale.c
> ===================================================================
> --- libswscale/swscale.c	(revision 29481)
> +++ libswscale/swscale.c	(working copy)
> @@ -302,19 +302,6 @@
>  {  1,  25,   7,  31,   0,  24,   6,  30, },
>  };
>  
> -#if 0
> -DECLARE_ALIGNED(8, const uint8_t, dither_8x8_64[8][8])={
> -{  0,  48,  12,  60,   3,  51,  15,  63, },
> -{ 32,  16,  44,  28,  35,  19,  47,  31, },
> -{  8,  56,   4,  52,  11,  59,   7,  55, },
> -{ 40,  24,  36,  20,  43,  27,  39,  23, },
> -{  2,  50,  14,  62,   1,  49,  13,  61, },
> -{ 34,  18,  46,  30,  33,  17,  45,  29, },
> -{ 10,  58,   6,  54,   9,  57,   5,  53, },
> -{ 42,  26,  38,  22,  41,  25,  37,  21, },
> -};
> -#endif
> -
>  DECLARE_ALIGNED(8, const uint8_t, dither_8x8_73[8][8])={
>  {  0,  55,  14,  68,   3,  58,  17,  72, },
>  { 37,  18,  50,  32,  40,  22,  54,  35, },
> @@ -326,19 +313,6 @@
>  { 48,  30,  43,  25,  47,  29,  42,  24, },
>  };
>  
> -#if 0
> -DECLARE_ALIGNED(8, const uint8_t, dither_8x8_128[8][8])={
> -{ 68,  36,  92,  60,  66,  34,  90,  58, },
> -{ 20, 116,  12, 108,  18, 114,  10, 106, },
> -{ 84,  52,  76,  44,  82,  50,  74,  42, },
> -{  0,  96,  24, 120,   6, 102,  30, 126, },
> -{ 64,  32,  88,  56,  70,  38,  94,  62, },
> -{ 16, 112,   8, 104,  22, 118,  14, 110, },
> -{ 80,  48,  72,  40,  86,  54,  78,  46, },
> -{  4, 100,  28, 124,   2,  98,  26, 122, },
> -};
> -#endif
> -
>  #if 1
>  DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={
>  {117,  62, 158, 103, 113,  58, 155, 100, },

ok


> Index: libswscale/ppc/yuv2rgb_altivec.c
> ===================================================================
> --- libswscale/ppc/yuv2rgb_altivec.c	(revision 29481)
> +++ libswscale/ppc/yuv2rgb_altivec.c	(working copy)

not maintained by me


[...]

> Index: libswscale/rgb2rgb_template.c
> ===================================================================
> --- libswscale/rgb2rgb_template.c	(revision 29481)
> +++ libswscale/rgb2rgb_template.c	(working copy)
> @@ -1258,10 +1258,6 @@
>  #endif
>      while (s < end)
>      {
> -#if 0 //slightly slower on Athlon
> -        int bgr= *s++;
> -        *((uint32_t*)d)++ = ((bgr&0x1F)<<3) + ((bgr&0x3E0)<<6) + ((bgr&0x7C00)<<9);
> -#else
>          register uint16_t bgr;
>          bgr = *s++;
>  #if HAVE_BIGENDIAN
> @@ -1275,8 +1271,6 @@
>          *d++ = (bgr&0x7C00)>>7;
>          *d++ = 255;
>  #endif
> -
> -#endif
>      }
>  }
>  
> Index: libswscale/swscale_template.c
> ===================================================================
> --- libswscale/swscale_template.c	(revision 29481)
> +++ libswscale/swscale_template.c	(working copy)
> @@ -2654,16 +2654,6 @@
>      //printf("swscale %X %X %X -> %X %X %X\n", (int)src[0], (int)src[1], (int)src[2],
>      //       (int)dst[0], (int)dst[1], (int)dst[2]);
>  
> -#if 0 //self test FIXME move to a vfilter or something
> -    {
> -    static volatile int i=0;
> -    i++;
> -    if (srcFormat==PIX_FMT_YUV420P && i==1 && srcSliceH>= c->srcH)
> -        selfTest(src, srcStride, c->srcW, c->srcH);
> -    i--;
> -    }
> -#endif
> -
>      //printf("sws Strides:%d %d %d -> %d %d %d\n", srcStride[0],srcStride[1],srcStride[2],
>      //dstStride[0],dstStride[1],dstStride[2]);
>  

ok

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

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- 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/20090808/cce425e0/attachment.pgp>



More information about the ffmpeg-devel mailing list