From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 3C4F94A22E for ; Mon, 25 Mar 2024 15:06:26 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 18F0568D61B; Mon, 25 Mar 2024 17:03:16 +0200 (EET) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6EDF068D5DC for ; Mon, 25 Mar 2024 17:03:01 +0200 (EET) Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-512e4f4e463so4756645e87.1 for ; Mon, 25 Mar 2024 08:03:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1711378980; x=1711983780; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F3RTHj/993f9i3VPyXWBjjJVlhPJNyypEagRhVLg6nY=; b=nwZRoZsI2/COFT3FITy6cs1QW87IQVeBAO+SA5jr5L9rv4R9Mv6MVUMeAa8e0jTqPP 1mOXQyIDEm6URGMHK2o/ZPPbuYE0CR1fTLjOMiihB5g+smExBI75jLZzem6QeEV/5ypR xzG/Odn/8/T5PauIZeMhsixQRXaXGj4a7kzAsN2WzauxHYukBQPbhdOTAQFcp82wyvSa tyy05U8dIBK+dBd4xDT+xfCF+gjJJOZc38pmMD+jL1Iaa8o3gnTaL0tNElBGa360fSMY OG4IJCUw5hNgdZTYJi/o22Q7B7TIapoyISgom30dy5UznCdLVt2Sr842sdAn2f8e3tMP wUBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711378980; x=1711983780; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F3RTHj/993f9i3VPyXWBjjJVlhPJNyypEagRhVLg6nY=; b=xVn96sftjXG0Tl6CVp+UrJ81hrhpJqIW5HLNNusMKekx10e7US9Ch8ll5IHxelYKeF RHp5FvGcD9LivoHAdZ4eMEaqaksIwMsTBM6VWXjZBOjssfEp6mPnza9H9TPaMrcYkwEX +LHA8Gawo8VYk2V1byoH78r+l/PA0SVvTfF/1dS45QlNONi/sNNewBZERhmThOZnqZXr Y1ekzIB+aqXpRShWB9UuoYcwZ4g35UmeCM9dSDXD1Vu30S5QhzHAS3Kj2upz8ED6Un3n uvVXPVOvxsFgO4rv8gvSdDMH7F6g9MpgIPdM20I8Jhl5nWsDRkiL0y75Yxf019u9nd1i K1ow== X-Gm-Message-State: AOJu0YwGNjfcrXF0ed7o3VHjWdL+B2lFsCzvhKzXuHFmW/b/gNxYwZtQ UtkwiOeoL3lvCB7R9GJ4EjOYwixP4w2uOyCeqfPoN8sE8u9z1obQSztekfP0Y8Jwd11ziUW3ym7 7R/gu X-Google-Smtp-Source: AGHT+IGic2vX5XfIc5XiKDdZptI8677X/4lil6m9lsn4074eRd82Xs48FDKDmZiX/ki6DGeqSDKc9Q== X-Received: by 2002:a19:644c:0:b0:513:dd43:a153 with SMTP id b12-20020a19644c000000b00513dd43a153mr78490lfj.59.1711378980380; Mon, 25 Mar 2024 08:03:00 -0700 (PDT) Received: from localhost (host-114-191.parnet.fi. [77.234.114.191]) by smtp.gmail.com with ESMTPSA id a21-20020ac25e75000000b00515a7984acbsm782605lfr.94.2024.03.25.08.03.00 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 25 Mar 2024 08:03:00 -0700 (PDT) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Mar 2024 17:02:42 +0200 Message-Id: <20240325150243.59058-21-martin@martin.st> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20240325150243.59058-1-martin@martin.st> References: <20240325150243.59058-1-martin@martin.st> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 20/21] aarch64: hevc: Produce plain neon versions of qpel_uni_w_hv 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: Logan Lyu , "J . Dekker" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: As the plain neon qpel_h functions process two rows at a time, we need to allocate storage for h+8 rows instead of h+7. AWS Graviton 3: put_hevc_qpel_uni_w_hv4_8_c: 422.2 put_hevc_qpel_uni_w_hv4_8_neon: 140.7 put_hevc_qpel_uni_w_hv4_8_i8mm: 100.7 put_hevc_qpel_uni_w_hv8_8_c: 1208.0 put_hevc_qpel_uni_w_hv8_8_neon: 268.2 put_hevc_qpel_uni_w_hv8_8_i8mm: 261.5 put_hevc_qpel_uni_w_hv16_8_c: 4297.2 put_hevc_qpel_uni_w_hv16_8_neon: 802.2 put_hevc_qpel_uni_w_hv16_8_i8mm: 731.2 put_hevc_qpel_uni_w_hv32_8_c: 15518.5 put_hevc_qpel_uni_w_hv32_8_neon: 3085.2 put_hevc_qpel_uni_w_hv32_8_i8mm: 2783.2 put_hevc_qpel_uni_w_hv64_8_c: 57254.5 put_hevc_qpel_uni_w_hv64_8_neon: 11787.5 put_hevc_qpel_uni_w_hv64_8_i8mm: 10659.0 --- libavcodec/aarch64/hevcdsp_init_aarch64.c | 6 +++ libavcodec/aarch64/hevcdsp_qpel_neon.S | 47 +++++++++++++++-------- 2 files changed, 37 insertions(+), 16 deletions(-) diff --git a/libavcodec/aarch64/hevcdsp_init_aarch64.c b/libavcodec/aarch64/hevcdsp_init_aarch64.c index 0531db027b..e9ee901322 100644 --- a/libavcodec/aarch64/hevcdsp_init_aarch64.c +++ b/libavcodec/aarch64/hevcdsp_init_aarch64.c @@ -305,6 +305,11 @@ NEON8_FNPROTO(epel_uni_w_hv, (uint8_t *_dst, ptrdiff_t _dststride, int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width), _i8mm); +NEON8_FNPROTO_PARTIAL_5(qpel_uni_w_hv, (uint8_t *_dst, ptrdiff_t _dststride, + const uint8_t *_src, ptrdiff_t _srcstride, + int height, int denom, int wx, int ox, + intptr_t mx, intptr_t my, int width),); + NEON8_FNPROTO_PARTIAL_5(qpel_uni_w_hv, (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, int height, int denom, int wx, int ox, @@ -446,6 +451,7 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) NEON8_FNASSIGN(c->put_hevc_qpel, 1, 1, qpel_hv,); NEON8_FNASSIGN(c->put_hevc_qpel_uni, 1, 1, qpel_uni_hv,); + NEON8_FNASSIGN_PARTIAL_5(c->put_hevc_qpel_uni_w, 1, 1, qpel_uni_w_hv,); if (have_i8mm(cpu_flags)) { NEON8_FNASSIGN(c->put_hevc_epel, 0, 1, epel_h, _i8mm); diff --git a/libavcodec/aarch64/hevcdsp_qpel_neon.S b/libavcodec/aarch64/hevcdsp_qpel_neon.S index f285ab7461..df7032b692 100644 --- a/libavcodec/aarch64/hevcdsp_qpel_neon.S +++ b/libavcodec/aarch64/hevcdsp_qpel_neon.S @@ -4164,7 +4164,7 @@ qpel_hv neon_i8mm DISABLE_I8MM #endif -.macro QPEL_UNI_W_HV_HEADER width +.macro QPEL_UNI_W_HV_HEADER width, suffix ldp x14, x15, [sp] // mx, my ldr w13, [sp, #16] // width stp x19, x30, [sp, #-80]! @@ -4173,7 +4173,7 @@ DISABLE_I8MM stp x24, x25, [sp, #48] stp x26, x27, [sp, #64] mov x19, sp - mov x11, #9088 + mov x11, #(MAX_PB_SIZE*(MAX_PB_SIZE+8)*2) sub sp, sp, x11 mov x20, x0 mov x21, x1 @@ -4190,7 +4190,16 @@ DISABLE_I8MM mov w26, #-6 sub w26, w26, w5 // -shift mov w27, w13 // width - bl X(ff_hevc_put_hevc_qpel_h\width\()_8_neon_i8mm) +.ifc \suffix, neon +.if \width >= 32 + mov w6, #\width + bl X(ff_hevc_put_hevc_qpel_h32_8_neon) +.else + bl X(ff_hevc_put_hevc_qpel_h\width\()_8_\suffix) +.endif +.else + bl X(ff_hevc_put_hevc_qpel_h\width\()_8_\suffix) +.endif movrel x9, qpel_filters add x9, x9, x23, lsl #3 ld1 {v0.8b}, [x9] @@ -4552,33 +4561,39 @@ function hevc_put_hevc_qpel_uni_w_hv16_8_end_neon ret endfunc -#if HAVE_I8MM -ENABLE_I8MM - -function ff_hevc_put_hevc_qpel_uni_w_hv4_8_neon_i8mm, export=1 - QPEL_UNI_W_HV_HEADER 4 +.macro qpel_uni_w_hv suffix +function ff_hevc_put_hevc_qpel_uni_w_hv4_8_\suffix, export=1 + QPEL_UNI_W_HV_HEADER 4, \suffix b hevc_put_hevc_qpel_uni_w_hv4_8_end_neon endfunc -function ff_hevc_put_hevc_qpel_uni_w_hv8_8_neon_i8mm, export=1 - QPEL_UNI_W_HV_HEADER 8 +function ff_hevc_put_hevc_qpel_uni_w_hv8_8_\suffix, export=1 + QPEL_UNI_W_HV_HEADER 8, \suffix b hevc_put_hevc_qpel_uni_w_hv8_8_end_neon endfunc -function ff_hevc_put_hevc_qpel_uni_w_hv16_8_neon_i8mm, export=1 - QPEL_UNI_W_HV_HEADER 16 +function ff_hevc_put_hevc_qpel_uni_w_hv16_8_\suffix, export=1 + QPEL_UNI_W_HV_HEADER 16, \suffix b hevc_put_hevc_qpel_uni_w_hv16_8_end_neon endfunc -function ff_hevc_put_hevc_qpel_uni_w_hv32_8_neon_i8mm, export=1 - QPEL_UNI_W_HV_HEADER 32 +function ff_hevc_put_hevc_qpel_uni_w_hv32_8_\suffix, export=1 + QPEL_UNI_W_HV_HEADER 32, \suffix b hevc_put_hevc_qpel_uni_w_hv16_8_end_neon endfunc -function ff_hevc_put_hevc_qpel_uni_w_hv64_8_neon_i8mm, export=1 - QPEL_UNI_W_HV_HEADER 64 +function ff_hevc_put_hevc_qpel_uni_w_hv64_8_\suffix, export=1 + QPEL_UNI_W_HV_HEADER 64, \suffix b hevc_put_hevc_qpel_uni_w_hv16_8_end_neon endfunc +.endm + +qpel_uni_w_hv neon + +#if HAVE_I8MM +ENABLE_I8MM + +qpel_uni_w_hv neon_i8mm DISABLE_I8MM #endif -- 2.39.3 (Apple Git-146) _______________________________________________ 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".