From: "Helmrich, Christian" <christian.helmrich@hhi.fraunhofer.de> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: "Stoffers, Christian" <christian.stoffers@hhi.fraunhofer.de> Subject: Re: [FFmpeg-devel] [PATCH] Request for adding XPSNR avfilter Date: Wed, 11 Jan 2023 16:53:58 +0000 Message-ID: <b54ae1386c664c7da7b5f4caa03793f1@hhi.fraunhofer.de> (raw) In-Reply-To: <CAPYw7P6b4aXhhBQOyPxVCK1OtFjqu1zJ9RpNe4dy6xZq33rPSg@mail.gmail.com> 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? Best, Christian Helmrich Fraunhofer HHI, Video Coding and Analytics Department ________________________________ Von: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> im Auftrag von Paul B Mahol <onemda@gmail.com> 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 <onemda@gmail.com> wrote: > On 1/11/23, Helmrich, Christian <christian.helmrich@hhi.fraunhofer.de> > 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 <ffmpeg-devel-bounces@ffmpeg.org> im Auftrag von Paul B >> Mahol <onemda@gmail.com> >> 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 <christian.helmrich@hhi.fraunhofer.de> >> 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".
next prev parent reply other threads:[~2023-01-11 16:54 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-10 19:39 Helmrich, Christian 2023-01-10 20:43 ` Paul B Mahol 2023-01-11 11:42 ` Helmrich, Christian 2023-01-11 11:48 ` Paul B Mahol 2023-01-11 11:53 ` Paul B Mahol 2023-01-11 16:53 ` Helmrich, Christian [this message] 2023-01-11 18:33 ` Paul B Mahol 2023-01-11 19:15 ` Helmrich, Christian 2023-01-17 13:46 ` Helmrich, Christian
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=b54ae1386c664c7da7b5f4caa03793f1@hhi.fraunhofer.de \ --to=christian.helmrich@hhi.fraunhofer.de \ --cc=christian.stoffers@hhi.fraunhofer.de \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git