mbox series

[FFmpeg-devel,v6,0/6] MIPS MSA & MMI Runtime detection support

Message ID 20200718153542.6434-1-jiaxun.yang@flygoat.com
Headers show
Series MIPS MSA & MMI Runtime detection support | expand

Message

Jiaxun Yang July 18, 2020, 3:35 p.m. UTC
This series adds MIPS MSA & MMI runtime detection support

Please review.

Thanks!

v2:
  - Add CPUCFG support.
  - Add "-mloongson-ext" to MMIFLAGS for Loongson-3 as well. (Loongson2F don't need this flag)

v3:
  - Address reveiew suggestions from Shiyou Yin and Weixi Gu.

v4:
  - Disable DSP for generic CPU

v5:
  - Clean ups
  - Address some GCC build warnings

v6:
  - Address more Shiyou's comments

Jiaxun Yang (6):
  ffbuild: Refine MIPS handling
  libavutils: Add parse_r helper for MIPS
  libavutil: Detect MMI and MSA flags for MIPS
  libavcodec: Enable runtime detection for MIPS MMI & MSA
  libavcodec: MIPS: MMI: Fix type mismatches
  libavcodec: MIPS: MMI: Move sp out of the clobber list

 configure                                   | 172 ++--
 ffbuild/common.mak                          |  10 +-
 libavcodec/mips/Makefile                    |   3 +-
 libavcodec/mips/blockdsp_init_mips.c        |  40 +-
 libavcodec/mips/cabac.h                     |   2 +-
 libavcodec/mips/h263dsp_init_mips.c         |  18 +-
 libavcodec/mips/h264chroma_init_mips.c      |  55 +-
 libavcodec/mips/h264dsp_init_mips.c         | 225 +++--
 libavcodec/mips/h264dsp_mips.h              |  18 +-
 libavcodec/mips/h264dsp_mmi.c               |  56 +-
 libavcodec/mips/h264pred_init_mips.c        | 207 ++--
 libavcodec/mips/h264qpel_init_mips.c        | 412 ++++----
 libavcodec/mips/hevcdsp_init_mips.c         | 992 ++++++++++----------
 libavcodec/mips/hevcpred_init_mips.c        |  40 +-
 libavcodec/mips/hpeldsp_init_mips.c         | 180 ++--
 libavcodec/mips/idctdsp_init_mips.c         |  74 +-
 libavcodec/mips/me_cmp_init_mips.c          |  50 +-
 libavcodec/mips/mpegvideo_init_mips.c       |  48 +-
 libavcodec/mips/mpegvideoencdsp_init_mips.c |  21 +-
 libavcodec/mips/pixblockdsp_init_mips.c     |  63 +-
 libavcodec/mips/qpeldsp_init_mips.c         | 270 +++---
 libavcodec/mips/vc1dsp_init_mips.c          | 186 ++--
 libavcodec/mips/videodsp_init.c             |  10 +-
 libavcodec/mips/vp3dsp_init_mips.c          |  44 +-
 libavcodec/mips/vp8dsp_init_mips.c          | 240 +++--
 libavcodec/mips/vp9dsp_init_mips.c          |  16 +-
 libavcodec/mips/wmv2dsp_init_mips.c         |  18 +-
 libavcodec/mips/wmv2dsp_mips.h              |   4 +-
 libavcodec/mips/wmv2dsp_mmi.c               |   4 +-
 libavcodec/mips/xvid_idct_mmi.c             |   4 +-
 libavcodec/mips/xvididct_init_mips.c        |  31 +-
 libavcodec/mips/xvididct_mips.h             |   4 +-
 libavutil/cpu.c                             |  10 +
 libavutil/cpu.h                             |   3 +
 libavutil/cpu_internal.h                    |   2 +
 libavutil/mips/Makefile                     |   2 +-
 libavutil/mips/asmdefs.h                    |  42 +
 libavutil/mips/cpu.c                        | 134 +++
 libavutil/mips/cpu.h                        |  28 +
 libavutil/tests/cpu.c                       |   3 +
 tests/checkasm/checkasm.c                   |   3 +
 41 files changed, 1919 insertions(+), 1825 deletions(-)
 create mode 100644 libavutil/mips/cpu.c
 create mode 100644 libavutil/mips/cpu.h

Comments

Shiyou Yin July 21, 2020, 7:40 a.m. UTC | #1
>-----Original Message-----
>From: ffmpeg-devel-bounces@ffmpeg.org [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf Of
>Jiaxun Yang
>Sent: Saturday, July 18, 2020 11:36 PM
>To: ffmpeg-devel@ffmpeg.org
>Cc: Jiaxun Yang
>Subject: [FFmpeg-devel] [PATCH v6 0/6] MIPS MSA & MMI Runtime detection support
>
>This series adds MIPS MSA & MMI runtime detection support
>
>Please review.
>
>Thanks!
>
>v2:
>  - Add CPUCFG support.
>  - Add "-mloongson-ext" to MMIFLAGS for Loongson-3 as well. (Loongson2F don't need this flag)
>
>v3:
>  - Address reveiew suggestions from Shiyou Yin and Weixi Gu.
>
>v4:
>  - Disable DSP for generic CPU
>
>v5:
>  - Clean ups
>  - Address some GCC build warnings
>
>v6:
>  - Address more Shiyou's comments
>
>Jiaxun Yang (6):
>  ffbuild: Refine MIPS handling
>  libavutils: Add parse_r helper for MIPS
>  libavutil: Detect MMI and MSA flags for MIPS
>  libavcodec: Enable runtime detection for MIPS MMI & MSA
>  libavcodec: MIPS: MMI: Fix type mismatches
>  libavcodec: MIPS: MMI: Move sp out of the clobber list
>
> configure                                   | 172 ++--
> ffbuild/common.mak                          |  10 +-
> libavcodec/mips/Makefile                    |   3 +-
> libavcodec/mips/blockdsp_init_mips.c        |  40 +-
> libavcodec/mips/cabac.h                     |   2 +-
> libavcodec/mips/h263dsp_init_mips.c         |  18 +-
> libavcodec/mips/h264chroma_init_mips.c      |  55 +-
> libavcodec/mips/h264dsp_init_mips.c         | 225 +++--
> libavcodec/mips/h264dsp_mips.h              |  18 +-
> libavcodec/mips/h264dsp_mmi.c               |  56 +-
> libavcodec/mips/h264pred_init_mips.c        | 207 ++--
> libavcodec/mips/h264qpel_init_mips.c        | 412 ++++----
> libavcodec/mips/hevcdsp_init_mips.c         | 992 ++++++++++----------
> libavcodec/mips/hevcpred_init_mips.c        |  40 +-
> libavcodec/mips/hpeldsp_init_mips.c         | 180 ++--
> libavcodec/mips/idctdsp_init_mips.c         |  74 +-
> libavcodec/mips/me_cmp_init_mips.c          |  50 +-
> libavcodec/mips/mpegvideo_init_mips.c       |  48 +-
> libavcodec/mips/mpegvideoencdsp_init_mips.c |  21 +-
> libavcodec/mips/pixblockdsp_init_mips.c     |  63 +-
> libavcodec/mips/qpeldsp_init_mips.c         | 270 +++---
> libavcodec/mips/vc1dsp_init_mips.c          | 186 ++--
> libavcodec/mips/videodsp_init.c             |  10 +-
> libavcodec/mips/vp3dsp_init_mips.c          |  44 +-
> libavcodec/mips/vp8dsp_init_mips.c          | 240 +++--
> libavcodec/mips/vp9dsp_init_mips.c          |  16 +-
> libavcodec/mips/wmv2dsp_init_mips.c         |  18 +-
> libavcodec/mips/wmv2dsp_mips.h              |   4 +-
> libavcodec/mips/wmv2dsp_mmi.c               |   4 +-
> libavcodec/mips/xvid_idct_mmi.c             |   4 +-
> libavcodec/mips/xvididct_init_mips.c        |  31 +-
> libavcodec/mips/xvididct_mips.h             |   4 +-
> libavutil/cpu.c                             |  10 +
> libavutil/cpu.h                             |   3 +
> libavutil/cpu_internal.h                    |   2 +
> libavutil/mips/Makefile                     |   2 +-
> libavutil/mips/asmdefs.h                    |  42 +
> libavutil/mips/cpu.c                        | 134 +++
> libavutil/mips/cpu.h                        |  28 +
> libavutil/tests/cpu.c                       |   3 +
> tests/checkasm/checkasm.c                   |   3 +
> 41 files changed, 1919 insertions(+), 1825 deletions(-)
> create mode 100644 libavutil/mips/cpu.c
> create mode 100644 libavutil/mips/cpu.h
>
>--
>2.27.0

LGTM
Michael Niedermayer July 23, 2020, 2:18 p.m. UTC | #2
On Tue, Jul 21, 2020 at 03:40:25PM +0800, Shiyou Yin wrote:
> >-----Original Message-----
> >From: ffmpeg-devel-bounces@ffmpeg.org [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf Of
> >Jiaxun Yang
> >Sent: Saturday, July 18, 2020 11:36 PM
> >To: ffmpeg-devel@ffmpeg.org
> >Cc: Jiaxun Yang
> >Subject: [FFmpeg-devel] [PATCH v6 0/6] MIPS MSA & MMI Runtime detection support
> >
> >This series adds MIPS MSA & MMI runtime detection support
> >
> >Please review.
> >
> >Thanks!
> >
> >v2:
> >  - Add CPUCFG support.
> >  - Add "-mloongson-ext" to MMIFLAGS for Loongson-3 as well. (Loongson2F don't need this flag)
> >
> >v3:
> >  - Address reveiew suggestions from Shiyou Yin and Weixi Gu.
> >
> >v4:
> >  - Disable DSP for generic CPU
> >
> >v5:
> >  - Clean ups
> >  - Address some GCC build warnings
> >
> >v6:
> >  - Address more Shiyou's comments
> >
> >Jiaxun Yang (6):
> >  ffbuild: Refine MIPS handling
> >  libavutils: Add parse_r helper for MIPS
> >  libavutil: Detect MMI and MSA flags for MIPS
> >  libavcodec: Enable runtime detection for MIPS MMI & MSA
> >  libavcodec: MIPS: MMI: Fix type mismatches
> >  libavcodec: MIPS: MMI: Move sp out of the clobber list
> >
> > configure                                   | 172 ++--
> > ffbuild/common.mak                          |  10 +-
> > libavcodec/mips/Makefile                    |   3 +-
> > libavcodec/mips/blockdsp_init_mips.c        |  40 +-
> > libavcodec/mips/cabac.h                     |   2 +-
> > libavcodec/mips/h263dsp_init_mips.c         |  18 +-
> > libavcodec/mips/h264chroma_init_mips.c      |  55 +-
> > libavcodec/mips/h264dsp_init_mips.c         | 225 +++--
> > libavcodec/mips/h264dsp_mips.h              |  18 +-
> > libavcodec/mips/h264dsp_mmi.c               |  56 +-
> > libavcodec/mips/h264pred_init_mips.c        | 207 ++--
> > libavcodec/mips/h264qpel_init_mips.c        | 412 ++++----
> > libavcodec/mips/hevcdsp_init_mips.c         | 992 ++++++++++----------
> > libavcodec/mips/hevcpred_init_mips.c        |  40 +-
> > libavcodec/mips/hpeldsp_init_mips.c         | 180 ++--
> > libavcodec/mips/idctdsp_init_mips.c         |  74 +-
> > libavcodec/mips/me_cmp_init_mips.c          |  50 +-
> > libavcodec/mips/mpegvideo_init_mips.c       |  48 +-
> > libavcodec/mips/mpegvideoencdsp_init_mips.c |  21 +-
> > libavcodec/mips/pixblockdsp_init_mips.c     |  63 +-
> > libavcodec/mips/qpeldsp_init_mips.c         | 270 +++---
> > libavcodec/mips/vc1dsp_init_mips.c          | 186 ++--
> > libavcodec/mips/videodsp_init.c             |  10 +-
> > libavcodec/mips/vp3dsp_init_mips.c          |  44 +-
> > libavcodec/mips/vp8dsp_init_mips.c          | 240 +++--
> > libavcodec/mips/vp9dsp_init_mips.c          |  16 +-
> > libavcodec/mips/wmv2dsp_init_mips.c         |  18 +-
> > libavcodec/mips/wmv2dsp_mips.h              |   4 +-
> > libavcodec/mips/wmv2dsp_mmi.c               |   4 +-
> > libavcodec/mips/xvid_idct_mmi.c             |   4 +-
> > libavcodec/mips/xvididct_init_mips.c        |  31 +-
> > libavcodec/mips/xvididct_mips.h             |   4 +-
> > libavutil/cpu.c                             |  10 +
> > libavutil/cpu.h                             |   3 +
> > libavutil/cpu_internal.h                    |   2 +
> > libavutil/mips/Makefile                     |   2 +-
> > libavutil/mips/asmdefs.h                    |  42 +
> > libavutil/mips/cpu.c                        | 134 +++
> > libavutil/mips/cpu.h                        |  28 +
> > libavutil/tests/cpu.c                       |   3 +
> > tests/checkasm/checkasm.c                   |   3 +
> > 41 files changed, 1919 insertions(+), 1825 deletions(-)
> > create mode 100644 libavutil/mips/cpu.c
> > create mode 100644 libavutil/mips/cpu.h
> >
> >--
> >2.27.0
> 
> LGTM

will apply


thx

[...]
Michael Niedermayer July 23, 2020, 3:24 p.m. UTC | #3
On Thu, Jul 23, 2020 at 04:18:32PM +0200, Michael Niedermayer wrote:
> On Tue, Jul 21, 2020 at 03:40:25PM +0800, Shiyou Yin wrote:
> > >-----Original Message-----
> > >From: ffmpeg-devel-bounces@ffmpeg.org [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf Of
> > >Jiaxun Yang
> > >Sent: Saturday, July 18, 2020 11:36 PM
> > >To: ffmpeg-devel@ffmpeg.org
> > >Cc: Jiaxun Yang
> > >Subject: [FFmpeg-devel] [PATCH v6 0/6] MIPS MSA & MMI Runtime detection support
> > >
> > >This series adds MIPS MSA & MMI runtime detection support
> > >
> > >Please review.
> > >
> > >Thanks!
> > >
> > >v2:
> > >  - Add CPUCFG support.
> > >  - Add "-mloongson-ext" to MMIFLAGS for Loongson-3 as well. (Loongson2F don't need this flag)
> > >
> > >v3:
> > >  - Address reveiew suggestions from Shiyou Yin and Weixi Gu.
> > >
> > >v4:
> > >  - Disable DSP for generic CPU
> > >
> > >v5:
> > >  - Clean ups
> > >  - Address some GCC build warnings
> > >
> > >v6:
> > >  - Address more Shiyou's comments
> > >
> > >Jiaxun Yang (6):
> > >  ffbuild: Refine MIPS handling
> > >  libavutils: Add parse_r helper for MIPS
> > >  libavutil: Detect MMI and MSA flags for MIPS
> > >  libavcodec: Enable runtime detection for MIPS MMI & MSA
> > >  libavcodec: MIPS: MMI: Fix type mismatches
> > >  libavcodec: MIPS: MMI: Move sp out of the clobber list
> > >
> > > configure                                   | 172 ++--
> > > ffbuild/common.mak                          |  10 +-
> > > libavcodec/mips/Makefile                    |   3 +-
> > > libavcodec/mips/blockdsp_init_mips.c        |  40 +-
> > > libavcodec/mips/cabac.h                     |   2 +-
> > > libavcodec/mips/h263dsp_init_mips.c         |  18 +-
> > > libavcodec/mips/h264chroma_init_mips.c      |  55 +-
> > > libavcodec/mips/h264dsp_init_mips.c         | 225 +++--
> > > libavcodec/mips/h264dsp_mips.h              |  18 +-
> > > libavcodec/mips/h264dsp_mmi.c               |  56 +-
> > > libavcodec/mips/h264pred_init_mips.c        | 207 ++--
> > > libavcodec/mips/h264qpel_init_mips.c        | 412 ++++----
> > > libavcodec/mips/hevcdsp_init_mips.c         | 992 ++++++++++----------
> > > libavcodec/mips/hevcpred_init_mips.c        |  40 +-
> > > libavcodec/mips/hpeldsp_init_mips.c         | 180 ++--
> > > libavcodec/mips/idctdsp_init_mips.c         |  74 +-
> > > libavcodec/mips/me_cmp_init_mips.c          |  50 +-
> > > libavcodec/mips/mpegvideo_init_mips.c       |  48 +-
> > > libavcodec/mips/mpegvideoencdsp_init_mips.c |  21 +-
> > > libavcodec/mips/pixblockdsp_init_mips.c     |  63 +-
> > > libavcodec/mips/qpeldsp_init_mips.c         | 270 +++---
> > > libavcodec/mips/vc1dsp_init_mips.c          | 186 ++--
> > > libavcodec/mips/videodsp_init.c             |  10 +-
> > > libavcodec/mips/vp3dsp_init_mips.c          |  44 +-
> > > libavcodec/mips/vp8dsp_init_mips.c          | 240 +++--
> > > libavcodec/mips/vp9dsp_init_mips.c          |  16 +-
> > > libavcodec/mips/wmv2dsp_init_mips.c         |  18 +-
> > > libavcodec/mips/wmv2dsp_mips.h              |   4 +-
> > > libavcodec/mips/wmv2dsp_mmi.c               |   4 +-
> > > libavcodec/mips/xvid_idct_mmi.c             |   4 +-
> > > libavcodec/mips/xvididct_init_mips.c        |  31 +-
> > > libavcodec/mips/xvididct_mips.h             |   4 +-
> > > libavutil/cpu.c                             |  10 +
> > > libavutil/cpu.h                             |   3 +
> > > libavutil/cpu_internal.h                    |   2 +
> > > libavutil/mips/Makefile                     |   2 +-
> > > libavutil/mips/asmdefs.h                    |  42 +
> > > libavutil/mips/cpu.c                        | 134 +++
> > > libavutil/mips/cpu.h                        |  28 +
> > > libavutil/tests/cpu.c                       |   3 +
> > > tests/checkasm/checkasm.c                   |   3 +
> > > 41 files changed, 1919 insertions(+), 1825 deletions(-)
> > > create mode 100644 libavutil/mips/cpu.c
> > > create mode 100644 libavutil/mips/cpu.h
> > >
> > >--
> > >2.27.0
> > 
> > LGTM
> 
> will apply

next time please make sure the patches do not add tabs in .h / .c files
these cannot be pushed

thx

[...]
Shiyou Yin July 24, 2020, 2:51 a.m. UTC | #4
>-----Original Message-----
>From: ffmpeg-devel-bounces@ffmpeg.org [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf Of
>Michael Niedermayer
>Sent: Thursday, July 23, 2020 11:24 PM
>To: FFmpeg development discussions and patches
>Subject: Re: [FFmpeg-devel] [PATCH v6 0/6] MIPS MSA & MMI Runtime detection support
>
>On Thu, Jul 23, 2020 at 04:18:32PM +0200, Michael Niedermayer wrote:
>> On Tue, Jul 21, 2020 at 03:40:25PM +0800, Shiyou Yin wrote:
>> > >-----Original Message-----
>> > >From: ffmpeg-devel-bounces@ffmpeg.org
>> > >[mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf Of Jiaxun Yang
>> > >Sent: Saturday, July 18, 2020 11:36 PM
>> > >To: ffmpeg-devel@ffmpeg.org
>> > >Cc: Jiaxun Yang
>> > >Subject: [FFmpeg-devel] [PATCH v6 0/6] MIPS MSA & MMI Runtime
>> > >detection support
>> > >
>> > >This series adds MIPS MSA & MMI runtime detection support
>> > >
>> > >Please review.
>> > >
>> > >Thanks!
>> > >
>> > >v2:
>> > >  - Add CPUCFG support.
>> > >  - Add "-mloongson-ext" to MMIFLAGS for Loongson-3 as well.
>> > >(Loongson2F don't need this flag)
>> > >
>> > >v3:
>> > >  - Address reveiew suggestions from Shiyou Yin and Weixi Gu.
>> > >
>> > >v4:
>> > >  - Disable DSP for generic CPU
>> > >
>> > >v5:
>> > >  - Clean ups
>> > >  - Address some GCC build warnings
>> > >
>> > >v6:
>> > >  - Address more Shiyou's comments
>> > >
>> > >Jiaxun Yang (6):
>> > >  ffbuild: Refine MIPS handling
>> > >  libavutils: Add parse_r helper for MIPS
>> > >  libavutil: Detect MMI and MSA flags for MIPS
>> > >  libavcodec: Enable runtime detection for MIPS MMI & MSA
>> > >  libavcodec: MIPS: MMI: Fix type mismatches
>> > >  libavcodec: MIPS: MMI: Move sp out of the clobber list
>> > >
>> > > configure                                   | 172 ++--
>> > > ffbuild/common.mak                          |  10 +-
>> > > libavcodec/mips/Makefile                    |   3 +-
>> > > libavcodec/mips/blockdsp_init_mips.c        |  40 +-
>> > > libavcodec/mips/cabac.h                     |   2 +-
>> > > libavcodec/mips/h263dsp_init_mips.c         |  18 +-
>> > > libavcodec/mips/h264chroma_init_mips.c      |  55 +-
>> > > libavcodec/mips/h264dsp_init_mips.c         | 225 +++--
>> > > libavcodec/mips/h264dsp_mips.h              |  18 +-
>> > > libavcodec/mips/h264dsp_mmi.c               |  56 +-
>> > > libavcodec/mips/h264pred_init_mips.c        | 207 ++--
>> > > libavcodec/mips/h264qpel_init_mips.c        | 412 ++++----
>> > > libavcodec/mips/hevcdsp_init_mips.c         | 992 ++++++++++----------
>> > > libavcodec/mips/hevcpred_init_mips.c        |  40 +-
>> > > libavcodec/mips/hpeldsp_init_mips.c         | 180 ++--
>> > > libavcodec/mips/idctdsp_init_mips.c         |  74 +-
>> > > libavcodec/mips/me_cmp_init_mips.c          |  50 +-
>> > > libavcodec/mips/mpegvideo_init_mips.c       |  48 +-
>> > > libavcodec/mips/mpegvideoencdsp_init_mips.c |  21 +-
>> > > libavcodec/mips/pixblockdsp_init_mips.c     |  63 +-
>> > > libavcodec/mips/qpeldsp_init_mips.c         | 270 +++---
>> > > libavcodec/mips/vc1dsp_init_mips.c          | 186 ++--
>> > > libavcodec/mips/videodsp_init.c             |  10 +-
>> > > libavcodec/mips/vp3dsp_init_mips.c          |  44 +-
>> > > libavcodec/mips/vp8dsp_init_mips.c          | 240 +++--
>> > > libavcodec/mips/vp9dsp_init_mips.c          |  16 +-
>> > > libavcodec/mips/wmv2dsp_init_mips.c         |  18 +-
>> > > libavcodec/mips/wmv2dsp_mips.h              |   4 +-
>> > > libavcodec/mips/wmv2dsp_mmi.c               |   4 +-
>> > > libavcodec/mips/xvid_idct_mmi.c             |   4 +-
>> > > libavcodec/mips/xvididct_init_mips.c        |  31 +-
>> > > libavcodec/mips/xvididct_mips.h             |   4 +-
>> > > libavutil/cpu.c                             |  10 +
>> > > libavutil/cpu.h                             |   3 +
>> > > libavutil/cpu_internal.h                    |   2 +
>> > > libavutil/mips/Makefile                     |   2 +-
>> > > libavutil/mips/asmdefs.h                    |  42 +
>> > > libavutil/mips/cpu.c                        | 134 +++
>> > > libavutil/mips/cpu.h                        |  28 +
>> > > libavutil/tests/cpu.c                       |   3 +
>> > > tests/checkasm/checkasm.c                   |   3 +
>> > > 41 files changed, 1919 insertions(+), 1825 deletions(-) create
>> > > mode 100644 libavutil/mips/cpu.c create mode 100644
>> > > libavutil/mips/cpu.h
>> > >
>> > >--
>> > >2.27.0
>> >
>> > LGTM
>>
>> will apply
>
>next time please make sure the patches do not add tabs in .h / .c files these cannot be pushed
>
thank you for your reminder, will pay attention to it in the future.