From patchwork Thu Aug 1 19:59:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= X-Patchwork-Id: 50866 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:12d6:0:b0:489:2eb3:e4c4 with SMTP id 205csp1393517vqs; Thu, 1 Aug 2024 12:59:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWTbA4+CJ/HN42Mzy2Ip6cRUCc5g7CEa01wgkdeHqzW8LrjfXInP8Y2n92Mwm+X5a1Wy/BP6lAvTKkCdT5DgDY5IwNjaqSdZsCSOw== X-Google-Smtp-Source: AGHT+IGHjxleZMvboPwyOHGPY2yriTIDfbV1dF2kBHbx6oDYoqbyy/v2bY3L3qm8YHE0zfPXDUCz X-Received: by 2002:a2e:87c3:0:b0:2ee:7bcd:a52 with SMTP id 38308e7fff4ca-2f15ab53020mr8853131fa.46.1722542379269; Thu, 01 Aug 2024 12:59:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722542379; cv=none; d=google.com; s=arc-20160816; b=A/FwFiP0EFVGreBEZJu2VBb7SYMyvOwQazhO+0O77iNrJ/aOoFkJUkKR839uUJOKzy TRXWfjxX1gs7Xbn3vLPMJsI3hzo+oFHciY74z2HKxkp2s5MoI85EOaksQ6HfEZIyXy7P 6lZ281whlhvwxr89ELoCaLZxbQkDRsL7kEOTfHKPxOz9yBou5m8u+ChjNeAX+bYSuQYY GPnelqoI1vaejog1o4E2BYxNMs/UWDnpStkfFCW5mADZ9O4L4QMkNvd//yCgC7is9IBe bqFrTa74i5VkJkCfXc1xTHbmAhDGUXvqoH3RGyH1Dw10qe18Qu6qi+OePO72ZEETX/Ne pNKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=215N/SL59c8rLIio0tqa1hLFKghRB+kOrAwU+K0biWU=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=ynA5KUDUlnTHZQKr2wdxIdMD6ADzM5oG0tHcYxQY2EiynmMmxjOTlLKffIwrURVlTE qUKo6fobIfzMSp6HDsnOYcbMs9U2N3w+2lyPws9yG2abTke1Dci/trdPvo0cGt+o5SlO xX5Z69cCbx3Kz4RR9uIdi7D46f090k60Kf2LPOGk83uwKq5j7Yvn25iq7LVNIY7SxHDg pP0ttuNGhn4A14xdDBZt6S+lKFtfx/Bhf7Q4HJNfAA+qtkxf7aM8EA1s5THa9ial/hmt Xb2FvugP2eWGgN0+w7paGsQj2KSkJY7/NLrMCO2ukI1nk4hbpozlHVv7Xu1SyPIdJEST UG9A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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 38308e7fff4ca-2f15c47efa3si951451fa.442.2024.08.01.12.59.38; Thu, 01 Aug 2024 12:59:39 -0700 (PDT) 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; 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 72DE568D8F9; Thu, 1 Aug 2024 22:59:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from ursule.remlab.net (vps-a2bccee9.vps.ovh.net [51.75.19.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 55CF168D7A6 for ; Thu, 1 Aug 2024 22:59:18 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id C97C5C03A6 for ; Thu, 1 Aug 2024 22:59:17 +0300 (EEST) From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 Aug 2024 22:59:13 +0300 Message-ID: <20240801195917.43555-2-remi@remlab.net> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801195917.43555-1-remi@remlab.net> References: <20240801195917.43555-1-remi@remlab.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/6] lavc/riscv: depend on RVB and simplify accordingly 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: LfxfWX3xRtGS There is no known (real) hardware with V and without the complete B extension. B was indeed required in the RISC-V application profile from 2022, earlier than V. There should not be any relevant hardware in the future either. In practice, different R-V Vector optimisations in FFmpeg already depend on every constituent of the B extension anyhow, so it would not work well. --- libavcodec/riscv/aacencdsp_init.c | 2 +- libavcodec/riscv/aacpsdsp_init.c | 27 ++++++++++++++--------- libavcodec/riscv/alacdsp_init.c | 2 +- libavcodec/riscv/audiodsp_init.c | 9 ++++---- libavcodec/riscv/exrdsp_init.c | 3 +-- libavcodec/riscv/flacdsp_init.c | 4 ++-- libavcodec/riscv/fmtconvert_init.c | 2 +- libavcodec/riscv/h264_chroma_init_riscv.c | 2 +- libavcodec/riscv/h264dsp_init.c | 2 +- libavcodec/riscv/huffyuvdsp_init.c | 5 ++--- libavcodec/riscv/jpeg2000dsp_init.c | 2 +- libavcodec/riscv/llauddsp_init.c | 2 +- libavcodec/riscv/lpc_init.c | 5 ++--- libavcodec/riscv/opusdsp_init.c | 3 +-- libavcodec/riscv/rv40dsp_init.c | 2 +- libavcodec/riscv/sbrdsp_init.c | 8 +++---- libavcodec/riscv/svqenc_init.c | 2 +- libavcodec/riscv/takdsp_init.c | 2 +- libavcodec/riscv/utvideodsp_init.c | 2 +- libavcodec/riscv/vorbisdsp_init.c | 2 +- libavcodec/riscv/vp7dsp_init.c | 2 +- libavcodec/riscv/vp8dsp_init.c | 2 +- 22 files changed, 45 insertions(+), 47 deletions(-) diff --git a/libavcodec/riscv/aacencdsp_init.c b/libavcodec/riscv/aacencdsp_init.c index 73bc8d8fa3..a2dc0a8d3f 100644 --- a/libavcodec/riscv/aacencdsp_init.c +++ b/libavcodec/riscv/aacencdsp_init.c @@ -35,7 +35,7 @@ av_cold void ff_aacenc_dsp_init_riscv(AACEncDSPContext *s) int flags = av_get_cpu_flags(); if (flags & AV_CPU_FLAG_RVV_F32) { - if (flags & AV_CPU_FLAG_RVB_ADDR) { + if (flags & AV_CPU_FLAG_RVB) { s->abs_pow34 = ff_abs_pow34_rvv; s->quant_bands = ff_aac_quant_bands_rvv; } diff --git a/libavcodec/riscv/aacpsdsp_init.c b/libavcodec/riscv/aacpsdsp_init.c index e094660cf3..b37c93f525 100644 --- a/libavcodec/riscv/aacpsdsp_init.c +++ b/libavcodec/riscv/aacpsdsp_init.c @@ -42,20 +42,25 @@ av_cold void ff_psdsp_init_riscv(PSDSPContext *c) #if HAVE_RVV int flags = av_get_cpu_flags(); - if (flags & AV_CPU_FLAG_RVV_F32) { - c->hybrid_analysis = ff_ps_hybrid_analysis_rvv; + if (flags & AV_CPU_FLAG_RVV_I32) { + if (flags & AV_CPU_FLAG_RVV_F32) { + if (flags & AV_CPU_FLAG_RVB) { + if (flags & AV_CPU_FLAG_RVV_I64) + c->add_squares = ff_ps_add_squares_rvv; - if (flags & AV_CPU_FLAG_RVB_ADDR) { - if (flags & AV_CPU_FLAG_RVV_I64) { - c->add_squares = ff_ps_add_squares_rvv; - c->hybrid_synthesis_deint = ff_ps_hybrid_synthesis_deint_rvv; + c->mul_pair_single = ff_ps_mul_pair_single_rvv; } - c->mul_pair_single = ff_ps_mul_pair_single_rvv; - c->stereo_interpolate[0] = ff_ps_stereo_interpolate_rvv; + c->hybrid_analysis = ff_ps_hybrid_analysis_rvv; } - } - if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) - c->hybrid_analysis_ileave = ff_ps_hybrid_analysis_ileave_rvv; + if (flags & AV_CPU_FLAG_RVB) { + c->hybrid_analysis_ileave = ff_ps_hybrid_analysis_ileave_rvv; + + if (flags & AV_CPU_FLAG_RVV_I64) + c->hybrid_synthesis_deint = ff_ps_hybrid_synthesis_deint_rvv; + if (flags & AV_CPU_FLAG_RVV_F32) + c->stereo_interpolate[0] = ff_ps_stereo_interpolate_rvv; + } + } #endif } diff --git a/libavcodec/riscv/alacdsp_init.c b/libavcodec/riscv/alacdsp_init.c index cd6dc4f8ae..c71b00c329 100644 --- a/libavcodec/riscv/alacdsp_init.c +++ b/libavcodec/riscv/alacdsp_init.c @@ -41,7 +41,7 @@ av_cold void ff_alacdsp_init_riscv(ALACDSPContext *c) #if HAVE_RVV && (__riscv_xlen == 64) int flags = av_get_cpu_flags(); - if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) { + if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB)) { c->decorrelate_stereo = ff_alac_decorrelate_stereo_rvv; c->append_extra_bits[0] = ff_alac_append_extra_bits_mono_rvv; c->append_extra_bits[1] = ff_alac_append_extra_bits_stereo_rvv; diff --git a/libavcodec/riscv/audiodsp_init.c b/libavcodec/riscv/audiodsp_init.c index 5750d4d8a7..e2d829ed57 100644 --- a/libavcodec/riscv/audiodsp_init.c +++ b/libavcodec/riscv/audiodsp_init.c @@ -34,11 +34,10 @@ av_cold void ff_audiodsp_init_riscv(AudioDSPContext *c) #if HAVE_RVV int flags = av_get_cpu_flags(); - if (flags & AV_CPU_FLAG_RVB_ADDR) { - if (flags & AV_CPU_FLAG_RVV_I32) { - c->scalarproduct_int16 = ff_scalarproduct_int16_rvv; - c->vector_clip_int32 = ff_vector_clip_int32_rvv; - } + if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB)) { + c->scalarproduct_int16 = ff_scalarproduct_int16_rvv; + c->vector_clip_int32 = ff_vector_clip_int32_rvv; + if (flags & AV_CPU_FLAG_RVV_F32) c->vector_clipf = ff_vector_clipf_rvv; } diff --git a/libavcodec/riscv/exrdsp_init.c b/libavcodec/riscv/exrdsp_init.c index 690a2231c5..f074c71c58 100644 --- a/libavcodec/riscv/exrdsp_init.c +++ b/libavcodec/riscv/exrdsp_init.c @@ -31,8 +31,7 @@ av_cold void ff_exrdsp_init_riscv(ExrDSPContext *c) #if HAVE_RVV int flags = av_get_cpu_flags(); - if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) { + if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB)) c->reorder_pixels = ff_reorder_pixels_rvv; - } #endif } diff --git a/libavcodec/riscv/flacdsp_init.c b/libavcodec/riscv/flacdsp_init.c index 861276be28..2689ebf2dc 100644 --- a/libavcodec/riscv/flacdsp_init.c +++ b/libavcodec/riscv/flacdsp_init.c @@ -70,10 +70,10 @@ av_cold void ff_flacdsp_init_riscv(FLACDSPContext *c, enum AVSampleFormat fmt, #if HAVE_RVV int flags = av_get_cpu_flags(); - if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) { + if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB)) { int vlenb = ff_get_rv_vlenb(); - if ((flags & AV_CPU_FLAG_RVB_BASIC) && vlenb >= 16) { + if (vlenb >= 16) { c->lpc16 = ff_flac_lpc16_rvv; # if (__riscv_xlen >= 64) diff --git a/libavcodec/riscv/fmtconvert_init.c b/libavcodec/riscv/fmtconvert_init.c index f5eeafba45..4d3f0f6464 100644 --- a/libavcodec/riscv/fmtconvert_init.c +++ b/libavcodec/riscv/fmtconvert_init.c @@ -36,7 +36,7 @@ av_cold void ff_fmt_convert_init_riscv(FmtConvertContext *c) #if HAVE_RVV int flags = av_get_cpu_flags(); - if ((flags & AV_CPU_FLAG_RVV_F32) && (flags & AV_CPU_FLAG_RVB_ADDR)) { + if ((flags & AV_CPU_FLAG_RVV_F32) && (flags & AV_CPU_FLAG_RVB)) { c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_rvv; c->int32_to_float_fmul_array8 = ff_int32_to_float_fmul_array8_rvv; } diff --git a/libavcodec/riscv/h264_chroma_init_riscv.c b/libavcodec/riscv/h264_chroma_init_riscv.c index 9802fa517f..b6bde42c0a 100644 --- a/libavcodec/riscv/h264_chroma_init_riscv.c +++ b/libavcodec/riscv/h264_chroma_init_riscv.c @@ -38,7 +38,7 @@ av_cold void ff_h264chroma_init_riscv(H264ChromaContext *c, int bit_depth) int flags = av_get_cpu_flags(); if (bit_depth == 8 && (flags & AV_CPU_FLAG_RVV_I32) && - (flags & AV_CPU_FLAG_RVB_ADDR) && ff_rv_vlen_least(128)) { + (flags & AV_CPU_FLAG_RVB) && ff_rv_vlen_least(128)) { c->put_h264_chroma_pixels_tab[0] = h264_put_chroma_mc8_rvv; c->avg_h264_chroma_pixels_tab[0] = h264_avg_chroma_mc8_rvv; c->put_h264_chroma_pixels_tab[1] = h264_put_chroma_mc4_rvv; diff --git a/libavcodec/riscv/h264dsp_init.c b/libavcodec/riscv/h264dsp_init.c index 7f787d8f57..b99c0124ee 100644 --- a/libavcodec/riscv/h264dsp_init.c +++ b/libavcodec/riscv/h264dsp_init.c @@ -128,7 +128,7 @@ av_cold void ff_h264dsp_init_riscv(H264DSPContext *dsp, const int bit_depth, if (bit_depth == depth) { \ if (zvl128b) \ dsp->h264_idct_add = ff_h264_idct_add_##depth##_rvv; \ - if (flags & AV_CPU_FLAG_RVB_ADDR) \ + if (flags & AV_CPU_FLAG_RVB) \ dsp->h264_idct8_add = ff_h264_idct8_add_##depth##_rvv; \ if (zvl128b && (flags & AV_CPU_FLAG_RVB)) { \ dsp->h264_idct_dc_add = ff_h264_idct4_dc_add_##depth##_rvv; \ diff --git a/libavcodec/riscv/huffyuvdsp_init.c b/libavcodec/riscv/huffyuvdsp_init.c index 79e93e213f..362ccb215f 100644 --- a/libavcodec/riscv/huffyuvdsp_init.c +++ b/libavcodec/riscv/huffyuvdsp_init.c @@ -33,10 +33,9 @@ av_cold void ff_huffyuvdsp_init_riscv(HuffYUVDSPContext *c, #if HAVE_RVV int flags = av_get_cpu_flags(); - if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) { + if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB)) { c->add_int16 = ff_add_int16_rvv; - if (flags & AV_CPU_FLAG_RVB_BASIC) - c->add_hfyu_left_pred_bgr32 = ff_add_hfyu_left_pred_bgr32_rvv; + c->add_hfyu_left_pred_bgr32 = ff_add_hfyu_left_pred_bgr32_rvv; } #endif } diff --git a/libavcodec/riscv/jpeg2000dsp_init.c b/libavcodec/riscv/jpeg2000dsp_init.c index e82ec47bde..d6930721cd 100644 --- a/libavcodec/riscv/jpeg2000dsp_init.c +++ b/libavcodec/riscv/jpeg2000dsp_init.c @@ -31,7 +31,7 @@ av_cold void ff_jpeg2000dsp_init_riscv(Jpeg2000DSPContext *c) #if HAVE_RVV int flags = av_get_cpu_flags(); - if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) { + if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB)) { if (flags & AV_CPU_FLAG_RVV_F32) c->mct_decode[FF_DWT97] = ff_ict_float_rvv; c->mct_decode[FF_DWT53] = ff_rct_int_rvv; diff --git a/libavcodec/riscv/llauddsp_init.c b/libavcodec/riscv/llauddsp_init.c index 1924b36821..e2c1edb400 100644 --- a/libavcodec/riscv/llauddsp_init.c +++ b/libavcodec/riscv/llauddsp_init.c @@ -36,7 +36,7 @@ av_cold void ff_llauddsp_init_riscv(LLAudDSPContext *c) #if HAVE_RVV int flags = av_get_cpu_flags(); - if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) { + if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB)) { c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_rvv; c->scalarproduct_and_madd_int32 = ff_scalarproduct_and_madd_int32_rvv; } diff --git a/libavcodec/riscv/lpc_init.c b/libavcodec/riscv/lpc_init.c index d9bcbbe604..b093271071 100644 --- a/libavcodec/riscv/lpc_init.c +++ b/libavcodec/riscv/lpc_init.c @@ -33,11 +33,10 @@ av_cold void ff_lpc_init_riscv(LPCContext *c) #if HAVE_RVV && (__riscv_xlen >= 64) int flags = av_get_cpu_flags(); - if ((flags & AV_CPU_FLAG_RVV_F64) && (flags & AV_CPU_FLAG_RVB_ADDR)) { + if ((flags & AV_CPU_FLAG_RVV_F64) && (flags & AV_CPU_FLAG_RVB)) { c->lpc_apply_welch_window = ff_lpc_apply_welch_window_rvv; - if ((flags & AV_CPU_FLAG_RVB_BASIC) && - ff_get_rv_vlenb() > c->max_order) + if (ff_get_rv_vlenb() > c->max_order) c->lpc_compute_autocorr = ff_lpc_compute_autocorr_rvv; } #endif diff --git a/libavcodec/riscv/opusdsp_init.c b/libavcodec/riscv/opusdsp_init.c index 88d8e77f0e..7ec261493b 100644 --- a/libavcodec/riscv/opusdsp_init.c +++ b/libavcodec/riscv/opusdsp_init.c @@ -32,8 +32,7 @@ av_cold void ff_opus_dsp_init_riscv(OpusDSP *d) #if HAVE_RVV int flags = av_get_cpu_flags(); - if ((flags & AV_CPU_FLAG_RVV_F32) && (flags & AV_CPU_FLAG_RVB_ADDR) && - (flags & AV_CPU_FLAG_RVB_BASIC)) + if ((flags & AV_CPU_FLAG_RVV_F32) && (flags & AV_CPU_FLAG_RVB)) d->postfilter = ff_opus_postfilter_rvv; #endif } diff --git a/libavcodec/riscv/rv40dsp_init.c b/libavcodec/riscv/rv40dsp_init.c index 47df0e98c5..6aba571794 100644 --- a/libavcodec/riscv/rv40dsp_init.c +++ b/libavcodec/riscv/rv40dsp_init.c @@ -41,7 +41,7 @@ av_cold void ff_rv40dsp_init_riscv(RV34DSPContext *c) int flags = av_get_cpu_flags(); if ((flags & AV_CPU_FLAG_RVV_I32) && ff_rv_vlen_least(128) && - (flags & AV_CPU_FLAG_RVB_ADDR)) { + (flags & AV_CPU_FLAG_RVB)) { c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_rvv; c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_rvv; c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_rvv; diff --git a/libavcodec/riscv/sbrdsp_init.c b/libavcodec/riscv/sbrdsp_init.c index 562c75e6b4..0915fe9964 100644 --- a/libavcodec/riscv/sbrdsp_init.c +++ b/libavcodec/riscv/sbrdsp_init.c @@ -47,7 +47,7 @@ av_cold void ff_sbrdsp_init_riscv(SBRDSPContext *c) int flags = av_get_cpu_flags(); if (flags & AV_CPU_FLAG_RVV_F32) { - if (flags & AV_CPU_FLAG_RVB_ADDR) { + if (flags & AV_CPU_FLAG_RVB) { c->sum64x5 = ff_sbr_sum64x5_rvv; c->sum_square = ff_sbr_sum_square_rvv; c->hf_gen = ff_sbr_hf_gen_rvv; @@ -55,10 +55,8 @@ av_cold void ff_sbrdsp_init_riscv(SBRDSPContext *c) if (ff_get_rv_vlenb() <= 32) { c->hf_apply_noise[0] = ff_sbr_hf_apply_noise_0_rvv; c->hf_apply_noise[2] = ff_sbr_hf_apply_noise_2_rvv; - if (flags & AV_CPU_FLAG_RVB_BASIC) { - c->hf_apply_noise[1] = ff_sbr_hf_apply_noise_1_rvv; - c->hf_apply_noise[3] = ff_sbr_hf_apply_noise_3_rvv; - } + c->hf_apply_noise[1] = ff_sbr_hf_apply_noise_1_rvv; + c->hf_apply_noise[3] = ff_sbr_hf_apply_noise_3_rvv; } } c->autocorrelate = ff_sbr_autocorrelate_rvv; diff --git a/libavcodec/riscv/svqenc_init.c b/libavcodec/riscv/svqenc_init.c index f4c398960c..5021849e4c 100644 --- a/libavcodec/riscv/svqenc_init.c +++ b/libavcodec/riscv/svqenc_init.c @@ -33,7 +33,7 @@ av_cold void ff_svq1enc_init_riscv(SVQ1EncDSPContext *c) int flags = av_get_cpu_flags(); if (flags & AV_CPU_FLAG_RVV_I32) { - if (flags & AV_CPU_FLAG_RVB_ADDR) { + if (flags & AV_CPU_FLAG_RVB) { c->ssd_int8_vs_int16 = ff_ssd_int8_vs_int16_rvv; } } diff --git a/libavcodec/riscv/takdsp_init.c b/libavcodec/riscv/takdsp_init.c index 58be83860b..12d2d8dab9 100644 --- a/libavcodec/riscv/takdsp_init.c +++ b/libavcodec/riscv/takdsp_init.c @@ -35,7 +35,7 @@ av_cold void ff_takdsp_init_riscv(TAKDSPContext *dsp) #if HAVE_RVV int flags = av_get_cpu_flags(); - if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) { + if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB)) { dsp->decorrelate_ls = ff_decorrelate_ls_rvv; dsp->decorrelate_sr = ff_decorrelate_sr_rvv; dsp->decorrelate_sm = ff_decorrelate_sm_rvv; diff --git a/libavcodec/riscv/utvideodsp_init.c b/libavcodec/riscv/utvideodsp_init.c index f5038c4736..9d7469f388 100644 --- a/libavcodec/riscv/utvideodsp_init.c +++ b/libavcodec/riscv/utvideodsp_init.c @@ -38,7 +38,7 @@ av_cold void ff_utvideodsp_init_riscv(UTVideoDSPContext *c) if (flags & AV_CPU_FLAG_RVV_I32) { c->restore_rgb_planes = ff_restore_rgb_planes_rvv; - if (flags & AV_CPU_FLAG_RVB_ADDR) + if (flags & AV_CPU_FLAG_RVB) c->restore_rgb_planes10 = ff_restore_rgb_planes10_rvv; } #endif diff --git a/libavcodec/riscv/vorbisdsp_init.c b/libavcodec/riscv/vorbisdsp_init.c index 0bbbcb68de..64c858dcba 100644 --- a/libavcodec/riscv/vorbisdsp_init.c +++ b/libavcodec/riscv/vorbisdsp_init.c @@ -31,7 +31,7 @@ av_cold void ff_vorbisdsp_init_riscv(VorbisDSPContext *c) #if HAVE_RVV int flags = av_get_cpu_flags(); - if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) + if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB)) c->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_rvv; #endif } diff --git a/libavcodec/riscv/vp7dsp_init.c b/libavcodec/riscv/vp7dsp_init.c index 9b8357ec05..e2771379e7 100644 --- a/libavcodec/riscv/vp7dsp_init.c +++ b/libavcodec/riscv/vp7dsp_init.c @@ -44,7 +44,7 @@ av_cold void ff_vp7dsp_init_riscv(VP8DSPContext *c) #if HAVE_RVV int flags = av_get_cpu_flags(); - if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR) && + if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB) && ff_rv_vlen_least(128)) { #if __riscv_xlen >= 64 c->vp8_luma_dc_wht = ff_vp7_luma_dc_wht_rvv; diff --git a/libavcodec/riscv/vp8dsp_init.c b/libavcodec/riscv/vp8dsp_init.c index d9e2beb237..250fecb2f0 100644 --- a/libavcodec/riscv/vp8dsp_init.c +++ b/libavcodec/riscv/vp8dsp_init.c @@ -86,7 +86,7 @@ av_cold void ff_vp78dsp_init_riscv(VP8DSPContext *c) c->put_vp8_bilinear_pixels_tab[2][2][1] = ff_put_vp8_bilin4_hv_rvv; c->put_vp8_bilinear_pixels_tab[2][2][2] = ff_put_vp8_bilin4_hv_rvv; - if (flags & AV_CPU_FLAG_RVB_ADDR) { + if (flags & AV_CPU_FLAG_RVB) { c->put_vp8_epel_pixels_tab[0][0][2] = ff_put_vp8_epel16_h6_rvv; c->put_vp8_epel_pixels_tab[1][0][2] = ff_put_vp8_epel8_h6_rvv; c->put_vp8_epel_pixels_tab[2][0][2] = ff_put_vp8_epel4_h6_rvv;