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 032B047C3D for ; Fri, 13 Oct 2023 23:00:59 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BE3EE68C832; Sat, 14 Oct 2023 02:00:57 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3DCB568C709 for ; Sat, 14 Oct 2023 02:00:51 +0300 (EEST) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id E450443518 for ; Sat, 14 Oct 2023 01:00:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1697238051; bh=lscADBzXaVvjVvkoO9rOSul0iPpGhGzsR975Bt+dSw4=; h=Date:From:To:Subject:In-Reply-To:References:From; b=Zz2/q/MayH1QkI6puzlZsuaTo7morrlutteCVQHIOihFyyvfXK1U6g88ZlUKAdcVr qPf4PGh1R3Z8eybqZzLf8Kn2GkxwPeG45oxMsKmHGroOIWIK2/PV7JKH6+x3pw4FO2 GWcDKpSglfixmQNRk3bYMDPD2APV0NqC9rgV0/+s= Date: Sat, 14 Oct 2023 01:00:50 +0200 Message-ID: <20231014010050.GC129318@haasn.xyz> From: Niklas Haas To: FFmpeg development discussions and patches In-Reply-To: <20231013225223.GS3543730@pb2> References: <20231013142205.60658-1-ffmpeg@haasn.xyz> <20231013225223.GS3543730@pb2> MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [FFmpeg-devel] [PATCH] avfilter/vf_scale: fix interlaced chroma for other formats 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: On Sat, 14 Oct 2023 00:52:23 +0200 Michael Niedermayer wrote: > On Fri, Oct 13, 2023 at 04:22:05PM +0200, Niklas Haas wrote: > > From: Niklas Haas > > > > This logic only covers the case of yuv420p. Extend this logic to cover > > *all* vertically subsampled YUV formats, which require the same > > interlaced scaling logic. > > > > Fortunately, we can get away with re-using the same code for both JPEG > > and MPEG range YUV, because the only difference here is the horizontal > > alignment. (To be fixed in a separate commit) > > --- > > libavfilter/vf_scale.c | 12 +++++++----- > > 1 file changed, 7 insertions(+), 5 deletions(-) > > the patches from H4JO.txt > cause several fate tests to worsen in their stddev. like: I investigated these regressions and came to the conclusion that the raw input to those tests use mpeg1/jpeg/center-aligned chroma, but the rawvideo demuxer does not tag them as such. So this change in logic (i.e. treating unspecified yuv as mpeg2/mpeg4 chroma loc instead of mpeg1/jpeg chroma loc) regresses those tests by design. A solution would either to continue treating unspecified yuv as mpeg1/jpeg chroma loc (status quo), or change the FATE test to explicitly mark the rawvideo source as center chroma. That said, if the status quo for the past decades is to for vf_scale treat unspecified chroma loc as center-aligned, I am no longer sure if suddenly changing this behavior is a good idea. At the same time, this is also terribly inconsistent across implementations. For example, VLC treats all chroma as center-aligned (ignoring tags), mpv treats untagged *limited range* yuv as mpeg2/left-aligned (and full range as mpeg1/jpeg/center), while libplacebo treats all untagged yuv as mpeg2/left-aligned. There really is no consistent standard here across software, and I haven't even looked at what proprietary players do. _______________________________________________ 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".