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 A80DD4230E for ; Fri, 4 Mar 2022 20:09:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E336E68B1A3; Fri, 4 Mar 2022 22:09:09 +0200 (EET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2A71368B0DB for ; Fri, 4 Mar 2022 22:09:03 +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 318B3C0007 for ; Fri, 4 Mar 2022 20:09:01 +0000 (UTC) Date: Fri, 4 Mar 2022 21:09:00 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220304200900.GF2829255@pb2> References: <20220303120645.13076-1-martin@martin.st> MIME-Version: 1.0 In-Reply-To: <20220303120645.13076-1-martin@martin.st> 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="===============1390768467374273400==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1390768467374273400== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Dmk7Jk93m0XdX0GP" Content-Disposition: inline --Dmk7Jk93m0XdX0GP Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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(+) 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 https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket524/ Is that intended ? - 233903 file-avci100dec.nut - 383853 file-avci50dec.nut + 196558 file-avci100dec.nut + 333893 file-avci50dec.nut thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB "I am not trying to be anyone's saviour, I'm trying to think about the future and not be sad" - Elon Musk --Dmk7Jk93m0XdX0GP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYiJx2QAKCRBhHseHBAsP qxYBAJ9wOOnp25uce6sbG2hV//efTCx7EQCfWBoLdLYpdUJcpFa4voP4snQag/0= =CSiI -----END PGP SIGNATURE----- --Dmk7Jk93m0XdX0GP-- --===============1390768467374273400== 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". --===============1390768467374273400==--