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 7E75144F49 for ; Wed, 11 Jan 2023 18:34:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 853FE68B903; Wed, 11 Jan 2023 20:34:03 +0200 (EET) Received: from mail-vk1-f176.google.com (mail-vk1-f176.google.com [209.85.221.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9A3B068ADF2 for ; Wed, 11 Jan 2023 20:33:56 +0200 (EET) Received: by mail-vk1-f176.google.com with SMTP id l129so6775611vkh.6 for ; Wed, 11 Jan 2023 10:33:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sVQbRJp6adQ8RXffoE2068Yd/CXuQpLIiSbk/4PEXAc=; b=K9HXiAR5KBXNy3jWIuv9UsA8G2af0J0AexbeGbd6a/ROeE5Imj4i1YhSbHCcTsSsWl pBrsE4zRVKRXsTRJQTtVc7TVs2Q+4ehI/RJM7YvJQFSfSuhZ0NXAth9OfB/G3eK6lLt7 bID0/AqDjXk+gqf9VKY79mBgzJ5BJfL4ooqg7yGcMQvL98e6FCeMemdeOGd7DuMaFZTa Rzh5pQ2pLtRL0MF2AxhkVuFZfu1Npl4zqEe2oKnVMDbvbBvSjyWOybicH88ZUuLq1Nyk LaZCGfSAzatNa+lYvGoDKzwUX9hdApsOVNi8LYXT3DtjwfWyXa2q0o1WuvXeoXyoXs0q fP3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sVQbRJp6adQ8RXffoE2068Yd/CXuQpLIiSbk/4PEXAc=; b=wCBV6WJOJ81eyIVG5T3MJLf9nSl7LE4MI/jN3UK1Nq2Gmx3rqpFXJl7n6zXOYMqJ4g wZHfJD4Ht8L0aS9Sh2CIZeJpYZERcHdfBsdjta9krUDrjeAjMIAQhRV6hq6mA/AFFoYm G4xLnwIFAyvR7Zu+LSBgqMSN/GveCVsrM0DhxydxUkYRZwSpWUquD0KXkVWRxF57H00O J/03uH3+4SBwTpioLXA00EOnCT+YTcxZv4+R6Ihcew9tnjUFy6oVdVKik8mfbkAYSoiD UtiCZ6B47mM5sNTStsvMDIG9HgendHhhLfRiEBXeb+eslHoEgVKL3bchw6Y5bMZT1CZV kohw== X-Gm-Message-State: AFqh2krhXUGEZjVZH9Q9D7uLnGUDuZ6VBXJrG2Na7rftYRFJkwD6+J5O NADSX6Q+jR4emXnWmIjOx5YtFqCQayfNKg7TarS517Er X-Google-Smtp-Source: AMrXdXsR2dpJ+qiGPOI1EGln4y0+j0Pzeu0omin0EF2F0umLL6uvQohBm8xYnRWIL7lpavt1GzPI6JZqIK2wAPS7MyU= X-Received: by 2002:a1f:1c95:0:b0:3bc:9f94:d7f1 with SMTP id c143-20020a1f1c95000000b003bc9f94d7f1mr9298281vkc.21.1673462034862; Wed, 11 Jan 2023 10:33:54 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:612c:2428:b0:32a:5eaa:92e4 with HTTP; Wed, 11 Jan 2023 10:33:53 -0800 (PST) In-Reply-To: References: <4a40a9d140aa477fb34cf5704034bd4c@hhi.fraunhofer.de> From: Paul B Mahol Date: Wed, 11 Jan 2023 19:33:53 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] Request for adding XPSNR avfilter 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: "Stoffers, Christian" 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: On 1/11/23, Helmrich, Christian wrote: > Hi, > > >> Also please fix style of code, ... example vf_psnr.c filter ... "for () >> {\n" instead of "for () \n{\n}" > > > Done, I aligned block encapsulation, indentation, and some other things with > those in vf_psnr.c > > >> Compare clang compiled ffmpeg without this asm code and with it, and tell >> if any difference. > >> I'might do it anyway later. > > Strange, the asm code is now only barely (a few percent at most) faster than > the C-loop code on > our side. Maybe the compilers or CPUs have improved since we last tested? > Anway, we decided > to make a new patch without the asm file, but keep the function pointers in > case we manage to > write better SIMD for the highds, diff1st, and diff2nd function later (for a > smaller patch then). > > I prepared a new avfilter_xpsnr_v2.patch. Do I need to change the email > (thread) title somehow > so that a new pipeline is being triggered? Not needed, just attach patch with proper authorship, made with git format-patch. > > > Best, > > > Christian Helmrich > > Fraunhofer HHI, Video Coding and Analytics Department > > > ________________________________ > Von: ffmpeg-devel im Auftrag von Paul B > Mahol > Gesendet: Mittwoch, 11. Januar 2023 12:53 > An: FFmpeg development discussions and patches > Cc: Stoffers, Christian > Betreff: Re: [FFmpeg-devel] [PATCH] Request for adding XPSNR avfilter > > On 1/11/23, Paul B Mahol wrote: >> On 1/11/23, Helmrich, Christian >> wrote: >>> Hi, >>> >>> >>>> So its better to use that instead of human written assembly? Does clang >>>> generate faster code without this asm? >>> >>> >>> I'm not sure I fully understand your questions, but I hope the following >>> answers it. The reason why we auto-converted our intrinsics code to asm >>> is >>> not a technical one, we unfortunately just don't have the knowledge or >>> resources to manually write asm code. If I remember correctly, the SIMD >>> optimized code runs about twice as fast as the C code, especially on UHD >>> input. >> >> Compare clang compiled ffmpeg without this asm code and with it, and >> tell if any difference. >> I'might do it anyway later. > > Also please fix style of code, look at other filters in codebase, for > example vf_psnr.c filter > > Use "for () {\n" instead of "for () \n{\n}" > >> >>> >>> >>>> Please remove SLICE_THREADS related flag as there is no call to execute >>>> to >>>> filter in slices. Please remove stdbool.h header and adapt code to >>>> compile >>>> without it. >>> >>> >>> Done, please find attached a second version (v1) of the XPSNR avfilter >>> patch. >>> >>> >>> Thanks and best, >>> >>> >>> Christian Helmrich >>> >>> Fraunhofer HHI, Video Coding and Analytics Department >>> >>> >>> ________________________________ >>> Von: ffmpeg-devel im Auftrag von Paul >>> B >>> Mahol >>> Gesendet: Dienstag, 10. Januar 2023 21:43 >>> An: FFmpeg development discussions and patches >>> Cc: Stoffers, Christian >>> Betreff: Re: [FFmpeg-devel] [PATCH] Request for adding XPSNR avfilter >>> >>> On 1/10/23, Helmrich, Christian >>> wrote: >>>> Hi, >>>> >>>> please find attached a patch (relative to FFmpeg master as of early >>>> January >>>> 10, 2023) >>>> adding avfilter support for extended perceptually weighted peak >>>> signal-to-noise ratio >>>> (XPSNR) measurements for videos, as described in the related addition >>>> to >>>> filters.texi. >>>> >>>> The XPSNR code was originally vectorized using SIMD intrinsics, but we >>>> concluded that >>>> FFmpeg code requires asm instead of such intrinsics, so we let gcc >>>> auto-convert these >>> >>> So its better to use that instead of human written assembly? >>> Does clang generate faster code without this asm? >>> >>>> instructions to pure assembly; see the vf_xpsnr.asm file. If the added >>>> asm >>>> code is too >>>> lengthy, intrinsics would be possible, or something else is missing, >>>> please >>>> let us know. >>>> >>> >>> Please remove SLICE_THREADS related flag as there is no call to >>> execute to filter in slices. >>> Please remove stdbool.h header and adapt code to compile without it. >>> >>>> Best, >>>> >>>> Christian Helmrich and Christian Stoffers >>>> Fraunhofer HHI >>>> >>> _______________________________________________ >>> 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". >>> >> > _______________________________________________ > 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". > _______________________________________________ > 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". > _______________________________________________ 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".