]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/x86/idct_mmx_xvid.c
x86: h264qpel: add cpu flag checks for init function
[ffmpeg] / libavcodec / x86 / idct_mmx_xvid.c
index 466cf75bc447d1ca6bc986a57abdc6f9ad1bfca3..3870ffddd501faf889f293e7ff20472b75ea8925 100644 (file)
  *
  * conversion to gcc syntax by Michael Niedermayer
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav 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.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav 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 FFmpeg; if not, write to the Free Software Foundation,
+ * along with Libav; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <inttypes.h>
+
+#include "config.h"
 #include "libavcodec/avcodec.h"
+#include "libavutil/mem.h"
+#include "dsputil_mmx.h"
 #include "idct_xvid.h"
 
+#if HAVE_INLINE_ASM
+
 //=============================================================================
 // Macros and other preprocessor constants
 //=============================================================================
@@ -506,7 +512,8 @@ __asm__ volatile(
 //-----------------------------------------------------------------------------
 
 
-void ff_idct_xvid_mmx2(short *block){
+void ff_idct_xvid_mmxext(short *block)
+{
 __asm__ volatile(
             //# Process each row
     DCT_8_INV_ROW_XMM(0*16(%0), 0*16(%0), 64*0(%2), 8*0(%1))
@@ -524,3 +531,28 @@ __asm__ volatile(
     :: "r"(block), "r"(rounder_0), "r"(tab_i_04_xmm), "r"(tg_1_16));
 }
 
+void ff_idct_xvid_mmx_put(uint8_t *dest, int line_size, int16_t *block)
+{
+    ff_idct_xvid_mmx(block);
+    ff_put_pixels_clamped_mmx(block, dest, line_size);
+}
+
+void ff_idct_xvid_mmx_add(uint8_t *dest, int line_size, int16_t *block)
+{
+    ff_idct_xvid_mmx(block);
+    ff_add_pixels_clamped_mmx(block, dest, line_size);
+}
+
+void ff_idct_xvid_mmxext_put(uint8_t *dest, int line_size, int16_t *block)
+{
+    ff_idct_xvid_mmxext(block);
+    ff_put_pixels_clamped_mmx(block, dest, line_size);
+}
+
+void ff_idct_xvid_mmxext_add(uint8_t *dest, int line_size, int16_t *block)
+{
+    ff_idct_xvid_mmxext(block);
+    ff_add_pixels_clamped_mmx(block, dest, line_size);
+}
+
+#endif /* HAVE_INLINE_ASM */