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 8E1AF44C6F for ; Mon, 14 Nov 2022 13:35:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DAEB768BDEF; Mon, 14 Nov 2022 15:35:35 +0200 (EET) Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4C4C268BDD5 for ; Mon, 14 Nov 2022 15:35:29 +0200 (EET) Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-13ae8117023so12447221fac.9 for ; Mon, 14 Nov 2022 05:35:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=bZ4+F+gjLNqrEMu5YpWpEzzrXCYc8gMVyICn8h7IFx8=; b=bnsUy1te6jHWJUAARegiKl3TsIH/zaLDFBpK6MD2YtO2hdIx4T83ZaqiGir+5sxZNA ShsV2ioShaQs0X/IA6EmZ+XZvv0rLpol/wjw6nemkA+O2lNpdo22H7dxbDRU/4kHlrqm DFE8/U9prn8zshg5NttSMRF9xtdEUsNgwW74UM4/ECk01Ab0UEpZvgqnB3DdIe+Ife5C lZgw7U54eVMfXb+ppmhg9Lqf9Bq9K/lhdpY5+KOfkBdtWqzT4wIUobvw8oV3cmsuIIPq v0CNIQ8oeBSFCw2ILClsYUohMf/ZR99jHBbI71wK0s32LMadP+BRB8YBeJR89Vg7ITfe dO3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bZ4+F+gjLNqrEMu5YpWpEzzrXCYc8gMVyICn8h7IFx8=; b=N5G82T8JUW53v98wlJmHwoa+qUtboJGxWbH1iGkSXCFb78Mdkw0w/arSA8kMoy6eQF wtcdmoPC6VsJjq2RLT2TgoH+/mpjATLWXo+Y4hIrfvzYCbedTlVJ+3hirvBgNmf0dsix b1CqWTWEuRk2rPxWMsC+p5yRKNvS1Lob4EQTrEcpQzaOE1lEG7oHYUXx/VN0abARKMr3 HMOEXxlp2KihICKO6o1vAvN71LIn6rndcFGSOUNTRXEhTdwG055m3W5eYomIapLiUIv5 IHQTxjZCrbZVAPi4Wcf6bl7Uj3LVLD9memf6uiVxWHCbO3q+ljN0eL7svH2sXEuwlZcM JMEQ== X-Gm-Message-State: ANoB5plrmoHclioG3YBdBqu9whXWqSG6KSDZ64IkAb2g7ZZ5VZCwVCcG 1cVIboQpj+0a+F31IC3b3wnGKIhX704= X-Google-Smtp-Source: AA0mqf6iaVJyoeCQNEolb6cXmltixpPllJmDrm5OhdcpZVyFn8KVs3kEN/K0/nFhrBuPKuz0Ev9ZEg== X-Received: by 2002:a05:6870:be94:b0:13c:476:69 with SMTP id nx20-20020a056870be9400b0013c04760069mr6768933oab.20.1668432927435; Mon, 14 Nov 2022 05:35:27 -0800 (PST) Received: from [192.168.0.15] ([181.85.72.69]) by smtp.gmail.com with ESMTPSA id bu7-20020a0568300d0700b0066cf6a14d1asm4162053otb.23.2022.11.14.05.35.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Nov 2022 05:35:26 -0800 (PST) Message-ID: <345301fa-4a3d-f131-4974-53b65b7c2adb@gmail.com> Date: Mon, 14 Nov 2022 10:35:47 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20221104082925.25598-1-bin.wang@intel.com> From: James Almer In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v7] libavfilter/x86/vf_convolution: add sobel filter optimization and unit test with intel AVX512 VNNI 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 11/14/2022 10:30 AM, Wang, Bin wrote: >> By using xmm# you're not taking into account any x86inc SWAPing, so this is >> using xmm0 and xmm1 where the single scalar float input arguments reside (at >> least on unix64), instead of xm0 and xm1 (xmm16 and xmm17) where the >> broadcasted scalars were stored. >> This, again, only worked by chance on unix64 because you're using scalar fmadd, >> and shouldn't work at all on win64. >> >> Also, all these as is are being encoded as VEX, not EVEX, but it should be fine >> leaving them untouched instead of using xm#, since they will be shorter (five >> bytes instead of six for some) by using the lower, non callee-saved regs. > > Thanks for the help. I'm not familiar with WIN64 asm. So what I need to do is change the WIN64 swap from: > SWAP xmm0, xmm2 > SWAP xmm1, xmm3 > To: > VBROADCASTSS m0, xmm2 > VBROADCASTSS m1, xmm3 > > Is that correct? Yes, that will ultimately broadcast the two scalars in xmm2 and xmm3 to zmm16 and zmm17. After that what you need to do is either change the fmaddss instruction to use xm0 and xm1 macros instead of xmm0 and xmm1 (so xmm16 and xmm17 with EVEX encoding is used), or much like the broadcast above use xmm2 and xmm3 explicitly on win64, so it remains VEX encoded. _______________________________________________ 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".