[FFmpeg-devel] [PATCH 01/13] Rename mipsdspr1 to mipsdsp

Vicente Olivert Riera Vincent.Riera at imgtec.com
Mon Nov 16 15:57:07 CET 2015


Signed-off-by: Vicente Olivert Riera <Vincent.Riera at imgtec.com>
---
 Makefile                                  |    2 +-
 arch.mak                                  |    2 +-
 configure                                 |   34 +++++++++++++++++------------
 libavcodec/aacenc.c                       |    2 +-
 libavcodec/mips/Makefile                  |    4 +-
 libavcodec/mips/ac3dsp_mips.c             |    4 +-
 libavcodec/mips/mpegaudiodsp_mips_fixed.c |    2 +-
 libavcodec/mpegaudiodec_template.c        |    4 +-
 libavcodec/mpegaudiodsp.c                 |    2 +-
 libavcodec/mpegaudiodsp.h                 |    2 +-
 10 files changed, 32 insertions(+), 26 deletions(-)

diff --git a/Makefile b/Makefile
index 306f060..6c53ceb 100644
--- a/Makefile
+++ b/Makefile
@@ -85,7 +85,7 @@ SUBDIR_VARS := CLEANFILES EXAMPLES FFLIBS HOSTPROGS TESTPROGS TOOLS      \
                HEADERS ARCH_HEADERS BUILT_HEADERS SKIPHEADERS            \
                ARMV5TE-OBJS ARMV6-OBJS ARMV8-OBJS VFP-OBJS NEON-OBJS     \
                ALTIVEC-OBJS MMX-OBJS YASM-OBJS                           \
-               MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSPR1-OBJS MSA-OBJS       \
+               MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSP-OBJS MSA-OBJS         \
                MMI-OBJS OBJS SLIBOBJS HOSTOBJS TESTOBJS
 
 define RESET
diff --git a/arch.mak b/arch.mak
index 98fde4a..08f78b4 100644
--- a/arch.mak
+++ b/arch.mak
@@ -5,7 +5,7 @@ OBJS-$(HAVE_VFP)     += $(VFP-OBJS)     $(VFP-OBJS-yes)
 OBJS-$(HAVE_NEON)    += $(NEON-OBJS)    $(NEON-OBJS-yes)
 
 OBJS-$(HAVE_MIPSFPU)   += $(MIPSFPU-OBJS)    $(MIPSFPU-OBJS-yes)
-OBJS-$(HAVE_MIPSDSPR1) += $(MIPSDSPR1-OBJS)  $(MIPSDSPR1-OBJS-yes)
+OBJS-$(HAVE_MIPSDSP)   += $(MIPSDSP-OBJS)    $(MIPSDSP-OBJS-yes)
 OBJS-$(HAVE_MIPSDSPR2) += $(MIPSDSPR2-OBJS)  $(MIPSDSPR2-OBJS-yes)
 OBJS-$(HAVE_MSA)       += $(MSA-OBJS)        $(MSA-OBJS-yes)
 OBJS-$(HAVE_MMI)   += $(MMI-OBJS)   $(MMI-OBJS-yes)
diff --git a/configure b/configure
index 9a736ce..0461a97 100755
--- a/configure
+++ b/configure
@@ -380,7 +380,7 @@ Optimization options (experts only):
   --disable-yasm           disable use of nasm/yasm assembly
   --disable-mips32r5       disable MIPS32R5 optimizations
   --disable-mips64r6       disable MIPS64R6 optimizations
-  --disable-mipsdspr1      disable MIPS DSP ASE R1 optimizations
+  --disable-mipsdsp        disable MIPS DSP ASE R1 optimizations
   --disable-mipsdspr2      disable MIPS DSP ASE R2 optimizations
   --disable-msa            disable MSA optimizations
   --disable-mipsfpu        disable floating point MIPS optimizations
@@ -1627,7 +1627,7 @@ ARCH_EXT_LIST_MIPS="
     mips32r2
     mips32r5
     mips64r6
-    mipsdspr1
+    mipsdsp
     mipsdspr2
     msa
 "
@@ -2102,7 +2102,7 @@ setend_deps="arm"
 map 'eval ${v}_inline_deps=inline_asm' $ARCH_EXT_LIST_ARM
 
 mipsfpu_deps="mips"
-mipsdspr1_deps="mips"
+mipsdsp_deps="mips"
 mipsdspr2_deps="mips"
 mips32r2_deps="mips"
 mips32r5_deps="mips"
@@ -4064,14 +4064,14 @@ elif enabled mips; then
             disable mips32r5
             disable mips64r6
             disable mipsfpu
-            disable mipsdspr1
+            disable mipsdsp
             disable mipsdspr2
             disable msa
         ;;
         24kf*)
             disable mips32r5
             disable mips64r6
-            disable mipsdspr1
+            disable mipsdsp
             disable mipsdspr2
             disable msa
         ;;
@@ -4101,14 +4101,14 @@ elif enabled mips; then
         ;;
         p5600)
             disable mips64r6
-            disable mipsdspr1
+            disable mipsdsp
             disable mipsdspr2
 
             check_cflags "-mtune=p5600"
         ;;
         i6400)
             disable mips32r5
-            disable mipsdspr1
+            disable mipsdsp
             disable mipsdspr2
             disable mipsfpu
 
@@ -4120,7 +4120,7 @@ elif enabled mips; then
             disable mips32r2
             disable mips32r5
             disable mips64r6
-            disable mipsdspr1
+            disable mipsdsp
             disable mipsdspr2
             disable msa
             enable local_aligned_8 local_aligned_16 local_aligned_32
@@ -4152,7 +4152,7 @@ elif enabled mips; then
             disable mips32r2
             disable mips32r5
             disable mips64r6
-            disable mipsdspr1
+            disable mipsdsp
             disable mipsdspr2
             disable msa
         ;;
@@ -4944,13 +4944,13 @@ elif enabled mips; then
     enabled mmi && check_inline_asm mmi '"punpcklhw $f0, $f0, $f0"'
 
     # Enable minimum ISA based on selected options
-    if enabled mips64 && (enabled mipsdspr1 || enabled mipsdspr2); then
+    if enabled mips64 && (enabled mipsdsp || enabled mipsdspr2); then
         add_cflags "-mips64r2"
         add_asflags "-mips64r2"
     elif enabled mips64 && enabled mipsfpu && disabled loongson2 && disabled loongson3; then
         add_cflags "-mips64"
         add_asflags "-mips64"
-    elif enabled mipsdspr1 || enabled mipsdspr2; then
+    elif enabled mipsdsp || enabled mipsdspr2; then
         add_cflags "-mips32r2 -mfp32"
         add_asflags "-mips32r2 -mfp32"
     elif enabled mips32r5 || enabled mips64r6; then
@@ -4964,8 +4964,8 @@ elif enabled mips; then
     enabled mips64r6  && check_cflags "-mips64r6 -msched-weight -mload-store-pairs -funroll-loops" &&
      check_ldflags "-mips64r6" &&
      check_inline_asm mips64r6  '"aui $t0, $t1, 1"'
-    enabled mipsdspr1 && add_cflags "-mdsp" && add_asflags "-mdsp" &&
-     check_inline_asm mipsdspr1 '"addu.qb $t0, $t1, $t2"'
+    enabled mipsdsp && add_cflags "-mdsp" && add_asflags "-mdsp" &&
+     check_inline_asm mipsdsp '"addu.qb $t0, $t1, $t2"'
     enabled mipsdspr2 && add_cflags "-mdspr2" && add_asflags "-mdspr2" &&
      check_inline_asm mipsdspr2 '"absq_s.qb $t0, $t1"'
     enabled mipsfpu   && add_cflags "-mhard-float" && add_asflags "-mhard-float" &&
@@ -4977,6 +4977,12 @@ elif enabled mips; then
     enabled mips64r6 && add_asflags "-mips64r6 -mfp64"
     enabled msa && add_asflags "-mmsa"
 
+        if enabled mipsdspr2; then
+            check_cflags "-mdspr2" &&
+            add_asflags "-mdspr2" &&
+            check_inline_asm mipsdspr2 '"absq_s.qb $t0, $t1"'
+        fi
+    fi
 elif enabled parisc; then
 
     if enabled gcc; then
@@ -6046,7 +6052,7 @@ if enabled mips; then
     echo "MIPS FPU enabled          ${mipsfpu-no}"
     echo "MIPS32R5 enabled          ${mips32r5-no}"
     echo "MIPS64R6 enabled          ${mips64r6-no}"
-    echo "MIPS DSP R1 enabled       ${mipsdspr1-no}"
+    echo "MIPS DSP R1 enabled       ${mipsdsp-no}"
     echo "MIPS DSP R2 enabled       ${mipsdspr2-no}"
     echo "MIPS MSA enabled          ${msa-no}"
     echo "LOONGSON MMI enabled      ${mmi-no}"
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 796038c..d3bf523 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -977,7 +977,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
     s->psypp = ff_psy_preprocess_init(avctx);
     ff_lpc_init(&s->lpc, 2*avctx->frame_size, TNS_MAX_ORDER, FF_LPC_TYPE_LEVINSON);
 
-    if (HAVE_MIPSDSPR1)
+    if (HAVE_MIPSDSP)
         ff_aac_coder_init_mips(s);
 
     ff_aac_tableinit();
diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile
index 2e8b1ee..f66017a 100644
--- a/libavcodec/mips/Makefile
+++ b/libavcodec/mips/Makefile
@@ -8,7 +8,7 @@ MIPSFPU-OBJS-$(CONFIG_AMRWB_DECODER)      += mips/acelp_filters_mips.o     \
                                              mips/celp_math_mips.o         \
                                              mips/acelp_vectors_mips.o
 MIPSFPU-OBJS-$(CONFIG_MPEGAUDIODSP)       += mips/mpegaudiodsp_mips_float.o
-MIPSDSPR1-OBJS-$(CONFIG_MPEGAUDIODSP)     += mips/mpegaudiodsp_mips_fixed.o
+MIPSDSP-OBJS-$(CONFIG_MPEGAUDIODSP)       += mips/mpegaudiodsp_mips_fixed.o
 MIPSFPU-OBJS-$(CONFIG_FFT)                += mips/fft_mips.o
 MIPSFPU-OBJS-$(CONFIG_FMTCONVERT)         += mips/fmtconvert_mips.o
 OBJS-$(CONFIG_AC3DSP)                     += mips/ac3dsp_mips.o
@@ -16,7 +16,7 @@ OBJS-$(CONFIG_AAC_DECODER)                += mips/aacdec_mips.o            \
                                              mips/aacsbr_mips.o            \
                                              mips/sbrdsp_mips.o            \
                                              mips/aacpsdsp_mips.o
-MIPSDSPR1-OBJS-$(CONFIG_AAC_ENCODER)      += mips/aaccoder_mips.o
+MIPSDSP-OBJS-$(CONFIG_AAC_ENCODER)        += mips/aaccoder_mips.o
 MIPSFPU-OBJS-$(CONFIG_AAC_ENCODER)        += mips/iirfilter_mips.o
 OBJS-$(CONFIG_HEVC_DECODER)               += mips/hevcdsp_init_mips.o      \
                                              mips/hevcpred_init_mips.o
diff --git a/libavcodec/mips/ac3dsp_mips.c b/libavcodec/mips/ac3dsp_mips.c
index 01c7de5..da4919f 100644
--- a/libavcodec/mips/ac3dsp_mips.c
+++ b/libavcodec/mips/ac3dsp_mips.c
@@ -59,7 +59,7 @@
 #include "libavutil/mips/asmdefs.h"
 
 #if HAVE_INLINE_ASM
-#if HAVE_MIPSDSPR1
+#if HAVE_MIPSDSP
 static void ac3_bit_alloc_calc_bap_mips(int16_t *mask, int16_t *psd,
                                         int start, int end,
                                         int snr_offset, int floor,
@@ -400,7 +400,7 @@ static void ac3_downmix_mips(float **samples, float (*matrix)[2],
 
 void ff_ac3dsp_init_mips(AC3DSPContext *c, int bit_exact) {
 #if HAVE_INLINE_ASM
-#if HAVE_MIPSDSPR1
+#if HAVE_MIPSDSP
     c->bit_alloc_calc_bap = ac3_bit_alloc_calc_bap_mips;
     c->update_bap_counts  = ac3_update_bap_counts_mips;
 #endif
diff --git a/libavcodec/mips/mpegaudiodsp_mips_fixed.c b/libavcodec/mips/mpegaudiodsp_mips_fixed.c
index 86ea13d..92d260b 100644
--- a/libavcodec/mips/mpegaudiodsp_mips_fixed.c
+++ b/libavcodec/mips/mpegaudiodsp_mips_fixed.c
@@ -901,7 +901,7 @@ static void ff_imdct36_blocks_mips_fixed(int *out, int *buf, int *in,
     }
 }
 
-void ff_mpadsp_init_mipsdspr1(MPADSPContext *s)
+void ff_mpadsp_init_mipsdsp(MPADSPContext *s)
 {
     s->apply_window_fixed   = ff_mpadsp_apply_window_mips_fixed;
     s->imdct36_blocks_fixed = ff_imdct36_blocks_mips_fixed;
diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c
index 0f32ac7..f681ef7 100644
--- a/libavcodec/mpegaudiodec_template.c
+++ b/libavcodec/mpegaudiodec_template.c
@@ -1172,9 +1172,9 @@ found2:
 #   include "mips/compute_antialias_float.h"
 #endif /* HAVE_MIPSFPU */
 #else
-#if HAVE_MIPSDSPR1
+#if HAVE_MIPSDSP
 #   include "mips/compute_antialias_fixed.h"
-#endif /* HAVE_MIPSDSPR1 */
+#endif /* HAVE_MIPSDSP */
 #endif /* USE_FLOATS */
 
 #ifndef compute_antialias
diff --git a/libavcodec/mpegaudiodsp.c b/libavcodec/mpegaudiodsp.c
index 5fe3444..a5d20df 100644
--- a/libavcodec/mpegaudiodsp.c
+++ b/libavcodec/mpegaudiodsp.c
@@ -46,5 +46,5 @@ av_cold void ff_mpadsp_init(MPADSPContext *s)
     if (ARCH_PPC)     ff_mpadsp_init_ppc(s);
     if (ARCH_X86)     ff_mpadsp_init_x86(s);
     if (HAVE_MIPSFPU)   ff_mpadsp_init_mipsfpu(s);
-    if (HAVE_MIPSDSPR1) ff_mpadsp_init_mipsdspr1(s);
+    if (HAVE_MIPSDSP) ff_mpadsp_init_mipsdsp(s);
 }
diff --git a/libavcodec/mpegaudiodsp.h b/libavcodec/mpegaudiodsp.h
index a722a2f..b827163 100644
--- a/libavcodec/mpegaudiodsp.h
+++ b/libavcodec/mpegaudiodsp.h
@@ -60,7 +60,7 @@ void ff_mpadsp_init_arm(MPADSPContext *s);
 void ff_mpadsp_init_ppc(MPADSPContext *s);
 void ff_mpadsp_init_x86(MPADSPContext *s);
 void ff_mpadsp_init_mipsfpu(MPADSPContext *s);
-void ff_mpadsp_init_mipsdspr1(MPADSPContext *s);
+void ff_mpadsp_init_mipsdsp(MPADSPContext *s);
 
 void ff_mpa_synth_init_float(float *window);
 void ff_mpa_synth_init_fixed(int32_t *window);
-- 
1.7.1



More information about the ffmpeg-devel mailing list