[FFmpeg-cvslog] x86: fix build without inline asm

Diego Biurrun git at videolan.org
Mon Nov 26 16:17:33 CET 2012


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Mon Nov 26 01:44:29 2012 +0100| [7ee40713621dbabf3d62e3cc3c4b26ce19b43146] | committer: Diego Biurrun

x86: fix build without inline asm

The qpel functions referenced here are not related to h264 and should
thus never have been under CONFIG_H264QPEL.

Signed-off-by: Mans Rullgard <mans at mansr.com>
Signed-off-by: Diego Biurrun <diego at biurrun.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7ee40713621dbabf3d62e3cc3c4b26ce19b43146
---

 libavcodec/x86/dsputil_mmx.c |   42 ++++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
index d403a14..58b6389 100644
--- a/libavcodec/x86/dsputil_mmx.c
+++ b/libavcodec/x86/dsputil_mmx.c
@@ -2263,6 +2263,18 @@ static void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
 #if HAVE_INLINE_ASM
     c->prefetch = prefetch_mmxext;
 
+    SET_QPEL_FUNCS(avg_qpel,        0, 16, mmxext, );
+    SET_QPEL_FUNCS(avg_qpel,        1,  8, mmxext, );
+    SET_QPEL_FUNCS(avg_2tap_qpel,   0, 16, mmxext, );
+    SET_QPEL_FUNCS(avg_2tap_qpel,   1,  8, mmxext, );
+
+    SET_QPEL_FUNCS(put_qpel,        0, 16, mmxext, );
+    SET_QPEL_FUNCS(put_qpel,        1,  8, mmxext, );
+    SET_QPEL_FUNCS(put_2tap_qpel,   0, 16, mmxext, );
+    SET_QPEL_FUNCS(put_2tap_qpel,   1,  8, mmxext, );
+    SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, mmxext, );
+    SET_QPEL_FUNCS(put_no_rnd_qpel, 1,  8, mmxext, );
+
     if (!high_bit_depth) {
         c->put_pixels_tab[0][1] = put_pixels16_x2_mmxext;
         c->put_pixels_tab[0][2] = put_pixels16_y2_mmxext;
@@ -2306,13 +2318,6 @@ static void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
 
 #if HAVE_MMXEXT_EXTERNAL
     if (CONFIG_H264QPEL) {
-        SET_QPEL_FUNCS(put_qpel,        0, 16, mmxext, );
-        SET_QPEL_FUNCS(put_qpel,        1,  8, mmxext, );
-        SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, mmxext, );
-        SET_QPEL_FUNCS(put_no_rnd_qpel, 1,  8, mmxext, );
-        SET_QPEL_FUNCS(avg_qpel,        0, 16, mmxext, );
-        SET_QPEL_FUNCS(avg_qpel,        1,  8, mmxext, );
-
         if (!high_bit_depth) {
             SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmxext, );
             SET_QPEL_FUNCS(put_h264_qpel, 1,  8, mmxext, );
@@ -2330,11 +2335,6 @@ static void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
             SET_QPEL_FUNCS(put_h264_qpel, 2, 4,  10_mmxext, ff_);
             SET_QPEL_FUNCS(avg_h264_qpel, 2, 4,  10_mmxext, ff_);
         }
-
-        SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, mmxext, );
-        SET_QPEL_FUNCS(put_2tap_qpel, 1,  8, mmxext, );
-        SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, mmxext, );
-        SET_QPEL_FUNCS(avg_2tap_qpel, 1,  8, mmxext, );
     }
 
     if (!high_bit_depth && CONFIG_H264CHROMA) {
@@ -2461,10 +2461,19 @@ static void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx, int mm_flags)
 static void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx,
                               int mm_flags)
 {
-#if HAVE_SSE2_EXTERNAL
     const int bit_depth      = avctx->bits_per_raw_sample;
     const int high_bit_depth = bit_depth > 8;
 
+#if HAVE_SSE2_INLINE
+    if (!high_bit_depth && avctx->idct_algo == FF_IDCT_XVIDMMX) {
+        c->idct_put              = ff_idct_xvid_sse2_put;
+        c->idct_add              = ff_idct_xvid_sse2_add;
+        c->idct                  = ff_idct_xvid_sse2;
+        c->idct_permutation_type = FF_SSE2_IDCT_PERM;
+    }
+#endif /* HAVE_SSE2_INLINE */
+
+#if HAVE_SSE2_EXTERNAL
     if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW)) {
         // these functions are slower than mmx on AMD, but faster on Intel
         if (!high_bit_depth) {
@@ -2491,13 +2500,6 @@ static void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx,
         H264_QPEL_FUNCS(3, 3, sse2);
     }
 
-    if (!high_bit_depth && avctx->idct_algo == FF_IDCT_XVIDMMX) {
-        c->idct_put              = ff_idct_xvid_sse2_put;
-        c->idct_add              = ff_idct_xvid_sse2_add;
-        c->idct                  = ff_idct_xvid_sse2;
-        c->idct_permutation_type = FF_SSE2_IDCT_PERM;
-    }
-
     if (bit_depth == 10) {
         if (CONFIG_H264QPEL) {
             SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_sse2, ff_);



More information about the ffmpeg-cvslog mailing list