changeset 628:f596db4aa871 libavcodec

sun solaris compilation bugfix, patch by (Martin Olschewski <olschewski at zpr dot uni-koeln dot de>)
author michaelni
date Fri, 30 Aug 2002 18:17:20 +0000
parents 79c43f519d02
children f65040bf4357
files avcodec.h mlib/dsputil_mlib.c mpegvideo.c mpegvideo.h
diffstat 4 files changed, 18 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Fri Aug 30 16:16:30 2002 +0000
+++ b/avcodec.h	Fri Aug 30 18:17:20 2002 +0000
@@ -310,10 +310,11 @@
     int aspected_height;
 
     int dct_algo;
-#define FF_DCT_AUTO 0
+#define FF_DCT_AUTO    0
 #define FF_DCT_FASTINT 1
-#define FF_DCT_INT 2
-#define FF_DCT_MMX 3
+#define FF_DCT_INT     2
+#define FF_DCT_MMX     3
+#define FF_DCT_MLIB    4
 
     //FIXME this should be reordered after kabis API is finished ...
     //TODO kill kabi
--- a/mlib/dsputil_mlib.c	Fri Aug 30 16:16:30 2002 +0000
+++ b/mlib/dsputil_mlib.c	Fri Aug 30 18:17:20 2002 +0000
@@ -18,6 +18,7 @@
  */
 
 #include "../dsputil.h"
+#include "../mpegvideo.h"
 
 #include <mlib_types.h>
 #include <mlib_status.h>
@@ -125,7 +126,6 @@
 
 void dsputil_init_mlib(void)
 {
-    av_fdct = ff_fdct_mlib;
     ff_idct = ff_idct_mlib;
 
     put_pixels_tab[0] = put_pixels_mlib;
@@ -142,3 +142,10 @@
     
     add_pixels_clamped = add_pixels_clamped_mlib;
 }
+
+void MPV_common_init_mlib(MpegEncContext *s)
+{
+    if(s->avctx->dct_algo==FF_DCT_AUTO || s->avctx->dct_algo==FF_DCT_MLIB){
+	s->fdct = ff_fdct_mlib;
+    }
+}
--- a/mpegvideo.c	Fri Aug 30 16:16:30 2002 +0000
+++ b/mpegvideo.c	Fri Aug 30 18:17:20 2002 +0000
@@ -153,6 +153,9 @@
 #ifdef ARCH_ALPHA
     MPV_common_init_axp(s);
 #endif
+#ifdef HAVE_MLIB
+    MPV_common_init_mlib(s);
+#endif
 
     s->mb_width = (s->width + 15) / 16;
     s->mb_height = (s->height + 15) / 16;
--- a/mpegvideo.h	Fri Aug 30 16:16:30 2002 +0000
+++ b/mpegvideo.h	Fri Aug 30 18:17:20 2002 +0000
@@ -480,6 +480,9 @@
 #ifdef ARCH_ALPHA
 void MPV_common_init_axp(MpegEncContext *s);
 #endif
+#ifdef HAVE_MLIB
+void MPV_common_init_mlib(MpegEncContext *s);
+#endif
 extern void (*draw_edges)(UINT8 *buf, int wrap, int width, int height, int w);
 void ff_conceal_past_errors(MpegEncContext *s, int conceal_all);
 void ff_copy_bits(PutBitContext *pb, UINT8 *src, int length);