[FFmpeg-cvslog] Remove Sun medialib glue code.

Diego Biurrun git at videolan.org
Thu Feb 9 01:46:10 CET 2012


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Feb  1 14:43:06 2012 +0100| [0144fe69951a10587769cfc76554d5f7f473eccb] | committer: Diego Biurrun

Remove Sun medialib glue code.

It is obscure, most likely unused and not bit-exact compared to
libavcodec due to a different IDCT transform algorithm.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0144fe69951a10587769cfc76554d5f7f473eccb
---

 configure                      |    4 -
 libavcodec/Makefile            |    4 +-
 libavcodec/avcodec.h           |    2 -
 libavcodec/dsputil.c           |    1 -
 libavcodec/dsputil.h           |    1 -
 libavcodec/mlib/dsputil_mlib.c |  469 ----------------------------------------
 libavcodec/mpegvideo.c         |    2 -
 libavcodec/mpegvideo.h         |    1 -
 libavcodec/options.c           |    2 -
 libswscale/Makefile            |    3 +-
 libswscale/mlib/yuv2rgb_mlib.c |   89 --------
 libswscale/swscale_internal.h  |    1 -
 libswscale/yuv2rgb.c           |    2 -
 13 files changed, 2 insertions(+), 579 deletions(-)

diff --git a/configure b/configure
index b1da509..a1cbd69 100755
--- a/configure
+++ b/configure
@@ -194,7 +194,6 @@ External library support:
   --enable-libxavs         enable AVS encoding via xavs [no]
   --enable-libxvid         enable Xvid encoding via xvidcore,
                            native MPEG-4/Xvid encoder exists [no]
-  --enable-mlib            enable Sun medialib [no]
   --enable-openssl         enable openssl [no]
   --enable-zlib            enable zlib [autodetect]
 
@@ -970,7 +969,6 @@ CONFIG_LIST="
     lsp
     mdct
     memalign_hack
-    mlib
     mpegaudiodsp
     network
     nonfree
@@ -2967,7 +2965,6 @@ enabled libx264    && require  libx264 x264.h x264_encoder_encode -lx264 &&
                         die "ERROR: libx264 version must be >= 0.118."; }
 enabled libxavs    && require  libxavs xavs.h xavs_encoder_encode -lxavs
 enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore
-enabled mlib       && require  mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
 enabled openssl    && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
                         check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
                         check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
@@ -3227,7 +3224,6 @@ echo "network support           ${network-no}"
 echo "threading support         ${thread_type-no}"
 echo "safe bitstream reader     ${safe_bitstream_reader-no}"
 echo "SDL support               ${sdl-no}"
-echo "Sun medialib support      ${mlib-no}"
 echo "libdxva2 enabled          ${dxva2-no}"
 echo "libva enabled             ${vaapi-no}"
 echo "libvdpau enabled          ${vdpau-no}"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 6308e82..fbb09ee 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -663,8 +663,6 @@ OBJS-$(CONFIG_TEXT2MOVSUB_BSF)            += movsub_bsf.o
 OBJS-$(HAVE_PTHREADS)                  += pthread.o
 OBJS-$(HAVE_W32THREADS)                += pthread.o
 
-OBJS-$(CONFIG_MLIB)                    += mlib/dsputil_mlib.o           \
-
 # inverse.o contains the ff_inverse table definition, which is used by
 # the FASTDIV macro (from libavutil); since referencing the external
 # table has a negative effect on performance, copy it in libavcodec as
@@ -696,7 +694,7 @@ HOSTPROGS = aac_tablegen aacps_tablegen cbrt_tablegen cos_tablegen      \
             dv_tablegen motionpixels_tablegen mpegaudio_tablegen        \
             pcm_tablegen qdm2_tablegen sinewin_tablegen
 
-DIRS = alpha arm bfin mlib ppc ps2 sh4 sparc x86
+DIRS = alpha arm bfin ppc ps2 sh4 sparc x86
 
 CLEANFILES = *_tables.c *_tables.h *_tablegen$(HOSTEXESUF)
 
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 05e8b9c..b60e7be 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1680,7 +1680,6 @@ typedef struct AVCodecContext {
 #define FF_DCT_FASTINT 1
 #define FF_DCT_INT     2
 #define FF_DCT_MMX     3
-#define FF_DCT_MLIB    4
 #define FF_DCT_ALTIVEC 5
 #define FF_DCT_FAAN    6
 
@@ -1731,7 +1730,6 @@ typedef struct AVCodecContext {
 #define FF_IDCT_SIMPLEMMX     3
 #define FF_IDCT_LIBMPEG2MMX   4
 #define FF_IDCT_PS2           5
-#define FF_IDCT_MLIB          6
 #define FF_IDCT_ARM           7
 #define FF_IDCT_ALTIVEC       8
 #define FF_IDCT_SH4           9
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index a72bd89..9f28241 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -3138,7 +3138,6 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
 
     if (HAVE_MMX)        dsputil_init_mmx   (c, avctx);
     if (ARCH_ARM)        dsputil_init_arm   (c, avctx);
-    if (CONFIG_MLIB)     dsputil_init_mlib  (c, avctx);
     if (HAVE_VIS)        dsputil_init_vis   (c, avctx);
     if (ARCH_ALPHA)      dsputil_init_alpha (c, avctx);
     if (ARCH_PPC)        dsputil_init_ppc   (c, avctx);
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index cadde7d..786a0ef 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -643,7 +643,6 @@ static inline int get_penalty_factor(int lambda, int lambda2, int type){
 void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx);
 void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx);
 void dsputil_init_bfin(DSPContext* c, AVCodecContext *avctx);
-void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx);
 void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx);
 void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx);
 void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx);
diff --git a/libavcodec/mlib/dsputil_mlib.c b/libavcodec/mlib/dsputil_mlib.c
deleted file mode 100644
index bfa5153..0000000
--- a/libavcodec/mlib/dsputil_mlib.c
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * Sun mediaLib optimized DSP utils
- * Copyright (c) 2001 Fabrice Bellard
- *
- * This file is part of Libav.
- *
- * Libav is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * Libav is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "libavcodec/dsputil.h"
-#include "libavcodec/mpegvideo.h"
-
-#include <mlib_types.h>
-#include <mlib_status.h>
-#include <mlib_sys.h>
-#include <mlib_algebra.h>
-#include <mlib_video.h>
-
-/* misc */
-
-static void get_pixels_mlib(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
-{
-  int i;
-
-  for (i=0;i<8;i++) {
-    mlib_VectorConvert_S16_U8_Mod((mlib_s16 *)block, (mlib_u8 *)pixels, 8);
-
-    pixels += line_size;
-    block += 8;
-  }
-}
-
-static void diff_pixels_mlib(DCTELEM *restrict block, const uint8_t *s1, const uint8_t *s2, int line_size)
-{
-  int i;
-
-  for (i=0;i<8;i++) {
-    mlib_VectorSub_S16_U8_Mod((mlib_s16 *)block, (mlib_u8 *)s1, (mlib_u8 *)s2, 8);
-
-    s1 += line_size;
-    s2 += line_size;
-    block += 8;
-  }
-}
-
-static void add_pixels_clamped_mlib(const DCTELEM *block, uint8_t *pixels, int line_size)
-{
-    mlib_VideoAddBlock_U8_S16(pixels, (mlib_s16 *)block, line_size);
-}
-
-/* put block, width 16 pixel, height 8/16 */
-
-static void put_pixels16_mlib (uint8_t * dest, const uint8_t * ref,
-                               int stride, int height)
-{
-  switch (height) {
-    case 8:
-      mlib_VideoCopyRef_U8_U8_16x8(dest, (uint8_t *)ref, stride);
-    break;
-
-    case 16:
-      mlib_VideoCopyRef_U8_U8_16x16(dest, (uint8_t *)ref, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-static void put_pixels16_x2_mlib (uint8_t * dest, const uint8_t * ref,
-                                  int stride, int height)
-{
-  switch (height) {
-    case 8:
-      mlib_VideoInterpX_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 16:
-      mlib_VideoInterpX_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-static void put_pixels16_y2_mlib (uint8_t * dest, const uint8_t * ref,
-                                  int stride, int height)
-{
-  switch (height) {
-    case 8:
-      mlib_VideoInterpY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 16:
-      mlib_VideoInterpY_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-static void put_pixels16_xy2_mlib(uint8_t * dest, const uint8_t * ref,
-                                  int stride, int height)
-{
-  switch (height) {
-    case 8:
-      mlib_VideoInterpXY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 16:
-      mlib_VideoInterpXY_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-/* put block, width 8 pixel, height 4/8/16 */
-
-static void put_pixels8_mlib (uint8_t * dest, const uint8_t * ref,
-                               int stride, int height)
-{
-  switch (height) {
-    case 4:
-      mlib_VideoCopyRef_U8_U8_8x4(dest, (uint8_t *)ref, stride);
-    break;
-
-    case 8:
-      mlib_VideoCopyRef_U8_U8_8x8(dest, (uint8_t *)ref, stride);
-    break;
-
-    case 16:
-      mlib_VideoCopyRef_U8_U8_8x16(dest, (uint8_t *)ref, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-static void put_pixels8_x2_mlib (uint8_t * dest, const uint8_t * ref,
-                                  int stride, int height)
-{
-  switch (height) {
-    case 4:
-      mlib_VideoInterpX_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 8:
-      mlib_VideoInterpX_U8_U8_8x8(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 16:
-      mlib_VideoInterpX_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-static void put_pixels8_y2_mlib (uint8_t * dest, const uint8_t * ref,
-                                  int stride, int height)
-{
-  switch (height) {
-    case 4:
-      mlib_VideoInterpY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 8:
-      mlib_VideoInterpY_U8_U8_8x8(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 16:
-      mlib_VideoInterpY_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-static void put_pixels8_xy2_mlib(uint8_t * dest, const uint8_t * ref,
-                                  int stride, int height)
-{
-  switch (height) {
-    case 4:
-      mlib_VideoInterpXY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 8:
-      mlib_VideoInterpXY_U8_U8_8x8(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 16:
-      mlib_VideoInterpXY_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-/* average block, width 16 pixel, height 8/16 */
-
-static void avg_pixels16_mlib (uint8_t * dest, const uint8_t * ref,
-                               int stride, int height)
-{
-  switch (height) {
-    case 8:
-      mlib_VideoCopyRefAve_U8_U8_16x8(dest, (uint8_t *)ref, stride);
-    break;
-
-    case 16:
-      mlib_VideoCopyRefAve_U8_U8_16x16(dest, (uint8_t *)ref, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-static void avg_pixels16_x2_mlib (uint8_t * dest, const uint8_t * ref,
-                                  int stride, int height)
-{
-  switch (height) {
-    case 8:
-      mlib_VideoInterpAveX_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 16:
-      mlib_VideoInterpAveX_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-static void avg_pixels16_y2_mlib (uint8_t * dest, const uint8_t * ref,
-                                  int stride, int height)
-{
-  switch (height) {
-    case 8:
-      mlib_VideoInterpAveY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 16:
-      mlib_VideoInterpAveY_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-static void avg_pixels16_xy2_mlib(uint8_t * dest, const uint8_t * ref,
-                                  int stride, int height)
-{
-  switch (height) {
-    case 8:
-      mlib_VideoInterpAveXY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 16:
-      mlib_VideoInterpAveXY_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-/* average block, width 8 pixel, height 4/8/16 */
-
-static void avg_pixels8_mlib (uint8_t * dest, const uint8_t * ref,
-                               int stride, int height)
-{
-  switch (height) {
-    case 4:
-      mlib_VideoCopyRefAve_U8_U8_8x4(dest, (uint8_t *)ref, stride);
-    break;
-
-    case 8:
-      mlib_VideoCopyRefAve_U8_U8_8x8(dest, (uint8_t *)ref, stride);
-    break;
-
-    case 16:
-      mlib_VideoCopyRefAve_U8_U8_8x16(dest, (uint8_t *)ref, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-static void avg_pixels8_x2_mlib (uint8_t * dest, const uint8_t * ref,
-                                  int stride, int height)
-{
-  switch (height) {
-    case 4:
-      mlib_VideoInterpAveX_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 8:
-      mlib_VideoInterpAveX_U8_U8_8x8(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 16:
-      mlib_VideoInterpAveX_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-static void avg_pixels8_y2_mlib (uint8_t * dest, const uint8_t * ref,
-                                  int stride, int height)
-{
-  switch (height) {
-    case 4:
-      mlib_VideoInterpAveY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 8:
-      mlib_VideoInterpAveY_U8_U8_8x8(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 16:
-      mlib_VideoInterpAveY_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-static void avg_pixels8_xy2_mlib(uint8_t * dest, const uint8_t * ref,
-                                  int stride, int height)
-{
-  switch (height) {
-    case 4:
-      mlib_VideoInterpAveXY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 8:
-      mlib_VideoInterpAveXY_U8_U8_8x8(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    case 16:
-      mlib_VideoInterpAveXY_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
-    break;
-
-    default:
-      assert(0);
-  }
-}
-
-/* swap byte order of a buffer */
-
-static void bswap_buf_mlib(uint32_t *dst, const uint32_t *src, int w)
-{
-  mlib_VectorReverseByteOrder_U32_U32(dst, src, w);
-}
-
-/* transformations */
-
-static void ff_idct_put_mlib(uint8_t *dest, int line_size, DCTELEM *data)
-{
-    int i;
-    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
-
-    mlib_VideoIDCT8x8_S16_S16 (data, data);
-
-    for(i=0;i<8;i++) {
-        dest[0] = cm[data[0]];
-        dest[1] = cm[data[1]];
-        dest[2] = cm[data[2]];
-        dest[3] = cm[data[3]];
-        dest[4] = cm[data[4]];
-        dest[5] = cm[data[5]];
-        dest[6] = cm[data[6]];
-        dest[7] = cm[data[7]];
-
-        dest += line_size;
-        data += 8;
-    }
-}
-
-static void ff_idct_add_mlib(uint8_t *dest, int line_size, DCTELEM *data)
-{
-    mlib_VideoIDCT8x8_S16_S16 (data, data);
-    mlib_VideoAddBlock_U8_S16(dest, (mlib_s16 *)data, line_size);
-}
-
-static void ff_idct_mlib(DCTELEM *data)
-{
-    mlib_VideoIDCT8x8_S16_S16 (data, data);
-}
-
-static void ff_fdct_mlib(DCTELEM *data)
-{
-    mlib_VideoDCT8x8_S16_S16 (data, data);
-}
-
-void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx)
-{
-    const int high_bit_depth = avctx->bits_per_raw_sample > 8;
-
-    c->diff_pixels = diff_pixels_mlib;
-    c->add_pixels_clamped = add_pixels_clamped_mlib;
-
-    if (!high_bit_depth) {
-    c->get_pixels  = get_pixels_mlib;
-
-    c->put_pixels_tab[0][0] = put_pixels16_mlib;
-    c->put_pixels_tab[0][1] = put_pixels16_x2_mlib;
-    c->put_pixels_tab[0][2] = put_pixels16_y2_mlib;
-    c->put_pixels_tab[0][3] = put_pixels16_xy2_mlib;
-    c->put_pixels_tab[1][0] = put_pixels8_mlib;
-    c->put_pixels_tab[1][1] = put_pixels8_x2_mlib;
-    c->put_pixels_tab[1][2] = put_pixels8_y2_mlib;
-    c->put_pixels_tab[1][3] = put_pixels8_xy2_mlib;
-
-    c->avg_pixels_tab[0][0] = avg_pixels16_mlib;
-    c->avg_pixels_tab[0][1] = avg_pixels16_x2_mlib;
-    c->avg_pixels_tab[0][2] = avg_pixels16_y2_mlib;
-    c->avg_pixels_tab[0][3] = avg_pixels16_xy2_mlib;
-    c->avg_pixels_tab[1][0] = avg_pixels8_mlib;
-    c->avg_pixels_tab[1][1] = avg_pixels8_x2_mlib;
-    c->avg_pixels_tab[1][2] = avg_pixels8_y2_mlib;
-    c->avg_pixels_tab[1][3] = avg_pixels8_xy2_mlib;
-
-    c->put_no_rnd_pixels_tab[0][0] = put_pixels16_mlib;
-    c->put_no_rnd_pixels_tab[1][0] = put_pixels8_mlib;
-    }
-
-    c->bswap_buf = bswap_buf_mlib;
-}
-
-void MPV_common_init_mlib(MpegEncContext *s)
-{
-    if(s->avctx->dct_algo==FF_DCT_AUTO || s->avctx->dct_algo==FF_DCT_MLIB){
-        s->dsp.fdct = ff_fdct_mlib;
-    }
-
-    if(s->avctx->idct_algo==FF_IDCT_MLIB){
-        s->dsp.idct_put= ff_idct_put_mlib;
-        s->dsp.idct_add= ff_idct_add_mlib;
-        s->dsp.idct    = ff_idct_mlib;
-        s->dsp.idct_permutation_type= FF_NO_IDCT_PERM;
-    }
-}
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 50e6ad6..d1c06c0 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -191,8 +191,6 @@ av_cold int ff_dct_common_init(MpegEncContext *s)
     MPV_common_init_mmx(s);
 #elif ARCH_ALPHA
     MPV_common_init_axp(s);
-#elif CONFIG_MLIB
-    MPV_common_init_mlib(s);
 #elif HAVE_MMI
     MPV_common_init_mmi(s);
 #elif ARCH_ARM
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 3473e6d..3d3b237 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -697,7 +697,6 @@ int MPV_encode_end(AVCodecContext *avctx);
 int MPV_encode_picture(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data);
 void MPV_common_init_mmx(MpegEncContext *s);
 void MPV_common_init_axp(MpegEncContext *s);
-void MPV_common_init_mlib(MpegEncContext *s);
 void MPV_common_init_mmi(MpegEncContext *s);
 void MPV_common_init_arm(MpegEncContext *s);
 void MPV_common_init_altivec(MpegEncContext *s);
diff --git a/libavcodec/options.c b/libavcodec/options.c
index eb80375..04fb1b4 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -201,7 +201,6 @@ static const AVOption options[]={
 {"fastint", "fast integer", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DCT_FASTINT }, INT_MIN, INT_MAX, V|E, "dct"},
 {"int", "accurate integer", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DCT_INT }, INT_MIN, INT_MAX, V|E, "dct"},
 {"mmx", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_DCT_MMX }, INT_MIN, INT_MAX, V|E, "dct"},
-{"mlib", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_DCT_MLIB }, INT_MIN, INT_MAX, V|E, "dct"},
 {"altivec", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_DCT_ALTIVEC }, INT_MIN, INT_MAX, V|E, "dct"},
 {"faan", "floating point AAN DCT", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DCT_FAAN }, INT_MIN, INT_MAX, V|E, "dct"},
 {"lumi_mask", "compresses bright areas stronger than medium ones", OFFSET(lumi_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E},
@@ -216,7 +215,6 @@ static const AVOption options[]={
 {"simplemmx", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEMMX }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"libmpeg2mmx", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_LIBMPEG2MMX }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"ps2", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_PS2 }, INT_MIN, INT_MAX, V|E|D, "idct"},
-{"mlib", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_MLIB }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"arm", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_ARM }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"altivec", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_ALTIVEC }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"sh4", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SH4 }, INT_MIN, INT_MAX, V|E|D, "idct"},
diff --git a/libswscale/Makefile b/libswscale/Makefile
index 75262f8..36c2bef 100644
--- a/libswscale/Makefile
+++ b/libswscale/Makefile
@@ -9,7 +9,6 @@ OBJS = input.o options.o output.o rgb2rgb.o swscale.o \
 OBJS-$(ARCH_BFIN)          +=  bfin/internal_bfin.o     \
                                bfin/swscale_bfin.o      \
                                bfin/yuv2rgb_bfin.o
-OBJS-$(CONFIG_MLIB)        +=  mlib/yuv2rgb_mlib.o
 OBJS-$(HAVE_ALTIVEC)       +=  ppc/swscale_altivec.o    \
                                ppc/yuv2rgb_altivec.o    \
                                ppc/yuv2yuv_altivec.o
@@ -25,4 +24,4 @@ OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o
 
 TESTPROGS = colorspace swscale
 
-DIRS = bfin mlib ppc sparc x86
+DIRS = bfin ppc sparc x86
diff --git a/libswscale/mlib/yuv2rgb_mlib.c b/libswscale/mlib/yuv2rgb_mlib.c
deleted file mode 100644
index 526c975..0000000
--- a/libswscale/mlib/yuv2rgb_mlib.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * software YUV to RGB converter using mediaLib
- *
- * Copyright (C) 2003 Michael Niedermayer <michaelni at gmx.at>
- *
- * This file is part of Libav.
- *
- * Libav is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * Libav is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <mlib_types.h>
-#include <mlib_status.h>
-#include <mlib_sys.h>
-#include <mlib_video.h>
-#include <inttypes.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#include "libswscale/swscale.h"
-#include "libswscale/swscale_internal.h"
-
-static int mlib_YUV2ARGB420_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
-                               int srcSliceH, uint8_t* dst[], int dstStride[])
-{
-    if(c->srcFormat == PIX_FMT_YUV422P) {
-        srcStride[1] *= 2;
-        srcStride[2] *= 2;
-    }
-
-    assert(srcStride[1] == srcStride[2]);
-
-    mlib_VideoColorYUV2ARGB420(dst[0]+srcSliceY*dstStride[0], src[0], src[1], src[2], c->dstW,
-                               srcSliceH, dstStride[0], srcStride[0], srcStride[1]);
-    return srcSliceH;
-}
-
-static int mlib_YUV2ABGR420_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
-                               int srcSliceH, uint8_t* dst[], int dstStride[])
-{
-    if(c->srcFormat == PIX_FMT_YUV422P) {
-        srcStride[1] *= 2;
-        srcStride[2] *= 2;
-    }
-
-    assert(srcStride[1] == srcStride[2]);
-
-    mlib_VideoColorYUV2ABGR420(dst[0]+srcSliceY*dstStride[0], src[0], src[1], src[2], c->dstW,
-                               srcSliceH, dstStride[0], srcStride[0], srcStride[1]);
-    return srcSliceH;
-}
-
-static int mlib_YUV2RGB420_24(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
-                              int srcSliceH, uint8_t* dst[], int dstStride[])
-{
-    if(c->srcFormat == PIX_FMT_YUV422P) {
-        srcStride[1] *= 2;
-        srcStride[2] *= 2;
-    }
-
-    assert(srcStride[1] == srcStride[2]);
-
-    mlib_VideoColorYUV2RGB420(dst[0]+srcSliceY*dstStride[0], src[0], src[1], src[2], c->dstW,
-                              srcSliceH, dstStride[0], srcStride[0], srcStride[1]);
-    return srcSliceH;
-}
-
-
-SwsFunc ff_yuv2rgb_init_mlib(SwsContext *c)
-{
-    switch(c->dstFormat) {
-    case PIX_FMT_RGB24: return mlib_YUV2RGB420_24;
-    case PIX_FMT_BGR32: return mlib_YUV2ARGB420_32;
-    case PIX_FMT_RGB32: return mlib_YUV2ABGR420_32;
-    default: return NULL;
-    }
-}
-
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 242a850..0f5404e 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -535,7 +535,6 @@ void updateMMXDitherTables(SwsContext *c, int dstY, int lumBufIndex, int chrBufI
 
 SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c);
 SwsFunc ff_yuv2rgb_init_vis(SwsContext *c);
-SwsFunc ff_yuv2rgb_init_mlib(SwsContext *c);
 SwsFunc ff_yuv2rgb_init_altivec(SwsContext *c);
 SwsFunc ff_yuv2rgb_get_func_ptr_bfin(SwsContext *c);
 void ff_bfin_get_unscaled_swscale(SwsContext *c);
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
index 39c8b9c..24dc960 100644
--- a/libswscale/yuv2rgb.c
+++ b/libswscale/yuv2rgb.c
@@ -510,8 +510,6 @@ SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c)
         t = ff_yuv2rgb_init_mmx(c);
     } else if (HAVE_VIS) {
         t = ff_yuv2rgb_init_vis(c);
-    } else if (CONFIG_MLIB) {
-        t = ff_yuv2rgb_init_mlib(c);
     } else if (HAVE_ALTIVEC) {
         t = ff_yuv2rgb_init_altivec(c);
     } else if (ARCH_BFIN) {



More information about the ffmpeg-cvslog mailing list