[FFmpeg-devel] [PATCH v2 1/5] avutil: [loongarch] Update loongson_intrinsics.h to v1.1.0
The loongson_intrinsics.h file is updated from v1.0.3 version to v1.1.0. Some spelling mistakes are fixed and new functions are added. Signed-off-by: Hao Chen --- libavutil/loongarch/loongson_intrinsics.h | 1697 +++-- 1 file changed, 884 insertions(+), 813 deletions(-) diff --git a/libavutil/loongarch/loongson_intrinsics.h b/libavutil/loongarch/loongson_intrinsics.h index 6e0439f829..eb256863c8 100644 --- a/libavutil/loongarch/loongson_intrinsics.h +++ b/libavutil/loongarch/loongson_intrinsics.h @@ -33,7 +33,7 @@ *Xiwei Gu *Lu Wang * - * This file is a header file for loongarch builtin extention. + * This file is a header file for loongarch builtin extension. * */ @@ -42,50 +42,50 @@ /** * MAJOR version: Macro usage changes. - * MINOR version: Add new functions, or bug fix. + * MINOR version: Add new functions, or bug fixes. * MICRO version: Comment changes or implementation changes. */ #define LSOM_VERSION_MAJOR 1 -#define LSOM_VERSION_MINOR 0 -#define LSOM_VERSION_MICRO 3 +#define LSOM_VERSION_MINOR 1 +#define LSOM_VERSION_MICRO 0 #define DUP2_ARG1(_INS, _IN0, _IN1, _OUT0, _OUT1) \ -{ \ -_OUT0 = _INS(_IN0); \ -_OUT1 = _INS(_IN1); \ -} + { \ +_OUT0 = _INS(_IN0); \ +_OUT1 = _INS(_IN1); \ + } #define DUP2_ARG2(_INS, _IN0, _IN1, _IN2, _IN3, _OUT0, _OUT1) \ -{ \ -_OUT0 = _INS(_IN0, _IN1); \ -_OUT1 = _INS(_IN2, _IN3); \ -} + { \ +_OUT0 = _INS(_IN0, _IN1); \ +_OUT1 = _INS(_IN2, _IN3); \ + } #define DUP2_ARG3(_INS, _IN0, _IN1, _IN2, _IN3, _IN4, _IN5, _OUT0, _OUT1) \ -{ \ -_OUT0 = _INS(_IN0, _IN1, _IN2); \ -_OUT1 = _INS(_IN3, _IN4, _IN5); \ -} + { \ +_OUT0 = _INS(_IN0, _IN1, _IN2); \ +_OUT1 = _INS(_IN3, _IN4, _IN5); \ + } #define DUP4_ARG1(_INS, _IN0, _IN1, _IN2, _IN3, _OUT0, _OUT1, _OUT2, _OUT3) \ -{ \ -DUP2_ARG1(_INS, _IN0, _IN1, _OUT0, _OUT1); \ -DUP2_ARG1(_INS, _IN2, _IN3, _OUT2, _OUT3); \ -} - -#define DUP4_ARG2(_INS, _IN0, _IN1, _IN2, _IN3, _IN4, _IN5, _IN6, _IN7, \ - _OUT0, _OUT1, _OUT2, _OUT3) \ -{ \ -DUP2_ARG2(_INS, _IN0, _IN1, _IN2, _IN3, _OUT0, _OUT1); \ -DUP2_ARG2(_INS, _IN4, _IN5, _IN6, _IN7, _OUT2, _OUT3); \ -} - -#define DUP4_ARG3(_INS, _IN0, _IN1, _IN2, _IN3, _IN4, _IN5, _IN6, _IN7, \ - _IN8, _IN9, _IN10, _IN11, _OUT0, _OUT1, _OUT2, _OUT3) \ -{ \ -DUP2_ARG3(_INS, _IN0, _IN1, _IN2, _IN3, _IN4, _IN5, _OUT0, _OUT1); \ -DUP2_ARG3(_INS, _IN6, _IN7, _IN8, _IN9, _IN10, _IN11, _OUT2, _OUT3); \ -} + { \ +DUP2_ARG1(_INS, _IN0, _IN1, _OUT0, _OUT1); \ +DUP2_ARG1(_INS, _IN2, _IN3, _OUT2, _OUT3); \ + } + +#define DUP4_ARG2(_INS, _IN0, _IN1, _IN2, _IN3, _IN4, _IN5, _IN6, _IN7, _OUT0, \ + _OUT1, _OUT2, _OUT3) \ + { \ +DUP2_ARG2(_INS, _IN0, _IN1, _IN2, _IN3, _OUT0, _OUT1); \ +DUP2_ARG2(_INS, _IN4, _IN5, _IN6, _IN7, _OUT2, _OUT3); \ + } + +#define DUP4_ARG3(_INS, _IN0, _IN1, _IN2, _IN3, _IN4, _IN5, _IN6, _IN7, _IN8, \ + _IN9, _IN10, _IN11, _OUT0, _OUT1, _OUT2, _OUT3) \ + { \ +DUP2_ARG3(_INS, _IN0, _IN1, _IN2, _IN3, _IN4, _IN5, _OUT0, _OUT1);\ +DUP2_ARG3(_INS, _IN6, _IN7, _IN8, _IN9, _IN10, _IN11, _OUT2, _OUT3); \ + } #ifdef __loongarch_sx #include @@ -94,11 +94,11 @@ * Description : Dot product & addition of byte vector elements * Arguments : Inputs - in_c, in_h, in_l * Outputs - out - * Retrun Type - halfword + * Return Type - halfword * Details : Signed byte elements from in_h are multiplied by * signed byte elements from in_l, and then added adjacent to * each other to get results with the twice size of input. - * Then the results plus to signed half word elements from in_c. + * Then the results plus to signed half-word elements from in_c. * Example : out = __lsx_vdp2add_h_b(in_c, in_h, in_l) *in_c : 1,2,3,4, 1,2,3,4 *in_h : 1,2,3,4, 5,6,7,8, 1,2,3,4, 5,6,7,8 @@ -106,13 +106,13 @@ * out : 23,40,41,26, 23,40,41,26 * = */ -static inline __m128i __lsx_vdp2add_h_b(__m128i i
Re: [FFmpeg-devel] [PATCH v2 1/5] avutil: [loongarch] Update loongson_intrinsics.h to v1.1.0
On Thu, Feb 17, 2022 at 07:11:47PM +0800, Hao Chen wrote: > The loongson_intrinsics.h file is updated from v1.0.3 version > to v1.1.0. Some spelling mistakes are fixed and new functions are added. > > Signed-off-by: Hao Chen > --- > libavutil/loongarch/loongson_intrinsics.h | 1697 +++-- > 1 file changed, 884 insertions(+), 813 deletions(-) > > diff --git a/libavutil/loongarch/loongson_intrinsics.h > b/libavutil/loongarch/loongson_intrinsics.h > index 6e0439f829..eb256863c8 100644 > --- a/libavutil/loongarch/loongson_intrinsics.h > +++ b/libavutil/loongarch/loongson_intrinsics.h > @@ -33,7 +33,7 @@ > *Xiwei Gu > *Lu Wang > * > - * This file is a header file for loongarch builtin extention. > + * This file is a header file for loongarch builtin extension. > * > */ > > @@ -42,50 +42,50 @@ > > /** > * MAJOR version: Macro usage changes. > - * MINOR version: Add new functions, or bug fix. > + * MINOR version: Add new functions, or bug fixes. > * MICRO version: Comment changes or implementation changes. > */ > #define LSOM_VERSION_MAJOR 1 > -#define LSOM_VERSION_MINOR 0 > -#define LSOM_VERSION_MICRO 3 > +#define LSOM_VERSION_MINOR 1 > +#define LSOM_VERSION_MICRO 0 > > #define DUP2_ARG1(_INS, _IN0, _IN1, _OUT0, _OUT1) \ > -{ \ > -_OUT0 = _INS(_IN0); \ > -_OUT1 = _INS(_IN1); \ > -} > + { \ > +_OUT0 = _INS(_IN0); \ > +_OUT1 = _INS(_IN1); \ > + } > > #define DUP2_ARG2(_INS, _IN0, _IN1, _IN2, _IN3, _OUT0, _OUT1) \ > -{ \ > -_OUT0 = _INS(_IN0, _IN1); \ > -_OUT1 = _INS(_IN2, _IN3); \ > -} > + { \ > +_OUT0 = _INS(_IN0, _IN1); \ > +_OUT1 = _INS(_IN2, _IN3); \ > + } These style changes differ from the recommandition in doc/developer.texi is that intentional ? thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Awnsering whenever a program halts or runs forever is On a turing machine, in general impossible (turings halting problem). On any real computer, always possible as a real computer has a finite number of states N, and will either halt in less than N cycles or never halt. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 1/5] avutil: [loongarch] Update loongson_intrinsics.h to v1.1.0
Thanks for your advices. This file is used by many projects, including Google. In order to facilitate the merger of the Google community, this file is adopted to the Google coding style. It will be troublesome for us to modify and maintain it, if the community is very concerned about this coding style. 在 2022/2/21 下午11:00, Michael Niedermayer 写道: On Thu, Feb 17, 2022 at 07:11:47PM +0800, Hao Chen wrote: The loongson_intrinsics.h file is updated from v1.0.3 version to v1.1.0. Some spelling mistakes are fixed and new functions are added. Signed-off-by: Hao Chen --- libavutil/loongarch/loongson_intrinsics.h | 1697 +++-- 1 file changed, 884 insertions(+), 813 deletions(-) diff --git a/libavutil/loongarch/loongson_intrinsics.h b/libavutil/loongarch/loongson_intrinsics.h index 6e0439f829..eb256863c8 100644 --- a/libavutil/loongarch/loongson_intrinsics.h +++ b/libavutil/loongarch/loongson_intrinsics.h @@ -33,7 +33,7 @@ *Xiwei Gu *Lu Wang * - * This file is a header file for loongarch builtin extention. + * This file is a header file for loongarch builtin extension. * */ @@ -42,50 +42,50 @@ /** * MAJOR version: Macro usage changes. - * MINOR version: Add new functions, or bug fix. + * MINOR version: Add new functions, or bug fixes. * MICRO version: Comment changes or implementation changes. */ #define LSOM_VERSION_MAJOR 1 -#define LSOM_VERSION_MINOR 0 -#define LSOM_VERSION_MICRO 3 +#define LSOM_VERSION_MINOR 1 +#define LSOM_VERSION_MICRO 0 #define DUP2_ARG1(_INS, _IN0, _IN1, _OUT0, _OUT1) \ -{ \ -_OUT0 = _INS(_IN0); \ -_OUT1 = _INS(_IN1); \ -} + { \ +_OUT0 = _INS(_IN0); \ +_OUT1 = _INS(_IN1); \ + } #define DUP2_ARG2(_INS, _IN0, _IN1, _IN2, _IN3, _OUT0, _OUT1) \ -{ \ -_OUT0 = _INS(_IN0, _IN1); \ -_OUT1 = _INS(_IN2, _IN3); \ -} + { \ +_OUT0 = _INS(_IN0, _IN1); \ +_OUT1 = _INS(_IN2, _IN3); \ + } These style changes differ from the recommandition in doc/developer.texi is that intentional ? thx [...] ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 1/5] avutil: [loongarch] Update loongson_intrinsics.h to v1.1.0
> 2022年2月21日 下午11:00,Michael Niedermayer 写道: > > On Thu, Feb 17, 2022 at 07:11:47PM +0800, Hao Chen wrote: >> The loongson_intrinsics.h file is updated from v1.0.3 version >> to v1.1.0. Some spelling mistakes are fixed and new functions are added. >> >> Signed-off-by: Hao Chen >> --- >> libavutil/loongarch/loongson_intrinsics.h | 1697 +++-- >> 1 file changed, 884 insertions(+), 813 deletions(-) >> >> diff --git a/libavutil/loongarch/loongson_intrinsics.h >> b/libavutil/loongarch/loongson_intrinsics.h >> index 6e0439f829..eb256863c8 100644 >> --- a/libavutil/loongarch/loongson_intrinsics.h >> +++ b/libavutil/loongarch/loongson_intrinsics.h >> @@ -33,7 +33,7 @@ >> *Xiwei Gu >> *Lu Wang >> * >> - * This file is a header file for loongarch builtin extention. >> + * This file is a header file for loongarch builtin extension. >> * >> */ >> >> @@ -42,50 +42,50 @@ >> >> /** >> * MAJOR version: Macro usage changes. >> - * MINOR version: Add new functions, or bug fix. >> + * MINOR version: Add new functions, or bug fixes. >> * MICRO version: Comment changes or implementation changes. >> */ >> #define LSOM_VERSION_MAJOR 1 >> -#define LSOM_VERSION_MINOR 0 >> -#define LSOM_VERSION_MICRO 3 >> +#define LSOM_VERSION_MINOR 1 >> +#define LSOM_VERSION_MICRO 0 >> >> #define DUP2_ARG1(_INS, _IN0, _IN1, _OUT0, _OUT1) \ >> -{ \ >> -_OUT0 = _INS(_IN0); \ >> -_OUT1 = _INS(_IN1); \ >> -} >> + { \ >> +_OUT0 = _INS(_IN0); \ >> +_OUT1 = _INS(_IN1); \ >> + } >> >> #define DUP2_ARG2(_INS, _IN0, _IN1, _IN2, _IN3, _OUT0, _OUT1) \ >> -{ \ >> -_OUT0 = _INS(_IN0, _IN1); \ >> -_OUT1 = _INS(_IN2, _IN3); \ >> -} >> + { \ >> +_OUT0 = _INS(_IN0, _IN1); \ >> +_OUT1 = _INS(_IN2, _IN3); \ >> + } > > These style changes differ from the recommandition in doc/developer.texi > is that intentional ? > > thx Can we keep this style in here, it’s helpful for us to maintain this header file which used for some other projects too. Thanks very much. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 1/5] avutil: [loongarch] Update loongson_intrinsics.h to v1.1.0
On Mon, Feb 28, 2022 at 04:19:55PM +0800, 殷时友 wrote: > > > > 2022年2月21日 下午11:00,Michael Niedermayer 写道: > > > > On Thu, Feb 17, 2022 at 07:11:47PM +0800, Hao Chen wrote: > >> The loongson_intrinsics.h file is updated from v1.0.3 version > >> to v1.1.0. Some spelling mistakes are fixed and new functions are added. > >> > >> Signed-off-by: Hao Chen > >> --- > >> libavutil/loongarch/loongson_intrinsics.h | 1697 +++-- > >> 1 file changed, 884 insertions(+), 813 deletions(-) > >> > >> diff --git a/libavutil/loongarch/loongson_intrinsics.h > >> b/libavutil/loongarch/loongson_intrinsics.h > >> index 6e0439f829..eb256863c8 100644 > >> --- a/libavutil/loongarch/loongson_intrinsics.h > >> +++ b/libavutil/loongarch/loongson_intrinsics.h > >> @@ -33,7 +33,7 @@ > >> *Xiwei Gu > >> *Lu Wang > >> * > >> - * This file is a header file for loongarch builtin extention. > >> + * This file is a header file for loongarch builtin extension. > >> * > >> */ > >> > >> @@ -42,50 +42,50 @@ > >> > >> /** > >> * MAJOR version: Macro usage changes. > >> - * MINOR version: Add new functions, or bug fix. > >> + * MINOR version: Add new functions, or bug fixes. > >> * MICRO version: Comment changes or implementation changes. > >> */ > >> #define LSOM_VERSION_MAJOR 1 > >> -#define LSOM_VERSION_MINOR 0 > >> -#define LSOM_VERSION_MICRO 3 > >> +#define LSOM_VERSION_MINOR 1 > >> +#define LSOM_VERSION_MICRO 0 > >> > >> #define DUP2_ARG1(_INS, _IN0, _IN1, _OUT0, _OUT1) \ > >> -{ \ > >> -_OUT0 = _INS(_IN0); \ > >> -_OUT1 = _INS(_IN1); \ > >> -} > >> + { \ > >> +_OUT0 = _INS(_IN0); \ > >> +_OUT1 = _INS(_IN1); \ > >> + } > >> > >> #define DUP2_ARG2(_INS, _IN0, _IN1, _IN2, _IN3, _OUT0, _OUT1) \ > >> -{ \ > >> -_OUT0 = _INS(_IN0, _IN1); \ > >> -_OUT1 = _INS(_IN2, _IN3); \ > >> -} > >> + { \ > >> +_OUT0 = _INS(_IN0, _IN1); \ > >> +_OUT1 = _INS(_IN2, _IN3); \ > >> + } > > > > These style changes differ from the recommandition in doc/developer.texi > > is that intentional ? > > > > thx > > > Can we keep this style in here, it’s helpful for us to maintain this header > file > which used for some other projects too. Thanks very much. yes, it makes sense to keep the style under these circumstances thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In a rich man's house there is no place to spit but his face. -- Diogenes of Sinope signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 1/5] avutil: [loongarch] Update loongson_intrinsics.h to v1.1.0
> 2022年2月28日 下午10:17,Michael Niedermayer 写道: > > On Mon, Feb 28, 2022 at 04:19:55PM +0800, 殷时友 wrote: >> >> >>> 2022年2月21日 下午11:00,Michael Niedermayer 写道: >>> >>> On Thu, Feb 17, 2022 at 07:11:47PM +0800, Hao Chen wrote: The loongson_intrinsics.h file is updated from v1.0.3 version to v1.1.0. Some spelling mistakes are fixed and new functions are added. Signed-off-by: Hao Chen --- libavutil/loongarch/loongson_intrinsics.h | 1697 +++-- 1 file changed, 884 insertions(+), 813 deletions(-) diff --git a/libavutil/loongarch/loongson_intrinsics.h b/libavutil/loongarch/loongson_intrinsics.h index 6e0439f829..eb256863c8 100644 --- a/libavutil/loongarch/loongson_intrinsics.h +++ b/libavutil/loongarch/loongson_intrinsics.h @@ -33,7 +33,7 @@ *Xiwei Gu *Lu Wang * - * This file is a header file for loongarch builtin extention. + * This file is a header file for loongarch builtin extension. * */ @@ -42,50 +42,50 @@ /** * MAJOR version: Macro usage changes. - * MINOR version: Add new functions, or bug fix. + * MINOR version: Add new functions, or bug fixes. * MICRO version: Comment changes or implementation changes. */ #define LSOM_VERSION_MAJOR 1 -#define LSOM_VERSION_MINOR 0 -#define LSOM_VERSION_MICRO 3 +#define LSOM_VERSION_MINOR 1 +#define LSOM_VERSION_MICRO 0 #define DUP2_ARG1(_INS, _IN0, _IN1, _OUT0, _OUT1) \ -{ \ -_OUT0 = _INS(_IN0); \ -_OUT1 = _INS(_IN1); \ -} + { \ +_OUT0 = _INS(_IN0); \ +_OUT1 = _INS(_IN1); \ + } #define DUP2_ARG2(_INS, _IN0, _IN1, _IN2, _IN3, _OUT0, _OUT1) \ -{ \ -_OUT0 = _INS(_IN0, _IN1); \ -_OUT1 = _INS(_IN2, _IN3); \ -} + { \ +_OUT0 = _INS(_IN0, _IN1); \ +_OUT1 = _INS(_IN2, _IN3); \ + } >>> >>> These style changes differ from the recommandition in doc/developer.texi >>> is that intentional ? >>> >>> thx >> >> >> Can we keep this style in here, it’s helpful for us to maintain this header >> file >> which used for some other projects too. Thanks very much. > > yes, it makes sense to keep the style under these circumstances > Thanks, hope this patch set can be merged. It’s the last part of LoongArch avcodec optimization. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".