summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/i386
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-11-01 18:12:53 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-11-01 18:12:53 +0000
commitad86ea038a0b4803c7e3f1a82a293e2ee538e345 (patch)
tree24aa3f8a8900028189d268d75854049dfa386794 /src/libffmpeg/libavcodec/i386
parent72ae3e51758986775949a7ba2002a526d359389f (diff)
downloadxine-lib-ad86ea038a0b4803c7e3f1a82a293e2ee538e345.tar.gz
xine-lib-ad86ea038a0b4803c7e3f1a82a293e2ee538e345.tar.bz2
big ffmpeg patch
* do not define CONFIG_ENCODERS any more, use a stripped down XINE_MPEG_ENCODER, which will only compile an I-frame-only MPEG1 encoder (speeds up compile time) * fix a lot of warnings in ffmpeg (a good deal of which have already been submitted to the ffmpeg project by Mike) * simplify some Makefiles CVS patchset: 5667 CVS date: 2003/11/01 18:12:53
Diffstat (limited to 'src/libffmpeg/libavcodec/i386')
-rw-r--r--src/libffmpeg/libavcodec/i386/Makefile.am3
-rw-r--r--src/libffmpeg/libavcodec/i386/dsputil_mmx.c7
-rw-r--r--src/libffmpeg/libavcodec/i386/fdct_mmx.c3
-rw-r--r--src/libffmpeg/libavcodec/i386/idct_mmx.c7
-rw-r--r--src/libffmpeg/libavcodec/i386/motion_est_mmx.c6
-rw-r--r--src/libffmpeg/libavcodec/i386/simple_idct_mmx.c1
6 files changed, 17 insertions, 10 deletions
diff --git a/src/libffmpeg/libavcodec/i386/Makefile.am b/src/libffmpeg/libavcodec/i386/Makefile.am
index 34fc82988..c9d90d951 100644
--- a/src/libffmpeg/libavcodec/i386/Makefile.am
+++ b/src/libffmpeg/libavcodec/i386/Makefile.am
@@ -34,6 +34,3 @@ endif
libavcodec_mmx_la_SOURCES = $(mmx_modules) $(libavcodec_mmx_dummy)
noinst_HEADERS = dsputil_mmx_avg.h dsputil_mmx_rnd.h mmx.h
-
-.s.lo:
- $(ASCOMPILE) -o $@ `test -f $< || echo '$(srcdir)/'`$<
diff --git a/src/libffmpeg/libavcodec/i386/dsputil_mmx.c b/src/libffmpeg/libavcodec/i386/dsputil_mmx.c
index c523be74a..a1e1642d5 100644
--- a/src/libffmpeg/libavcodec/i386/dsputil_mmx.c
+++ b/src/libffmpeg/libavcodec/i386/dsputil_mmx.c
@@ -588,6 +588,7 @@ static void diff_bytes_mmx(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
for(; i<w; i++)
dst[i+0] = src1[i+0]-src2[i+0];
}
+#endif
static void sub_hfyu_median_prediction_mmx2(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w, int *left, int *left_top){
int i=0;
@@ -625,6 +626,8 @@ static void sub_hfyu_median_prediction_mmx2(uint8_t *dst, uint8_t *src1, uint8_t
*left = src2[w-1];
}
+#ifdef CONFIG_ENCODERS
+
#define LBUTTERFLY2(a1,b1,a2,b2)\
"paddw " #b1 ", " #a1 " \n\t"\
"paddw " #b2 ", " #a2 " \n\t"\
@@ -1599,10 +1602,10 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
#endif
if (mm_flags & MM_MMX) {
- const int dct_algo = avctx->dct_algo;
const int idct_algo= avctx->idct_algo;
-
#ifdef CONFIG_ENCODERS
+ const int dct_algo = avctx->dct_algo;
+
if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX)
c->fdct = ff_fdct_mmx;
#endif //CONFIG_ENCODERS
diff --git a/src/libffmpeg/libavcodec/i386/fdct_mmx.c b/src/libffmpeg/libavcodec/i386/fdct_mmx.c
index 8d3552d2a..a2402c95d 100644
--- a/src/libffmpeg/libavcodec/i386/fdct_mmx.c
+++ b/src/libffmpeg/libavcodec/i386/fdct_mmx.c
@@ -7,9 +7,10 @@
* Intel Application Note AP-922 - fast, precise implementation of DCT
* http://developer.intel.com/vtune/cbts/appnotes.htm
*/
-#include "../common.h"
+#include "../dsputil.h"
#include "mmx.h"
+#undef ATTR_ALIGN
#define ATTR_ALIGN(align) __attribute__ ((__aligned__ (align)))
//////////////////////////////////////////////////////////////////////
diff --git a/src/libffmpeg/libavcodec/i386/idct_mmx.c b/src/libffmpeg/libavcodec/i386/idct_mmx.c
index 298c8a8b0..654792e5e 100644
--- a/src/libffmpeg/libavcodec/i386/idct_mmx.c
+++ b/src/libffmpeg/libavcodec/i386/idct_mmx.c
@@ -22,10 +22,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "../common.h"
+#include "../dsputil.h"
#include "mmx.h"
+#undef ATTR_ALIGN
#define ATTR_ALIGN(align) __attribute__ ((__aligned__ (align)))
#define ROW_SHIFT 11
@@ -554,6 +555,10 @@ static int32_t rounder5[] ATTR_ALIGN(8) =
#undef COL_SHIFT
#undef ROW_SHIFT
+/* the macro below will generate these */
+void ff_mmx_idct(DCTELEM *block);
+void ff_mmxext_idct(DCTELEM *block);
+
#define declare_idct(idct,table,idct_row_head,idct_row,idct_row_tail,idct_row_mid) \
void idct (int16_t * block) \
{ \
diff --git a/src/libffmpeg/libavcodec/i386/motion_est_mmx.c b/src/libffmpeg/libavcodec/i386/motion_est_mmx.c
index aa22f0649..950100e63 100644
--- a/src/libffmpeg/libavcodec/i386/motion_est_mmx.c
+++ b/src/libffmpeg/libavcodec/i386/motion_est_mmx.c
@@ -21,9 +21,9 @@
#include "../dsputil.h"
static const __attribute__ ((aligned(8))) uint64_t round_tab[3]={
-0x0000000000000000,
-0x0001000100010001,
-0x0002000200020002,
+0x0000000000000000ULL,
+0x0001000100010001ULL,
+0x0002000200020002ULL,
};
static const __attribute__ ((aligned(8), unused)) uint64_t bone= 0x0101010101010101LL;
diff --git a/src/libffmpeg/libavcodec/i386/simple_idct_mmx.c b/src/libffmpeg/libavcodec/i386/simple_idct_mmx.c
index 626c1f565..1ee88b634 100644
--- a/src/libffmpeg/libavcodec/i386/simple_idct_mmx.c
+++ b/src/libffmpeg/libavcodec/i386/simple_idct_mmx.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../dsputil.h"
+#include "../simple_idct.h"
/*
23170.475006