summaryrefslogtreecommitdiff
path: root/libavcodec/armv4l
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-10-06 15:27:01 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-10-06 15:27:01 +0000
commit676e200cfff6f94e8dae29b2410ddc894578852a (patch)
tree3db83595ae893870dd45f9f75bbc2687b1f9c433 /libavcodec/armv4l
parent6c3830660013a0d18dea65edbeb94476f7f56fed (diff)
trying to fix the non-x86 IDCTs (untested)
Originally committed as revision 1006 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/armv4l')
-rw-r--r--libavcodec/armv4l/dsputil_arm.c2
-rw-r--r--libavcodec/armv4l/mpegvideo_arm.c50
2 files changed, 51 insertions, 1 deletions
diff --git a/libavcodec/armv4l/dsputil_arm.c b/libavcodec/armv4l/dsputil_arm.c
index cd362ca489..66358b38d3 100644
--- a/libavcodec/armv4l/dsputil_arm.c
+++ b/libavcodec/armv4l/dsputil_arm.c
@@ -23,5 +23,5 @@ extern void j_rev_dct_ARM(DCTELEM *data);
void dsputil_init_armv4l(void)
{
- ff_idct = j_rev_dct_ARM;
+// ff_idct = j_rev_dct_ARM;
}
diff --git a/libavcodec/armv4l/mpegvideo_arm.c b/libavcodec/armv4l/mpegvideo_arm.c
new file mode 100644
index 0000000000..d54bb7a37e
--- /dev/null
+++ b/libavcodec/armv4l/mpegvideo_arm.c
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2002 Michael Niedermayer
+ *
+ * This library 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 of the License, or (at your option) any later version.
+ *
+ * This library 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 this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include "../dsputil.h"
+#include "../mpegvideo.h"
+#include "../avcodec.h"
+
+extern void j_rev_dct_ARM(DCTELEM *data);
+
+/* XXX: those functions should be suppressed ASAP when all IDCTs are
+ converted */
+static void arm_idct_put(UINT8 *dest, int line_size, DCTELEM *block)
+{
+ j_rev_dct_ARM (block);
+ put_pixels_clamped(block, dest, line_size);
+}
+static void arm_idct_add(UINT8 *dest, int line_size, DCTELEM *block)
+{
+ j_rev_dct_ARM (block);
+ add_pixels_clamped(block, dest, line_size);
+}
+
+void MPV_common_init_armv4l(MpegEncContext *s)
+{
+ int i;
+ const int idct_algo= s->avctx->idct_algo;
+
+ if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){
+ s->idct_put= arm_idct_put;
+ s->idct_add= arm_idct_add;
+ for(i=0; i<64; i++)
+ s->idct_permutation[i]= i;
+ }
+}