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 0EF5C4C309 for ; Wed, 24 Jul 2024 19:43:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 961BD68D6E1; Wed, 24 Jul 2024 22:42:58 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7762668D61A for ; Wed, 24 Jul 2024 22:42:52 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id BBD731BF203 for ; Wed, 24 Jul 2024 19:42:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1721850171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MdTi3vUKvw8tYeg45pQxYenrMF1z/wSl5YMkKZSflso=; b=Zd17EUIbaKMtXHtiovcaSiHYrWvq2VUpAXSVGXDS4KPtYhaAVffwXu/OT1traSDn5OW9Mw xFDDVMg1KRuF9gAFUu5ibLF5VDhXUgqW8y1HpPBgpNbFinsdXPpEcpawuQIRttu4jFaJ3A QM7xMbZKB3R/APoSLwCBay6HujmHLux++YL096tnbOwZm2ZJSxLUnFFc5sALnnrM7x1WFx ipqQMG8DesdP7Uw4OMdp4H1LD0GGIlWhLcoUMyTGRmqvP50sJRJhxC/ydVzJU5+q4MRfA/ su5Le7ipK+6y159zpS9DrJ5cIWsfbBFKnUfAHDC4jGsvQeMvdznN3/kGRZ2MdQ== Date: Wed, 24 Jul 2024 21:42:51 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240724194251.GB4991@pb2> References: <20240716171155.31838-1-anton@khirnov.net> <20240716171155.31838-22-anton@khirnov.net> MIME-Version: 1.0 In-Reply-To: <20240716171155.31838-22-anton@khirnov.net> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 22/39] lavc/ffv1enc: stop using per-slice FFV1Context 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="===============2818345562943477781==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2818345562943477781== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QwqEysHDLt9UhJtE" Content-Disposition: inline --QwqEysHDLt9UhJtE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 16, 2024 at 07:11:37PM +0200, Anton Khirnov wrote: > All remaining accesses to them are for fields that have the same value > in the main encoder context. > --- > libavcodec/ffv1enc.c | 57 ++++++++++++++++------------------- > libavcodec/ffv1enc_template.c | 24 +++++++-------- > 2 files changed, 37 insertions(+), 44 deletions(-) [...] > +RENAME(encode_line)(FFV1Context *f, FFV1SliceContext *sc, > int w, TYPE *sample[3], int plane_index, int bits) > { > PlaneContext *const p =3D &sc->plane[plane_index]; > @@ -36,12 +35,12 @@ RENAME(encode_line)(FFV1Context *f, > =20 > if (f->ac !=3D AC_GOLOMB_RICE) { > if (c->bytestream_end - c->bytestream < w * 35) { > - av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n"); > + av_log(f->avctx, AV_LOG_ERROR, "encoded frame too large\n"); > return AVERROR_INVALIDDATA; > } > } else { > if (put_bytes_left(&sc->pb, 0) < w * 4) { > - av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n"); > + av_log(f->avctx, AV_LOG_ERROR, "encoded frame too large\n"); > return AVERROR_INVALIDDATA; > } > } > @@ -73,7 +72,7 @@ RENAME(encode_line)(FFV1Context *f, > diff =3D fold(diff, bits); > =20 > if (f->ac !=3D AC_GOLOMB_RICE) { > - if (s->flags & AV_CODEC_FLAG_PASS1) { > + if (f->flags & AV_CODEC_FLAG_PASS1) { > put_symbol_inline(c, p->state[context], diff, 1, sc->rc_= stat, > sc->rc_stat2[p->quant_table_index][con= text]); > } else { > @@ -103,7 +102,7 @@ RENAME(encode_line)(FFV1Context *f, > } > } > =20 > - ff_dlog(s->avctx, "count:%d index:%d, mode:%d, x:%d pos:%d\n= ", > + ff_dlog(f->avctx, "count:%d index:%d, mode:%d, x:%d pos:%d\n= ", > run_count, run_index, run_mode, x, > (int)put_bits_count(&sc->pb)); > =20 iam not sure if carrying a 2nd pointer around in the loops in encode_line()= for ac/flags/avctx is worth it. IMHO these could be either on teh stack or in t= he slice context thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is dangerous to be right in matters on which the established authorities are wrong. -- Voltaire --QwqEysHDLt9UhJtE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZqFZNwAKCRBhHseHBAsP q+yGAJ4rvMqnZPGFTbFIHoNr8Fj9oMf/ygCdFdzScOlnD12si+6gHD6fh/AEP1Y= =opau -----END PGP SIGNATURE----- --QwqEysHDLt9UhJtE-- --===============2818345562943477781== 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". --===============2818345562943477781==--