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 BF8BA4780B for ; Fri, 22 Sep 2023 22:33:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9670F68C92F; Sat, 23 Sep 2023 01:33:43 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C4D6368C87F for ; Sat, 23 Sep 2023 01:33:37 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1EF61FF802 for ; Fri, 22 Sep 2023 22:33:36 +0000 (UTC) Date: Sat, 23 Sep 2023 00:33:36 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230922223336.GB3543730@pb2> References: <20230726235916.30058-1-michael@niedermayer.cc> <20230922192204.GC8640@pb2> <20230922212616.GH8640@pb2> <20230922215215.GA3543730@pb2> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 1/4] avcodec/rtv1: Check if the minimal size is available in decode_rtv1() 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="===============8111335829487205285==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8111335829487205285== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZoaI/ZTpAVc4A5k6" Content-Disposition: inline --ZoaI/ZTpAVc4A5k6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 23, 2023 at 12:01:17AM +0200, Paul B Mahol wrote: > On 9/22/23, Michael Niedermayer wrote: > > On Fri, Sep 22, 2023 at 11:30:37PM +0200, Paul B Mahol wrote: > >> On 9/22/23, Michael Niedermayer wrote: > >> > On Fri, Sep 22, 2023 at 09:32:47PM +0200, Paul B Mahol wrote: > >> >> On 9/22/23, Michael Niedermayer wrote: > >> >> > On Thu, Jul 27, 2023 at 01:59:13AM +0200, Michael Niedermayer wro= te: > >> >> >> Signed-off-by: Michael Niedermayer > >> >> >> --- > >> >> >> libavcodec/rtv1.c | 6 +++++- > >> >> >> 1 file changed, 5 insertions(+), 1 deletion(-) > >> >> > > >> >> > will apply 1-3 of this patchset > >> >> > >> >> Are you sure this does not break decoding? > >> > > >> > Well, its a loop over 4x4 blocks, a 16bit "skip" run so the minimum > >> > check looks correct. > >> > There are 2 end of bitstream checks for early exit but they look like > >> > error handling not some normal exit as they leave the frame > >> > uninitialized > >> > > >> > >> FFmpeg default initialization code for AVFrame's buffers does it > >> twice, so they are always zeroed or previous values of previous > >> buffers in pool. > > > > its rare that correct frame decoding depends on internal AVFrame buffer > > ordering > > >=20 > Users are supposed to use error checking. And I think decoder returns > error on missing frame data. yes, the rtv1 decoder looks a bit sloppy written, not returning error codes on what looks like error checks. Its not the only code doing that, ive seen this in other files too >=20 > When we lost interest in preserving all decoded frame pixels as much > as possible? when patches using discard_damaged_percentage where getting blocked in revi= ew while simpler but less ideal solutions made all reviewers happy I can implement this using discard_damaged_percentage, then the user can decide at which point a frame would be too damaged to decode/return and also to drop none or all with damage as the user prefers thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Homeopathy is like voting while filling the ballot out with transparent ink. Sometimes the outcome one wanted occurs. Rarely its worse than filling out a ballot properly. --ZoaI/ZTpAVc4A5k6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZQ4WOwAKCRBhHseHBAsP q3T5AJ9c5S+NEwiSBiFqcjJc1E/ZZBGT2wCeNXptUaxPUsfu1rpj3sNIYZNIs5s= =0LH3 -----END PGP SIGNATURE----- --ZoaI/ZTpAVc4A5k6-- --===============8111335829487205285== 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". --===============8111335829487205285==--