[MPlayer-dev-eng] [PATCH] removed av_fdct from dsputil_mlib.c
Martin Olschewski
olschewski at zpr.uni-koeln.de
Fri Aug 30 19:39:30 CEST 2002
Hallo Michael,
On Fri, Aug 30, 2002 at 06:29:13PM +0200, Michael Niedermayer wrote:
> On Friday 30 August 2002 16:21, Martin Olschewski wrote:
[av_fdct removed]
> nice, but wrong, av_fdct wasnt removed, it was moved into MpegEncContext, u
> should set MpegEncContext->fdct instead (and u should check the value of
> AVCodecContext->dct_algo before, just look at MPV_common_init_mmx(), the
> rest should be obvious)
I should have been warned. It seemed to be so easy. New Patch attached.
Bye,
Martin
--
Dipl.-Inform. Martin Olschewski Center for Applied Computer Science
Email: olschewski at zpr.uni-koeln.de University of Cologne
Tel.: ++49/221/470-6018 Weyertal 80
Fax.: ++49/221/470-5160 D-50931 K\"oln
-------------- next part --------------
Index: libavcodec/mpegvideo.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegvideo.c,v
retrieving revision 1.131
diff -u -r1.131 mpegvideo.c
--- libavcodec/mpegvideo.c 29 Aug 2002 23:55:32 -0000 1.131
+++ libavcodec/mpegvideo.c 30 Aug 2002 17:33:24 -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;
Index: libavcodec/mpegvideo.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegvideo.h,v
retrieving revision 1.71
diff -u -r1.71 mpegvideo.h
--- libavcodec/mpegvideo.h 29 Aug 2002 23:55:32 -0000 1.71
+++ libavcodec/mpegvideo.h 30 Aug 2002 17:33:24 -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);
Index: libavcodec/mlib/dsputil_mlib.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mlib/dsputil_mlib.c,v
retrieving revision 1.3
diff -u -r1.3 dsputil_mlib.c
--- libavcodec/mlib/dsputil_mlib.c 25 May 2002 22:45:33 -0000 1.3
+++ libavcodec/mlib/dsputil_mlib.c 30 Aug 2002 17:33:24 -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;
@@ -141,4 +141,11 @@
put_no_rnd_pixels_tab[0] = put_pixels_mlib;
add_pixels_clamped = add_pixels_clamped_mlib;
+}
+
+void MPV_common_init_mlib(MpegEncContext *s)
+{
+ if(s->avctx->dct_algo==FF_DCT_AUTO){
+ s->fdct = ff_fdct_mlib;
+ }
}
More information about the MPlayer-dev-eng
mailing list