]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/armv4l/mpegvideo_arm.c
Fix regression introduced by r12929.
[ffmpeg] / libavcodec / armv4l / mpegvideo_arm.c
index f8d2f8a2f7347c7ebd62a4364ef817be814e3f6a..0aca43557b6a31473b9e8065910db445a2ceddcb 100644 (file)
@@ -1,55 +1,40 @@
 /*
  * Copyright (c) 2002 Michael Niedermayer
  *
- * This library is free software; you can redistribute it and/or
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg 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.
+ * version 2.1 of the License, or (at your option) any later version.
  *
- * This library is distributed in the hope that it will be useful,
+ * FFmpeg 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
- *
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "../dsputil.h"
-#include "../mpegvideo.h"
-#include "../avcodec.h"
+#include "dsputil.h"
+#include "mpegvideo.h"
+#include "avcodec.h"
 
-extern void j_rev_dct_ARM(DCTELEM *data);
-/* XXX: local hack */
-static void (*ff_put_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size);
-static void (*ff_add_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size);
-
-/* 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);
-    ff_put_pixels_clamped(block, dest, line_size);
-}
-static void arm_idct_add(UINT8 *dest, int line_size, DCTELEM *block)
-{
-    j_rev_dct_ARM (block);
-    ff_add_pixels_clamped(block, dest, line_size);
-}
+extern void MPV_common_init_iwmmxt(MpegEncContext *s);
+extern void MPV_common_init_armv5te(MpegEncContext *s);
 
 void MPV_common_init_armv4l(MpegEncContext *s)
 {
-    int i;
-    const int idct_algo= s->avctx->idct_algo;
-
-    ff_put_pixels_clamped = s->dsp.put_pixels_clamped;
-    ff_add_pixels_clamped = s->dsp.add_pixels_clamped;
-
-    if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){
-        s->idct_put= arm_idct_put;
-        s->idct_add= arm_idct_add;
-        s->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;/* FF_NO_IDCT_PERM */
-    }
+    /* IWMMXT support is a superset of armv5te, so
+     * allow optimized functions for armv5te unless
+     * a better iwmmxt function exists
+     */
+#ifdef HAVE_ARMV5TE
+    MPV_common_init_armv5te(s);
+#endif
+#ifdef HAVE_IWMMXT
+    MPV_common_init_iwmmxt(s);
+#endif
 }