From patchwork Thu Dec 1 07:00:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junxian Zhu X-Patchwork-Id: 39548 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp155539pzb; Wed, 30 Nov 2022 23:00:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf6dRlKgazZCc0RBcShQXWHARyFgyoVxcPImSEAYPztyOFGEFt1f5pTiCi40A84Q+jzyiFC8 X-Received: by 2002:a17:906:a157:b0:7a5:7e25:5b11 with SMTP id bu23-20020a170906a15700b007a57e255b11mr54235903ejb.254.1669878026124; Wed, 30 Nov 2022 23:00:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669878026; cv=none; d=google.com; s=arc-20160816; b=hLLw1QQ1Q805BUNRxDfVNRsNtSGBmowiK1J8y6odukX70kxEowxw8bdBqoKy7tYdFk ccTR6/cBbBaMVFYkNcYimfjlceKweSYiiBzf3tA4Zos+CnAOTuBXO5odaeqxNlPwhb8/ 3tZaHUpTohFn6qaqDFApMnB13re7EG9GZY0XwibKrRoAJk7zTcY0HLxUevPPa5FeUSXM VgQuHaDEJn5jGYRhVczYJ3erJsyX4isAOqBa0TCOcEyXR4CSM7d2E1IzgZ0yCs+dy/WK OmVDTpW5KbaDbEnJBZmkO69QK83TeGJgPTq8+8dE03Wlpfu/2itsQyK2OBME00/UzI3P /+Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:to:mime-version:from:message-id :dkim-signature:delivered-to; bh=4cfajGEViQYvo6D3HpTtPhRgwurOR7F8X4cUZUGY2ds=; b=hMiWt0ZEt97bEKOfEm8D+2hy3DQugKkFgVP5scqJP4COVXv7UV6GssXdyDDhQAQZ3E iGPZ+XmuO2bHnhVRXVDUQUXbxXz+dpEF1jFJnI0WhT7Wav9KemA4bTMRPDQrViDrTtKM Vhd3CVZAi0fmokUmx5EEdi0ZJlZvOt9WeQf8yUQQ8vsGClTVHDOJDvAK4/atDxvOHaE1 1yZS1jZcBmmAv4pyBWxHRMhVkhZMuBSx4igdjsmt/cCW8wyoodSAOhNdP50RqdAMLFbF 54F+8ZF9v1DZpnpVukQ3Nnx2sHvPwgHxNyVzpRVnKsM4moWIQN1Bw1zo39ixgS5amUUB 9lQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@oss-cipunited-com.20200927.dkim.feishu.cn header.s=s1 header.b=17PZkwH8; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m16-20020a056402431000b0046a24c3b2a0si3566428edc.630.2022.11.30.23.00.25; Wed, 30 Nov 2022 23:00:26 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@oss-cipunited-com.20200927.dkim.feishu.cn header.s=s1 header.b=17PZkwH8; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F0BFC68B87F; Thu, 1 Dec 2022 09:00:21 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from v03.bc.feishu.cn (v03.bc.feishu.cn [101.36.218.35]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F1DC168A33E for ; Thu, 1 Dec 2022 09:00:14 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=s1; d=oss-cipunited-com.20200927.dkim.feishu.cn; t=1669878007; h=from:subject:mime-version:from:date:message-id:subject:to:cc: reply-to:content-type:mime-version:in-reply-to:message-id; bh=ylWHQm3AzjNyoJhDCxVqghisMpm++Pqampv1JDsPrYA=; b=17PZkwH8+8bBqdLpxfn/aMXSQsoDfSNucZ5YlklGiDdCoTETBwxaJ9tQdGUBnJjcTqMAy/ K9yJKfKBQZMekqVxyXXw6c8a2CHNlpNdfWNxwxjPhUoMdIPHn8vmcqlxhR4hyC2JxV0mEt KKKB3LVG5cralZ0VWR0uLsWKHBOPCKDIq/IIPYjRmltI1hN+5RApHosOC/qjxPFKe4Fn1B tdgyaXQi6FAcVjQDmNfmAFMuRJFB49iYy6Zga9fnVxKDSrz5cT8+bkr2W3+TsQtKKGbeRq 56cekgFkeVv5kAMEZ+FKRL3WP106uvTXizzUpa3Xsrvd4K65MJTf+9mrBqysQQ== X-Lms-Return-Path: Message-Id: <20221201065938.1450-1-zhujunxian@oss.cipunited.com> From: "Junxian Zhu" Mime-Version: 1.0 X-Mailer: git-send-email 2.38.1.windows.1 To: Date: Thu, 01 Dec 2022 15:00:06 +0800 X-Original-From: "Junxian Zhu" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [FFmpeg-devel] [PATCH] mips: fix build fail on MIPS R6 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Junxian Zhu , jiaxun.yang@flygoat.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Zbb15bxXqpXw From: Junxian Zhu Add macro define to avoid causing build fail with incompatible assembler code on MIPS R6. Signed-off-by: Junxian Zhu --- 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)