diff mbox

[FFmpeg-devel] avcodec/mips: [loongson] enable MSA optimization for loongson platform.

Message ID 1545041010-26599-1-git-send-email-yinshiyou-hf@loongson.cn
State Accepted
Commit 76952aa46163f92c8bb5180973e33ca36d583308
Headers show

Commit Message

殷时友 Dec. 17, 2018, 10:03 a.m. UTC
Set initialization order of MSA after MMI to make it work on loongson platform(msa is supported by loongson2k、3a4000 etc.).
---
 libavcodec/mips/blockdsp_init_mips.c    | 6 +++---
 libavcodec/mips/h264chroma_init_mips.c  | 6 +++---
 libavcodec/mips/h264dsp_init_mips.c     | 6 +++---
 libavcodec/mips/h264pred_init_mips.c    | 6 +++---
 libavcodec/mips/h264qpel_init_mips.c    | 6 +++---
 libavcodec/mips/hpeldsp_init_mips.c     | 6 +++---
 libavcodec/mips/idctdsp_init_mips.c     | 6 +++---
 libavcodec/mips/mpegvideo_init_mips.c   | 6 +++---
 libavcodec/mips/pixblockdsp_init_mips.c | 6 +++---
 libavcodec/mips/vp8dsp_init_mips.c      | 6 +++---
 10 files changed, 30 insertions(+), 30 deletions(-)

Comments

Michael Niedermayer Dec. 18, 2018, 10:38 a.m. UTC | #1
On Mon, Dec 17, 2018 at 06:03:30PM +0800, Shiyou Yin wrote:
> Set initialization order of MSA after MMI to make it work on loongson platform(msa is supported by loongson2k、3a4000 etc.).
> ---
>  libavcodec/mips/blockdsp_init_mips.c    | 6 +++---
>  libavcodec/mips/h264chroma_init_mips.c  | 6 +++---
>  libavcodec/mips/h264dsp_init_mips.c     | 6 +++---
>  libavcodec/mips/h264pred_init_mips.c    | 6 +++---
>  libavcodec/mips/h264qpel_init_mips.c    | 6 +++---
>  libavcodec/mips/hpeldsp_init_mips.c     | 6 +++---
>  libavcodec/mips/idctdsp_init_mips.c     | 6 +++---
>  libavcodec/mips/mpegvideo_init_mips.c   | 6 +++---
>  libavcodec/mips/pixblockdsp_init_mips.c | 6 +++---
>  libavcodec/mips/vp8dsp_init_mips.c      | 6 +++---
>  10 files changed, 30 insertions(+), 30 deletions(-)

will apply

thx

[...]
diff mbox

Patch

diff --git a/libavcodec/mips/blockdsp_init_mips.c b/libavcodec/mips/blockdsp_init_mips.c
index 30ae95f..55ac1c3 100644
--- a/libavcodec/mips/blockdsp_init_mips.c
+++ b/libavcodec/mips/blockdsp_init_mips.c
@@ -45,10 +45,10 @@  static av_cold void blockdsp_init_mmi(BlockDSPContext *c)
 
 void ff_blockdsp_init_mips(BlockDSPContext *c)
 {
-#if HAVE_MSA
-    blockdsp_init_msa(c);
-#endif  // #if HAVE_MSA
 #if HAVE_MMI
     blockdsp_init_mmi(c);
 #endif /* HAVE_MMI */
+#if HAVE_MSA
+    blockdsp_init_msa(c);
+#endif  // #if HAVE_MSA
 }
diff --git a/libavcodec/mips/h264chroma_init_mips.c b/libavcodec/mips/h264chroma_init_mips.c
index 122148d..ae817e4 100644
--- a/libavcodec/mips/h264chroma_init_mips.c
+++ b/libavcodec/mips/h264chroma_init_mips.c
@@ -54,10 +54,10 @@  static av_cold void h264chroma_init_mmi(H264ChromaContext *c, int bit_depth)
 
 av_cold void ff_h264chroma_init_mips(H264ChromaContext *c, int bit_depth)
 {
-#if HAVE_MSA
-    h264chroma_init_msa(c, bit_depth);
-#endif  // #if HAVE_MSA
 #if HAVE_MMI
     h264chroma_init_mmi(c, bit_depth);
 #endif /* HAVE_MMI */
+#if HAVE_MSA
+    h264chroma_init_msa(c, bit_depth);
+#endif  // #if HAVE_MSA
 }
diff --git a/libavcodec/mips/h264dsp_init_mips.c b/libavcodec/mips/h264dsp_init_mips.c
index 1fe7f84..dc08a25 100644
--- a/libavcodec/mips/h264dsp_init_mips.c
+++ b/libavcodec/mips/h264dsp_init_mips.c
@@ -138,10 +138,10 @@  static av_cold void h264dsp_init_mmi(H264DSPContext * c, const int bit_depth,
 av_cold void ff_h264dsp_init_mips(H264DSPContext *c, const int bit_depth,
                                   const int chroma_format_idc)
 {
-#if HAVE_MSA
-    h264dsp_init_msa(c, bit_depth, chroma_format_idc);
-#endif  // #if HAVE_MSA
 #if HAVE_MMI
     h264dsp_init_mmi(c, bit_depth, chroma_format_idc);
 #endif /* HAVE_MMI */
+#if HAVE_MSA
+    h264dsp_init_msa(c, bit_depth, chroma_format_idc);
+#endif  // #if HAVE_MSA
 }
diff --git a/libavcodec/mips/h264pred_init_mips.c b/libavcodec/mips/h264pred_init_mips.c
index c33d8f7..63637b8 100644
--- a/libavcodec/mips/h264pred_init_mips.c
+++ b/libavcodec/mips/h264pred_init_mips.c
@@ -146,10 +146,10 @@  av_cold void ff_h264_pred_init_mips(H264PredContext *h, int codec_id,
                                     int bit_depth,
                                     const int chroma_format_idc)
 {
-#if HAVE_MSA
-    h264_pred_init_msa(h, codec_id, bit_depth, chroma_format_idc);
-#endif  // #if HAVE_MSA
 #if HAVE_MMI
     h264_pred_init_mmi(h, codec_id, bit_depth, chroma_format_idc);
 #endif /* HAVE_MMI */
+#if HAVE_MSA
+    h264_pred_init_msa(h, codec_id, bit_depth, chroma_format_idc);
+#endif  // #if HAVE_MSA
 }
diff --git a/libavcodec/mips/h264qpel_init_mips.c b/libavcodec/mips/h264qpel_init_mips.c
index 92219f8..33bae30 100644
--- a/libavcodec/mips/h264qpel_init_mips.c
+++ b/libavcodec/mips/h264qpel_init_mips.c
@@ -240,10 +240,10 @@  static av_cold void h264qpel_init_mmi(H264QpelContext *c, int bit_depth)
 
 av_cold void ff_h264qpel_init_mips(H264QpelContext *c, int bit_depth)
 {
-#if HAVE_MSA
-    h264qpel_init_msa(c, bit_depth);
-#endif  // #if HAVE_MSA
 #if HAVE_MMI
     h264qpel_init_mmi(c, bit_depth);
 #endif /* HAVE_MMI */
+#if HAVE_MSA
+    h264qpel_init_msa(c, bit_depth);
+#endif  // #if HAVE_MSA
 }
diff --git a/libavcodec/mips/hpeldsp_init_mips.c b/libavcodec/mips/hpeldsp_init_mips.c
index 363a045..d6f7a97 100644
--- a/libavcodec/mips/hpeldsp_init_mips.c
+++ b/libavcodec/mips/hpeldsp_init_mips.c
@@ -113,10 +113,10 @@  static void ff_hpeldsp_init_mmi(HpelDSPContext *c, int flags)
 
 void ff_hpeldsp_init_mips(HpelDSPContext *c, int flags)
 {
-#if HAVE_MSA
-    ff_hpeldsp_init_msa(c, flags);
-#endif  // #if HAVE_MSA
 #if HAVE_MMI
     ff_hpeldsp_init_mmi(c, flags);
 #endif  // #if HAVE_MMI
+#if HAVE_MSA
+    ff_hpeldsp_init_msa(c, flags);
+#endif  // #if HAVE_MSA
 }
diff --git a/libavcodec/mips/idctdsp_init_mips.c b/libavcodec/mips/idctdsp_init_mips.c
index bb33b55..85b76ca 100644
--- a/libavcodec/mips/idctdsp_init_mips.c
+++ b/libavcodec/mips/idctdsp_init_mips.c
@@ -65,10 +65,10 @@  static av_cold void idctdsp_init_mmi(IDCTDSPContext *c, AVCodecContext *avctx,
 av_cold void ff_idctdsp_init_mips(IDCTDSPContext *c, AVCodecContext *avctx,
                           unsigned high_bit_depth)
 {
-#if HAVE_MSA
-    idctdsp_init_msa(c, avctx, high_bit_depth);
-#endif  // #if HAVE_MSA
 #if HAVE_MMI
     idctdsp_init_mmi(c, avctx, high_bit_depth);
 #endif /* HAVE_MMI */
+#if HAVE_MSA
+    idctdsp_init_msa(c, avctx, high_bit_depth);
+#endif  // #if HAVE_MSA
 }
diff --git a/libavcodec/mips/mpegvideo_init_mips.c b/libavcodec/mips/mpegvideo_init_mips.c
index 1918da5..be77308 100644
--- a/libavcodec/mips/mpegvideo_init_mips.c
+++ b/libavcodec/mips/mpegvideo_init_mips.c
@@ -49,10 +49,10 @@  static av_cold void dct_unquantize_init_mmi(MpegEncContext *s)
 
 av_cold void ff_mpv_common_init_mips(MpegEncContext *s)
 {
-#if HAVE_MSA
-    dct_unquantize_init_msa(s);
-#endif  // #if HAVE_MSA
 #if HAVE_MMI
     dct_unquantize_init_mmi(s);
 #endif /* HAVE_MMI */
+#if HAVE_MSA
+    dct_unquantize_init_msa(s);
+#endif  // #if HAVE_MSA
 }
diff --git a/libavcodec/mips/pixblockdsp_init_mips.c b/libavcodec/mips/pixblockdsp_init_mips.c
index 1b3741e..fd0238d 100644
--- a/libavcodec/mips/pixblockdsp_init_mips.c
+++ b/libavcodec/mips/pixblockdsp_init_mips.c
@@ -60,10 +60,10 @@  static av_cold void pixblockdsp_init_mmi(PixblockDSPContext *c,
 void ff_pixblockdsp_init_mips(PixblockDSPContext *c, AVCodecContext *avctx,
                               unsigned high_bit_depth)
 {
-#if HAVE_MSA
-    pixblockdsp_init_msa(c, avctx, high_bit_depth);
-#endif  // #if HAVE_MSA
 #if HAVE_MMI
     pixblockdsp_init_mmi(c, avctx, high_bit_depth);
 #endif /* HAVE_MMI */
+#if HAVE_MSA
+    pixblockdsp_init_msa(c, avctx, high_bit_depth);
+#endif  // #if HAVE_MSA
 }
diff --git a/libavcodec/mips/vp8dsp_init_mips.c b/libavcodec/mips/vp8dsp_init_mips.c
index 3fc5f8e..7fd8fb0 100644
--- a/libavcodec/mips/vp8dsp_init_mips.c
+++ b/libavcodec/mips/vp8dsp_init_mips.c
@@ -193,10 +193,10 @@  static av_cold void vp8dsp_init_mmi(VP8DSPContext *dsp)
 
 av_cold void ff_vp8dsp_init_mips(VP8DSPContext *dsp)
 {
-#if HAVE_MSA
-    vp8dsp_init_msa(dsp);
-#endif  // #if HAVE_MSA
 #if HAVE_MMI
     vp8dsp_init_mmi(dsp);
 #endif /* HAVE_MMI */
+#if HAVE_MSA
+    vp8dsp_init_msa(dsp);
+#endif  // #if HAVE_MSA
 }