From patchwork Wed Feb 23 08:57:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wu, Jianhua" X-Patchwork-Id: 34469 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:d078:0:0:0:0 with SMTP id x24csp633213nkx; Wed, 23 Feb 2022 00:58:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjaIbZunlatadY5/1sDDKwxNVFniend7KSVwJyqIlsjkaDzS9Ctoz3Q4/l/tnIg39Qz253 X-Received: by 2002:a17:906:354f:b0:6b4:1449:2d03 with SMTP id s15-20020a170906354f00b006b414492d03mr23201749eja.197.1645606721623; Wed, 23 Feb 2022 00:58:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645606721; cv=none; d=google.com; s=arc-20160816; b=usCbFGDNXkTBtpKGGrStktvBy8Jur1Wdtr5FBzKKrI09IfKUTCHx88MJD1vegFcQhm RPZe7fGGlyRiB6AtPFjM7z99hCbIHZxBtKCvqr2jnBPSNtRAYjm2YY8sDpIMyc6y/WeW JY2cgGP1vOwAfdY80uIA3rTpHu3J0koiW8eWDqIrotPtur0//sLro0DlBWl3dDleoHxu hMV+zLdY6Lb28IqggtjC+gk0QiIBZk+gvkHcbouE15tTwd01lJKPM3OBzxLBFRajpyP6 ViJygckMlRyvAGuTUKep9rHdhaEDefTIL8Wibu0QDpUnBk/iadC6tYknnUjk3aW9BpIG Z01w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=9JY1fQtxQ6kIMrzpwvqIDKHIiS/P3bjv1gb49OCT6Fs=; b=VDwTEpXAMhhlIvijoOAEHtXRTAROmZ6w3HPSuv4BawTBAV3T3ulNsJYGnHQOJrM08Q o1WLOfDMtqRtkewn0jMMOWHk5MCShpZRFQ0+o9RJmf9WaaYd/+TAJSHEca9JTpAE7i8y +PFLEn8JcPwfqQPUKy8Qtcx+XebxT/SY3t1gZ0WgVGvSlOh686UV0sDHB671uA7a8Due p5WaL0XujUA7MKz3C34lXj8g8Nv1tozwl04G5fhdtKh4uxouvRQTD2tPKjcMxmg14m++ o3V/gy4pWCiI0fp6wUXgmMwNUquFAujIYdfCU+RXoxaNbOOOfY+W54Q2cyoeYEbg1kI/ T2gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=esCShk+u; 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 j20si5683591ejc.589.2022.02.23.00.58.41; Wed, 23 Feb 2022 00:58:41 -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=@intel.com header.s=Intel header.b=esCShk+u; 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 9C96068B2A8; Wed, 23 Feb 2022 10:58:02 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B7C6268B299 for ; Wed, 23 Feb 2022 10:57:55 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645606681; x=1677142681; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=vD2G+o/sXOO9UppY5r2QrQw6vcDToneOKELj8Fb7E38=; b=esCShk+uZ5tNYN0Mp8xn0/IVlQUlJ/jEDxv2Kz/TF+qiFZdYizzCOiWC dAKLFShszcpM+/ZNESVr3Gfyhmxi2JjqDiuBd2VBaJZGNNq+A3F6FvI2A kP8J3NMJUQgbQILuur2l9mwMdeT1fPf0AWIV93A4gC3bNDKPU+tN9/ktn 3U52xXSA42kzw4XDh7YbFt9zV+gfGak3WcDkTsoCqnqTnS7w19fSaXmBm eJqNn7r4agY+MGhgzpQbwgyCalTNkN5i4lsuYZR9Nt3feGRZeHlqg1+rx 1+QkH9uUMiiNCqWf29UiL6jdR5P4nTfwd5yXvshghTAcoAlCi3ez5/5yj w==; X-IronPort-AV: E=McAfee;i="6200,9189,10266"; a="235427237" X-IronPort-AV: E=Sophos;i="5.88,390,1635231600"; d="scan'208";a="235427237" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 00:57:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,390,1635231600"; d="scan'208";a="628005802" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by FMSMGA003.fm.intel.com with ESMTP; 23 Feb 2022 00:57:48 -0800 From: jianhua.wu-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Wed, 23 Feb 2022 16:57:34 +0800 Message-Id: <20220223085735.70854-5-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220223085735.70854-1-jianhua.wu@intel.com> References: <20220223085735.70854-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 5/6] avcodec/x86/hevc_mc: add qpel_h32_8_avx512icl 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: qkjEm4lLSRx5 From: Wu Jianhua ff_hevc_put_hevc_qpel_h32_8_sse4 14122151 ff_hevc_put_hevc_qpel_h32_8_avx2 9337675 ff_hevc_put_hevc_qpel_h32_8_avx512icl 6424654 Signed-off-by: Wu Jianhua --- libavcodec/x86/hevc_mc.asm | 7 +++++++ libavcodec/x86/hevcdsp.h | 1 + libavcodec/x86/hevcdsp_init.c | 1 + 3 files changed, 9 insertions(+) diff --git a/libavcodec/x86/hevc_mc.asm b/libavcodec/x86/hevc_mc.asm index 25880b8858..4cf5dcd338 100644 --- a/libavcodec/x86/hevc_mc.asm +++ b/libavcodec/x86/hevc_mc.asm @@ -91,6 +91,7 @@ QPEL_TABLE 4, 1, b, avx512icl_h QPEL_TABLE 8, 1, b, avx512icl_h QPEL_TABLE 8, 1, d, avx512icl_v QPEL_TABLE 16, 1, b, avx512icl_h +QPEL_TABLE 32, 1, b, avx512icl_h pb_qpel_shuffle_index: db 0, 1, 2, 3 db 1, 2, 3, 4 @@ -1765,6 +1766,11 @@ cglobal hevc_put_hevc_qpel_h%1_%2, 5, 6, 8, dst, src, srcstride, height, mx, tmp %else vpmovdw ym6, m6 movu [dstq], ym6 +%endif +%if %1 == 32 + QPEL_H_LOAD_COMPUTE 7, srcq + 16 - 3 + vpmovdw ym7, m7 + movu [dstq + 32], ym7 %endif LOOP_END dst, src, srcstride RET @@ -1843,6 +1849,7 @@ HEVC_PUT_HEVC_QPEL_HV_AVX512ICL 8, 8 INIT_ZMM avx512icl HEVC_PUT_HEVC_QPEL_AVX512ICL 16, 8 +HEVC_PUT_HEVC_QPEL_AVX512ICL 32, 8 %endif %endif diff --git a/libavcodec/x86/hevcdsp.h b/libavcodec/x86/hevcdsp.h index 51ffdc9628..8d3c3cc75f 100644 --- a/libavcodec/x86/hevcdsp.h +++ b/libavcodec/x86/hevcdsp.h @@ -236,6 +236,7 @@ WEIGHTING_PROTOTYPES(12, sse4); void ff_hevc_put_hevc_qpel_h4_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); void ff_hevc_put_hevc_qpel_h8_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); void ff_hevc_put_hevc_qpel_h16_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); +void ff_hevc_put_hevc_qpel_h32_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); void ff_hevc_put_hevc_qpel_hv8_8_avx512icl(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); /////////////////////////////////////////////////////////////////////////////// diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index be1484d06e..e9002c8b15 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -882,6 +882,7 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->put_hevc_qpel[1][0][1] = ff_hevc_put_hevc_qpel_h4_8_avx512icl; c->put_hevc_qpel[3][0][1] = ff_hevc_put_hevc_qpel_h8_8_avx512icl; c->put_hevc_qpel[5][0][1] = ff_hevc_put_hevc_qpel_h16_8_avx512icl; + c->put_hevc_qpel[7][0][1] = ff_hevc_put_hevc_qpel_h32_8_avx512icl; c->put_hevc_qpel[3][1][1] = ff_hevc_put_hevc_qpel_hv8_8_avx512icl; } } else if (bit_depth == 10) {