* [FFmpeg-devel] [PATCH] mips: fix build fail on MIPS R6
@ 2022-12-01 7:00 Junxian Zhu
2023-02-21 2:16 ` Junxian Zhu
2023-03-06 9:44 ` Junxian Zhu
0 siblings, 2 replies; 7+ messages in thread
From: Junxian Zhu @ 2022-12-01 7:00 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Junxian Zhu, jiaxun.yang
From: Junxian Zhu <zhujunxian@oss.cipunited.com>
Add macro define to avoid causing build fail with incompatible assembler code on MIPS R6.
Signed-off-by: Junxian Zhu <zhujunxian@oss.cipunited.com>
---
libavcodec/mips/cabac.h | 2 ++
libavcodec/mips/compute_antialias_fixed.h | 2 ++
libavutil/mips/generic_macros_msa.h | 6 +++---
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mips/cabac.h b/libavcodec/mips/cabac.h
index 39c308c7e0..20ecab4320 100644
--- a/libavcodec/mips/cabac.h
+++ b/libavcodec/mips/cabac.h
@@ -30,6 +30,7 @@
#include "libavutil/mips/mmiutils.h"
#include "config.h"
+#if !HAVE_MIPS32R6 && !HAVE_MIPS64R6
#define get_cabac_inline get_cabac_inline_mips
static av_always_inline int get_cabac_inline_mips(CABACContext *c,
uint8_t * const state){
@@ -225,4 +226,5 @@ static av_always_inline int get_cabac_bypass_sign_mips(CABACContext *c, int val)
return res;
}
+#endif /* !HAVE_MIPS32R6 && !HAVE_MIPS64R6 */
#endif /* AVCODEC_MIPS_CABAC_H */
diff --git a/libavcodec/mips/compute_antialias_fixed.h b/libavcodec/mips/compute_antialias_fixed.h
index 1f395d2302..982002ad4c 100644
--- a/libavcodec/mips/compute_antialias_fixed.h
+++ b/libavcodec/mips/compute_antialias_fixed.h
@@ -56,6 +56,7 @@
#define AVCODEC_MIPS_COMPUTE_ANTIALIAS_FIXED_H
#if HAVE_INLINE_ASM
+#if !HAVE_MIPS32R6 && !HAVE_MIPS64R6
static void compute_antialias_mips_fixed(MPADecodeContext *s,
GranuleDef *g)
{
@@ -246,6 +247,7 @@ static void compute_antialias_mips_fixed(MPADecodeContext *s,
}
}
#define compute_antialias compute_antialias_mips_fixed
+#endif /* !HAVE_MIPS32R6 && !HAVE_MIPS64R6 */
#endif /* HAVE_INLINE_ASM */
#endif /* AVCODEC_MIPS_COMPUTE_ANTIALIAS_FIXED_H */
diff --git a/libavutil/mips/generic_macros_msa.h b/libavutil/mips/generic_macros_msa.h
index 1486f7296e..9beb0443ed 100644
--- a/libavutil/mips/generic_macros_msa.h
+++ b/libavutil/mips/generic_macros_msa.h
@@ -44,7 +44,7 @@
#define ST_UW(...) ST_V(v4u32, __VA_ARGS__)
#define ST_SW(...) ST_V(v4i32, __VA_ARGS__)
-#if (__mips_isa_rev >= 6)
+#if HAVE_MIPS32R6 || HAVE_MIPS64R6
#define LH(psrc) \
( { \
uint16_t val_lh_m = *(uint16_t *)(psrc); \
@@ -85,7 +85,7 @@
#define SW(val, pdst) *(uint32_t *)(pdst) = (val);
#define SD(val, pdst) *(uint64_t *)(pdst) = (val);
-#else // !(__mips_isa_rev >= 6)
+#else // !HAVE_MIPS32R6 && !HAVE_MIPS64R6
#define LH(psrc) \
( { \
uint8_t *psrc_lh_m = (uint8_t *) (psrc); \
@@ -188,7 +188,7 @@
SW(val0_sd_m, pdst_sd_m); \
SW(val1_sd_m, pdst_sd_m + 4); \
}
-#endif // (__mips_isa_rev >= 6)
+#endif // HAVE_MIPS32R6 || HAVE_MIPS64R6
/* Description : Load 4 words with stride
Arguments : Inputs - psrc (source pointer to load from)
--
2.38.1.windows.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] mips: fix build fail on MIPS R6
2022-12-01 7:00 [FFmpeg-devel] [PATCH] mips: fix build fail on MIPS R6 Junxian Zhu
@ 2023-02-21 2:16 ` Junxian Zhu
2023-03-06 9:44 ` Junxian Zhu
1 sibling, 0 replies; 7+ messages in thread
From: Junxian Zhu @ 2023-02-21 2:16 UTC (permalink / raw)
To: ffmpeg-devel
Could anyone review this patch and merge it into master? It will fix build failed problems on mips r6 isa platform.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] mips: fix build fail on MIPS R6
2022-12-01 7:00 [FFmpeg-devel] [PATCH] mips: fix build fail on MIPS R6 Junxian Zhu
2023-02-21 2:16 ` Junxian Zhu
@ 2023-03-06 9:44 ` Junxian Zhu
2023-03-06 18:08 ` Michael Niedermayer
1 sibling, 1 reply; 7+ messages in thread
From: Junxian Zhu @ 2023-03-06 9:44 UTC (permalink / raw)
To: ffmpeg-devel, michael
Hello, Michael, can you help to review this pacth? It made ffmpeg compilable on mips r6 platform.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] mips: fix build fail on MIPS R6
2023-03-06 9:44 ` Junxian Zhu
@ 2023-03-06 18:08 ` Michael Niedermayer
2023-03-10 9:22 ` Junxian Zhu
0 siblings, 1 reply; 7+ messages in thread
From: Michael Niedermayer @ 2023-03-06 18:08 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 535 bytes --]
On Mon, Mar 06, 2023 at 05:44:55PM +0800, Junxian Zhu wrote:
> Hello, Michael, can you help to review this pacth? It made ffmpeg compilable on mips r6 platform.
iam not mips maintainer, i have no mips hw anymore, i know very little
about the different mips variants
Iam sure there are people who are in a better position to review this
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] mips: fix build fail on MIPS R6
2023-03-06 18:08 ` Michael Niedermayer
@ 2023-03-10 9:22 ` Junxian Zhu
2023-03-25 14:36 ` Shiyou Yin
0 siblings, 1 reply; 7+ messages in thread
From: Junxian Zhu @ 2023-03-10 9:22 UTC (permalink / raw)
To: FFmpeg development discussions and patches, Michael Niedermayer,
yinshiyou-hf
because there were no mips maintainer give me any feedback about this
patch, so i had to send mail to you
On 2023/3/7 02:08, Michael Niedermayer wrote:
> On Mon, Mar 06, 2023 at 05:44:55PM +0800, Junxian Zhu wrote:
>> Hello, Michael, can you help to review this pacth? It made ffmpeg compilable on mips r6 platform.
> iam not mips maintainer, i have no mips hw anymore, i know very little
> about the different mips variants
> Iam sure there are people who are in a better position to review this
>
> 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-request@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-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] mips: fix build fail on MIPS R6
2023-03-10 9:22 ` Junxian Zhu
@ 2023-03-25 14:36 ` Shiyou Yin
2023-03-25 20:33 ` Michael Niedermayer
0 siblings, 1 reply; 7+ messages in thread
From: Shiyou Yin @ 2023-03-25 14:36 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Cc: Michael Niedermayer, zhujunxian
LGTM from the code.
I have no R6 MIPS to reproduce the issue, but this patch just disable the optimization for R6, so it won’t affect other MIPS.
> 2023年3月10日 17:22,Junxian Zhu <zhujunxian@oss.cipunited.com> 写道:
>
> because there were no mips maintainer give me any feedback about this
> patch, so i had to send mail to you
>
>
> On 2023/3/7 02:08, Michael Niedermayer wrote:
>> On Mon, Mar 06, 2023 at 05:44:55PM +0800, Junxian Zhu wrote:
>>> Hello, Michael, can you help to review this pacth? It made ffmpeg compilable on mips r6 platform.
>> iam not mips maintainer, i have no mips hw anymore, i know very little
>> about the different mips variants
>> Iam sure there are people who are in a better position to review this
>>
>> 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-request@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-request@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-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] mips: fix build fail on MIPS R6
2023-03-25 14:36 ` Shiyou Yin
@ 2023-03-25 20:33 ` Michael Niedermayer
0 siblings, 0 replies; 7+ messages in thread
From: Michael Niedermayer @ 2023-03-25 20:33 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 551 bytes --]
On Sat, Mar 25, 2023 at 10:36:30PM +0800, Shiyou Yin wrote:
> LGTM from the code.
> I have no R6 MIPS to reproduce the issue, but this patch just disable the optimization for R6, so it won’t affect other MIPS.
will apply patch
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
than the original author, trying to rewrite it will not make it better.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-03-25 20:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01 7:00 [FFmpeg-devel] [PATCH] mips: fix build fail on MIPS R6 Junxian Zhu
2023-02-21 2:16 ` Junxian Zhu
2023-03-06 9:44 ` Junxian Zhu
2023-03-06 18:08 ` Michael Niedermayer
2023-03-10 9:22 ` Junxian Zhu
2023-03-25 14:36 ` Shiyou Yin
2023-03-25 20:33 ` Michael Niedermayer
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git