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 C54C840A8D for ; Sat, 5 Mar 2022 23:08:59 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8C47B68B0AE; Sun, 6 Mar 2022 01:08:56 +0200 (EET) Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0F0B568AFEC for ; Sun, 6 Mar 2022 01:08:49 +0200 (EET) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 199AE100002 for ; Sat, 5 Mar 2022 23:08:48 +0000 (UTC) Date: Sun, 6 Mar 2022 00:08:48 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220305230848.GI2829255@pb2> References: <20220303120645.13076-1-martin@martin.st> <20220304200900.GF2829255@pb2> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] libavfilter: vf_scale: Properly take in->color_range into account 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: multipart/mixed; boundary="===============4399719311000257065==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4399719311000257065== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TEbJ1QKNuxkzt0cH" Content-Disposition: inline --TEbJ1QKNuxkzt0cH Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 05, 2022 at 11:33:15PM +0200, Martin Storsj=F6 wrote: > On Fri, 4 Mar 2022, Michael Niedermayer wrote: >=20 > > On Thu, Mar 03, 2022 at 02:06:45PM +0200, Martin Storsj=F6 wrote: > > > While swscale can be reconfigured with sws_setColorspaceDetails, > > > the in/out ranges also need to be set before calling > > > sws_init_context, otherwise the initialization might choose > > > fastpaths that don't take the ranges into account. > > >=20 > > > Therefore, look at in->color_range too, when deciding on whether > > > the scaler needs to be reconfigured. > > >=20 > > > Add a new member variable for keeping track of this, for being > > > able to differentiate between whether the scale filter parameter > > > "in_range" has been set (which should override whatever the input > > > frame has set) or whether it has been configured based on the > > > latest frame (which should trigger reconfiguring the scaler if > > > the input frame ranges change). > > >=20 > > > Signed-off-by: Martin Storsj=F6 > > > --- > > > To test this (without risking running many conflicting swscale > > > filters in one filter pipeline), we'd need to be able to tag > > > the incoming raw yuv data with colorspace and range without setting > > > the in_color_matrix and in_range options on the scale filter. > > >=20 > > > When using the rawvideo demuxer, the pixel format is set via the > > > ffmpeg -pix_fmt option, but there's no corresponding option for > > > setting color matrix or range for it. > > > --- > > > libavfilter/vf_scale.c | 13 +++++++++++++ > > > 1 file changed, 13 insertions(+) > >=20 > > This changes the output for: > > ffmpeg -i tickets/524/AVCI50.mov -vframes 3 file-avci50dec.nut > > ffmpeg -i tickets/4493/AVCI100.mov -vframes 3 file-avci100dec.nut > >=20 > > https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket524/ > >=20 > > Is that intended ? > >=20 > > - 233903 file-avci100dec.nut > > - 383853 file-avci50dec.nut > > + 196558 file-avci100dec.nut > > + 333893 file-avci50dec.nut >=20 > Looks like these source files have full range content; for any data with > full range input, this patch makes sure it uses the right intended > conversion through swscale. So yes, I guess it's expected that these > conversions change. patch ok then thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have never wished to cater to the crowd; for what I know they do not approve, and what they approve I do not know. -- Epicurus --TEbJ1QKNuxkzt0cH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYiPtfAAKCRBhHseHBAsP q1zdAJ9vyOHO3f0rgbwAV9eu5A9O9yrCGACfdi5rihpLVqEBKN1MrxGvDso29CE= =XpTc -----END PGP SIGNATURE----- --TEbJ1QKNuxkzt0cH-- --===============4399719311000257065== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============4399719311000257065==--