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 70B4045F6F for ; Wed, 19 Apr 2023 21:06:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 050B768BE9B; Thu, 20 Apr 2023 00:06:17 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 92C5068B36D for ; Thu, 20 Apr 2023 00:06:10 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 455C72404EE for ; Wed, 19 Apr 2023 23:06:10 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id GCQMx2cojZqP for ; Wed, 19 Apr 2023 23:06:09 +0200 (CEST) Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 8324C2404EC for ; Wed, 19 Apr 2023 23:06:09 +0200 (CEST) Received: by lain.khirnov.net (Postfix, from userid 1000) id 66F511601B2; Wed, 19 Apr 2023 23:06:09 +0200 (CEST) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20230419205302.GU275832@pb2> References: <20230419194832.757-1-anton@khirnov.net> <20230419205302.GU275832@pb2> Mail-Followup-To: FFmpeg development discussions and patches Date: Wed, 19 Apr 2023 23:06:09 +0200 Message-ID: <168193836938.9711.9672747873724950733@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [RFC/PATCH] fftools/ffmpeg: stop printing PSNR information in status report 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-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: Quoting Michael Niedermayer (2023-04-19 22:53:02) > On Wed, Apr 19, 2023 at 09:48:32PM +0200, Anton Khirnov wrote: > > When an encoder exports sum-of-squared-differences information in > > encoded packets, print_report() will print PSNR information in the > > status line. However, > > > * the code computing PSNR assumes 8bit 420 video and prints incorrect > > values otherwise; there are no issues on trac about this > > Are the values in the "otherwise" case maybe good enough so they > worked for people with noone noticing ? While working on this with a 10bit sample I was suprised this code and vf_psnr showed significantly different values (IIRC not even the first digit was accurate) and it took me a while to realize the scaling made the assumptions it did. > > * only a few encoders (namely aom, vpx, mpegvideo, snow) export this > > information; other often-used encoders such as libx26[45] do not > > export this, even though they could > > > > This suggests that this feature is not useful and it is better to remove > > it rather than spend effort on fixing it. > > --- > > I needed to resolve this code's interaction with encoders as a part of > > my multithreading work and spent a few hours on it. Making it work > > correctly in all cases seems nontrivial and duplicates a lot of the > > logic from vf_psnr. > > Can anything missing in vf_psnr be added into it and then vf_psnr used ? > I agree that duplicating PSNR code and logic is bad Nothing is missing in vf_psnr AFAIK, the difference is that these values are produced directly by the encoder, so you don't need a decoding+filtering pass to obtain the numbers. The question more broadly is - what is this supposed to be useful for? PSNR is a highly flawed metric and AFAIU state of the art moved several generations away from it. And for a quick-and-dirty quality estimate, the bitrate and QP might be more informative for most users, and are supported by more encoders. So what is the point of printing this information? -- Anton Khirnov _______________________________________________ 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".