Browse Source

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

Set initialization order of MSA after MMI to make it work on loongson platform(msa is supported by loongson2k、3a4000 etc.).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.2
Shiyou Yin Michael Niedermayer 7 years ago
parent
commit
76952aa461
10 changed files with 30 additions and 30 deletions
  1. +3
    -3
      libavcodec/mips/blockdsp_init_mips.c
  2. +3
    -3
      libavcodec/mips/h264chroma_init_mips.c
  3. +3
    -3
      libavcodec/mips/h264dsp_init_mips.c
  4. +3
    -3
      libavcodec/mips/h264pred_init_mips.c
  5. +3
    -3
      libavcodec/mips/h264qpel_init_mips.c
  6. +3
    -3
      libavcodec/mips/hpeldsp_init_mips.c
  7. +3
    -3
      libavcodec/mips/idctdsp_init_mips.c
  8. +3
    -3
      libavcodec/mips/mpegvideo_init_mips.c
  9. +3
    -3
      libavcodec/mips/pixblockdsp_init_mips.c
  10. +3
    -3
      libavcodec/mips/vp8dsp_init_mips.c

+ 3
- 3
libavcodec/mips/blockdsp_init_mips.c View File

@@ -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
}

+ 3
- 3
libavcodec/mips/h264chroma_init_mips.c View File

@@ -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
}

+ 3
- 3
libavcodec/mips/h264dsp_init_mips.c View File

@@ -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
}

+ 3
- 3
libavcodec/mips/h264pred_init_mips.c View File

@@ -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
}

+ 3
- 3
libavcodec/mips/h264qpel_init_mips.c View File

@@ -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
}

+ 3
- 3
libavcodec/mips/hpeldsp_init_mips.c View File

@@ -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
}

+ 3
- 3
libavcodec/mips/idctdsp_init_mips.c View File

@@ -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
}

+ 3
- 3
libavcodec/mips/mpegvideo_init_mips.c View File

@@ -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
}

+ 3
- 3
libavcodec/mips/pixblockdsp_init_mips.c View File

@@ -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
}

+ 3
- 3
libavcodec/mips/vp8dsp_init_mips.c View File

@@ -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
}

Loading…
Cancel
Save